POV-Ray : Newsgroups : povray.binaries.images : Bathtub - take 2 Server Time
1 Aug 2024 14:28:15 EDT (-0400)
  Bathtub - take 2 (Message 26 to 35 of 65)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Thomas de Groot
Subject: Re: Bathtub - take 2
Date: 19 Dec 2008 03:02:43
Message: <494b5523$1@news.povray.org>
"alphaQuad" <alp### [at] earthlinknet> schreef in bericht 
news:web.494ad7956655db18e157c2430@news.povray.org...
> did anyone mention
> global_settings { number_of_waves Count }

No. But that can also be used of course :-)

> 3.5.11.35  Waves
> When used as a normal pattern, this pattern uses a specialized normal
> perturbation function. This means that the pattern cannot be used with
> normal_map, slope_map or wave type modifiers in a normal statement.

Whatever the docs say, it works for me anyway... :-)

>
>
> OK now I'm just a little ichy ... grain of salt eh?

Shower in mineral water... :-)


Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Bathtub - take 2
Date: 19 Dec 2008 03:10:35
Message: <494b56fb@news.povray.org>
"alphaQuad" <alp### [at] earthlinknet> schreef in bericht 
news:web.494b47636655db18ab3d2ec40@news.povray.org...

Those images look allright though... What code did you use here?

Thomas


Post a reply to this message

From: alphaQuad
Subject: Re: Bathtub - take 2
Date: 19 Dec 2008 13:50:01
Message: <web.494bec5f6655db18c18a63f20@news.povray.org>
"Thomas de Groot" <tDOTdegroot@interDOTnlANOTHERDOTnet> wrote:
> "alphaQuad" <alp### [at] earthlinknet> schreef in bericht
> news:web.494b47636655db18ab3d2ec40@news.povray.org...
>
> Those images look allright though... What code did you use here?
>
> Thomas
Well now that you mention it, I looked over what I grabbed for testing...

Really sloppy chrome, actually. I don't write stuff like this, but have been
know to paste it. Wont do that again.


all. The page had 6 lights, no radiosity used: this is water "11" in the 4-by
image, using the posted norms. (I dont think I changed them)

global_settings {
  number_of_waves  2
  assumed_gamma 1.9
  max_trace_level 5
}

camera {
  location <0, 50, -560>
  look_at <0,-7,0>
  angle 25
}
light_source { <0, 8000, 0> color White
    spotlight
    point_at <0,0,0>
    radius 10
    falloff 90
}
light_source {<4000,-250,-4000> color Gray30
 fade_distance 8000 fade_power 2
}

light_source {<-5000, 2500, -5000> color Gray40
     fade_distance 8000 fade_power 2
}

light_source {
<0, 1200, 0>
color White
spotlight
point_at <0,0,0>
radius 10
falloff 110
}
light_source {
<40,-2.5,-40>
color Gray60
fade_distance 80
fade_power 2
}
light_source {
<-50, 25, -50>
color Gray50
fade_distance 80
fade_power 2
}



#declare Bigripple =
normal {
  waves 1
  frequency 6
  turbulence 0.8
  scale <0.5, 0.2, 0.2>*0.5
  translate -100*z
  rotate -30*y
}

#declare Smallripple =
normal {
  ripples 1
  frequency 3
  turbulence 0.5
  scale <0.35, 0.25, 0.25>*0.2
  translate 100*z
  rotate -10*z
}
#declare RippleNorm =
normal {
  average
  normal_map {
    [0.9 Bigripple]
    [0.8 Smallripple]
  }
}
#declare water5 = plane {
    y,-50
    texture {
       T_Chrome_3C
       pigment{ rgb <0.3,0.4,0.85>*0.6 }
       //normal { Bigripple scale 5000 }
       normal { RippleNorm scale 5000 }
       finish { ambient 0 }
   }
   translate x*-18000
}
object { water5 }


thanks for posting code. One day we'll see a great picture for the effort.


Post a reply to this message

