|
![](/i/fill.gif) |
Just to see if there was a way to go back to the old style refraction and still
use MegaPov I gave it a try and this was the result:
// half full-half empty glass test
#version unofficial MegaPov 0.4;
global_settings {
photons {spacing .25 gather 33,133 autostop 0}
}
light_source { <3,5,10> color rgb 1
photons {global reflection on refraction on}
}
camera {
location <0,5,-10>
angle 25
look_at <0, .75, 0>
}
plane {y,-.01 pigment {checker color rgb 1 color rgb 0}}
#version 3.0 // back to old style refraction
#declare HFt=
texture {pigment {rgbft <.5,.7,.9,.85,.15>}
finish {reflection .2 refraction on ior 1.33}
}
#declare HEt=
texture {pigment {rgbf <.9,.975,.925,1>}
finish {reflection .1 refraction on ior 1.5}
}
#declare H=1 // liquid height (glass is 2 units tall)
difference {
cylinder {0,2*y,1} cylinder {.999*H*y,2.001*y,.95}
texture {gradient y texture_map {
[.5 HFt] // half full
[.5 HEt] // half empty
} scale 2.001}
#version unofficial MegaPov 0.4;
photons {target reflection on refraction on}
}
If you render this you might find it does seem to work okay at first but there
is no actual ior used.
Bob
"Greg M. Johnson" <gre### [at] my-dejanews com> wrote in message
news:38F8879E.732977CB@my-dejanews.com...
| Is there a procedural way to set up a cylinder so that it looks like
| it's half full of liquid--liquid that refracts, interacts with photons,
| etc? I know how to make the whole cylinder look like a liquid: I want
| to be able to animate the level at which the liquid resides, etc.
|
| I tried this a few times with setting up a gradient y in the pigment,
| but this never had quite the right effect. Are there interior maps or
| is there some way to do this with the pigment?
|
Post a reply to this message
|
![](/i/fill.gif) |