POV-Ray : Newsgroups : povray.general : iso surfaces and pigments Server Time
6 Nov 2024 06:24:24 EST (-0500)
  iso surfaces and pigments (Message 1 to 6 of 6)  
From: Tom Melly
Subject: iso surfaces and pigments
Date: 7 Oct 2002 10:57:36
Message: <3da1a0e0$1@news.povray.org>
I've not really played with iso-pigments yet, so please excuse any obvious
errors in this.

Problem: You generate an iso-surface and what to apply an iso-pigment to it,
say, for example, a turbulent sea with foamy waves. Now, the surface represents
a particular threshold, so the same iso-surface function will be no help when it
comes to the pigment (since the surface would only return one value).

However, in some way, the pigment function has some relation to the iso-surface
(or at least you'd like it to), but what is it? (or should one always be using
some kind of slope-map in such situations?)

--
#macro A(V,B,C,R)#while(B-256)#if(V-128/B>=0)sphere{0,.5translate<C-4R-1,9>
pigment{rgb<1-C/8R/2C/8>}}#local V=V-128/B;#end#local B=B*2;#local C=C+1;#
end#end A(234,1,0,2)A(85,1,0,1)A(81,1,0,0)light_source{-5 1}//Tom Melly


Post a reply to this message

From: Tim McMurdo
Subject: Re: iso surfaces and pigments
Date: 7 Oct 2002 12:26:46
Message: <3da1b5c6$1@news.povray.org>
Suddenly you have my interest. I am trying to come up with a surface taht
simulates deep ocean swells.

I am trying Christph's (I think) waves.inc file. While the include file
generates dynamic height fields that are perfect for rolling swells, I just
can't get the surface to look like the real thing.

How do I simulate the wind blown look of the oceansurface. I hate to go with
a fixed heightfield because I want to animate the surface.

If you are indeed trying to simulate the sea, I would love to see what you
have come up with so far.

Tim




"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3da1a0e0$1@news.povray.org...
> I've not really played with iso-pigments yet, so please excuse any obvious
> errors in this.
>
> Problem: You generate an iso-surface and what to apply an iso-pigment to
it,
> say, for example, a turbulent sea with foamy waves. Now, the surface
represents
> a particular threshold, so the same iso-surface function will be no help
when it
> comes to the pigment (since the surface would only return one value).
>
> However, in some way, the pigment function has some relation to the
iso-surface
> (or at least you'd like it to), but what is it? (or should one always be
using
> some kind of slope-map in such situations?)
>
> --
> #macro
A(V,B,C,R)#while(B-256)#if(V-128/B>=0)sphere{0,.5translate<C-4R-1,9>
> pigment{rgb<1-C/8R/2C/8>}}#local V=V-128/B;#end#local B=B*2;#local C=C+1;#
> end#end A(234,1,0,2)A(85,1,0,1)A(81,1,0,0)light_source{-5 1}//Tom Melly
>
>


Post a reply to this message

From: Tom Melly
Subject: Re: iso surfaces and pigments
Date: 8 Oct 2002 04:53:51
Message: <3da29d1f@news.povray.org>
"Tim McMurdo" <tmc### [at] prodigynet> wrote in message
news:3da1b5c6$1@news.povray.org...
> Suddenly you have my interest. I am trying to come up with a surface taht
> simulates deep ocean swells.
>

Well, more of a theoretical example (although one I have tried, but with little
success).


Post a reply to this message

From: Marc-Hendrik Bremer
Subject: Re: iso surfaces and pigments
Date: 8 Oct 2002 05:24:26
Message: <3da2a44a@news.povray.org>
"Tom Melly" <tom### [at] tomandlucouk> schrieb im Newsbeitrag
news:3da1a0e0$1@news.povray.org...
> Problem: You generate an iso-surface and what to apply an iso-pigment to
it,
> say, for example, a turbulent sea with foamy waves. Now, the surface
represents
> a particular threshold, so the same iso-surface function will be no help
when it
> comes to the pigment (since the surface would only return one value).

I have to admit, that I don't understand your question.

If you have a function to create an isosurface, it's quite simple to build a
pigment. Just use one "slice" of that function as a pattern.

In your example that should look like this

isosurface{
function{Surface_Fun(x,y,z)}
[...]
texture{
function{Surface_Fun(x,0,z}}
texture_map{...}
}
}

This won't work for function made of say the object-pattern because of their
infinite gradient (you would only gain two states), but in most other cases
this works quite well IMHO.
In this 'slice', the function did not reach the threshold-value in the
"elevated" parts of the surface and the function gives lower values for
those areas which are at y=0 'in' the surface. This is quite useful for
normal_maps as well, as it's quite easy the change the surface properties
this way (f.e. to simulate the foam). You can of course combine this pattern
with some slope dependent texturing to gain an extra amount of control.


Please tell me if this is no answer to your question :-)

Marc-Hendrik


Post a reply to this message

From: Tom Melly
Subject: Re: iso surfaces and pigments
Date: 8 Oct 2002 05:58:22
Message: <3da2ac3e$1@news.povray.org>
"Marc-Hendrik Bremer" <Mar### [at] t-onlinede> wrote in message
news:3da2a44a@news.povray.org...
>
>
> I have to admit, that I don't understand your question.
>

It may be a dumb question - I'll play with your example (or similiar) and try
and work out whether this is a non-problem or not. I hadn't thought of using y
in the surface and 0 in the texture, and I've no idea whether this resolves the
issue.

As for my "problem", consider:

 isosurface{
 function{Surface_Fun(x,y,z)}
 [...]
 texture{
 function{Surface_Fun(x,y,z}}
 texture_map{...}
 }
 }

Here, the texture function becomes superfluous (IMHO), since the entire surface
will have the same threshold, meaning that only one entry in the texture map
will be used.


Post a reply to this message

From: Marc-Hendrik Bremer
Subject: Re: iso surfaces and pigments
Date: 8 Oct 2002 06:34:45
Message: <3da2b4c5@news.povray.org>
"Tom Melly" <tom### [at] tomandlucouk> schrieb im Newsbeitrag
news:3da2ac3e$1@news.povray.org...
> Here, the texture function becomes superfluous (IMHO), since the entire
surface
> will have the same threshold, meaning that only one entry in the texture
map
> will be used.
>

Yes, you are right, but that problem is solved by the mentioned method. One
could even use multiple y-values of the function if that's necessary (if the
surface hangs over f.e.) by using a gradient pattern and function-patterns
in the various parts of the texture_map{}. It was never necessary for me
'til now though.

Marc-Hendrik


Post a reply to this message

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