Skip to content

Migrate from InstancedMesh2 to BatchedMesh - #1090

Merged
Micheal Parks (micheal-parks) merged 13 commits into
mainfrom
batched-primitives
Sep 25, 2026
Merged

Micheal Parks (micheal-parks) merged 13 commits into
mainfrom
batched-primitives

Conversation

@micheal-parks

Copy link
Copy Markdown
Member

Overview

This PR removes our dependency on InstancedMesh2 in favor of using one batched mesh for all geometries. This means spheres, capsules, cylinders, boxes, and even custom buffer geometries are inserted into the same batched mesh.

The benefits here are in removing a dependency and much better transparency sorting results. A lot of visibility snapping and clipping issues have been resolved by just putting everything into the same sorting space.

We should also get a (likely very small) performance boost by further reducing draw calls.

A lot of redundant code in each individual instancing file (Boxes.svelte) was reduced due to the single batched mesh taking in a lot of shared logic.

@changeset-bot

changeset-bot Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6837276

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@viamrobotics/visualization Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-25 18:35 UTC

@micheal-parks
Micheal Parks (micheal-parks) merged commit c592002 into main Sep 25, 2026
7 checks passed
@micheal-parks
Micheal Parks (micheal-parks) deleted the batched-primitives branch September 25, 2026 18:35
@claude claude Bot mentioned this pull request Sep 25, 2026
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