From: alphaQuad
Subject: Re: Bathtub - take 2
Date: 19 Dec 2008 13:55:00
Message: <web.494bed9d6655db18c18a63f20@news.povray.org>
"Thomas de Groot" <tDOTdegroot@interDOTnlANOTHERDOTnet> wrote:
> "alphaQuad" <alp### [at] earthlinknet> schreef in bericht
> news:web.494b47636655db18ab3d2ec40@news.povray.org...
>
> Those images look allright though... What code did you use here?
>
> Thomas

I forgot the sky, of course.


#declare sky_blue =
sky_sphere {
    pigment {
        gradient y
        color_map {
         [0.0 rgb <0.6,0.7,1.0>]
          [0.7 rgb <0.0,0.1,0.8>]
        }
    }
}

sky_sphere { sky_blue }


Post a reply to this message

From: Trevor G Quayle
Subject: Re: Bathtub - take 2
Date: 19 Dec 2008 15:50:00
Message: <web.494c08bf6655db1881c811d20@news.povray.org>
"alphaQuad" <alp### [at] earthlinknet> wrote:
>
> Today I tried to find a suitable replacement for my Lego water:
>  <web.49472c24399f7e1d778c150@news.povray.org>
>
> I could not. I was able to make some watery chrome.
>
> I'd love to see someone find something better than f_ridge for the Lego pool.

The water probably doesn't look that bad.  The issue with water that makes it
interesting looking it what is available to reflect.  Your sky and background
is rather simple which ends up making the reflection very simple and chromey
looking.

I always point out that reflective surfaces only look as good as what is
available for them to reflect.
(see :
http://news.povray.org/povray.binaries.images/message/%3Cweb.464c611a4ef76416c150d4c10%40news.povray.org%3E/#%3Cweb.464
c611a4ef76416c150d4c10%40news.povray.org%3E
 for an example)

-tgq


Post a reply to this message

From: Trevor G Quayle
Subject: Re: Bathtub - take 2
Date: 19 Dec 2008 16:20:01
Message: <web.494c0f496655db1881c811d20@news.povray.org>
"Trevor G Quayle" <Tin### [at] hotmailcom> wrote:
> "alphaQuad" <alp### [at] earthlinknet> wrote:
> >
> > Today I tried to find a suitable replacement for my Lego water:
> >  <web.49472c24399f7e1d778c150@news.povray.org>
> >
> > I could not. I was able to make some watery chrome.
> >
> > I'd love to see someone find something better than f_ridge for the Lego pool.
>
> The water probably doesn't look that bad.  The issue with water that makes it
> interesting looking it what is available to reflect.  Your sky and background
> is rather simple which ends up making the reflection very simple and chromey
> looking.
>
> I always point out that reflective surfaces only look as good as what is
> available for them to reflect.
> (see :
>
http://news.povray.org/povray.binaries.images/message/%3Cweb.464c611a4ef76416c150d4c10%40news.povray.org%3E/#%3Cweb.4
64
> c611a4ef76416c150d4c10%40news.povray.org%3E
>  for an example)
>
> -tgq

I played around with coming up with a nice water today.


Post a reply to this message


Attachments:
Download 'legopool1.jpg' (84 KB)

Preview of image 'legopool1.jpg'
legopool1.jpg


 

From: Trevor G Quayle
Subject: Re: Bathtub - take 2
Date: 19 Dec 2008 16:20:01
Message: <web.494c0f736655db1881c811d20@news.povray.org>
"Trevor G Quayle" <Tin### [at] hotmailcom> wrote:
> "alphaQuad" <alp### [at] earthlinknet> wrote:
> >
> > Today I tried to find a suitable replacement for my Lego water:
> >  <web.49472c24399f7e1d778c150@news.povray.org>
> >
> > I could not. I was able to make some watery chrome.
> >
> > I'd love to see someone find something better than f_ridge for the Lego pool.
>
> The water probably doesn't look that bad.  The issue with water that makes it
> interesting looking it what is available to reflect.  Your sky and background
> is rather simple which ends up making the reflection very simple and chromey
> looking.
>
> I always point out that reflective surfaces only look as good as what is
> available for them to reflect.
> (see :
>
http://news.povray.org/povray.binaries.images/message/%3Cweb.464c611a4ef76416c150d4c10%40news.povray.org%3E/#%3Cweb.4
64
> c611a4ef76416c150d4c10%40news.povray.org%3E
>  for an example)
>
> -tgq

