POV-Ray : Newsgroups : povray.binaries.images : XRay Test : Re: XRay Test Server Time
31 Jul 2024 12:16:36 EDT (-0400)
  Re: XRay Test  
From: Chris B
Date: 14 Oct 2009 03:49:18
Message: <4ad5827e$1@news.povray.org>
"mone" <mon### [at] alienenterprisesde> wrote in message 
news:web.4ad518671466e24f66e6d7c00@news.povray.org...
>
> I think I will try it with a more simple object first, since I always have
> problems to imagine how this slope maps really work. There also was a 
> slope map
> x-ray version with MakeHuman, but I didn't succeed to apply it to another
> object. But obviously this slope map pattern is very versatile if one 
> knows, how
> to handle it. Thanks for the nice code.
>

The main control on the slope pattern is a vector defining the orientation 
of the pattern. I used   'slope{z}'  in the example, along with a 
pigment_map which tells it that, everything aligned precisely with the 
z-axis is to be White with a tiny bit of transparency. It transitions to 
have progressively more transparency and a Blue color for surfaces that are 
not precisely aligned to the z-axis. It fades to completely transparent for 
surfaces at right angles to the z-axis.

It can be tricky to keep the direction of the slope pattern aligned to the 
camera. In the example, the second copy of the skull is rotated before 
applying the slope pattern (so that the slope pattern isn't rotated). As Sam 
mentioned it works best with an Orthographic camera, which makes it possible 
to keep the pattern aligned to the camera direction throughout the whole 
image. If you declare variables 'MyLocation' and 'MyLook_At' for the camera, 
then you can simply use  slope{MyLook_At-MyLocation}  to keep the pattern 
oriented towards the camera as you move the camera around (remembering not 
to rotate objects after applying the texture/pattern).

One word of warning. This is one of the few instances where working with too 
simple an object could actually be a little confusing, because you need some 
subtle surface changes on the object to be able to appreciate what's going 
on.

Regards,
Chris B.


Post a reply to this message

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