POV-Ray : Newsgroups : povray.binaries.images : Underwater Server Time
5 Nov 2024 14:20:22 EST (-0500)
  Underwater (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Trevor G Quayle
Subject: Underwater
Date: 14 Jul 2006 08:35:01
Message: <web.44b78e99dec2fd42c150d4c10@news.povray.org>
Lately I've been participating in the lighting challenges hosted by Jeremy
Birn over at CGTalk (http://forums.cgsociety.org/forumdisplay.php?f=185).
(I have a feeling that I may be the only POVer there at the moment,
everyone elseseems to be using commercial level progs)
Anyways, here is one of my latest entries in the latest challenge that I
wanted to share here.

-tgq

p.s. It would be nice to maybe see some more POV presence if anyone is
looking for a challenge.


Post a reply to this message


Attachments:
Download 'undertheboardwalk-13.jpg' (287 KB)

Preview of image 'undertheboardwalk-13.jpg'
undertheboardwalk-13.jpg


 

From: Gail Shaw
Subject: Re: Underwater
Date: 14 Jul 2006 09:16:14
Message: <44b7991e@news.povray.org>
"Trevor G Quayle" <Tin### [at] hotmailcom> wrote in message
news:web.44b78e99dec2fd42c150d4c10@news.povray.org...
> Lately I've been participating in the lighting challenges hosted by Jeremy
> Birn over at CGTalk (http://forums.cgsociety.org/forumdisplay.php?f=185).
> (I have a feeling that I may be the only POVer there at the moment,
> everyone elseseems to be using commercial level progs)
> Anyways, here is one of my latest entries in the latest challenge that I
> wanted to share here.

Very nice. I've been plyaing with underwater scenes recently, but haven't
had much success

Would you be willing to share the code for the water please?


Post a reply to this message

From: Trevor G Quayle
Subject: Re: Underwater
Date: 14 Jul 2006 09:40:00
Message: <web.44b79e3341c8db3cc150d4c10@news.povray.org>
"Gail Shaw" <initialsurname@sentech sa dot com> wrote:
> "Trevor G Quayle" <Tin### [at] hotmailcom> wrote in message
> news:web.44b78e99dec2fd42c150d4c10@news.povray.org...
> > Lately I've been participating in the lighting challenges hosted by Jeremy
> > Birn over at CGTalk (http://forums.cgsociety.org/forumdisplay.php?f=185).
> > (I have a feeling that I may be the only POVer there at the moment,
> > everyone elseseems to be using commercial level progs)
> > Anyways, here is one of my latest entries in the latest challenge that I
> > wanted to share here.
>
> Very nice. I've been plyaing with underwater scenes recently, but haven't
> had much success
>
> Would you be willing to share the code for the water please?

Sure.
A few notes:
The surface is just normals with ripple center locations manually enteredfor
objects penetrating the surface.  The parameters used for N1 need to be
adjusted according to the look you want and the scale of your scene.
The water color itself is perfectly clear (rgbt 1) and light attenuation is
not on.  All light colouring and attenuation comes from the absorption
media which I tried to tweak based on some actual water/light parameters
(http://www.seafriends.org.nz/phgraph/water.htm#colour if you would like an
interesting read).  The caustics were faked using a bitmap filter just above
the water surface. (Caustic map obtained
fromhttp://www.dgp.toronto.edu/%7Estam/reality/Research/PeriodicCaustics/index.html)

//START
global_settings{number_of_waves 10 }
#declare NP=21;//number of items making ripples

#declare P0=normal{granite bump_size NP/20 scale 2}

#macro N1(OS,SCL,FRQ,SIZ,BS)//ripple macro
  cylindrical
  normal_map{[0.0 bozo 0] [1.0 ripples bump_size BS*NP scale SIZ/SCL
frequency SIZ*FRQ]}
  poly_wave 1.5
  scale SCL
  translate OS
#end

#declare PLoc0=<-7.3,9,-25.9>;//Pier Locations
#declare PLoc1=< 7.3,9,-25.9>;
#declare PLoc2=< 7.3,9, -6.6>;
#declare PLoc3=<-7.3,9, -6.6>;
#declare PLoc4=< 7.3,9, 17.0>;
#declare PLoc5=<-7.3,9, 17.0>;
#declare PLoc6=< 7.3,9, 40.7>;
#declare PLoc7=<-7.3,9, 40.7>;
#declare PT1=<3.2,0,-24.5>;//PAD1
#declare PT2=<3.6,0,-26.6>;//PAD2
#declare PT3=<5.8,0,-24.9>;//PAD3
#declare PT4=<5.4,0,-30.8>;//FLOAT
#declare PT5=<0.4,0,-32.9>;//PLANT
#declare PT6=<2.0,0,-32.1>;//PLANT
#declare PT7=<1.5,0,-34.0>;//PLANT
#declare PT8=<0.7,0,-32.2>;//PLANT
#declare PT9=<11.6,0,-22.0>;//PLANT
#declare PT10=<11.8,0,-22.8>;//PLANT
#declare PT11=<13.0,0,-20.9>;//PLANT

#declare P1= //ripple normal map
  normal {
    average
    normal_map {
      [1 N1(PLoc0,12,3,0.5,1)]
      [1 N1(PLoc1,12,3,0.5,1)]
      [1 N1(PLoc2,12,3,0.5,1)]
      [1 N1(PLoc3,12,3,0.5,1)]
      [1 N1(PLoc4,12,3,0.5,1)]
      [1 N1(PLoc5,12,3,0.5,1)]
      [1 N1(PLoc6,12,3,0.5,1)]
      [1 N1(PLoc7,12,3,0.5,1)]
      [1 N1(0,20,2,1.0,1) scale <1,1,2> rotate -y*13 translate
<-14.4,0,-13.4>]//BOAT
      [1 N1(PT1,10,5,0.2,1)]//PAD1
      [1 N1(PT2,10,5,0.2,1)]//PAD2
      [1 N1(PT3,10,5,0.2,1)]//PAD3
      [1 N1(PT4,5,20,0.3,1)]//FLOAT
      [1 N1(PT5,5,20,0.3,1)]//PLANT
      [1 N1(PT6,5,20,0.3,1)]//PLANT
      [1 N1(PT7,5,20,0.3,1)]//PLANT
      [1 N1(PT8,5,20,0.3,1)]//PLANT
      [1 N1(PT9,5,20,0.3,1)]//PLANT
      [1 N1(PT10,5,20,0.3,1)]//PLANT
      [1 N1(PT11,5,20,0.3,1)]//PLANT
      [1.5 P0]
    }
  }


#declare MWater=
  material{
    texture{
      pigment{rgbt 1}
      finish{conserve_energy  diffuse 0  ambient 0  reflection{0 1 fresnel
on metallic 0}}
      normal{P1}
    }
    #local FD=-(1000/(6*25.4))/ln(0.58)*2;
    interior{
      ior 1.33
      media{//light absorption
        absorption rgb 1-<0.51373, 0.70588, 0.59216>
        density{rgb 1/FD}
      }
      media{//light scattering
        method 3
        samples 50,100
        jitter 0.5
        scattering{4,rgb <0.74118, 0.71765, 0.41961>}
        density{
          bozo
            color_map {
              [0.0 rgb 1/100]
              [1.0 rgb 1/200]
            }
            scale 1/2
        }
      }
    }
  }

#declare WaterSurface2=box{<-202,-2,-234><202,8.14,91> hollow}


object{WaterSurface2 hollow
  material{MWater}
//  photons{target refraction on reflection on collect off}
}

//faked caustics
#local PIMAGE = function {pigment{image_map {sys "Caus.bmp" interpolate
2}rotate x*90 scale 10}}
plane{y 0 pigment{function{PIMAGE(x,y,z).gray} colour_map{[0 rgbt 0][1 rgbt
2]}}   translate y*8.141 hollow no_image no_reflection}

//END

-tgq


Post a reply to this message

From: Gail Shaw
Subject: Re: Underwater
Date: 14 Jul 2006 12:09:31
Message: <44b7c1bb@news.povray.org>
"Trevor G Quayle" <Tin### [at] hotmailcom> wrote in message
news:web.44b79e3341c8db3cc150d4c10@news.povray.org...
>
> Sure.

Thanks


Post a reply to this message

From: EagleSun
Subject: Re: Underwater
Date: 14 Jul 2006 16:30:01
Message: <web.44b7fe1241c8db3c841337530@news.povray.org>
"Trevor G Quayle" <Tin### [at] hotmailcom> wrote:
> Lately I've been participating in the lighting challenges hosted by Jeremy
> Birn over at CGTalk (http://forums.cgsociety.org/forumdisplay.php?f=185).
> (I have a feeling that I may be the only POVer there at the moment,
> everyone elseseems to be using commercial level progs)
> Anyways, here is one of my latest entries in the latest challenge that I
> wanted to share here.
>
> -tgq
>
> p.s. It would be nice to maybe see some more POV presence if anyone is
> looking for a challenge.

WOW!@

I think you are going to win this one....  Lots of professional-looking
software use many rendering shortcuts and take away from real physics light
modelling.  It's too expensive (on CPU) to render things right.  But if you
want to win the prize, you need to pay the price.

You are using internal media, right?  I suggest to bump up the "interval"
and "sample".  Those 2 parameters are extremely expensive, but they produce
lively results.


Post a reply to this message

From: EagleSun
Subject: Re: Underwater
Date: 14 Jul 2006 16:30:01
Message: <web.44b7fec041c8db3c841337530@news.povray.org>
"Trevor G Quayle" <Tin### [at] hotmailcom> wrote:
>       media{//light scattering
>         method 3
>         samples 50,100
>         jitter 0.5
>         scattering{4,rgb <0.74118, 0.71765, 0.41961>}
>         density{
>           bozo
>             color_map {
>               [0.0 rgb 1/100]
>               [1.0 rgb 1/200]
>             }
>             scale 1/2
>         }

OK, I see you are using samples already... try media.  It's slightly cheaper
on CPU and allows you to reduce sample values to get the same results.


Post a reply to this message

From: Trevor G Quayle
Subject: Re: Underwater
Date: 14 Jul 2006 20:36:34
Message: <44b83892$1@news.povray.org>
"EagleSun" <nomail@nomail> wrote in message 
news:web.44b7fe1241c8db3c841337530@news.povray.org...
> "Trevor G Quayle" <Tin### [at] hotmailcom> wrote:
>> Lately I've been participating in the lighting challenges hosted by 
>> Jeremy
>> Birn over at CGTalk (http://forums.cgsociety.org/forumdisplay.php?f=185).
>> (I have a feeling that I may be the only POVer there at the moment,
>> everyone elseseems to be using commercial level progs)
>> Anyways, here is one of my latest entries in the latest challenge that I
>> wanted to share here.
>>
>> -tgq
>>
>> p.s. It would be nice to maybe see some more POV presence if anyone is
>> looking for a challenge.
>
> WOW!@
>
> I think you are going to win this one....  Lots of professional-looking
> software use many rendering shortcuts and take away from real physics 
> light
> modelling.  It's too expensive (on CPU) to render things right.  But if 
> you
> want to win the prize, you need to pay the price.
>
> You are using internal media, right?  I suggest to bump up the "interval"
> and "sample".  Those 2 parameters are extremely expensive, but they 
> produce
> lively results.
>
>

Thanks.  Compared to most of the other postings, I tend to try to make POV 
give real-world results, which includes total internal reflection and light 
attenuation.
To tell the truth, I have no experience in any other renderers, especially 
scan-line, but for some reason, noone seems to be getting the total internal 
reflection effect properly.  (Or perhaps they are avoiding it for artistic 
reasons...)

-tgq


Post a reply to this message

From: Alain
Subject: Re: Underwater
Date: 15 Jul 2006 14:04:35
Message: <44b92e33$1@news.povray.org>
Trevor G Quayle nous apporta ses lumieres en ce 14/07/2006 09:37:

>       media{//light scattering
>         method 3
This is the default, you don't need to force it
>         samples 50,100
Only the first value is used, the 100 is completely ignored.
>         jitter 0.5
>         scattering{4,rgb <0.74118, 0.71765, 0.41961>}
>         density{
>           bozo
>             color_map {
>               [0.0 rgb 1/100]
>               [1.0 rgb 1/200]
>             }
>             scale 1/2
>         }
>       }
>     }
>   }
> 
> 
> //faked caustics
> #local PIMAGE = function {pigment{image_map {sys "Caus.bmp" interpolate
> 2}rotate x*90 scale 10}}
> plane{y 0 pigment{function{PIMAGE(x,y,z).gray} colour_map{[0 rgbt 0][1 rgbt
> 2]}}   translate y*8.141 hollow no_image no_reflection}
> 
> //END
For this, you can use the caustics keyword in your interior. Way faster than using
photons, only 
dependent on normals/shape, independent from distance, only affect area inside the
"shadow" area, no 
reflection caustics.
Perfect in your case.
> 
> -tgq
> 
> 