Again, but with an environment map rather than plain sky.


Post a reply to this message


Attachments:
Download 'legopool2.jpg' (80 KB)

Preview of image 'legopool2.jpg'
legopool2.jpg


 

From: Trevor G Quayle
Subject: Re: Bathtub - take 2
Date: 19 Dec 2008 16:25:00
Message: <web.494c10106655db1881c811d20@news.povray.org>
"Trevor G Quayle" <Tin### [at] hotmailcom> wrote:
> "alphaQuad" <alp### [at] earthlinknet> wrote:
> >
> > Today I tried to find a suitable replacement for my Lego water:
> >  <web.49472c24399f7e1d778c150@news.povray.org>
> >
> > I could not. I was able to make some watery chrome.
> >
> > I'd love to see someone find something better than f_ridge for the Lego pool.
>
> The water probably doesn't look that bad.  The issue with water that makes it
> interesting looking it what is available to reflect.  Your sky and background
> is rather simple which ends up making the reflection very simple and chromey
> looking.
>
> I always point out that reflective surfaces only look as good as what is
> available for them to reflect.
> (see :
>
http://news.povray.org/povray.binaries.images/message/%3Cweb.464c611a4ef76416c150d4c10%40news.povray.org%3E/#%3Cweb.4
64
> c611a4ef76416c150d4c10%40news.povray.org%3E
>  for an example)
>
> -tgq

The actual water (as a heightfield as in the renders):

//start
#declare ASiz=250;

#declare RHIT=0.25;
#declare FREQ=15;

#declare WDep=75;
#declare WHit=0.45;

#declare TDep=WDep+WHit+RHIT+1;

#declare TFunk1=function{max(min(abs(x),1)-0.5,0)/(1-0.5)}

#declare PPIG3= //Pool Side Ripples
  pigment {
    function{TFunk1(x,y,z)}
    pigment_map{
      [0.0 rgb 0]
      [1.0 function{TFunk1(x,y,z)} frequency ASiz/FREQ sine_wave]
    }
    scale 1/2
    poly_wave 3
    translate x*1/2
    scale 5
    warp{turbulence 0.05*x}
    scale 1/5
    warp{turbulence 0.05*x}
  }

#declare WCol=rgb <0.51373, 0.70588, 0.70588>; //Water colour
#local FD=-60/ln(0.58);                        //Fade distance

#declare RScal=1/10;
#declare RFreq=50;

#declare SRip =
function{
  pigment {
    marble
    frequency ASiz/RFreq*RScal
    scale 1/5
    warp{turbulence 1.5}
    scale 5
    warp{turbulence 0.5}
    sine_wave
    scale RScal
  }
}

#local FTILEA = function {SRip(x,y,z).gray*0.5+SRip(y,x,z).gray*0.5}
#local FTILEB = function {pigment{PPIG3 }}
#local FTILEC = function {pigment{PPIG3 rotate z*90}}

#declare aaa=WHit/TDep;
#declare bbb=RHIT/TDep;

#local FTILE = function
{FTILEA(x,y,z)*aaa+FTILEB(x,y,z).gray*bbb+FTILEC(x,y,z).gray*bbb+(1-aaa-bbb*2)}

#declare WW2=
height_field{
  function 600,600 {pattern{function{FTILE(x,y,z)}}}
  smooth
  hollow
  scale <ASiz,TDep,ASiz>
}

#declare MWater=
  material{
    texture{
      pigment{rgbt 1}
      finish{conserve_energy  diffuse 0.0  ambient 0  reflection{0 1 fresnel on
metallic 0}}
    }
    interior{
      ior 1.33
      media{
        absorption rgb 1-WCol
        density{rgb 1/FD}
      }
    }
  }

