GPUOpen-LibrariesAndSDKs / RadeonProRenderBlenderAddon

This hardware-agnostic rendering plug-in for Blender uses accurate ray-tracing technology to produce images and animations of your scenes, and provides real-time interactive rendering and continuous adjustment of effects.
https://gpuopen.com/radeon-prorender-suite/
Apache License 2.0
480 stars 56 forks source link

Instance meshes where the "Data" mesh is reused between objects #592

Closed bsavery closed 1 year ago

bsavery commented 1 year ago

PURPOSE

Currently Objects which share a data mesh, we make a new mesh each time, this could be slow to export.

EFFECT OF CHANGE

With each mesh we check if it's unmodified and if the mesh is already exported to reuse and instance.

TECHNICAL STEPS

To do this we keep a dictionary of mesh masters

NOTES FOR REVIEWERS

TODO does not yet handle viewport updates.

VascoPi commented 1 year ago

The issue needs to be investigated, Q&A observed NorthStar crash of one of the test scenes. Narrowing down the issue:

VascoPi commented 1 year ago

The thing is that when during synchronization we convert the curve to the mesh Blender dynamically creates DepsgraphObjectInstance for that object. As result, we sync such objects twice. So in summary we have two objects in the render having only one real curve object in the scene. blender_XZGryidWxF

related to Blender Release_Notes 3.0 Python_API section Geometry Instancing

bsavery commented 1 year ago

I guess I'm not clear where that code path would get used. Can you take a look @VascoPi

VascoPi commented 1 year ago

Fixed the crash and improved the instance's transform update. Waiting for autotest results.