HELP! Realtime window reflections???

Can someone help me with getting some wondows in a building to reflect the surroundings? I looked at what someone had done with water. That was horizontal. Need to reflect in windows. I tried the multi cam approach but haven’t got it working. Anyone if you could help that would be greatly appreciated. The glass windows do not need to be transparent!!!

Thanks,

G

How many windows do you have and do they need to reflect actual geometry, or “reflect something abstract” (in that case just use a cube map and one of reflective shaders)?

Many windows. Was trying to see if this would work to make it look very realistic. I guess I could try the Cubemap way but was hoping to see the cars, trees, etc. reflecting. Could you run through the basic process for doing both? Thanks for the help for this Noob!

Cheers,

G

I made a small shader+scrript to make reflective mirrors (that is essentially what you need, right?). On Unify wiki: http://www.unifycommunity.com/wiki/index.php?title=MirrorReflection

This should give you reflecting cars, trees and whatnot, and should work with multiple windows.

Aras,

Thank you for your help! I am having some difficulty understanding how to use the shader. I copied the code into a new text file and saved it as MirrorReflection.shader. I am not sure where to place the shader in the assets folder. I have tried a few different places. It won’t let me attach/use the shader as an option under the material. I am not sure what I am doing wrong. Any further help ould be greatly appreciated.

Cheers,

Gary

I think it’s easiest if you select Assets->Create->Shader in the Unity menu and the open the newly created shader file from the Project view, and then paste the code into it.

Look at the error console you can get by using Windows->Console. Is there an error in your shader script perhaps?

d.

No errors with either the script or the shader. I created the shader by the method described by Freyr. That seems to work. Now all I see on the windowis flat black. I have the material assigned to the window(and the script to the geometry). Thanks for the help so far everyone!!!

Cheers,

G

Try hitting Play button? The reflections don’t show up until you’re in the game mode.

Tried that, and did a build game to see if that would solve the problem. Rebooting now. Deleted old material and recreated it with the same issue of showing up flat black when played…

Got the material to work on one window. It seems to be reflecting the sky box and nothing else. the reflection is also upside down!!! Thanks for any further help.

Gary

Can you send the Unity project you have via Report Bug.app? Maybe you’re setting up something wrong, or maybe I did not explain it correctly on the wiki page…

Not sure how to do that… Sorry Aras. I will definitely send it to you once I know how

:frowning:

Gary

Ok figured out how to submit the bug. I have done so. Thanks for all your help.

Cheers,

Gary Haus

I put an example package up on the page on the wiki.

Cheers,
-Jon

Ok downloading example now. Waiting for the bug report to finish submitting to test the package. Thanks so much everyone for the help so far.

Cheers,

G

Ok I submitted my project via the bug report system. Let me know if I can be of any further help to hopefully fix my issues.

Cheers,

G

Ok I have impported the package example and it works great! When I apply the material and script to my geometry it has the same effect as before. Upside down skybox with black at top and no reflecting geometry… I am stumped. I hope you guys can figure it out over there at OTEE!!!

Cheers,

Gary

I replied to your bug report