POV-Ray : Newsgroups : povray.general : Volumetric textures : Re: Volumetric textures Server Time
28 Sep 2024 19:43:49 EDT (-0400)
  Re: Volumetric textures  
From: Alain
Date: 5 Jan 2015 15:27:40
Message: <54aaf3bc$1@news.povray.org>

> "Nekar Xenos" <nomail@nomail> wrote:
>> "Anthony D. Baye" <Sha### [at] spamnomorehotmailcom> wrote:
>>> "MichaelJF" <mi-### [at] t-onlinede> wrote:
>>>> Le_Forgeron <jgr### [at] freefr> wrote:
>>>>> Le 03/01/2015 10:13, Warp a écrit :
>>>>>> Anthony D. Baye <Sha### [at] spamnomorehotmailcom> wrote:
>>>>>>> So povray's textures are supposed to be 3D, and indeed the patterns are
>>>>>>> demonstrably three-dimensional, however they do not seem to be sampled for the
>>>>>>> inside of an object.
>>>>>>
>>>>>>> So I guess my question is: Why not?
>>>>>>
>>>>>> POV-Ray renders *surfaces*.
>>>>>>
>>>>> Sampling 3D is done with media (and there is three kind of them), inside
>>>>> surface.
>>>>
>>>>
>>>> Obviously media are the way to go. A good way here may be the use of df3-files.
>>>> Bill Pokorny has given the link to an interesting visualisation tool just some
>>>> days ago
>>>>
>>>>
http://news.povray.org/povray.general/thread/%3C54a2dc7e%241%40news.povray.org%3E/
>>>>
>>>> Of course one must generate or obtain the df3-files first. But this is another
>>>> story...
>>>>
>>>> Best regards,
>>>> Michael
>>>
>>> There's a key difference between media and textures. Textures have finishes.
>>>
>>> As for Warps glib response about povray only rendering surfaces: that hasn't
>>> been true since media was added. Subsurface scattering is also b.d. not on the
>>> surface.  Why can't textures be sampled for the interior as well?
>>>
>>> A.D.B.
>>
>> Maybe I misunderstood what you meant. Can you show me an example of such a
>> texture?
>
> I'll admit that I'm having problems finding good examples of what I'm after.
> Most uses of volumetric textures in games seem to be about doing smoke effects,
> which is what we have media for, or hair effects, which are better handled in
> other ways.
>
> What I was hoping to accomplish is to create a believable compound material with
> solid and transparent parts.
>
> With the current system, when you look through the transparent parts of a
> texture, you see the texture on the back surface of the object, with nothing
> inside.
>
> What I'd like to see is the internal boundaries between transparent and opaque
> parts of the texture.
>
> The way I imagine this happening is that, as you trace along a ray, you sample
> the texture continuously at intervals, until you hit an opaque pixel, or the
> blended result of your previous samples is "reasonably opaque".
>
> this method could even account for things like flaws or air pockets in a
> transparent material without having to resort to a csg object or isosurface.
>
> Admittedly, I have no experience with this sort of programming, so I'm just
> theorizing how it could work without thinking about things like overhead.
>
> As it is, the only way I can think of to achieve the effect I'd like is to use a
> compound object with each part having its own texture.
>
> I can't think of any way to get this effect using simple layered textures, but
> I'm not that much of an artist.  If anyone has examples of this sort of thing
> using the current system, I'd love to see them.
>
> Regards,
> A.D.B.
>
>

Using scattering media will give you exactly that. The containing object 
don't need to be totaly transparent, and the media density can share the 
same pattern as the texture of the surface. I've done it in the past 
with good results.
You need a media having a very high density, say 1000 or more, for the 
opaque parts, and zero density for the fully transparent parts.
You may need relatively high samples values, possibly in the 100's range 
up to a few 1000s if the texture is realy noisy.
Adding subsurface light transport may be a good idea to add more 
realism. It will increase your rendering time.

For air bubbles and inclusions inside a transparent object, using an 
union with some objects representing those is the way to go. Those 
objects need to have their own interior statement, with an ior set as 
1/(parent object's ior) for air bubbles. Don't forget to adjust 
max_trace_level as needed, possibly all the way up to 256.
Alternatively, you can use an isosurface. There are cases where it will 
render faster than using discreete objects for the holes. Especialy true 
when you have 100's of inclusions...



Alain


Post a reply to this message

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