Skip to content

Add in-place updates for fixed-topology tensor line sets - #7571

Open
mstoelzle wants to merge 1 commit into
isl-org:mainfrom
mstoelzle:codex/update-tensor-lineset-geometry
Open

mstoelzle wants to merge 1 commit into
isl-org:mainfrom
mstoelzle:codex/update-tensor-lineset-geometry

Conversation

@mstoelzle

@mstoelzle mstoelzle commented Sep 18, 2026

Copy link
Copy Markdown

This PR is based directly on main and can be reviewed and merged independently of #7570. The shared API additions are arranged consistently with #7570; a synthetic merge of the two branch tips completes without conflicts.

Type

Motivation and Context

The Filament renderer can add t::geometry::LineSet objects, but applications currently have to remove and re-add them whenever point positions or line colors change. That recreates GPU resources during interactive visualization and simulation.

This change adds in-place updates for fixed-topology tensor line sets.

Checklist:

  • I have run python util/check_style.py --apply to apply Open3D code style to my code.
  • This PR changes Open3D behavior or adds new functionality.
    • Both C++ (Doxygen) and Python (Sphinx / Google style) documentation is updated accordingly.
    • I have added or updated C++ and / or Python unit tests OR included test results (e.g. screenshots or numbers) here.
  • I will follow up and update the code if CI fails.
  • For fork PRs, I have selected Allow edits from maintainers.

Description

  • Adds Scene::UpdateGeometry overloads for t::geometry::LineSet in C++ and Python, and exposes the same path through Open3DScene and O3DVisualizer.
  • Reuses the existing Filament vertex and index buffers for point-position and line-color updates.
  • Shares the buffer packing path between initial creation and updates for all three existing layouts: indexed uncolored thin lines, expanded per-line-colored thin lines, and expanded triangle-based wide lines.
  • Updates both the current endpoint and partner-endpoint attributes required by the wide-line shader.
  • Records source counts, render layout, and normalized line-index hash when the line set is added. Changes to topology, width mode, or an incompatible thin-line color layout are rejected before buffers are modified.
  • Refreshes the Filament object bounds and aggregate Open3DScene bounds after point updates.
  • Normalizes non-CPU and non-contiguous tensors before asynchronous Filament uploads, whose descriptors retain ownership until the render thread has consumed them.
  • Adds an animated tensor LineSet example and documents the fixed-topology contract.
  • Covers all three buffer layouts, repeated asynchronous uploads, bounds, and rejection of topology and color-layout changes. The wide-line tests compare the updated rendering byte-for-byte with a remove-and-readd reference, which verifies both endpoint-partner and color buffer updates.

Test results

Tested on Linux x86-64 with GCC 15.2 and Mesa llvmpipe software Vulkan:

TensorGeometryUpdateTest.*
[  PASSED  ] 3 tests.

python/test/visualization/test_tensor_lineset_rendering.py
1 passed

The changed Open3D library, Python binding, and C++ test executable compiled and linked successfully. The local build needed the existing workaround for the unrelated bundled curl/BoringSSL archive-order issue tracked in #7556; that workaround is absent from this branch.

Windows was not available for runtime testing. The implementation uses the existing cross-platform Filament buffer API and retains the current MSVC header guards. Open3D's Windows CI should verify the branch before merge.

Copilot AI lite review requested due to automatic review settings September 18, 2026 12:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@mstoelzle
mstoelzle force-pushed the codex/update-tensor-lineset-geometry branch from ceeb618 to 1444fad Compare September 18, 2026 13:08
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