Jump to content
  • Advertisement
Sign in to follow this  

ray tracing a bezier surface (please help)

This topic is 4233 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've run into a brickwall with a bezier surface ray intersection algorithm. Usually what I did with a b-spline curve was to subdivide it into lines at certain U points in the curve, then subdivide that section further to find a more exact intersection point. No matter what the direction of the ray it will always lie inside the further subdivided U section of the curve. Here are some samples: Subdivision level 1 Subdivision level 2 This method works fine. However, as I noticed when moving to surfaces (I'm using bezier patches now instead of b-spline patches) and subdividing the surface into planes, I run into some problems. In this first case, the method works fine since the line is almost perpendicular to the surface and is almost guaranteed to lie inside a chosen U,V section: Subdivision level 1 Subdivision level 2 Subdivision level 3 In the second case this won't work since the ray is too slanted and it will first intersect inside the first quadrant and then intersect on the next one, essentially ruining the algorithm: Subdivision level 1 Subdivision level 2 The only way to solve this would be to check again with the next level of subdivision on the whole surface again every time the ray is "lost", but this essentially takes away the efficiency of the algorithm and would make it too slow. Is there a way to circumscribe the ray to a U,V section to an infinite degree of precision?

Share this post


Link to post
Share on other sites
Advertisement
Carsten Benthin wrote a thesis on the OpenRT ray tracer and reserved quite a few pages for bezier surfaces. Check it out:

http://graphics.cs.uni-sb.de/~benthin/final.pdf

Greets
Jacco.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!