POV-Ray : Newsgroups : povray.advanced-users : creating faked water depth via gradient pigment Server Time
26 Dec 2024 13:58:14 EST (-0500)
  creating faked water depth via gradient pigment (Message 1 to 9 of 9)  
From: omniVERSE
Subject: creating faked water depth via gradient pigment
Date: 8 Nov 1999 00:59:10
Message: <382666ae@news.povray.org>
For TonyB.
As the lengthy Subject of this message post suggests this is one way to
create the illusion of depth in water when a object is partially or fully
submerged.
Let's say you already have both a water object (plane, etc.) and other
typical object (cylinder maybe).  By differencing the cylinder, slightly
scaled larger than the final one to be used, from the plane and applying a
texture having a gradient y color map there can be a surface showing the
variation of filtered pigment against that cylinder when reinserted into the
plane.  Example:

#declare WaterPlane=plane {y,0} // water texture to be added later
#declare UprightPipe=cylinder {-y,y,1} // original object to test with, no
texture

difference { // this will be the water
 object {WaterPlane}
 object {UprightPipe scale 1.001} // scaled slightly larger to create a
hollow for the later original addition
  texture {pigment {gradient y color_map { // a basic water texture
                [0,1 color rgbf <.5,.6,.7,.8> color rgbf <.8,.9,1,1>]}
ramp_wave } // darker to light coloring, less to more filtering
                 normal {ripples 1 turbulence .4}
                  finish {specular .9 roughness .01 reflection .3}
    scale 1 // scaled to appropriate dimension for actual water depth
  }
   interior {ior 1.33 caustics 1}
}

// the pipe added in
object {UprightPipe // non-scaled original
 texture {pigment {rgb <1,1,1>}}
}

A camera and light should be placed to see this at a good angle of course.
Now I realize this isn't anything to compare to fog, media, or maybe not
even fade_distance; yet it's a simple "pigment only" method which could do
okay for certain situations.  With the new fade-color patch in UVPov this is
even less useful. TonyB needed my explanation though.  You catching on Tony?
Hope I'm telling it right. The water texture could of course be anything so
long as the transparency allows for seeing through it enough. And a
height_field used in the same way can do good for the lake bottom, etc.

Bob
--
// omniVERSE
// http://users.aol.com/inversez/


Post a reply to this message

From: Chris Huff
Subject: Re: creating faked water depth via gradient pigment
Date: 8 Nov 1999 09:21:05
Message: <3826DCF6.CC42DCEE@compuserve.com>
Am I missing something? Why not just do this with fade_power and
fade_distance or with attenuating media?


Post a reply to this message

From: omniVERSE
Subject: Re: creating faked water depth via gradient pigment
Date: 8 Nov 1999 18:08:07
Message: <382757d7@news.povray.org>
You missed my disclaimer.  I said that, TonyB wanted a description of this
way though.

Bob

Chris Huff <Chr### [at] compuservecom> wrote in message
news:3826DCF6.CC42DCEE@compuserve.com...
> Am I missing something? Why not just do this with fade_power and
> fade_distance or with attenuating media?
>


Post a reply to this message

From: Chris Huff
Subject: Re: creating faked water depth via gradient pigment
Date: 8 Nov 1999 18:15:36
Message: <38275A3D.859A74D4@compuserve.com>
Yeah, I guess I did. :-)
I should learn to pay more attention to what I am reading...


Post a reply to this message

From: Sean Worle
Subject: Re: creating faked water depth via gradient pigment
Date: 16 Nov 1999 18:48:37
Message: <3831ED11.A9586CC@insurquote.com>
Chris Huff wrote:

> Am I missing something? Why not just do this with fade_power and
> fade_distance or with attenuating media?

I can see an advantage to this method.  In circumstances where the
appearance is not too critical (ie in the distance, small objects,
etc.), this might give the desired effect without the extra rendering
time that the more orthodox methods entail.
Just my  two cents.


Post a reply to this message

From: Chris Huff
Subject: Re: creating faked water depth via gradient pigment
Date: 16 Nov 1999 18:56:17
Message: <3831EFD2.4E963143@compuserve.com>
Actually, I think fade_power and fade_distance could be faster than the
gradient pigment in some cases. Not sure though, you would have to do a
test of the two.


Post a reply to this message

From: Margus Ramst
Subject: Re: creating faked water depth via gradient pigment
Date: 16 Nov 1999 19:01:40
Message: <3831F10E.B7F25098@peak.edu.ee>
The rendering time hit with fade_distance is negligible, IMO. It's a rather
simple calculation.

Margus

Sean Worle wrote:
> 
> I can see an advantage to this method.  In circumstances where the
> appearance is not too critical (ie in the distance, small objects,
> etc.), this might give the desired effect without the extra rendering
> time that the more orthodox methods entail.
> Just my  two cents.


Post a reply to this message

From: omniVERSE
Subject: Re: creating faked water depth via gradient pigment
Date: 16 Nov 1999 19:31:02
Message: <3831f746@news.povray.org>
It was originally intended as a simple remedy for non-color fadeable
objects, which is now available.  So still might be the way to go for
official POV 3.1 and earlier versions, if not "patched in" yet.

Bob

Margus Ramst <mar### [at] peakeduee> wrote in message
news:3831F10E.B7F25098@peak.edu.ee...
> The rendering time hit with fade_distance is negligible, IMO. It's a
rather
> simple calculation.
>
> Margus
>
> Sean Worle wrote:
> >
> > I can see an advantage to this method.  In circumstances where the
> > appearance is not too critical (ie in the distance, small objects,
> > etc.), this might give the desired effect without the extra rendering
> > time that the more orthodox methods entail.
> > Just my  two cents.


Post a reply to this message

From: Nieminen Juha
Subject: Re: creating faked water depth via gradient pigment
Date: 17 Nov 1999 06:05:14
Message: <38328bea@news.povray.org>
Chris Huff <Chr### [at] compuservecom> wrote:
: Actually, I think fade_power and fade_distance could be faster than the
: gradient pigment in some cases. Not sure though, you would have to do a
: test of the two.

  I think that fade_distance should be a lot faster than a patterned gradient
pigment. With fade_distance you just multiply the calculated color by
some values but with a gradient pigment you have to make several other
calculations (I think there are search through the color_map table?) to get
the right color.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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