|
|
I have been trying to create a smoke effect using scattering media, but
I cannot seem to get any results. Emitting and absorbing media work
fine, but scattering media appears completely invisible. I got so
frustrated that I want and downloaded Glenn McCarter's and N.B.'s source
code for thier "First Strike at Pearl" image (absolutely fabulous, by
the way). I borrowed the smoke texture from their include file, but
again, nothing.
Here is the interior statement. Yes, all of my objects are hollow (as I
say, emitting and absorbing media work fine).
#declare SmokeInt =
interior {
media {
// scattering { 1, <.02,.02,.02,> extinction 1.0 } // stinking choking
black
scattering { 3, <.01,.01,.01,> extinction 1.0 } // charcoal grey with
fuzzy fur
// scattering { 1, <.002,.002,.002,> extinction 1.0 } // soft fluffy
grey
density { spherical
color_map{
[0.0 color rgb <0.0,0.0,0.0> ] // outside is transparent
[0.4 color rgb <0,0,0> ] // this prevents it from reaching the
container
[1.0 color rgb <1,1,1> ] // inside is opaque
}
turbulence .18
omega 0.835 // default 0.5, higher = rougher
}
}
}
When I render a sphere with this texture, I get absolutely nothing. I
discovered that if I remove the density section, the media shows up, but
of course it is constant. If I add the density back in again, the
sphere once again disappears. At this point, I'm just testing this
texture, so the scene only has a plane and the sphere. What's going on?
Post a reply to this message
|
|
|
|
> When I render a sphere with this texture, I get absolutely nothing. I
> discovered that if I remove the density section, the media shows up, but
> of course it is constant. If I add the density back in again, the
> sphere once again disappears. At this point, I'm just testing this
> texture, so the scene only has a plane and the sphere. What's going on?
Have you tried it with a very large sphere. I think your problem may be
scale dependant.
Post a reply to this message
|
|
|
|
[0.0 color rgb <0.0,0.0,0.0> ] // outside is transparent
Try
[0.0 color rgbt <0.0,0.0,0.0,1.0> ] // outside is transparent
Post a reply to this message
|
|
|
|
You probably need to increase the density. I usually control the density
by doing something like this:
scattering { 1, < 0.002, 0.002, 0.002,>*5 extinction 1.0 } // soft
fluffy grey
Notice that I multiplied the color by a value. Just increase this value
until the smoke is the desired density.
Post a reply to this message
|
|
|
|
Edward Coffey wrote:
> Have you tried it with a very large sphere. I think your problem may be
> scale dependant.
That's it. Man, that was annoying. My problem was that I misunderstood the
way media works. That smoke looked great on the "First Strike" image, but the
clouds must have been a lot bigger. Media apparently doesn't scale the way
other Material specs do. A bigger sphere will not mean that the media gets
bigger, it just means that the media has more space to fill. This means more
media, thus darker effect. My sphere was too small, and so the light was
barely attenuated by the time it exited. A bigger sphere means more media to
pass through. I found that both scaling the sphere up and increasing the
media density on the small sphere achieved the desired results.
Thank you (all of you) for your help!
Post a reply to this message
|
|