Sign in to follow this  

Reflected image lighting

This topic is 4371 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

This topic is 4371 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this