POV-Ray : Newsgroups : povray.general : Trying to multiply pigment color Server Time
16 Nov 2024 03:24:08 EST (-0500)
  Trying to multiply pigment color (Message 1 to 3 of 3)  
From: FlyerX
Subject: Trying to multiply pigment color
Date: 11 Apr 2004 19:25:01
Message: <web.4079d2ff849d36059482ecba0@news.povray.org>
Hello,

I have been using filter as a multiplier for a pigment but the results are
always too bright.

Here is how I define the material:

#declare p_map1=pigment {image_map{jpeg "tex.jpg" interpolate 2 transmit all
0 filter all 1 }  }

#declare Mat1=
texture{pigment {color rgb <1,1,1> transmit 0 filter 0}finish{ambient 0}}
texture{pigment{p_map1} finish{ambient 0}}

This should be the same as

#declare p_map2=pigment {image_map{jpeg "tex.jpg" interpolate 2 transmit all
0 filter all 1 }  }

#declare Mat2=
texture{pigment{p_map2} finish{ambient 0}}

because the color underneat the pigment is white <1,1,1>. Unfortunately Mat1
is brighter than Mat2. Is there a procedure that could be done to remedy
this? If there is another way of multiplying a pigment color please let me
know.

Thanks,

FlyerX


Post a reply to this message

From: Mike Williams
Subject: Re: Trying to multiply pigment color
Date: 12 Apr 2004 02:11:14
Message: <2VmR7DAfKjeAFw8V@econym.demon.co.uk>
Wasn't it FlyerX who wrote:
>Hello,
>
>I have been using filter as a multiplier for a pigment but the results are
>always too bright.
>
>Here is how I define the material:
>
>#declare p_map1=pigment {image_map{jpeg "tex.jpg" interpolate 2 transmit all
>0 filter all 1 }  }
>
>#declare Mat1=
>texture{pigment {color rgb <1,1,1> transmit 0 filter 0}finish{ambient 0}}
>texture{pigment{p_map1} finish{ambient 0}}
>
>This should be the same as
>
>#declare p_map2=pigment {image_map{jpeg "tex.jpg" interpolate 2 transmit all
>0 filter all 1 }  }
>
>#declare Mat2=
>texture{pigment{p_map2} finish{ambient 0}}
>
>because the color underneat the pigment is white <1,1,1>. Unfortunately Mat1
>is brighter than Mat2. Is there a procedure that could be done to remedy
>this? If there is another way of multiplying a pigment color please let me
>know.

All other things being equal, these two textures are equally bright.

There are an awful lot of things that can make other things not be equal. For
example, the background that you can see through the transparency of Mat2
might be further from the light source, or at a different angle to the light
source, or may be in shadow (in particular, check for the shadow of the object
that you've applied the Mat2 texture to).

Below is a complete scene that has all other things almost exactly equal, and
the two textures are indistinguishable.

Hint: if your lighting is arranged such that you can see a pure white object
against a pure white background, then adding an image_map pigment to the white
object will not look the same as looking through a semitransparent image_map
at the background.


#version 3.5;

global_settings {assumed_gamma 1.0}

#declare p_map1=pigment {image_map{jpeg  "tex.jpg" interpolate 2 transmit all
 0 filter all 1 }  }

#declare Mat1=
texture{pigment {color rgb <1,1,1> transmit 0 filter 0}finish{ambient 0}}
texture{pigment{p_map1} finish{ambient 0}}

#declare p_map2=pigment {image_map{jpeg  "tex.jpg" interpolate 2 transmit all
 0 filter all 1 }  }

#declare Mat2= texture{pigment{p_map2} finish{ambient 0}}


camera {location  <0,0,-10> look_at <0,0,0> angle 25}

plane {z,-0.94  texture{pigment {color rgb <1,1,1> transmit 0 filter 0}
 finish{ambient 0}}
}

light_source {<10,10,-30> color rgb 1}

box {-0.95,0.95 texture{Mat1} translate -x}
box {-0.95,0.95 texture{Mat2} no_shadow translate x}


Post a reply to this message

From: FlyerX
Subject: Re: Trying to multiply pigment color
Date: 12 Apr 2004 03:30:01
Message: <web.407a44b258254474e82a19d20@news.povray.org>
Thanks for the answer but unfortunately I made a mistake on the original
post and I apologize for the confusion.

p_map2 should have been declared as

#declare p_map2=pigment {image_map{jpeg "tex.jpg" interpolate 2 transmit all
0 filter all 0 }  }

Filter all should have been 0 intead of 1 to avoid filtering.

If I try each material on the same scene Mat1 is always brighter than Mat2.

FlyerX


Post a reply to this message

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