Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pruning Improvements and Voxel Regions + Bugfix & Cleanup #175

Merged
merged 28 commits into from
Jan 12, 2024

Conversation

Eric-Vin
Copy link
Collaborator

@Eric-Vin Eric-Vin commented Sep 8, 2023

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.

@Eric-Vin Eric-Vin marked this pull request as draft September 8, 2023 21:26
@Eric-Vin Eric-Vin changed the title [WIP] Pruning Improvements + Bugfix & Cleanup [WIP] Pruning Improvements and Voxel Regions + Bugfix & Cleanup Sep 8, 2023
@Eric-Vin Eric-Vin changed the title [WIP] Pruning Improvements and Voxel Regions + Bugfix & Cleanup [WIP] Pruning Improvements + Bugfix & Cleanup Sep 8, 2023
@Eric-Vin Eric-Vin changed the title [WIP] Pruning Improvements + Bugfix & Cleanup [WIP] Pruning Improvements and Voxel Regions + Bugfix & Cleanup Sep 11, 2023
@Eric-Vin Eric-Vin requested a review from dfremont October 13, 2023 00:52
Copy link
Collaborator

@dfremont dfremont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great overall. All my comments are minor except I think something's wrong with the cyclic dependency check in visibility pruning (see above).

@Eric-Vin
Copy link
Collaborator Author

Alright, should have all the changes you requested implemented!

@Eric-Vin Eric-Vin requested a review from dfremont January 12, 2024 05:10
@dfremont dfremont merged commit c4895b4 into main Jan 12, 2024
23 checks passed
@dfremont dfremont deleted the 3DPruningImprovements branch January 12, 2024 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants