|
|
William F Pokorny <ano### [at] anonymousorg> wrote:
> Assuming you want access to the real internally generated >first rays,
Nope.
Just something like:
#declare SFn_vdot = function (ax, ay, az, bx, by, bz) {ax*bx + ay*by + az*bz}
#declare f_Reflectionx = function (Dx, Dy, Dz, Nx, Ny, Nz) {Dx - 2 * SFn_vdot
(Dx, Dy, Dz, Nx, Ny, Nz)* Nx}
#declare f_Reflectiony = function (Dx, Dy, Dz, Nx, Ny, Nz) {Dy - 2 * SFn_vdot
(Dx, Dy, Dz, Nx, Ny, Nz)* Ny}
#declare f_Reflectionz = function (Dx, Dy, Dz, Nx, Ny, Nz) {Dz - 2 * SFn_vdot
(Dx, Dy, Dz, Nx, Ny, Nz)* Nz}
which in sane functions would like a macro formula:
#macro Reflection (Direction, Normal)
//#local Refl = 2*Normal*(vdot(Normal, V)) - V;
#local v_reflection = Direction - 2*vdot (Direction, Normal)*Normal;
v_reflection
#end
> the other forms are quite a bit harder / uglier to do than is trace().
> Further, the results for other than initial / first rays are also
> tangled in render settings and options.
Oh, I can only imagine... :O
Post a reply to this message
|
|