POV-Ray : Newsgroups : povray.advanced-users : The Mathematics Behind Spotlights : Re: The Mathematics Behind Spotlights Server Time
28 Jul 2024 16:22:32 EDT (-0400)
  Re: The Mathematics Behind Spotlights  
From: Mike Raiford
Date: 6 Dec 2004 08:02:25
Message: <41b45861@news.povray.org>
Captain Chemistry wrote:
  > That's all sweeet -- I don't care about the emitting media "spotlight"
> lighting up anything; I simply don't like scattering media because it is
> too slow on my computer (and it is a A64 3000+ computer).

Big deal, there are lots of us here who use scattering media despite it 
being "too slow". My suggestion: If you're too impatient for raytracing, 
then don't do it. Generally, with careful containment of the media (As 
Alain suggested) and good selection of media parameters, a 
constant-density scattering media effect isn't all that slow. It may 
take 10 minutes or so to get  a desktop-sized image out of it, but 
that's not really a big deal. Instant picture generator a raytracer is not.

> More to the point, I simply want to model what a spotlight does inside
> scatting media and use that model in emitting media because emitting media
> has less problems.

Others have mentioned the deficiencies of this approach. Scattering 
media will model everything that happens when light interacts with it, 
including visible umbra of shadows, etc. Using a mathematical approach, 
you still cannot get the proper sampling of the light.

> Some of these problems include:
> * all hell breaks loose if you intersect two or more scattering media
> containers (like the cones you suggested) - the brightness changes when it
> shouldn't and this is not a problem with the quality of the media, it is a
> problem with the scattering media itself. With emitting media you can
> intersect as many containers as you like and it makes no difference because
> WE ARE NOT TRACING THE PATH OF A SPOTLIGHT ANYMORE. *That* is the problem I
> want to avoid (tracing the spotlight)

Why? Tracing a spotlight is trivial compared to sampling media. If 
you're concerned about the overlap problem there's two solutions: "If it 
hurts when you do that then don't do it", and use a merge. Problem 
solved. The inner edges are swallowed up when using a merge, and two: 
the merge itself would be the media container, not each individual cone.

> * it is hard (and render-time consuming) to get the quality of the media
> good with spotlights shining through it

All things equal its not that time consuming. Try media without a 
constant density, then whine about the amount of time it takes.

> I do not care about the spotlight itself as a light; I only care about the
> EFFECT that spotlight happens to have in scattering media. I can chuck 100
> spotlights with media_interaction_off to light up the scene and it would
> *still* take less time than some cheap scattering media!

Then use a cone, and f_cone as a density function for your emitting media.

> Perhaps I am exaggerating but the above is a long description of why I want
> to use emitting media...

It sounds to me like the above description was a justification for your 
whining.

> (and I am still open to suggestions of how to model this spotlight!)

Simple: Use a partially transparent cone can get reasonably close to 
looking like what you want. You don't even have to use emitting media, 
unless you want to.

I hate it when people ask for advice, then when they don't get the 
answer they want to hear they go on some long, drawn out diatribe about 
how they were right in the first place, and anyone who advises them are 
wrong.

-- 
~Mike


Post a reply to this message

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