POV-Ray : Newsgroups : povray.general : rendering partially wet material Server Time
29 Jul 2024 16:32:30 EDT (-0400)
  rendering partially wet material (Message 7 to 16 of 16)  
<<< Previous 6 Messages Goto Initial 10 Messages
From: kiwon
Subject: Re: rendering partially wet material
Date: 9 Aug 2011 12:20:01
Message: <web.4e415d22a119247b4c0a951f0@news.povray.org>
Le_Forgeron <lef### [at] freefr> wrote:
> I would cheat further: using the object pattern, assuming you have the
> collection of wet spots (as particle, they might be promoted to sphere)
> in a union, it's a simple matter of providing a wet and a dry look for
> each object.

This is a brilliant idea. Then, there is a question. Does the *object pattern*
support for smooth edge between wet and dry area?

Thanks.

--
Kiwon Um


Post a reply to this message

From: Le Forgeron
Subject: Re: rendering partially wet material
Date: 9 Aug 2011 13:35:46
Message: <4e416ff2$1@news.povray.org>
Le 09/08/2011 18:15, kiwon nous fit lire :
> Le_Forgeron <lef### [at] freefr> wrote:
>> I would cheat further: using the object pattern, assuming you have the
>> collection of wet spots (as particle, they might be promoted to sphere)
>> in a union, it's a simple matter of providing a wet and a dry look for
>> each object.
> 
> This is a brilliant idea. Then, there is a question. Does the *object pattern*
> support for smooth edge between wet and dry area?

No. It's either 1 or 0. Antialiasing might help anyway, but only at
pixel size.

If you need some more smoothness, it might be tempting to push in some
average pattern on top of many object pattern (with somehow variant
objects).

In fact, you would enjoy a proximity pattern... (sampling inside-test of
objects in a sphere around the object.. it would be smooth); but it's
not yet available.

I was just assuming that it's either wet or dry. Life is so complex.


Post a reply to this message

From: Patrick Elliott
Subject: Re: rendering partially wet material
Date: 9 Aug 2011 18:18:52
Message: <4e41b24c$1@news.povray.org>
On 8/9/2011 10:35 AM, Le_Forgeron wrote:
> Le 09/08/2011 18:15, kiwon nous fit lire :
>> Le_Forgeron<lef### [at] freefr>  wrote:
>>> I would cheat further: using the object pattern, assuming you have the
>>> collection of wet spots (as particle, they might be promoted to sphere)
>>> in a union, it's a simple matter of providing a wet and a dry look for
>>> each object.
>>
>> This is a brilliant idea. Then, there is a question. Does the *object pattern*
>> support for smooth edge between wet and dry area?
>
> No. It's either 1 or 0. Antialiasing might help anyway, but only at
> pixel size.
>
> If you need some more smoothness, it might be tempting to push in some
> average pattern on top of many object pattern (with somehow variant
> objects).
>
> In fact, you would enjoy a proximity pattern... (sampling inside-test of
> objects in a sphere around the object.. it would be smooth); but it's
> not yet available.
>
> I was just assuming that it's either wet or dry. Life is so complex.
Hmm. The issue there is probably more a case of "wet vs. damp vs. dry". 
Not sure how that would work, since you need a darkening of the color 
where its merely "damp", to match that of the wet part, but without the 
reflective characteristics... But, yeah, life, sadly, is often more 
complex than is easily managed in what is supposed to be a 
photo-realistic rendering engine. lol


Post a reply to this message

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


Post a reply to this message

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 6 Messages Goto Initial 10 Messages

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