POV-Ray : Newsgroups : povray.general : Media emission as true light source? Server Time
5 Aug 2024 06:20:10 EDT (-0400)
  Media emission as true light source? (Message 1 to 10 of 26)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Neil Conway
Subject: Media emission as true light source?
Date: 4 Feb 2003 07:20:03
Message: <web.3e3faf53e0395af21c4fca030@news.povray.org>
Hi... I'm quite new to POV-Ray but I don't believe this is a FAQ (I have
looked).

I work on a tokamak (nuclear fusion research), and we have a large vacuum
tank (mostly made of steel) inside which we make a toroidal plasma.  This
plasma emits light, some of which can be directly viewed by cameras (and a
hundred other diagnostics!).

I'm hoping POV-Ray can help me to model how much of the plasma light is
reflected around inside the tank and back into the cameras.  We can treat
surfaces with various materials to make them dull or blackish, but it's
undesirable to do too much of this for plasma purity reasons...

Anyway: here's the question (at last!).  The media-emission process looks
ideal except for the fact that the docs say it doesn't actually light up
objects in the view, but rather just emits light which is viewable by the
camera.  So, is it possible to patch povray to make it treat the emission
from the media as a "real" light source?  Would this patch be a major job?

Thanks in advance...
Neil Conway
UKAEA Fusion


Post a reply to this message

From: Warp
Subject: Re: Media emission as true light source?
Date: 4 Feb 2003 08:47:52
Message: <3e3fc488@news.povray.org>
Neil Conway <nei### [at] yahoocom> wrote:
> Anyway: here's the question (at last!).  The media-emission process looks
> ideal except for the fact that the docs say it doesn't actually light up
> objects in the view, but rather just emits light which is viewable by the
> camera.  So, is it possible to patch povray to make it treat the emission
> from the media as a "real" light source?  Would this patch be a major job?

  Making an accurate simulation of an emitting media casting light to the
scene would be such a slow process that it's probably completely out of
possibilities.
  The radiosity feature of POV-Ray can be made to take media into account
at a certain level of accuracy. You can try it if it's enough.

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

From: hughes, b 
Subject: Re: Media emission as true light source?
Date: 4 Feb 2003 09:04:21
Message: <3e3fc865$1@news.povray.org>
"Neil Conway" <nei### [at] yahoocom> wrote in message
news:web.3e3faf53e0395af21c4fca030@news.povray.org...
> is it possible to patch povray to make it treat the emission
> from the media as a "real" light source?  Would this patch be a major job?

It currently works with the diffuse properties of the surface finish. That
makes radiosity applicable only to object textures, and to get media to
interact would need some new way of doing things since I believe it only
deals with surfaces by making intersections with the rays. I guess it would
need to be something that makes it possible to use solid, filled objects. Or
at least a kind of sampled interior which has added to it a ambient and
diffuse property.
--
Farewell,
Bob


Post a reply to this message

From: Tom Melly
Subject: Re: Media emission as true light source?
Date: 4 Feb 2003 09:29:54
Message: <3e3fce62$1@news.povray.org>
"Neil Conway" <nei### [at] yahoocom> wrote in message
news:web.3e3faf53e0395af21c4fca030@news.povray.org...
>
> Anyway: here's the question (at last!).  The media-emission process looks
> ideal except for the fact that the docs say it doesn't actually light up
> objects in the view, but rather just emits light which is viewable by the
> camera.  So, is it possible to patch povray to make it treat the emission
> from the media as a "real" light source?  Would this patch be a major job?
>

As Warp said, this is already possible (with limitations).

Here is a small sample scene (comment out "media on" in the global block to see
the difference) - note the lack of light sources and ambient_light 0.

#version 3.5;

global_settings {
  assumed_gamma 1.0
  ambient_light 0
  radiosity {
    media on
  }
}

camera {
  location  <0.0, 0, -4.99>
  look_at   <0.0, 0.0,  0.0>
}

sphere{
  0,1 pigment{rgbf 1}
  interior{
    media{
      emission 1
      density{
        agate density_map{
          [0.5 rgb 0]
          [1 rgb <20,1,1>]
        }
      }
      density{
        spherical
      }
    }
  }
  hollow
}

sphere {0.0, 5 pigment{rgb 1} hollow}

#declare N = 0;
#while(N <= 180)
  cylinder{y*-4,y*4 0.25 translate x*-1.5 rotate y*N pigment{rgb 1}}
  #declare N = N+45;
#end


Post a reply to this message

From: Neil Conway
Subject: Re: Media emission as true light source?
Date: 4 Feb 2003 13:00:12
Message: <web.3e3ffebcc7b69b7a1c4fca030@news.povray.org>
Thanks guys, all three of you. (Now I have to figure out what you all meant
:-))

