Skip to content

[WIP] - interaction surface points#2442

Draft
aclegg3 wants to merge 9 commits into
mainfrom
alex-08_07-interaction_surface_points
Draft

[WIP] - interaction surface points#2442
aclegg3 wants to merge 9 commits into
mainfrom
alex-08_07-interaction_surface_points

Conversation

@aclegg3

@aclegg3 aclegg3 commented Aug 8, 2024

Copy link
Copy Markdown
Contributor

Motivation and Context

This PR contains a prototype viewer.py application for computing "interaction surface points".

Context:

In many scenarios a heuristic of unoccluded point to surface distance is desired.

  • Checking against a single point is prone to edge case errors and unreliable (e.g. when an object conveniently blocks the center).
  • Using the full mesh is intractable.
  • Using a reduced representation like AABB is error prone for complex shapes (imagine the classic L shaped couch and this becomes obvious).

Instead, "interaction surface points" provide a pre-computed set of points which cover the surface of an object allowing distance and occlusion checks against a set of points in order to reduce the likely-hood of edge cases.

Implementation:

Concretely, we use horizontal raycasting from the AABB boundary to collect a set of exterior surface points.
We then cull the point set by removing points with lowest pairwise distance until a configurable maximum number of points remain. This provides a heuristically uniform distribution.
We cache the points in MarkerSets and serialize to template metadata such that pre-computed points can be re-loaded from the SceneDataset rather than re-computed at runtime.

TODO: migrate to a util, pre-compute over dataset

How Has This Been Tested

Viewer application demo code.
Try it out:

  • run viewer.py on your scene of choice.
  • right click an object to compute the interaction surface points (displayed in yellow)
  • 'r' increments radial samples (+shift to decrement)
  • 'v' increments vertical samples (+shift to decrement)
  • 'c' increments max points after culling (+shift to decrement)
  • alt-'c' to toggle culling
  • 't' to toggle ray debug drawing

Example:

interaction_surface_points-2024-08-07_17.16.46.mp4

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@aclegg3
aclegg3 requested a review from xavierpuigf August 8, 2024 00:35
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Aug 8, 2024
@meta-cla

meta-cla Bot commented May 19, 2026

Copy link
Copy Markdown

Hi @aclegg3!

Thank you for your pull request.

We require contributors to sign our Contributor License Agreement, and yours needs attention.

You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants