Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by megabrobro · Sep 09, 2017 at 03:59 PM · unity 5transparencytransparent shadermuzzleflash

Applying partly transparent texture to a 3d model made in Blender.

Ok so I am making a gun muzzle flash for my FPS game. I've made a cube in Blender and scaled down one face so that it is like a pyramid. AFAIK there isnt any point for me to apply the texture in Blender, as the transpareny effects etc I add to Cycles wont work in my Unity project.

So, I imported just the blank pyramid shape, but it has the grey texture for the mesh. So I set the material in Unity to 'Transparency', and in albedo I added a gun flash texture which is a 2d image of the gun flare, with transparent edges (also the flare itself has an element of transparency).

But no matter what settings I try for the texture and the material, it doesnt work. I either make the entire mesh transparent or not, also for some reason the gun flare doesnt show on the object, It just makes the pyramid change colour (but in the material preview inspector the gun flare looks great).

I set the texture to be a sprite, then I tried default again. I checked/uncheecked the Alpha Is Transparency. I set the material to many things too , and none of them seem to work.

Has anyone got an idea of what I'm doing wrong? Many thanks

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Pangamini · Sep 09, 2017 at 04:08 PM

For a muzzle flash, you might want to use unlit additive shader. While standard shader set to transparency is still lit (acts eg. like a glass), muzzle flash is not affected by the scene lights at all. I don't have Unity here now so I can't check, but there should be Unlit/Additive or Particles/Additive shader included in standard shader package. These don't require an alpha channel for transparency, because they just add itself (the flash texture) to the background. Making the pixel black makes it invisible.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image megabrobro · Sep 09, 2017 at 04:11 PM 0
Share

thank you for your answer. I may end up doing this. However confusingly earlier I read that particle systems arent actually optimal for this because they arent shown from all angles or something like this. And apparently using a texture with alpha in gives a more realistic effect (apparently it was supposed to me more simple also lol)

Thanks again, I had been starting to think maybe i should explore the particle effects.

avatar image Pangamini megabrobro · Sep 09, 2017 at 04:13 PM 1
Share

Well it really depends on what kind of effect you are trying to achieve, but in general you will use additive blending for fire. Also, you are NOT supposed to use a particle system, just a particle system shader - which is also doing some extra stuff like applying vertex color, but that's going to be a negligible performance difference. Just apply it on your mesh.

avatar image Pangamini Pangamini · Sep 09, 2017 at 04:15 PM 1
Share

Optionally you can write your own unlit shader that can act both like additive and darkening (for smoke) but that's outside the scope here I guess.

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

139 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

can see inside object that is supposed to be fully opaque 0 Answers

White outline around tree leaves after upgrade to Unity 5 1 Answer

Problem with transparent shader 0 Answers

Transparency cutting opaque mesh 0 Answers

Seeing inside faces in transparent materials 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges