- Home /
Particles are rendering in front of trees...
The problem: particle effects are rendering in front of trees
Searched forums, someone said "Use particle shader cutout" - shader doesn't exist. Transparent cutout shader does exist. Doesn't have blending I want and all the options for it look tacky, but it does render in the correct order.
Downloaded base shaders, transparent shaders aren't included so I can't see how the cutout actually works to add it to the additive(soft) shader that looks good.
Tried Ztesting, tried the alpha testing examples in the reference, tried resetting the queue so it would render afterwards. Failed. Failed. Failed.
I have seen several other requests for this, but no answers as to where to find it, checked the wiki and none of the listed shaders seem to solve the problem so I'm asking again.
Is there a shader that successfully renders the alpha(soft) particle shader with the transparent cutout shaders such that the particles from the particle emitter render behind the soft-occluding leaves from the trees? Or is there something I can do with the shader I've tried to play with so that it will succesfully do this?
I have to admit to being a bit surprised that setting the Queue all the way down to background still rendered my particle effects in front of the trees, especially since the leaf shaders are queued at transparent - 99, but I must not fully understand the rendering pipeline (highly probable).
Answer by luke.du · Sep 24, 2010 at 11:34 PM
First question are you using maya?
If not, this probably wont help so... sorry.
however if you are using maya read on:
You say your using trees. If these trains are paint effects generated you maya need to convert them to nurbs or polys and should solve your problem without having to mess around with particle shaders.
I had a similar problem where paint effects trees kept rendering infront of a fountain is was rendering as particle spray. after trying to split it up into render passes and failing again and again and again, I converted the trees to nurbs and hey presto everything solved.
Sorry if this doesnt help. I know that particle shaders in maya are a bitch to solve problems with and I know a lot of people who dont bother rendering particles in maya, they use stuff like krakatoa or renderman.
No the terrain was build in the unity editor. I reset the far clipping plane and turned on fog and the problem disappeared. I'm not sure I really want fog, but since it also kept the trees from shifting into position as I ran past them I decided it is a necessary evil.
Your answer
Follow this Question
Related Questions
An Outline like the Editor does in game, with transparency 1 Answer
Cutout texture 2d 1 Answer
How do I achieve this effect? 2 Answers
Making a cutout semi-transparent? 1 Answer
Cutout shader not being drawn on iOS 1 Answer