I've run both of the sample scenes, and I'm starting to get the idea.  It
looks promising: e.g., the emission from the media is reflected beautifully
from the cylinders in Tom's example.  Now I'm playing with the various
options to tweak just how much CPU effort goes into getting the radiosity
right.

When you all mention limitations, I must admit I'm not clear on how they
apply to this case.  Tom's example appears to lay the foundations of
exactly what I'm after (albeit at great cost in CPU time).  Am I missing
something?

All I really need is to have a volumetric emission source (e.g. my plasma)
with proper reflections from the walls etc.  Isn't that what Tom's example
does?  (I haven't figured out Warp's example very thoroughly yet.)

Looks like I won't need to patch the program (phew)...

Thanks,
Neil


Post a reply to this message

From: Christopher James Huff
Subject: Re: Media emission as true light source?
Date: 4 Feb 2003 14:26:36
Message: <cjameshuff-C475C6.14234004022003@netplex.aussie.org>
In article <web.3e3ffebcc7b69b7a1c4fca030@news.povray.org>,
 "Neil Conway" <nei### [at] yahoocom> wrote:

> All I really need is to have a volumetric emission source (e.g. my plasma)
> with proper reflections from the walls etc.  Isn't that what Tom's example
> does?  (I haven't figured out Warp's example very thoroughly yet.)

You really need to define your problem more clearly: what do you mean by 
"proper reflections"? What is your goal, a picture that looks like the 
interior of the tokamak, or an actual simulation? If the latter is the 
case, a custom raytracer will probably be needed.

POV is currently only capable of handling diffuse reflections of light 
emitted by media, such as light bouncing off a sheet of paper, or media 
seen directly. Specular reflections, like light bouncing off a mirror, 
are not handled. It techni cally would be possible: fire photons in 
random directions from random locations in the media container, but it 
would be extremely CPU and memory intensive to get good accuracy. If you 
want to take scattering and absorption of the media into account instead 
of just emission, it would would take massive amounts of processing 
power...it is probably impractical on any existing hardware.

However, if everything in the scene (except the plasma) is highly 
reflective, these photons would have little contribution. Ordinary 
raytracing can handle this situation pretty accurately, photons mainly 
exist for caustics and radiosity for diffusely scattered light. Straight 
raytracing and radiosity will cover most effects.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Tom & Lu Melly
Subject: Re: Media emission as true light source?
Date: 4 Feb 2003 15:05:09
Message: <3e401cf5@news.povray.org>
"Neil Conway" <nei### [at] yahoocom> wrote in message
news:web.3e3ffebcc7b69b7a1c4fca030@news.povray.org...
>
> When you all mention limitations, I must admit I'm not clear on how they
> apply to this case.  Tom's example appears to lay the foundations of
> exactly what I'm after (albeit at great cost in CPU time).  Am I missing
> something?
>
> All I really need is to have a volumetric emission source (e.g. my plasma)
> with proper reflections from the walls etc.  Isn't that what Tom's example
> does?  (I haven't figured out Warp's example very thoroughly yet.)
>

I'm not really qualified to say - I'm very much a dumb-hobbyist - but I
guess it comes down to the level of accuracy you need. As a general guide to
what areas of a scene are going to receive the most indirect illumination,
it might be okay, but when other wiser heads say "limitations", I tend to
trust them.

Kari K. might be a good person to contact for some RL(tm) advice - he/she
iirc takes some interest in this area.


Post a reply to this message

From: Johannes Dahlstrom
Subject: Re: Media emission as true light source?
Date: 4 Feb 2003 15:25:12
Message: <3e4021a7@news.povray.org>
Tom & Lu Melly wrote:

> he/she

Kari's a "he" (well, I can't know for sure, but all Finnish Karis I have 
met this far have been males ;)

-Johannes


Post a reply to this message

From: Warp
Subject: Re: Media emission as true light source?
Date: 4 Feb 2003 16:12:22
Message: <3e402cb6@news.povray.org>
Neil Conway <nei### [at] yahoocom> wrote:
> (I haven't figured out Warp's example very thoroughly yet.)

  Which example?

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Nathan Kopp
Subject: Re: Media emission as true light source?
Date: 4 Feb 2003 18:39:46
Message: <3e404f42$1@news.povray.org>
"Neil Conway" <nei### [at] yahoocom> wrote...
>
> When you all mention limitations, I must admit I'm not clear on how they
> apply to this case.  Tom's example appears to lay the foundations of
> exactly what I'm after (albeit at great cost in CPU time).  Am I missing
> something?

A few limitations:
1) Lack of specular & phong highlights.
2) It ignores brilliance settings (IIRC)
3) Surface normals (bump maps, etc) won't show up by default.  You must
specify "normals on" in the radiosity block, and this will take even _more_
processor power.

-Nathan


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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