|
![](/i/fill.gif) |
An example halo to media conversion would be:
halo {
dust
spherical_mapping
poly
turbulence .3
color_map {
[0 color rgbt <1, 1, 1, 1>]
[1 color rgbt <1, 1, 1, 0>]
}
}
Which in media would be:
interior {
media {
scattering {
1, rgb .01 //first number is the type and the second is the color
}
intervals 5
samples 2, 30 //the minimum and maximum # of samples, respectively
confidence 0.9999
variance 1/1000
density {
spherical
poly_wave 1 //this is a cool new feature :)
turbulence .3
color_map {
[0 color rgb <0, 0, 0>] //transmit is now irrelevent. This is no
scattering.
[1 color rgb <1, 1, 1>] //this is full scattering. You might have to lower
the values
}
}
}
}
Now to make the clouds just make multiple media statements within interior
like the multiple halos shown in the 3.02 docs. You can also do multiple
densities instead. I believe it's the latter that will behave like a CSG
intersection, which may not be the best method for clouds, but it could be.
You can add the extinction keyword within the scattering {} statement to
control how the media interacts with the scene. If you set it at 0, it will
only be visible where there is light, something I find useful much of the
time. The default is 1. You'll probably find scattering to be very slow,
so you can use emission or absorption in place of it. Actually, emission
and absorption work well together, though I usually prefer to create two
identical medias and use one of each in them. That way I'm able to adjust
the colors in the density individually for each. Emission is good for
adding color and absorption is good for diminishing the light that gets
through. It's usually better to have the absorption lower than the
emission.
The 3.1 docs tell us that in order to get shadows with media, you must add
filter to the object you are using as the media container. The above
example will work fine, since it uses no color. If you use a colored media
this can be a problem, since the shadows will end up the compliment of the
color of the media. This can look ugly, though a slightly brown tinted
media will cast blue-grey shadow, which could look good. To be honest I
haven't tried it...yet.
Now I don't have 3.1 handy, but I'll try to recreate the cloud tutorial with
media.
#declare Cloud_section =
media {
emission .3
density {
spherical
turbulence 1
color_map {
[0 color rgb <0, 0, 0>]
[1 color rgb <1, 0, 0>]
}
}
}
sphere {0, 1.5
pigment {color rgbt <1, 1, 1, 1>}
interior {
media {Cloud_section
scale <0.75, 0.5, 1>
translate <-0.4, 0, 0>
}
media {Cloud_section
scale <0.75, 0.5, 1>
translate <0.4, 0, 0>
}
media {Cloud_section
scale 0.5
translate <0, 0.2, 0>
}
}
hollow
}
Unfortunately I'm unable to try that out right now, so I hope it works. It
should get you going at least. One interesting and useful thing to note is
that the media doesn't have to be inside anything. Just make them without
an object and they will exist in space, provided they are not inside a
non-hollow object. This makes it particularly useful for atmospheric
effects.
-Mike
Ekim E. YARDIMLI wrote:
> hello,
>
> in povray 3.0x there was a nice example about creating clouds with a few
> halos, but i can't seem to duplicate the idea with the media and
> interior in 3.1. actually i'm also wondering if there exists a tutorial
> with examples about media and interior. i would like to creat actual 3d
> clouds not texture clouds.
> and also if any pov-god listes in on this channel i've read through the
> new docs and find the 3.0x more easy to understand. :)
>
> thanx in advance
Post a reply to this message
|
![](/i/fill.gif) |