This PR adds various pruning improvements, including:
New type of inradius for objects projected into the plane.
Improvements to containment pruning, which allows for pruning efficiency equal to what was present in Scenic 2.0 for 2D scenes, even without 3D mode.
Added a VoxelRegion class, and the ability to approximately erode a mesh. This enables pruning for objects contained in meshes, though not optimally. Better pruning comes at a higher compile time cost, enabled by increasing PRUNING_PITCH in pruning.py.
Added a limited version of pruning based on visibility. This can be expanded in a future PR, but currently only prunes when an object must be visible from a fixed object.
Performance Note: This appears to add only minor compile time slowdowns to our current examples, so I think it's unlikely to cause a performance regression. Any performance loss would only be at compile time, and would be offset by greater sampling efficiency. In my tests, voxelization during pruning is the only added expensive operation and it takes roughly one second (per voxelization) with the current pitch.
This PR adds various pruning improvements, including:
PRUNING_PITCH
inpruning.py
.Performance Note: This appears to add only minor compile time slowdowns to our current examples, so I think it's unlikely to cause a performance regression. Any performance loss would only be at compile time, and would be offset by greater sampling efficiency. In my tests, voxelization during pruning is the only added expensive operation and it takes roughly one second (per voxelization) with the current pitch.