POV-Ray : Newsgroups : povray.general : 3D interior colors with df3 Server Time
31 Jul 2024 18:18:23 EDT (-0400)
  3D interior colors with df3 (Message 1 to 2 of 2)  
From: Vasilis
Subject: 3D interior colors with df3
Date: 13 Nov 2006 09:45:01
Message: <web.455883e5b7b5f063eac2ab100@news.povray.org>
Dear all,

I am trying to use povray to display the 3d distribution of a value (i.e.
temperature) as color mapped on the surface of a body. So when I do an
intersection with another object, to be able to see the color temperature
mapping on the interior of the first. The values I have is the temperature
for every voxel in space.
I tried to use the following:
intersection {
 box {  // initial object with the temperature mapping
  <0,0,0>, <1,1,1>
  translate <-0.5,-0.5,-0.5>
 }
 box { // Clipping object
  <0,0,0>, <1,1,1>
  inverse
 }
 interior {
  media {
   density {
    density_file df3 "temp.df3"
    interpolate 1
    color_map {
        [0.00 rgb <1,1,1>]
        [0.10 rgb <1,0,1>]
        [0.20 rgb <0,0,1>]
        [0.40 rgb <0,1,0>]
        [0.60 rgb <0,1,1>]
        [0.80 rgb <1,0,0>]
        [1.00 rgb <1,1,1>]
     }
   }
  }
 }
 hollow
}

but I get a black screen. Is this the correct way of doing?


Post a reply to this message

From: Alain
Subject: Re: 3D interior colors with df3
Date: 13 Nov 2006 19:32:16
Message: <45590e90@news.povray.org>
Vasilis nous apporta ses lumieres en ce 13/11/2006 09:40:
> Dear all,

> I am trying to use povray to display the 3d distribution of a value (i.e.
> temperature) as color mapped on the surface of a body. So when I do an
> intersection with another object, to be able to see the color temperature
> mapping on the interior of the first. The values I have is the temperature
> for every voxel in space.
> I tried to use the following:
> intersection {
>  box {  // initial object with the temperature mapping
>   <0,0,0>, <1,1,1>
>   translate <-0.5,-0.5,-0.5>
>  }
>  box { // Clipping object
>   <0,0,0>, <1,1,1>
>   inverse
>  }
>  interior {
>   media {
>    density {
>     density_file df3 "temp.df3"
>     interpolate 1
>     color_map {
>         [0.00 rgb <1,1,1>]
>         [0.10 rgb <1,0,1>]
>         [0.20 rgb <0,0,1>]
>         [0.40 rgb <0,1,0>]
>         [0.60 rgb <0,1,1>]
>         [0.80 rgb <1,0,0>]
>         [1.00 rgb <1,1,1>]
>      }
>    }
>   }
>  }
>  hollow
> }

> but I get a black screen. Is this the correct way of doing?

It's basicaly correct, but there is some things missing:
There is no light to make it visible, so you need ether a light_source or make 
the media emissive.
Also, your containing box use the default pigment, witch is black and opaque. 
Add pigment{rgbt 1} to make the container transparent.


-- 
Alain
-------------------------------------------------
Change is inevitable, except from a vending machine.


Post a reply to this message

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