POV-Ray : Newsgroups : povray.general : texture_map interpolation Server Time
2 Nov 2024 17:18:33 EDT (-0400)
  texture_map interpolation (Message 1 to 7 of 7)  
From: Christian Froeschlin
Subject: texture_map interpolation
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
{
   pigment
   {
     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]
   }
}

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


Post a reply to this message

From: Le Forgeron
Subject: Re: texture_map interpolation
Date: 19 Oct 2010 09:40:00
Message: <4cbd9fb0$1@news.povray.org>
Le 19/10/2010 13:26, Christian Froeschlin a écrit :

> 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.

Testing also 3.7 beta 39, windows, with 3 colours/textures (0, 0.5, 1:
white, black, green; in that order, with ambient 1 diffuse 0 reflection
0 and no light source)

Confirmed for:
==============
bozo
bumps
dents
granite
spotted

doubtful (but very possible, at least different):
=========
wrinkles

The color_map is darker, more greyish, less saturated (no pure white, no
pure green: no extreme 0 or 1)

if the colour are black, white, green (in that order), the color map is
more white

Replacing color_map with pigment_map has no effect.

Seems fine:
===========
agate
boxed
cells
crackle
cylindrical
gradient
leopard
marble
onion
planar
quilted
radial
ripples
spherical
spiral1
spiral2
waves
wood


-- 
A good Manager will take you
through the forest, no mater what.
A Leader will take time to climb on a
Tree and say 'This is the wrong forest'.


Post a reply to this message

From: Ive
Subject: Re: texture_map interpolation
Date: 19 Oct 2010 09:52:27
Message: <4cbda29b$1@news.povray.org>
On 19.10.2010 13:26, Christian Froeschlin wrote:
> 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.
>


It is the same problem as mentioned here:

http://news.povray.org/povray.beta-test/thread/%3C48112367%241%40news.povray.org%3E/?ttop=351703&toff=350

...and I had myself meanwhile completely forgotten about it.

-Ive


Post a reply to this message

From: Jim Holsenback
Subject: Re: texture_map interpolation
Date: 19 Oct 2010 10:37:54
Message: <4cbdad42$1@news.povray.org>
On 10/19/2010 10:40 AM, Le_Forgeron wrote:
> Confirmed for:
> ==============
> bozo
> bumps
> dents
> granite
> spotted
> 
> doubtful (but very possible, at least different):
> =========
> wrinkles



> Seems fine:
> ===========
> agate
> boxed
> cells
> crackle
> cylindrical
> gradient
> leopard
> marble
> onion
> planar
> quilted
> radial
> ripples
> spherical
> spiral1
> spiral2
> waves
> wood

hmmmm ... wondering if this might be noise_generator related ... by
coincidence I ran across your grouping of "patterns" in the docs the
other day :-)


Post a reply to this message

From: Christian Froeschlin
Subject: Re: texture_map interpolation
Date: 19 Oct 2010 11:31:13
Message: <4cbdb9c1@news.povray.org>
Ive wrote:

> ...and I had myself meanwhile completely forgotten about it.

I have now entered it in the bug tracker as FS#168


Post a reply to this message

From: Jim Holsenback
Subject: Re: texture_map interpolation
Date: 1 Nov 2010 19:15:36
Message: <4ccf4a18@news.povray.org>
On 10/19/2010 11:37 AM, Jim Holsenback wrote:
> hmmmm ... wondering if this might be noise_generator related ... by
> coincidence I ran across your grouping of "patterns" in the docs the
> other day :-)

ha-ha ... wouldn't it be cool if more coincidences worked out like this:
http://bugs.povray.org/task/168#comment471


Post a reply to this message

From: Le Forgeron
Subject: Re: texture_map interpolation
Date: 2 Nov 2010 03:50:06
Message: <4ccfc2ae$1@news.povray.org>
Le 02/11/2010 00:15, Jim Holsenback a écrit :
> On 10/19/2010 11:37 AM, Jim Holsenback wrote:
>> hmmmm ... wondering if this might be noise_generator related ... by
>> coincidence I ran across your grouping of "patterns" in the docs the
>> other day :-)
> 
> ha-ha ... wouldn't it be cool if more coincidences worked out like this:
> http://bugs.povray.org/task/168#comment471
> 

Great: a small complain uncovered a bigger subtle issue which get fixed.
(ok, I'm optimistic)

One more step toward the final goal.


Post a reply to this message

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