• About us
  • Contact Us
  • Terms and Conditions
  • Forum
  • Materials
  • Shaders
  • Tools
  • Video
  • Learn
  • Gallery
My Mental Ray

Navigation

  • Main Page
  • Cookbook

MYMR WIKI Tools

  • Creating pages
  • Markup n styles
  • Page protection
  • Help

 

Toolbox

  • Upload file
  • Special pages
  • Printable version
  • Permanent link
Article    Discussion    View source    History   
Personal tools
  • Log in / create account

Optimizing Photon mapping

From Wiki

Jump to: navigation , search

You are here: mental ray cookbook / optimizing photon mapping

Notes by Zap on getting good results from photon mapping

Basically, you have four result-levels for photons:

  • Type 1. Dots or "blood cell" circles: Means you are looking up too few of them
  • Type 2. Well covered but "cloudy"/"splotchy" (not smooth): Looking up a tad too few
  • Type 3. Smooth and detailed: "just right"
  • Type 4. Over-smooth and totally smeared : Looking up too many / too large radius

Basically, the photon search stops when either the radius is reached or the count is reached. So if you set it to 100 photons, 10 cm, it will look within for the 100 nearest photons within 10 cm.

  • If the 100 nearest are within 1 centimeter, those 100 will be used, none further than 1 cm will be used
  • If the 100 nearest are within 10 cm, they will all be used.
  • If the 100 nearest are within 1m, only those within 10cm will be used.

From this you can trivially understand that if you hit the "number limit" this acts as an adaptively variable radius... the more photons, the better the detail, the less the photons, the more radius is looked up in.

However, if the count is too high, the radius is always hit first. So you will always "smear" the result over the radius. This is oversmooth (type 4 above).

The trick is to get to type 3 "just right", but the good thing is that when combined with FG, the accuracy need is much less. The cloudy (type 2) solution works just fine with FG. A spotty/circly (type 1) solution wont work, a over-smoothed (type 4) solution "works" but can put light where it's not supposed to be.

So with FG the "margin of error" is large.

My workflow is generally:

  1. Turn off FG
  2. Look at the photons-only result
  3. Is it dotty? Increase radius, or photon count, until it stops being "dotty"
  4. Is it super-smeared, decrease radius.
  5. When neither "dotty" nor "super smeared" (generally "cloudy" or "nice"), be happy
  6. Turn FG back on.
  7. Rejoice.

External links

Retrieved from "http://mymentalray.com/wiki/index.php/Optimizing_Photon_mapping"
Copyright © 2008 My Mental Ray Community. All Rights Reserved.
No part of this website may be reproduced unless for personal use without prior written permission from The My Mental Ray Community.