-- 
Alain
-------------------------------------------------
Judaism: Why does this shit always happen to us?


Post a reply to this message

From: Alain
Subject: Re: Underwater
Date: 15 Jul 2006 14:07:32
Message: <44b92ee4@news.povray.org>
EagleSun nous apporta ses lumieres en ce 14/07/2006 16:26:
> "Trevor G Quayle" <Tin### [at] hotmailcom> wrote:
>> Lately I've been participating in the lighting challenges hosted by Jeremy
>> Birn over at CGTalk (http://forums.cgsociety.org/forumdisplay.php?f=185).
>> (I have a feeling that I may be the only POVer there at the moment,
>> everyone elseseems to be using commercial level progs)
>> Anyways, here is one of my latest entries in the latest challenge that I
>> wanted to share here.
>>
>> -tgq
>>
>> p.s. It would be nice to maybe see some more POV presence if anyone is
>> looking for a challenge.
> 
> WOW!@
> 
> I think you are going to win this one....  Lots of professional-looking
> software use many rendering shortcuts and take away from real physics light
> modelling.  It's too expensive (on CPU) to render things right.  But if you
> want to win the prize, you need to pay the price.
> 
> You are using internal media, right?  I suggest to bump up the "interval"
> and "sample".  Those 2 parameters are extremely expensive, but they produce
> lively results.
> 
> 
Using method 3, DON'T increase intervals but bump up samples. Increasing intervals
greatly increase 
render time. Increasing samples only have a moderate incidence on render time, and
usualy give you 
beter results.

-- 
Alain
-------------------------------------------------
There will always be beer cans rolling on the floor of your car when the boss asks
for a ride home from the office.


Post a reply to this message

From: Trevor G Quayle
Subject: Re: Underwater
Date: 15 Jul 2006 16:45:05
Message: <44b953d1@news.povray.org>
>> //faked caustics
>> #local PIMAGE = function {pigment{image_map {sys "Caus.bmp" interpolate
>> 2}rotate x*90 scale 10}}
>> plane{y 0 pigment{function{PIMAGE(x,y,z).gray} colour_map{[0 rgbt 0][1 
>> rgbt
>> 2]}}   translate y*8.141 hollow no_image no_reflection}
>>
> For this, you can use the caustics keyword in your interior. Way faster 
> than using photons, only dependent on normals/shape, independent from 
> distance, only affect area inside the "shadow" area, no reflection 
> caustics.
> Perfect in your case.
>>
>> -tgq
>>
>>
>
>
> -- 
> Alain

Actually, I did have caustics on before, but I could not get them to give 
the desired results, so I reverted to the filter method.

-tgq


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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