|
|
> I have a "fully" working path tracer under development. The next thing
> to implement is transformations (at least translate and rotate). What is
> the best (fastest) way to do it?
>
> Let's take box for example. Now I have a method for calculating
> axis-aligned box intersections. So if I rotate the box how should I
> proceed?
>
> I was thinking that maybe I should not rotate the box, but rotate the
> ray so that I can use the fast AABox intersection routines. And then I
> get intersection point and surface normal, which I rotate back to world
> space?
>
> Am I missing something here and is the the best way to do it?
As far as I know, the way POV-Ray does it (and probably most others) is
by creating a transformation matrix of all the individual
transformations, then inversing it, and using it to transform *rays*
before doing the intersection calculations.
But don't trust me on this. I still haven't managed to solve the
ray-sphere intersection equation...
Post a reply to this message
|
|