|
![](/i/fill.gif) |
In article <372BFF14.9874C00E@tiac.net>, Phil Clute <pcl### [at] tiac net> wrote:
>If someone knows how to contain fog inside say
>a sphere(or any object for that matter), I would
>love it if they would show me an example. I've tried
>to do it a few times and I can't figure out what I'm
>doing wrong...
>
>It don't werk fer me.
What do you mean by that? You mean you see nothing, or you see fog but the
wrong kind?
The following should render fog inside of a sphere:
If you want turbulence, uncomment the turbulence statement; if you want
multiple clumps of fog inside your sphere, combine it with, for example, a
bozo pattern (in this example, uncomment the bozo density).
#include "colors.inc"
#declare render_quality = 0; //0 to 1
//the fog
#declare minsamples = 1;
#declare maxsamples = int(4+render_quality*5);
#declare fogvariance = (100-render_quality*50)/1000;
#declare fogconfidence = .7+render_quality*.27;
#declare fogintervals=int(4+render_quality*20);
#declare sphere_size = 8;
sphere {
<0,0, 0>,2
pigment {
color rgbf <1,1,1,1>
}
interior {
media {
scattering { 1, .5/sphere_size}
intervals fogintervals
samples minsamples, maxsamples
confidence fogconfidence
variance fogvariance
density {
spherical
//turbulence .5
color_map {
[0 color rgb <0,0,0>]
[0.15 color rgb <.3,.3,.3>]
[0.4 color rgb <1,1,1>]
[1 color rgb <1,1,1>]
}
}
/* density {
bozo
//turbulence .3
color_map {
[0.0 color rgb <1,1,1>]
[0.3 color rgb <1,1,1>]
[0.6 color rgb <0,0,0>]
[1.0 color rgb <0,0,0>]
}
scale .3
}
*/
}
}
scale 2*sphere_size
hollow
}
background {
color Blue
}
light_source {
<250,250,35>
color White
}
camera {
location <0,0,-5*sphere_size>
look_at <0,0,0>
}
Jerry
http://www.hoboes.com/jerry/
Post a reply to this message
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <372CFF60.1545DCC7@tiac.net>, Phil Clute <pcl### [at] tiac net> wrote:
>Thank you but I meant the "fog" keyword. The pov docs
>indicate that you can put fog into a hollow object. I
>may have just misinterpreted what the docs say, but regarding
>fog there is a small section refering to solid and hollow
>objects, which I think implies that fog can be contained.
>I could be wrong however...
Yes, I think so.
In POV, some atmospheric effects, such as media and fog, are not visible
if the camera is inside of a non-hollow object. So even though the fog
keyword puts fog everywhere, you won't see any if you put the camera
inside of a 'solid' object.
Also, if fog acts like the other items that are affected by hollowness,
fog will *not* appear inside of a non-hollow object. This means that if
you have a sphere, make it completely clear, and do not specify that it is
hollow, your fog will not 'penetrate' to the inside of that sphere. If you
make the sphere hollow, the fog will penetrate.
You could, I suppose, use this to fake a fog container. Make a huge,
non-hollow sphere which is not invisible, and pretend it is a sky_sphere.
Put all of your scene inside this huge sphere. Put a fog onto your scene.
The fog will only appear inside of objects which you have specified as
hollow. Note that your camera will have to be inside of one of those
objects.
Post the part of the docs that you're talking about, though, and someone
can probably give a better explanation of what it means.
Jerry
Post a reply to this message
|
![](/i/fill.gif) |