Photonmap VS Lightmap, what are better to use?

General disscusion about Kray
Locked
PrintF
Posts: 57
Joined: Sat Aug 05, 2006 1:25 am
Location: russia, north

Photonmap VS Lightmap, what are better to use?

Post by PrintF »

Photonmap VS Lightmap, what are better to use?

what kind of light map You usually use? photonmap or lightmap, in which scene, and in what way moment...?
silverlw
Posts: 453
Joined: Thu Jun 02, 2005 7:05 pm
Location: Sweden
Contact:

Post by silverlw »

If you ask me i mainly use pmapping since pmapping is the fastest mode and gives me the nicest and quickest irradiancemap. Both pmapping and lmapping have advantages and dissadvantages depending on the scenesetup.
quick and dirsty explanation of pmapping is that lights or luminous objects emit's bursts of photons that with the distance will have a natural falloff (inverse square falloff) Photons that hit's anything will be collected in the irradiancemap.
Lmaps works completly opposite. Instead of tracing photons from the lightsource we start from the camera instead and backtrack it to the lightsource.

If you plan on using Imageworld.p to get light from a skyprobe i highly recommend lmapping since lmapping take into account for everything that emits light inkluding backdrop colour, lights without falloff etc..
There is also situations when lmapping completly fails as an example:
If you put a light inside a glassphere or other transparent material, it will be almost impossible to trace the light from the camera back to the source and the outcome will be lot's of bright speckles. It will be hard to backtrack through a transparent medium to the source.

So i cant use pmapping together with HDRI's then? Yes you can but you have to map the hdri or skysurface on some geometry or sphere with the polygons flipped invard.
Dont hesitate asking more if this topic wasnt enough explained.
Captain Obvious
Posts: 165
Joined: Mon Oct 10, 2005 6:15 pm
Location: London, UK

Post by Captain Obvious »

I prefer light mapping, since (as Silverlw said) it will include the lighting from the backdrop. Another advantage with light mapping is that it works with non-physical lights. Lights without inverse square fall off do NOT work with photon mapping, so it's impossible to get lighting from a distant light without using light mapping. Also, if you want soft shadows from the sun, you'll have to use an area light. If you use an area light placed far away from your scene along with photon mapping, you'll have to use a LOT of photons, since most will miss the scene. With light mapping, you don't have this problem.

For scenes that are closed off and all the light is coming from inside, photon mapping will give better results.
silverlw
Posts: 453
Joined: Thu Jun 02, 2005 7:05 pm
Location: Sweden
Contact:

Post by silverlw »

Well said: quote: "For scenes that are closed off and all the light is coming from inside, photon mapping will give better results."
Locked