POV-Ray : Newsgroups : povray.general : rendering partially wet material : Re: rendering partially wet material Server Time
29 Jul 2024 18:31:08 EDT (-0400)
  Re: rendering partially wet material  
From: Jaime Vives Piqueres
Date: 10 Aug 2011 16:18:44
Message: <4e42e7a4$1@news.povray.org>

> Jaime Vives Piqueres<jai### [at] ignoranciaorg>  wrote:

>>> Yeah... life is so complex to render...
>>>
>>> Alright, if I manually generate a texture for wet area as saturation
>>> level or something similar, how can I apply a special *finish* only
>>> to the wet area?
>>>
>>> I tried like: material { texture {T_Stone24 scale 0.3} texture {
>>> pigment {uv_mapping image_map {png "wet.png"}} finish {phong 1
>>> reflection {0.1, 1 fresnel} conserve_energy} } } where "wet.png" is
>>> basically transparent except some wet areas.
>>>
>>> It's syntactically renderable, but does not render what I intend; the
>>> *finish* is applied to all surfaces, i.e. T_Stone24 as well. Am I
>>> missing something?
>>>
>>
>>    Yes, the texture map:
>>
>> material{
>>     texture{
>>       pigment_pattern{
>>        image_map{ png "wet_map.png" }  // grayscale (white=dry, black=wet)
>>       }
>>       texture_map{
>>         [0 t_dry]  // dry texture previously defined
>>         [1 t_wet]  // wet texture
>>       }
>>     }
>> }
>>
>>
>>     Hope this helps...
>
> Thanks! This helped me so much. Then, this is also quite tricky to present
> smooth change between dry and wet area. One simple idea might be putting many
> discrete levels such as [0 t_dry] [0.2 t_wet1] [0.4 t_wet2] ...
> Is there better way for this?
>

   Yes, indeed, my example was just a hint: you should adjust the map 
entries to your desired transition effect.



-- 
Jaime Vives Piqueres
		
La Persistencia de la Ignorancia
http://www.ignorancia.org


Post a reply to this message

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