POV-Ray : Newsgroups : povray.general : Coloring an object with r,g,b,t df3 files Server Time
30 Jul 2024 16:23:34 EDT (-0400)
  Coloring an object with r,g,b,t df3 files (Message 1 to 3 of 3)  
From: uekstrom
Subject: Coloring an object with r,g,b,t df3 files
Date: 19 Nov 2008 15:25:00
Message: <web.492475f9fdddf9f1be88af0f0@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


Post a reply to this message

From: Tim Attwood
Subject: Re: Coloring an object with r,g,b,t df3 files
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

From: uekstrom
Subject: Re: Coloring an object with r,g,b,t df3 files
Date: 20 Nov 2008 03:35:00
Message: <web.4925202e82166519be88af0f0@news.povray.org>
> > is it possible to color an object by giving separate df3 files for the
> > red, blue, green and transparent/filter components?

[..]

> You should be able to use the average pattern to combine them...

Works perfectly, thanks!

Ulf


Post a reply to this message

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