POV-Ray : Newsgroups : povray.general : texture_map interpolation : texture_map interpolation Server Time
4 Jul 2022 02:39:01 EDT (-0400)
  texture_map interpolation  
From: Christian Froeschlin
Date: 19 Oct 2010 07:26:03
Message: <4cbd804b$1@news.povray.org>
The documentation for texture_map states:

"The blended area of a texture map works by fully calculating both 
contributing textures in their entirety and then linearly interpolating 
the apparent colors."

Now, as long as the textures are just plain colored pigment
I would have expected that the result of a texture_map looks
identical to a color_map with the corresponding colors.

However, the "strands" in the below test scene get much
thinner with the texture_map (regardless of whether the
strands are bright on dark or vice versa, so it probably
is not due to some strange gamma issue).

Why is the output different? In linear color space, wouldn't
the apparent color of the texture be linearly dependent on the
color of the pigment? To keep it simple I removed the light
source in the below code so everything is just ambient.

Tested using 3.7 beta 39.

#declare C_STRAND = color rgb 1;

#declare C_CLEAR  = color rgb 0;

#declare T_STRAND = texture
   pigment {color C_STRAND}

#declare T_CLEAR = texture
   pigment {color C_CLEAR}

#declare T_STRANDS1 = texture
     granite scale 2 color_map
       [0.0 color C_STRAND]
       [0.5 color C_CLEAR]
       [1.0 color C_CLEAR]

#declare T_STRANDS2 = texture
   granite scale 2 texture_map
     [0.0 T_STRAND]
     [0.5 T_CLEAR]
     [1.0 T_CLEAR]

   z, 10
   texture {T_STRANDS1}
   //texture {T_STRANDS2}

Post a reply to this message

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