POV-Ray : Newsgroups : povray.general : rendering partially wet material Server Time
29 Jul 2024 14:20:25 EDT (-0400)
  rendering partially wet material (Message 1 to 10 of 16)  
Goto Latest 10 Messages Next 6 Messages >>>
From: kiwon
Subject: rendering partially wet material
Date: 7 Aug 2011 04:25:01
Message: <web.4e3e4b7c7da1560a4c0a951f0@news.povray.org>
Dear POV-Ray users,

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


Post a reply to this message

From: Christian Froeschlin
Subject: Re: rendering partially wet material
Date: 7 Aug 2011 11:17:05
Message: <4e3eac71@news.povray.org>
kiwon wrote:

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

The paper seems to be mostly about simulating the behavior of the
fluid, so I think they get some complex water geometry out which they
can then render as water in addition to the object (also the object
mesh is probably deformed by their algorithm as it soaks).

It may be quite difficult to get decent results. Some things you
can do is make those parts of the object that are wet darker and
with more reflection, and add some water geometry such as droplets
with trace function.


Post a reply to this message

From: Alain
Subject: Re: rendering partially wet material
Date: 7 Aug 2011 13:10:24
Message: <4e3ec700$1@news.povray.org>

> kiwon wrote:
>
>> 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? :)
>
> The paper seems to be mostly about simulating the behavior of the
> fluid, so I think they get some complex water geometry out which they
> can then render as water in addition to the object (also the object
> mesh is probably deformed by their algorithm as it soaks).
>
> It may be quite difficult to get decent results. Some things you
> can do is make those parts of the object that are wet darker and
> with more reflection, and add some water geometry such as droplets
> with trace function.

It's a particle-based simulation. You should look for particle in the 
object collection for a good start point.


Post a reply to this message

From: kiwon
Subject: Re: rendering partially wet material
Date: 7 Aug 2011 22:05:00
Message: <web.4e3f4397a119247b4c0a951f0@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> kiwon wrote:
>
> > 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? :)
>
> The paper seems to be mostly about simulating the behavior of the
> fluid, so I think they get some complex water geometry out which they
> can then render as water in addition to the object (also the object
> mesh is probably deformed by their algorithm as it soaks).

The simulation is not matter for me, because it's my major research area. I'm
quite familiar to computational fluid dynamics and fluid simulation in computer
graphics field.

> It may be quite difficult to get decent results. Some things you
> can do is make those parts of the object that are wet darker and
> with more reflection, and add some water geometry such as droplets
> with trace function.

I'm wondering how I can make POV-Ray to recognize such partially darker and more
reflective regions. Using texture? (manually generated one using saturation or
density data coming from the simulation result) media? or other way?

--
Kiwon Um


Post a reply to this message

From: Alain
Subject: Re: rendering partially wet material
Date: 8 Aug 2011 13:39:00
Message: <4e401f34$1@news.povray.org>

> Christian Froeschlin<chr### [at] chrfrde>  wrote:
>> kiwon wrote:
>>
>>> 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? :)
>>
>> The paper seems to be mostly about simulating the behavior of the
>> fluid, so I think they get some complex water geometry out which they
>> can then render as water in addition to the object (also the object
>> mesh is probably deformed by their algorithm as it soaks).
>
> The simulation is not matter for me, because it's my major research area. I'm
> quite familiar to computational fluid dynamics and fluid simulation in computer
> graphics field.
>
>> It may be quite difficult to get decent results. Some things you
>> can do is make those parts of the object that are wet darker and
>> with more reflection, and add some water geometry such as droplets
>> with trace function.
>
> I'm wondering how I can make POV-Ray to recognize such partially darker and more
> reflective regions. Using texture? (manually generated one using saturation or
> density data coming from the simulation result) media? or other way?
>
> --
> Kiwon Um
>
>

You can use layered textures.

You start with your base texture.
You place another, mostly transparent, texture over it. Dry areas are 
totaly transparent, with a non-reflective finish. If you have specular 
or phong highlights, make those broad and low intensity.
Wet areas use a filtering pigment and a finish having some variable 
reflection: reflection{0.1, 1 fresnel}. Add conserve_energy to the 
finish. This part should have moderate to strong specular or phong 
highlights that are relatively tight.
Add interior{ior 1.33} to your object as it's wet with water. You need 
an ior for the fresnel computation.

If it's suposed to be "wet" from some other kind of liquid, use the ior 
for that liquid. The minimum reflection could also be adjusted as needed.


Alain


Post a reply to this message

From: Le Forgeron
Subject: Re: rendering partially wet material
Date: 9 Aug 2011 02:35:20
Message: <4e40d528$1@news.povray.org>
Le 08/08/2011 19:39, Alain a écrit :
> Le 2011/08/07 22:02, kiwon a écrit :
>> Christian Froeschlin<chr### [at] chrfrde>  wrote:
>>> kiwon wrote:
>>>
>>>> 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? :)
>>>
>>> The paper seems to be mostly about simulating the behavior of the
>>> fluid, so I think they get some complex water geometry out which they
>>> can then render as water in addition to the object (also the object
>>> mesh is probably deformed by their algorithm as it soaks).
>>
>> The simulation is not matter for me, because it's my major research
>> area. I'm
>> quite familiar to computational fluid dynamics and fluid simulation in
>> computer
>> graphics field.
>>
>>> It may be quite difficult to get decent results. Some things you
>>> can do is make those parts of the object that are wet darker and
>>> with more reflection, and add some water geometry such as droplets
>>> with trace function.
>>
>> I'm wondering how I can make POV-Ray to recognize such partially
>> darker and more
>> reflective regions. Using texture? (manually generated one using
>> saturation or
>> density data coming from the simulation result) media? or other way?
>>
>> -- 
>> Kiwon Um
>>
>>
> 
> You can use layered textures.
> 
> You start with your base texture.
> You place another, mostly transparent, texture over it. Dry areas are
> totaly transparent, with a non-reflective finish. If you have specular
> or phong highlights, make those broad and low intensity.
> Wet areas use a filtering pigment and a finish having some variable
> reflection: reflection{0.1, 1 fresnel}. Add conserve_energy to the
> finish. This part should have moderate to strong specular or phong
> highlights that are relatively tight.
> Add interior{ior 1.33} to your object as it's wet with water. You need
> an ior for the fresnel computation.
> 
> If it's suposed to be "wet" from some other kind of liquid, use the ior
> for that liquid. The minimum reflection could also be adjusted as needed.
> 
> 
> Alain

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.

Real liquid part must be coded as usual, but it is only them which need
an actual ior. The other solids can remain as previously, just changing
the wet/dry look based on the object pattern and its inside tests.



-- 
Software is like dirt - it costs time and money to change it and move it
around.

Just because you can't see it, it doesn't weigh anything,
and you can't drill a hole in it and stick a rivet into it doesn't mean
it's free.


Post a reply to this message

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

Goto Latest 10 Messages Next 6 Messages >>>

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