Reflected image lighting

Started by
1 comment, last by matches81 18 years, 3 months ago
I'm having a little trouble with a mirror I've made in directx. The mirror reflects the object fine, but doesn't reflect the lighting on the object properly. The image in the reflection seems to be taking the original light source as its light source and as is illuminated in the wrong way. My mirror works by scaling all the objects by (-1, 1, 1) as the mirror lies along the y-z axis. I tried reflecting the light source as well when rendering the reflected images but directx didn't seem to like it. Does anyone have any suggestions on how to properly animate shading in reflected objects? Cheers
Advertisement
Ok, i've kinda got it working by setting up 2 individual lights whos proporties are the same except their position is reflected along the mirror's plane. I turn on each light depending on which set of objects i am rendering (real or reflected) This seems like more of a hack than a solution. Any suggestions on how to make it work otherwise?
hmm... I would have said that mirroring the light source should work without any problems. What kind of problems do you get when mirroring the light source?
Also you could try to mirror the camera instead of the scene, should work just the same and should be some kind of work-around for the lighting problem.
Nevertheless it would be interesting (at least I think so) to see the problems you encounter when mirroring the light source.

This topic is closed to new replies.

Advertisement