// water
intersection{
  box { <-8, -77, -8> <216, 1, 216>}
  object{WW2 translate <-10,-76,-10>}
  hollow
  material { MWater translate <-10,0,-10>}
}

//END

it can also be expressed as a normal by using modifying and using the function:

//START

#declare ASiz=250;

#declare RHIT=0.25;
#declare FREQ=15;

#declare WDep=75;
#declare WHit=0.45;

#declare TDep=WDep+WHit+RHIT+1;

#declare TFunk1=function{max(min(abs(x),1)-0.5,0)/(1-0.5)}

#declare PPIG3= //Pool Side Ripples
  pigment {
    function{TFunk1(x,y,z)}
    pigment_map{
      [0.0 rgb 0]
      [1.0 function{TFunk1(x,y,z)} frequency ASiz/FREQ sine_wave]
    }
    scale 1/2
    poly_wave 3
    translate x*1/2
    scale 5
    warp{turbulence 0.05*x}
    scale 1/5
    warp{turbulence 0.05*x}
  }

#declare WCol=rgb <0.51373, 0.70588, 0.70588>; //Water colour
#local FD=-60/ln(0.58);                        //Fade distance


#declare RScal=1/10;
#declare RFreq=50;

#declare SRip =
function{
  pigment {
    marble
    frequency ASiz/RFreq*RScal
    scale 1/5
    warp{turbulence 1.5}
    scale 5
    warp{turbulence 0.5}
    sine_wave
    scale RScal
  }
}

#local FTILEA = function {SRip(x,y,z).gray*0.5+SRip(y,x,z).gray*0.5}
#local FTILEB = function {pigment{PPIG3 }}
#local FTILEC = function {pigment{PPIG3 rotate z*90}}

#declare aaa=WHit/TDep;
#declare bbb=RHIT/TDep;

#local FTILE = function
{FTILEA(x,y,z)*aaa+FTILEB(x,y,z).gray*bbb+FTILEC(x,y,z).gray*bbb+(1-aaa-bbb*2)}


#declare THit=WHit+RHIT*2;
#local FTILE2 = function
{FTILEA(x,y,z)*WHit/THit+FTILEB(x,y,z).gray*RHIT/THit+FTILEC(x,y,z).gray*RHIT/THit}


//#declare WW2=
//height_field{
//  function 600,600 {pattern{function{FTILE(x,y,z)}}}
//  smooth
//  hollow
//  scale <ASiz,TDep,ASiz>
//}

#declare MWater=
  material{
    texture{
      pigment{rgbt 1}
      finish{conserve_energy  diffuse 0.0  ambient 0  reflection{0 1 fresnel on
metallic 0}}
      normal{function{FTILE2(x,z,y)} scale <ASiz,TDep,ASiz> bump_size 0.1}
    }
    interior{
      ior 1.33
      media{
        absorption rgb 1-WCol
        density{rgb 1/FD}
      }
    }
  }

// water
intersection{
  box { <-8, -77, -8> <216, 1, 216>}
  //object{WW2 translate <-10,-76,-10>}
  hollow
  material { MWater translate <-10,0,-10>}
}

//END

-tgq


Post a reply to this message

From: alphaQuad
Subject: Re: Bathtub - take 2
Date: 20 Dec 2008 01:15:01
Message: <web.494c8c2a6655db18fb8a7bfa0@news.povray.org>
"Trevor G Quayle" <Tin### [at] hotmailcom> wrote:

> I played around with coming up with a nice water today.

Indeed.

log_E(0.58)
log(.58)/log(2.7182818284590452353602874713526) =
-0.544727175441672
#local FD=-60/ln(0.58); //Fade distance = 110.146882

so what does .58 refer to?

#declare WHit=0.45;
water-height ??? what does 0.45 refer to?

I can really appreciate the dimension considerations.

Reflection was unconvincing with 2 light-levels in the BG;
 still working on a tile pool perhaps.

