Photon map saving

Component:YafaRay Core
Category:feature request
Assigned:David Bluecame

Will it be possible to save PhotonMap of a scene to render fly-through animations faster, easier and without any flickering.

Photon map compute all the lighting of the scene, so only one photon Map is enough.

See here the topic.

If you know Vray for animation rendering, you will certainly know the Irradiance Map/ LightCache save map ... y-through/ (in french) ... _imap2.htm (in english - site of the Vray manual)
It allows us to compute the GI once and save it for the rendering.

It prevents flickering of GI by using the same map for all frames. And you can compute GI once, for flythrough animations.





Status:active» postponed

Interested feature request, anyway postponed to future releases of YafaRay


Assigned to:Anonymous» David Bluecame
Status:postponed» active

Working on this now...


Status:active» ready to commit


This feature will be available in the next YafaRay-E version.

There is a price to pay, though. The Photon Maps will require more RAM than they do now, so it's possible to properly save and load all objects within them.

From my first tests, an example scene with 10 million diffuse photons + FG and 10 million caustic photons is giving me these results:

Blender+YafaRay-E v2.1.1, including photon maps: 746MB

Blender+YafaRay-E v3.0.0, including photon maps: 926MB (around 27% more RAM needed now)

This is just an estimation and may vary depending on the scene, but it's giving an idea about more or less how this change will affect memory usage.


Please forget about the previous point. I managed to reduce the Photon Map RAM requirements to the same as of v2.1.1, while keeping the new Photon Map save/load functionality! :-)

I will do some more testing and this will be available in the upcoming YafaRay-E v3.0.0


I've attached an example (using the new Params badge with extended information, as for example the render time + photon map generation/load time and total)

First image was where I generated a 50 million photons caustic photon map. The photon map generation took around 4 minutes and generated a 562MB photon map file. The render 34s, so the total time was 4m 51s

Second image, after rotating a bit the camera, where I loaded the photon map instead of generating it again. The photon map 562MB file loading took 12s and the render 34s, so total time was just 46s (comparing with the first frame 4m 51s is a very nice improvement!)

Of course this does not help at all for animations where objects and lights change, but it will help enormously with animations where only the camera changes (rotation around objects, flying/moving through a building, room, etc).


photonmapsave2 - 001.jpg 168.23 KB
photonmapsave2 - 002.jpg 168.23 KB


Status:ready to commit» fixed

Fixed in v3.0.0-beta:


Status:fixed» closed

Closing as it was marked as "fixed" for 4 weeks without any further comments from users.