POV-Ray : Newsgroups : povray.binaries.images : Seashore (wip) : Re: Seashore (wip) Server Time
8 Aug 2024 10:21:47 EDT (-0400)
  Re: Seashore (wip)  
From: Paolo Gibellini
Date: 4 Oct 2005 04:52:40
Message: <434242d8@news.povray.org>
Water texture is here.
As soon as I can add some decent comments and credits I will post the whole
source...
;-)
Paolo

---8<------ snippet ----
// This material arises from Christoph Hormann tutorial
// and was step by step modified following p.b.i. people
// indications (see credits above)
#declare m_water = color_map {
 [ 0.00 rgbt <0.217,0.552,0.877, 0.9> ]
 [ 0.90 rgbt <0.137,0.437,0.697, 0.95> ]
 [ 1.00 rgb <1,1,1> ]
}

#if(water_blur)
 #declare BlurAmount = .75; // Amount of blurring  --- 0.2 works but .75 I
like better
 #declare BlurSamples = 5; //How many rays to shoot   --- 40 for my pc is
impossible. 5 is not too bad

 #declare t_water = texture {
  average texture_map {
   #declare Ind = 0;
       #declare S = seed(0);
        #while(Ind < BlurSamples)
          [1 // The pigment of the object:
       pigment{
        rgbt <0.217,0.552,0.877, 0.9>
       }
            // The surface finish:
       finish {
     diffuse 0.3
     ambient 0.0
           reflection {0.3, 1 fresnel}
           conserve_energy
     specular 0.3
     roughness 0.003
       }
             // This is the actual trick:
             normal {
              //bumps BlurAmount
           ripples BlurAmount
           frequency 1
               translate <rand(S),rand(S),rand(S)>*10
               scale 1000
             }
          ]
          #declare Ind = Ind+1;
      #end
     }
 }
#else
 #declare t_water = texture {
     pigment{
      rgbt <0.217,0.552,0.877, 0.9>
      /*
   // I prefer a single pigment
      gradient z
      color_map {m_water}
      turbulence 0.9
      */
     }
     normal {
         ripples 0.75
         frequency 1
         translate <-3,0,3>
     }
     finish {
   diffuse 0.3
   ambient 0.0
         reflection {0.3, 1 fresnel}
         conserve_energy
   specular 0.3
   roughness 0.003
     }
 }
#end

#declare i_water =interior {
    ior 1.33
    fade_distance 0.3
 fade_power 1000
    fade_color <0.217,0.552,0.877>
}

#declare m_acqua =material {
    texture {t_water}
    interior {i_water}
}

---8<------ snippet ----

> "David El Tom" wrote:
> would you mind to share your water texture setup. Would help me much to
> get a feeling how to tweak textures for such scenes.
> ... dave


Post a reply to this message


Attachments:
Download 'riva70_1024_aa.jpg' (91 KB)

Preview of image 'riva70_1024_aa.jpg'
riva70_1024_aa.jpg


 

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