I made a Unity Pro reflective floor using Aras’ script here. Looks pretty slick (no pun intended) but my particles don’t cast a reflection. Can that be done?
TIA
I made a Unity Pro reflective floor using Aras’ script here. Looks pretty slick (no pun intended) but my particles don’t cast a reflection. Can that be done?
TIA
Definitely, though I don’t know Aras’s script specifically. The particles in my game Pawns are reflected properly.
Reflections are created by rendering to texture using a camera, so effectively the question is, why doesn’t that camera see the particles? Are the particles where you think they are (i.e. over the reflective surface)? Are they somehow masked from being rendered by that camera?
Good to know.
Hmm… the particles are indeed over the surface (in fact they fall and come to rest on it), and their layer is Default. The reflection camera’s Culling Mask is set to Everything.
What else might mask them from a camera?
The particles are emitted from meshes–and the meshes DO reflect.
Random theory:
The particles start emitting when the mesh’s renderer is turned off (the particles simulate the object’s destruction). Is there some reason a camera might ignore an object with no mesh renderer, even if it has a particle renderer?
(The main camera of course does see the particles, and the reflection camera is set to defaults–I’m pretty sure I didn’t mess with anything.)
No, that should not happen. I’d try this: start the game, pause it, and then double check the layers of the particles, the culling mask of the camera that renders reflections, and the contents of the reflection render texture.
…though I think my reflection script on the wiki might have problems with scaled or mirrored objects.
Particle layer: Default
Camera culling mask: Everything
Reflection render texture: Shows no particles
Drats! Can you send a small project that shows the issue via Report Bug.app?
Will do! Thanks for taking a look.
I’ve sent a project. I think the pattern is that only dedicated particle shaders will cast reflections. For instance, the default Fire Add shader seems to use Glossy, and particles with Fire Add won’t reflect.
A (possibly unrelated) issue: particles have a flickering box behind them–as though the transparent alpha areas are opaque black for just a frame every now and then. Not always. (This happens on both ATI and nVidia cards, including one that doesn’t support pixellights and one that does, and including both PPC and Intel Macs. Usually graphical glitches aren’t so consistent from machine to machine, but this is.)