POV-Ray : Newsgroups : povray.binaries.images : Grassy Julia, Final Server Time
12 Aug 2024 21:24:12 EDT (-0400)
  Grassy Julia, Final (Message 11 to 13 of 13)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Tek
Subject: Re: Grassy Julia, Final
Date: 25 Jul 2003 18:34:07
Message: <3f21b05f$1@news.povray.org>
"Tony LaVigne" <ton### [at] xenomechanicscom> wrote in message
news:web.3f2165ea2acdf50fd97cd3e00@news.povray.org...
> Very nice rendering.
> How did you model the water surface?
> If the code for it is available it would be appeciated.
> Thanks
> Tony
>

Sure thing. Basically the sea is a flat plane with a granite texture used as a
normal map, and some realistic reflection settings. I've also added concentric
ripples to the surface around the base of my object, and flattened the surface
in the distance to prevent unpleasant noisiness near the horizon.

Here's the full source for the ocean effect:

//ocean
#declare f_Ripple =
 function ( d ) {
  sin(d*80)/(d*d)
 }

plane {
 y, -.8

 material {
  texture {
   pigment { rgb <.3,.5,.5> filter 1 }
   finish { diffuse 0 reflection { 0.05, 1 falloff 5 } conserve_energy }
   normal {
    function {
     .5+
     (1/((x*x+z*z)/pow(30,2) + 1))* //exp(-(x*x+z*z)/pow(50,2))* //
     (
      -.1 * f_granite(x,y,z)
      + .002*f_Ripple( sqrt(x*x+z*z)-.3 ) //rippples from base of object
     )
    } 1
    translate <.15,0,-.4>
   }
  } //texture
  interior {
   ior Water_Ior
  } //interior
 } //material
}

-- 
Tek
http://www.evilsuperbrain.com


Post a reply to this message

From: Tony LaVigne
Subject: Re: Grassy Julia, Final
Date: 26 Jul 2003 00:50:02
Message: <web.3f2207492acdf50f5de5b4510@news.povray.org>
Tek
Your the best.  I love this water surface.  To render your code on my system
I had to make two modifications, the first was to include the f_granite
file before it was called with...
#include "functions.inc"
and the 2nd was to sub "Water_Ior" with "`1.33"
I need to ask one more question and I'll post it soon,
again, thanks for all the insights,
Tony


xen### [at] xenomechanicscom


Post a reply to this message

From: Tek
Subject: Re: Grassy Julia, Final
Date: 26 Jul 2003 11:55:27
Message: <3f22a46f$1@news.povray.org>
Oh yes, for Water_Ior you'll want #include "consts.inc".

-- 
Tek
http://www.evilsuperbrain.com

"Tony LaVigne" <ton### [at] xenomechanicscom> wrote in message
news:web.3f2207492acdf50f5de5b4510@news.povray.org...
> Tek
> Your the best.  I love this water surface.  To render your code on my system
> I had to make two modifications, the first was to include the f_granite
> file before it was called with...
> #include "functions.inc"
> and the 2nd was to sub "Water_Ior" with "`1.33"
> I need to ask one more question and I'll post it soon,
> again, thanks for all the insights,
> Tony
>
>
> xen### [at] xenomechanicscom
>
>
>
>


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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