|
![](/i/fill.gif) |
"Tony LaVigne" <ton### [at] xenomechanics com> 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
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
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] xenomechanics com
Post a reply to this message
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
Oh yes, for Water_Ior you'll want #include "consts.inc".
--
Tek
http://www.evilsuperbrain.com
"Tony LaVigne" <ton### [at] xenomechanics com> 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] xenomechanics com
>
>
>
>
Post a reply to this message
|
![](/i/fill.gif) |