POV-Ray : Newsgroups : povray.advanced-users : What exactly does photons media factor do? : Re: What exactly does photons media factor do? Server Time
3 Jul 2024 04:32:03 EDT (-0400)
  Re: What exactly does photons media factor do?  
From: Blue Herring
Date: 29 Jul 2008 08:43:50
Message: <488f1086@news.povray.org>
Cousin Ricky wrote:
> I was trying to fine tune some photon media parameters (in global_settings), and
> tried varying the factor.  There seems to be no visible effect at all, although
> the mere inclusion of the parameter doubles or quadruples the render time.  Am
> I missing anything?  Am I just using it incorrectly?
> 
> Below is a code extract, run with version 3.6.1 with +kff7 and +kff-1.  (I set
> the max_steps value low in order to contrast the effect of the factor
> parameter.)  CPU time averaged 493 seconds per frame vs 106 seconds without the
> factor parameter.  All 8 images are virtually identical.

Hello,
Funny that you posted this now, I've just been messing with a scene, 
trying to tune this very parameter.

The factor multiplies the spacing of photons that are shot into media. 
So a factor greater than 1 increases the spacing (fewer photons), and 
less than 1 decreases the spacing (more photons).  More photons would 
obviously increase render time.  Its possible introducing the variation 
has some inherent render time cost, I couldn't say for sure.

I haven't tried your code yet, but my theory is that between your global 
spacing and the media max interval setting, you are getting enough 
sampling (or at least around the same amount.)  If your factor is low 
and you get a lot of photons, the max interval setting is going to put a 
limit on how many are actually deposited, while the global spacing might 
be high enough to get enough photons even with a high factor.

You might be able to see some more dramatic difference if you increase 
your global spacing and the max intervals of the media.

Another thing that may well be a factor is that you are using the 
default samples of 1 for your media, which is likely too low.  You 
should probably set intervals to 1 as well, as the default method is 3. 
  Try adding something like:
   intervals 1
   samples 20
to your media block.

The problem I've been dealing with is that I have a mesh with scattering 
media, and there is a thin section which is way too dark.  I've found 
that increasing the max intervals and decreasing the factor has helped 
to brighten the area, though I haven't found the right balance yet.  The 
rest of the object looks just about the same regardless.  So, the upshot 
is, I've found factor does do something, but it depends on circumstance, 
and might require large adjustments to see a difference.  For example my 
current setting:
   photons {
     spacing 0.005
     autostop 0
     media 300, 0.0025
   }
helps but doesn't nearly help enough yet.  If its any help, this is the 
media I've been using:

   media {
     method 3
     intervals 1
     samples 20
     absorption 1 - PaleGreen
     scattering { 4, 11 }
     aa_level 3
     aa_threshold 0.1
   }

Lowering the aa_level from default 4 might speed things up for you as well.

-- 
-The Mildly Infamous Blue Herring


Post a reply to this message

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