|
![](/i/fill.gif) |
Thanks, this might be it (didn't quite get it yet, my brain isn't working
too well around this time of the year...)
Margus
Ronald L. Parker wrote in message <36920d89.71268632@news.povray.org>...
>Why not determine the component of the ray that does not lie along the
>
>normal vector, negate it, and add it back to the componenent that does
>lie along the normal? something like this (untested) code:
>
>// This assumes that R is relative to the intersection point and
>// points AWAY from the intersection point. This is probably not
>// the way you have it set up if you're using the SuperPatch.
>
>// R = ray
>// N = normal
>
>#macro mirror( R, N )
> #local nN = vnormalize( N );
> #local par = vdot( R, nN );
> #local perp = R-par*nN;
> par*nN-perp
>#end
>
>Something else to chew on: I've added XenoArch's projected_through
>patch to the next version of the superpatch, and that will allow easy
>simulation of reflective caustics from planar surfaces, for the price
>of an extra light source per reflected light source per reflective
>surface.
>
Post a reply to this message
|
![](/i/fill.gif) |