|
|
Frank nous apporta ses lumieres en ce 2008/02/26 08:23:
> Hi,
>
> I have a large .df3 file I visualize by using it as a media density. I want to
> postprocess that density after loading it into povray. For example, set
> everything in the density that is smaller (or larger) than a threshold to zero
> and rescale the rest.
>
> Effectively, I want to visualize only density values in the interval from
> [0.2,0.3], say. Of course, I could do this outside and save a scaled .df3 right
> away, but since this is part of a movie and the interval changes (it is used as
> a lens to let you go through the materials in the volume), it would mean a lot
> of wasted diskspace - the .df3 is really big.
>
> Ideally, I would like to specify a transfer function that maps a density value
> in a voxel to an emission value in that voxel. Any ideas how I can do this in
> povray? I'm using the latest beta.
>
> Frank
>
>
>
Very simple, and without ever altering your data.
Just add a color_map like:
color_map{[clock rgb 0][clock rgb 1][clock+0.1 rgb 1][clock+0.1 rgb 0]}
The media is now only visible in the range of clock to clock + 0.1. Everywhere
else, it's density will be zero, whitch is equivalent to no media.
I used "clock" as you mentioned an animation, but you can use any variable you want.
You can use another variable to set the width of the visible part. You can also
use a colour of your choice instead of white as in my example.
--
Alain
-------------------------------------------------
The tree of liberty must be refreshed from time to time with the blood of
patriots and tyrants.
Thomas Jefferson
Post a reply to this message
|
|