Sky and lighting remains the same.
absorption from: 1-<0.51373, 0.70588, 0.70588>
to: <0.272, 0.046, 0.010>
(c_H2O_abs // rgb 1-WCol)

Top quality Lego bricks = parse time. Brick quality should have been a
brick(param), then you could save time where it isnt needed and have highQ
bricks in view.


Post a reply to this message


Attachments:
Download 'legoworld_pool2.png' (107 KB)

Preview of image 'legoworld_pool2.png'
legoworld_pool2.png


 

From: Trevor G Quayle
Subject: Re: Bathtub - take 2
Date: 20 Dec 2008 10:45:00
Message: <web.494d12cf6655db18c67b294d0@news.povray.org>
"alphaQuad" <alp### [at] earthlinknet> wrote:
> "Trevor G Quayle" <Tin### [at] hotmailcom> wrote:
>
> > I played around with coming up with a nice water today.
>
> Indeed.
>
> log_E(0.58)
> log(.58)/log(2.7182818284590452353602874713526) =
> -0.544727175441672
> #local FD=-60/ln(0.58); //Fade distance = 110.146882
>
> so what does .58 refer to?

Um, I don't recall off the top of my head.  This was set up over a year ago.  I
think it was to try to correlate with something but the exact reasoning escapes
me at the moment.

>
> #declare WHit=0.45;
> water-height ??? what does 0.45 refer to?

Sorry, I should've explained the variables.

ASiz=250; //~Length/Width of pool object

#declare RHIT=0.25; //Height of ripples (ripples at the sides of the pool)

#declare FREQ=15;   //frequency of ripples actually period or spacing, higher
number means further apart)

#declare WDep=75;   //Total depth of water
#declare WHit=0.45; //Height of main wave pattern

#declare TDep=WDep+WHit+RHIT+1; //Total depth of water with waves/ripples added
  - actually should be #declare TDep=WDep+WHit+RHIT*2;

#declare WCol=rgb <0.51373, 0.70588, 0.70588>; //Water colour
#local FD=-60/ln(0.58);                        //Fade distance

#declare RScal=1/10; //relative overall scaling of wave pattern
#declare RFreq=50;   //frequency of waves (similar to FREQ above but for the
main waves)

#local FTILEA = function {SRip(x,y,z).gray*0.5+SRip(y,x,z).gray*0.5}  //main
wave pattern.  two perpendicular marble patterns with sine_wave and much
turbulence
#local FTILEB = function {pigment{PPIG3 }}  //side ripples
#local FTILEC = function {pigment{PPIG3 rotate z*90}} //side ripples

#declare aaa=WHit/TDep; //proportional height of waves
#declare bbb=RHIT/TDep; //proportional height of ripples


#local FTILE = function
{FTILEA(x,y,z)*aaa+FTILEB(x,y,z).gray*bbb+FTILEC(x,y,z).gray*bbb+(1-aaa-bbb*2)}
//total surface function


Note that when using function patterns/pigments, care must be taken to keep the
maximum total values between 0 and 1 as anything outside that range wraps back
around (ie jumps back down to 0 after 1, etc) and gives wrong and awful
results.

In FTILEA  the two 0.5 values can be altered but make sure they add to 1 (0.4 &
0.6, etc)

In FTILE, the combination of aaa+bbb+bbb+(1-aaa-bbb2) makes the wave pattern
sizing proportional keeping the values between 0 and 1.


>
> I can really appreciate the dimension considerations.
>
> Reflection was unconvincing with 2 light-levels in the BG;
>  still working on a tile pool perhaps.

As I have said, reflection is generally not helped with lighting, but with what
there is to reflect.  Maybe add a sun where your light is and some clouds to
the sky.

Adding a sun is as simple as making a sphere with high ambient values:

within light source
looks_like{
  sphere{0,1  //size and locate accordingly
    pigment{rgb 1} //or use whatever colour you want the sun to be
    finish{diffuse 0 ambient 10}  //it is important to have a high ambient value
here, otherwise it looks like a plain white ball
  }
}

Using it with looks_like within a light source automatically lets light pass
through.  If it is not within a light source, add no_shadow to the object so it
doesn't interfere with the light.



-tgq


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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