In general, LuxCore never remove a binding (name => texture/material/shape/object/etc.) if not explicitly instructed so, even if it is not used in the scene at the time. You have to explicitly delete the item or just always call RemoveUnused*() before to start the rendering session.B.Y.O.B. wrote: ↑Tue Oct 15, 2019 4:07 pm By the way, what happens to the intermediate shapes after the session is started?
When doing subdivision + displacement, we have:
- original mesh (no longer needed if not instanced)
- subdivided mesh (no longer needed)
- displaced mesh (needed during render)
Maybe more, due to e.g. pointiness.
Are the meshes that are no longer needed for the render deleted automatically by LuxCore, or does the caller (e.g. the Blender addon) have to delete them with scene.RemoveUnusedMeshes()?
Note: As you see, displacement is done at parsing/loading time so a Displacement Shape will not be updated if you edit the texture (for instance for real-time view port rendering) during the rendering. However if you redefine the Displacement shape (without having called RemoveUnusedMeshes()/RemoveUnusedTextures()), the mesh will be updated.
You probably want to call all RemoveUnused*() for final rendering while keep the intermediate steps alive for view-port rendering so you can edit the texture and update the Displacement shape.