|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <38F8879E.732977CB@my-dejanews.com>,
gre### [at] my-dejanewscom wrote:
> 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.
What do you mean by "procedural"? Isosurfaces? Macros? Or just CSG? Or
do you want to do the whole thing with just textures? It would be done
with a CSG macro like this:
#macro Tube(ORad, IRad, TubeHeight, LiquidHeight, Open, GlassMaterial,
LiquidMaterial)
#local Thk = ORad-IRad;// wall thickness
union {
difference {
cylinder {< 0, 0, 0>, < 0, TubeHeight, 0>, ORad}
#if(Open = yes)
cylinder {< 0, Thk, 0>, < 0, TubeHeight+Thk, 0>, IRad}
#else
cylinder {< 0, Thk, 0>, < 0, TubeHeight-Thk, 0>, IRad}
#end
material {GlassMaterial}
}
cylinder {< 0, Thk, 0>, < 0, LiquidHeight, 0>, IRad*1.001
material {LiquidMaterial}
}
#end
#declare LiqMat =
material {
texture {
pigment {color Green filter 0.8}
}
interior {
ior 1.1
}
}
#declare GlassMat =
material {
texture {
pigment {color White filter 0.95}
}
interior {
ior 1.3
}
}
Tube(0.5, 0.45, 2, 1.3, yes, GlassMat, LiqMat)
translate < 1, 0.001, 0>
}
Tube(0.5, 0.45, 2, 1, no, GlassMat, LiqMat)
translate <-1, 0.001, 0>
}
> 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?
No, there is no "interior map"(and "material_map" is completely
unrelated). Things like varying ior are hard to calculate, and would be
quite slow.
You could get varying colors and amounts of filter with a pigment, but
you can't get different iors for the liquid and the glass that way, and
it probably wouldn't look very good up close.
--
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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-dejanewscom> 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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Bob Hughes <per### [at] aolcom?subject=PoV-News:> wrote ...
> #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}
> }
As you know, the old style IOR cannot be used with POV 3.1 (and thus with
MegaPov). Even if you could use it, it would not look correct, especially
when the glass was viewed from any angle other than perfect horizontal. You
pretty much have to create one object for the glass and one object for the
liquid inside. Then you can animate the liquid object to make the level of
the liquid decrease or increase over time.
-Nathan
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Someone posted a macro or include file recently on one of the newsgroups, a
file/macro to make various types of glasses, with control over the liquid
level, among other things
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Snowman wrote:
>
> Someone posted a macro or include file recently on one of the newsgroups, a
> file/macro to make various types of glasses, with control over the liquid
> level, among other things
Maybe this one -
Subject: glassware macros...
Date: Wed, 15 Mar 2000 19:09:09 -0500
From: Paul Daniel Jones <pdj### [at] psuedu>
Newsgroups: povray.binaries.scene-files
--
Ken Tyler - 1400+ POV-Ray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
No, sorry, I didn't want CSG, because my object is a complex blob.
I want the interior or texture or media to be two different things (glass vs.
glass+liquid).
Ken wrote:
> Snowman wrote:
> >
> > Someone posted a macro or include file recently on one of the newsgroups, a
> > file/macro to make various types of glasses, with control over the liquid
> > level, among other things
>
> Maybe this one -
>
> Subject: glassware macros...
> Date: Wed, 15 Mar 2000 19:09:09 -0500
> From: Paul Daniel Jones <pdj### [at] psuedu>
> Newsgroups: povray.binaries.scene-files
>
> --
> Ken Tyler - 1400+ POV-Ray, Graphics, 3D Rendering, and Raytracing Links:
> http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <38FB56CE.EEB42B36@my-dejanews.com>,
gre### [at] my-dejanewscom wrote:
> No, sorry, I didn't want CSG, because my object is a complex blob.
Blobs work fine with CSG...just do something like this:
#macro BlobComponents()
// put your blob components here, to avoid
// having to duplicate them for each blob which
// uses them.
#end
#macro MakeBlobContainer(LiqHeight, ThreshDiff, Thresh, GlassMaterial,
LiqMaterial)
union {
difference {
blob {BlobComponents() threshold Thresh}
blob {BlobComponents() threshold Thresh+ThreshDiff}
material {GlassMaterial}
}
intersection {
blob {BlobComponents() threshold Thresh+ThreshDiff-0.01}
plane {y, LiqHeight}
material {LiqMaterial}
}
}
#end
And use ThreshDiff to control the thickness of the blob "container".
> I want the interior or texture or media to be two different things (glass
> vs. glass+liquid).
I am not sure what you mean...
--
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|