POV-Ray : Newsgroups : povray.text.scene-files : Source code for "AOI textures for isosurfaces" : Re: Source code for "AOI textures for isosurfaces" Server Time
28 Sep 2024 18:15:18 EDT (-0400)
  Re: Source code for "AOI textures for isosurfaces"  
From: Tek
Date: 6 Jun 2003 14:49:14
Message: <3ee0e22a$1@news.povray.org>
"Tor Olav Kristensen" <tor_olav_kCURLYAhotmail.com> wrote:
> I'm not quite sure if I understand what you mean here.
>
> Are you suggesting to actually use the slope_map pattern modifier
> or do you mean to use 3 slope functions (one for each component) ?

I meant 3 slope functions. Sorry I always mistakenly call them slope_maps and
then I get confused when POV gives me errors :)

> Please explain more.

Well, basically your angle of incidence calculation works by computing the
surface normal from the gradient of the isosurface function. Then you dot
product that with the position of the point relative to the camera, giving you
the cos of the angle of incedence.

What I'm suggesting is you could find the surface normal using 3 slope
functions, one for each component. Now, if I'm right, those 3 functions will
give you the x, y, and z values of the surface normal. Then you can form the dot
product of that with the vector from the camera to the point, to again get the
cos of the angle of incedence.

That way you could apply the material to any object without needing the
isosurface function for that object.

I think that should work.

--
Tek
http://www.evilsuperbrain.com


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.