POV-Ray : Newsgroups : povray.general : Coloring an object with r,g,b,t df3 files : Re: Coloring an object with r,g,b,t df3 files Server Time
30 Jul 2024 16:24:58 EDT (-0400)
  Re: Coloring an object with r,g,b,t df3 files  
From: Tim Attwood
Date: 19 Nov 2008 21:50:39
Message: <4924d07f$1@news.povray.org>
> Dear all,
> is it possible to color an object by giving separate df3 files for the 
> red,
> blue, green and transparent/filter components? I have tried layering 
> textures
> with different color maps, but I can't seem to get it right. If someone 
> has an
> example I would be very grateful. This is for a scientific visualization
> project where I want to color an isosurface, depending on a function that 
> is
> practically impossible to calculate inside Povray. I precompute this 
> function
> and save the colors I want into r,g,b,t df3 files.
>
> Regards,
> Ulf Ekstrom

You should be able to use the average pattern to combine them...
#declare P_Red = pigment {
   density_file df3 "red_file"
   color_map {
      [0 Black]
      [1 Red*3]
   }
};
#declare P_Iso = pigment {
      average
      pigment_map {
        [1.0  P_Red]
        [1.0  P_Green]
        [1.0  P_Blue]
      }
 };


Post a reply to this message

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