POV-Ray : Newsgroups : povray.general : Water Media Server Time
16 Nov 2024 23:18:33 EST (-0500)
  Water Media (Message 1 to 5 of 5)  
From: Rafal 'Raf256' Maj
Subject: Water Media
Date: 11 Aug 2003 10:59:34
Message: <Xns93D4ACE13E20Braf256com@204.213.191.226>
Hi,
I;m trying to symulate realistic water.
I'm using media and pigment rgbf 1

What media I shuld use?

Scanntering media works ok if water color is white. When I'm using blue 
water, like:

    media {  #local C=<0,0,1>;
      density { color rgb C  }
      scattering { 1 1 extinction 1 }
    }  

Then I have problem with shadow that's color is (1-C) - yellow.
If I set extinction 0 get rid of shadow, all objects in water are visible 
with is I quess not correct.


-- 
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: Water Media
Date: 11 Aug 2003 11:05:00
Message: <Xns93D4ADCC862CBraf256com@204.213.191.226>
spa### [at] raf256com news:Xns### [at] 204213191226

> Then I have problem with shadow that's color is (1-C) - yellow.
> If I set extinction 0 get rid of shadow, all objects in water are
> visible with is I quess not correct.

Hmm I think that I have a nice splution after all:

    media { #local C=<0,0,1>;
      density { color rgb 1  }
      scattering { 1 C extinction 0 }
      absorption .1*(1-C)
      intervals 6
    }  

but any other ideas / comments are welcomed :)


-- 
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M


Post a reply to this message

From: ABX
Subject: Re: Water Media
Date: 11 Aug 2003 11:21:25
Message: <h0dfjv84jrht0rjht8d0eji41aqhrvn6nl@4ax.com>
On 11 Aug 2003 10:59:34 -0400, "Rafal 'Raf256' Maj" <spa### [at] raf256com> wrote:
> What media I shuld use?

http://www-public.tu-bs.de:8080/~y0013390/pov/water/

ABX


Post a reply to this message

From: Christopher James Huff
Subject: Re: Water Media
Date: 11 Aug 2003 11:23:18
Message: <cjameshuff-8D2392.10200811082003@netplex.aussie.org>
In article <Xns### [at] 204213191226>,
 "Rafal 'Raf256' Maj" <spa### [at] raf256com> wrote:

> Scanntering media works ok if water color is white. When I'm using blue 
> water, like:
> 
>     media {  #local C=<0,0,1>;
>       density { color rgb C  }
>       scattering { 1 1 extinction 1 }
>     }  

I don't know about where you live, but around here, water is nearly 
clear and colorless...I certainly wouldn't drink or swim in this.

Your shadow is yellow because you scatter lots of blue light, but no red 
or green. Clean water scatters very little, and mainly absorbs red 
light, with green coming next and blue coming last. A simple Google 
search should show some real numbers. Scattering media is mainly useful 
for simulating silt, suspended algae/plankton, etc. You've given no 
clues as to what kind of water you're trying to simulate...you need to 
give more information.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Slime
Subject: Re: Water Media
Date: 12 Aug 2003 15:42:05
Message: <3f39430d$1@news.povray.org>
>     media {  #local C=<0,0,1>;

My first tip for you: Never, ever, ever use zero for one of the components
of a color. Use a small value, like 0.1 or so, instead. It creates a *much*
more realistic effect in areas where things get bright. A color component of
zero is something that you just don't find in real life.

There are exceptions, I'm sure, but speaking from experience, things look a
lot better when you use colors like <0.1, 0.15 ,1> instead of <0,0,1>.

That won't solve your media problem, though. I faced the same problem when i
made http://www.slimeland.com/images/pictures/RealWater.jpg . In the end, I
don't remember what I did. I do, however, remember fiddling with it for days
until I got it to a point where I was reasonably happy with it. Try making
the media more dense, or less dense. Fiddle with colors. Just keep trying
things. I hope someone else here has some more concrete advice for you.

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

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