|
![](/i/fill.gif) |
"Micheus" <nomail@nomail> wrote in message
news:web.4a36c43a438fc1fb194bff60@news.povray.org...
>
> ...
>
> So, now I go to an other level...
> In the true I want use this effect with "mesh" objects and solved this
> doubt I
> would like to try this code with an irregular mesh (see:
> http://img196.imageshack.us/img196/4778/lavalampwings3d.png) - the yellow
> lava
> "balls".
You can fill any shape with an interior, so you can use something similar to
this effect on a mesh or mesh2 object. The example below uses the POVRay
blob primitive for lava balls (as I didn't have suitable mesh shapes to
hand). I think the best approach would be to use a simple flat emission
color to fill the main body of the object. If you just use the spherical
emission statement as you had before, you'll get a single red/yellow
transition passing through the entire multi-blob object.
This doesn't mean you're stuck with flat colors though because you can add
multiple media statements within an interior block and POV-Ray should add
the media together. For example, you could have a flat red media and
superimpose multiple spherical media that transition from yellow to nothing.
I've added one such yellow transition at the centre of the central blob, but
you could add one for each blob.
I think you should be able to get about as sophisticated as you want with
this general approach.
camera {location <-2, 1.2, -5> look_at 0}
light_source {<2,20,-4> color rgb 2}
#declare nebulosa = blob { threshold 0.6
// Central Blob
sphere {0,2,1}
sphere {y,1,1}
// Left Blob
sphere {<-1.6,1.6,0.7>,1.5,1}
sphere {<-1.1,2.2,1 >,1 ,1}
// Right Blob
sphere {<1,1.8,1.2>,1.2,1}
sphere {<1,2.3,1 >,1.2,1}
}
object { nebulosa scale 0.5
pigment {rgbt 1 } hollow
interior {
media {emission rgb <1,0,0>}
media {emission 1
density {spherical
density_map {
[0 rgb 0]
[0.2 rgb 0]
[0.5 rgb <1,1,0>]
[1 rgb <1,1,0>]
}
}
scale <0.3,0.6,0.3>
rotate z*8
translate 0.15*y
}
}
}
plane {y,-1 pigment {rgb 0.1}}
> Don't POV have a way to use object shape? (only: bozo, wood, gradient,
> waves,
> spherical, planar, cylindrical, and boxed)
Yes you can use any pattern and there is an object pattern, which should
enable you to use any object shape to control the media. The problem with
this is that it transitions from 0 to 1 immediately at the surface of the
object, so it doesn't give you any sort of progressive change. I suspect
that it's therefore mostly useless for what you want to do.
Regards,
Chris B.
Post a reply to this message
|
![](/i/fill.gif) |