POV-Ray : Newsgroups : povray.general : rendering partially wet material Server Time
29 Jul 2024 16:24:18 EDT (-0400)
  rendering partially wet material (Message 11 to 16 of 16)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Jaime Vives Piqueres
Subject: Re: rendering partially wet material
Date: 10 Aug 2011 02:11:09
Message: <4e4220fd@news.povray.org>

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



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


Post a reply to this message

From: kiwon
Subject: Re: rendering partially wet material
Date: 10 Aug 2011 12:05:00
Message: <web.4e42abfda119247b4c0a951f0@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?

--
Kiwon Um


Post a reply to this message

From: clipka
Subject: Re: rendering partially wet material
Date: 10 Aug 2011 15:04:46
Message: <4e42d64e$1@news.povray.org>
Am 07.08.2011 10:24, schrieb kiwon:
> is there any person who has an experience to render some kinds of wet materials
> such as cloth, sponge, etc? I read a SIGGRAPH paper:
> http://graphics.cs.kuleuven.be/publications/PFPBFS/PorousFlow.pdf
>
> This paper says that they used POV-Ray for rendering, but not so much in detail.
> How can I use POV-Ray to render these kinds of materials? Would you please give
> me some idea or tip? :)

According to the paper they just changed the pigment to make it darker; 
I'd guess they used a DF3 file, but a UV-mapped approach might be 
possible as well.


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: rendering partially wet material
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

From: Christian Froeschlin
Subject: Re: rendering partially wet material
Date: 10 Aug 2011 17:45:49
Message: <4e42fc0d$1@news.povray.org>
kiwon wrote:

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

If wet_map.png contains intermediate values and not just two
states like 0 and 255 for wet and dry, the texture map should
already interpolate the textures for you. Of course, the other
question is whether the average of dry and 100% wet is a good
texture for 50% wet. If this is not the case, you will need
to define individual textures.


Post a reply to this message

From: kiwon
Subject: Re: rendering partially wet material
Date: 11 Aug 2011 12:50:00
Message: <web.4e440744a119247b4c0a951f0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 07.08.2011 10:24, schrieb kiwon:
> > is there any person who has an experience to render some kinds of wet materials
> > such as cloth, sponge, etc? I read a SIGGRAPH paper:
> > http://graphics.cs.kuleuven.be/publications/PFPBFS/PorousFlow.pdf
> >
> > This paper says that they used POV-Ray for rendering, but not so much in detail.
> > How can I use POV-Ray to render these kinds of materials? Would you please give
> > me some idea or tip? :)
>
> According to the paper they just changed the pigment to make it darker;
> I'd guess they used a DF3 file, but a UV-mapped approach might be
> possible as well.

I also can generate the DF3 file which contains the saturation level data; it
varies from 0 (dry) to 1 (fully saturated), actually, the value 1 must be
0xFFFFFFFF in real binary data as the document says. Since the DF3 data covers
<0,0,0> to <1,1,1>, I also matched it with the target object. For the test, box
is just fine now.

Then, how I can use the DF3 file relevantly for my intention? My first hack is
like:
object {
  box {<0, 0, 0>, <1, 1, 1>
    translate <-0.5, -0.5, -0.5>
    scale 0.9
    translate <0.5, 0.5, 0.5>
  }
  material {
    texture {
      pigment_pattern {density_file df3 "saturation.df3" interpolate 1}
      texture_map {
        [0 T_Dry]
        [1 T_Wet]
      }
    }
  }
}
Enough? or any advice?

--
Kiwon Um


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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