POV-Ray : Newsgroups : povray.general : media and MegaPOV Server Time
9 Aug 2024 11:24:20 EDT (-0400)
  media and MegaPOV (Message 1 to 3 of 3)  
From: David
Subject: media and MegaPOV
Date: 9 Aug 2000 22:49:15
Message: <3992182b@news.povray.org>
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

From: Ken
Subject: Re: media and MegaPOV
Date: 9 Aug 2000 23:37:19
Message: <39922198.2997B183@pacbell.net>
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

From: Bob Hughes
Subject: Re: media and MegaPOV
Date: 10 Aug 2000 05:00:20
Message: <39926f24@news.povray.org>
"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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.