Jump to content
  • Advertisement
Sign in to follow this  
goodtforce

Reflection Orientation Problem.

This topic is 5174 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

Hello , I am having a tough time solving this problem. What i am doing is expanding the NeHe 26 tutorial on reflections so that i can reflect off any plane rather then just the floor. What i have come up with thus far ,is that i need to do a Ray to Plane test so that i can use the position of the ball and the Normal of the floor to generate a line that i can translate the position of the ball for the reflection. This all works great. But here is the problem. I am confused on how to handle the orientation of the ball once it gets to its destination so that it is properly reflected off the surface. If anyone has a good remedy for this or a different way to look at the problem please let me know.

Share this post


Link to post
Share on other sites
Advertisement
I haven't looked at the tutorial so I don't understand most of what you are saying -- especially the need for a "ray to plane test".

Anyway, the transformation to do a reflection around an arbitrary plane can be found here. Simply transform the world with this matrix (don't forget to reverse the winding!) and draw to get the reflected image, using the stencil buffer to clip the reflection.

Share this post


Link to post
Share on other sites
Awesome thanks, My Ray to plane test was something that i came up with to try to solve the problem, so it was my mistake =P. I appreciate the help =D

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!