Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Gillissie · May 02, 2011 at 09:21 PM · shaderfbx

particles/multiply shader not working on fbx

I started by using a primitive "Plane" as the ground. I textured it with a diffuse shader for grass, and a particles/multiply shader for random splotchiness to distract from the grass tiling. It looks like this: http://dl.dropbox.com/u/6927019/ground1.png

This is good so far, except I want the ground to be more subdivided so I can adjust height by changing vertices. Since there is no way to specify that in Unity for the Plane primitive, I create one in Lightwave 3D, convert it to fbx (just like all my other 3D assets), and use that instead.

However, the particles/multiply shader on the fbx results in a black mesh instead of shading it as expected. THE QUESION: Why would the shader work on the primitive but not on the fbx?

I know that the fbx has UV coordinates because the diffuse shader works properly on it.

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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Gillissie · May 03, 2011 at 12:25 AM

I found that I could use the "Simple Additive" example from the documentation, and change the blend mode to multiply and get the effect I am after without using the particle shader.

http://unity3d.com/support/documentation/Components/SL-Blend.html

Comment
Add comment · Show 1 · 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 Bunny83 · May 03, 2011 at 12:56 AM 0
Share

I think that's even the best solution ;) The particle shaders use always the vertex color (it's used to tint each particle differently). If you mesh doesn't contain vertex colors it will be multiplied by (0,0,0,0) which results in black. The built-in meshes (cube, plane,...) have a white vertex color that's why it works with the built-in mesh. I'm glad you've found a solution that fits your needs.

avatar image
0

Answer by Bunny83 · May 02, 2011 at 09:37 PM

There's technically no difference between the built-in plane mesh and an imported mesh. There's probably something wrong with your mesh. Maybe:

  • your vertex normals point into the wrong direction. Try the Unity generated normals. Just check your importsettings of your fbx model.
  • your UVs are messed up in some weird way.
  • you used different materials when you tested it with the built-in plane.
  • you have exported vertex colors?
Comment
Add comment · Show 7 · 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 Gillissie · May 02, 2011 at 09:49 PM 0
Share

I always use "Generate" for the normals on the fbx importer. Like I said above, the UV's work properly when using the normal diffuse shader. I'm using the exact same materials as the plane. I didn't do anything special to export vertex colors. Even if I did, the diffuse texture wouldn't work right. I'm thinking it's a bug, but I wanted to make sure before submitting a bug.

avatar image Gillissie · May 02, 2011 at 09:53 PM 0
Share

I'm thinking it's something about the particle shaders that don't like imported meshes. The problem is the same on any fbx that I've imported.

avatar image Bunny83 · May 02, 2011 at 09:57 PM 0
Share

I'm pretty sure that's not a bug of Unity. The particle shaders aren't made for "normal" geometry. $$anonymous$$ost of them use the alpha channel for blending or other things. Even the render queue position is different because they count as transparent. Do you use a light? Otherwise the normal diffuse shader would render also black.

avatar image Gillissie · May 02, 2011 at 10:07 PM 0
Share

Yes. Like I said, the diffuse shader works perfectly. I would be happy to use a shader that uses multiply blending, but isn't the particle shader, but there isn't one in the standard assets and I don't know how to write shaders.

avatar image Gillissie · May 02, 2011 at 10:11 PM 0
Share

$$anonymous$$akes me wonder, what shader do the shadow maps use? That's exactly the effect I'm looking for.

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

No one has followed this question yet.

Related Questions

How can I change default shader for new/imported objects? 1 Answer

Confusion with using textures for blender fbx models 0 Answers

Parts of mesh become invisible at certian angles 2 Answers

I NEED HELP PLSSS....MY FBX -AFTER IMPORTED FROM DAZ STUDIO- APPEARS DARK IN UNITY,How to fix an FBX shaded black -even with materials included- (FBX exported from DAZ studio) 1 Answer

Stingray (FBX Exporter (beta) 1 Answer


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