|
|
I am trying to recreate a flashlight and using media and photons to make the
beam more realistic. I'm not worried about the photons at the moment, and
plan on working and tweaking the media. When I add a plane above the head
of the flashlight, the media seem sto "disappear". Here is the code: Does
anyone know why this happens, and how I can fix it?
#version unofficial MegaPov 0.4;
#include "colors.inc"
#include "textures.inc"
media { scattering { 1, rgb 0.75} }
/*global_settings
{
photons
{
count 20000
autostop 0
jitter .4
}
} */
#declare basic_head =
lathe
{
quadratic_spline
5
<0.0, -1.0>,
<0.75, -1.3>,
<1.35, -0.9>,
<1.75, 0.2>,
<1.9, 1.5>
}
camera
{
location <1.0, 3.0, -10.0>
look_at <0, 1.0, 0>
}
union
{
object { basic_head pigment { rgb <1.0, 0.0, 0.0> } finish { ior 1.25
phong 1.25} }
object { basic_head texture { Polished_Chrome } scale 0.97 translate
y*0.05}
light_source
{
0.25*y rgb 2.0
media_interaction on
}
}
plane
{
y, -3.5
pigment { rgb 1*y }
}
// This is the plane that is giving me problems
plane
{
y, 10
pigment { rgb 1*y }
}
// Used to increse the overall lighting of the scene
light_source
{
<2, 2, -5> rgb 1.0
media_interaction off
}
Post a reply to this message
|
|
|
|
David wrote:
>
> I am trying to recreate a flashlight and using media and photons to make the
> beam more realistic. I'm not worried about the photons at the moment, and
> plan on working and tweaking the media. When I add a plane above the head
> of the flashlight, the media seem sto "disappear". Here is the code: Does
> anyone know why this happens, and how I can fix it?
With the way you have described the plane the camera is inside of it.
You either need to flip the normal of the plane (you can use the
inverse keyword) or make the plane hollow by adding the hollow keyword
at the end of the plane statement. Either method should restore your
media effects.
--
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
|
|
|
|
"Ken" <tyl### [at] pacbellnet> wrote in message
news:39922198.2997B183@pacbell.net...
|
| You either need to flip the normal of the plane (you can use the
| inverse keyword) or make the plane hollow by adding the hollow keyword
| at the end of the plane statement. Either method should restore your
| media effects.
Flipping the normal, as Ken says, for a plane has to do with using a
negative or positive axis, so you could say:
// This should no longer cause you problems
plane
{
-y, -10 // facing downward because it's negative y but -10 is also needed
to move it in opposite direction
pigment { rgb 1*y } // if this were filtered or transparent color then no
media would show above it
} // if hollow is used then media can show up on both sides instead of just
the one side
Thing to remember about planes is that they are like extended boxes with the
surface being one side but maybe you already knew that.
Bob
Post a reply to this message
|
|