Page MenuHome

Fix T82129: Cycles "Persistent Images" incorrectly retains scene data
ClosedPublic

Authored by Kévin Dietrich (kevindietrich) on Oct 28 2020, 7:50 PM.

Details

Summary

The issue stems from the fact that scene arrays are not cleared when rendering is done. This was not really an issue before the introduction of the ownership system (rB429afe0c626a) as the id_map would recreate scene data arrays based on their new content. However, now that the id_maps do not have access to the scene data anymore the arrays are never created.

Another related issue is that the BlenderSync instance is never freed when the persistent data option is activated.

To fix this, we delete nodes created by the id_maps in their destructors, and delete the BlenderSync instance before creating a new one, so the id_maps destructors are actually called.

Diff Detail

Repository
rB Blender

Event Timeline

Kévin Dietrich (kevindietrich) requested review of this revision.Oct 28 2020, 7:50 PM

Please stay on topic, don't use code review for feature requests.

Brecht Van Lommel (brecht) added inline comments.
intern/cycles/blender/blender_id_map.h
44–47

This has quadratic time complexity, so it will be extremely slow when there are e.g. 100k object instances.

Can you find a way to avoid this?

This revision is now accepted and ready to land.Oct 29 2020, 1:08 PM
Brecht Van Lommel (brecht) requested changes to this revision.Oct 29 2020, 1:08 PM
This revision now requires changes to proceed.Oct 29 2020, 1:08 PM
  • use a set to gather nodes to be deleted and accelerate bulk node deletion
This revision is now accepted and ready to land.Oct 29 2020, 2:45 PM