Viewer visibility improvements#801
Conversation
…s in the viewer Signed-off-by: Miles Macklin <mmacklin@nvidia.com>
Signed-off-by: Miles Macklin <mmacklin@nvidia.com>
… make allegro example show the palm Signed-off-by: Miles Macklin <mmacklin@nvidia.com>
Signed-off-by: Miles Macklin <mmacklin@nvidia.com>
📝 WalkthroughWalkthroughCentralizes shape visibility and batching in the viewer: adds show_collision/show_visual/show_static toggles, a shape-hash batching model (ShapeInstances), and threads a new hidden flag through logging APIs; syncs backend signatures; updates GL UI and example usage; tweaks OpenGL sky_lower color constant. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Viewer as ViewerBase
participant Cache as GeometryCache
participant Batches as _shape_instances (ShapeInstances)
participant Backend as Viewer Backend (GL/US D/File/Null)
User->>Viewer: log_shapes(..., hidden)
Viewer->>Viewer: _hash_shape(geo_hash, static, flags)
Viewer->>Cache: _populate_geometry(geo_type, ...)
Cache-->>Viewer: mesh_ref
Viewer->>Viewer: _should_show_shape(flags, is_static)
alt batch exists
Viewer->>Batches: reuse/update ShapeInstances
else create batch
Viewer->>Batches: create ShapeInstances(static, flags, mesh)
end
Viewer->>Backend: log_instances(name, mesh, xforms, scales, colors, materials, hidden)
Backend-->>Viewer: ack
sequenceDiagram
autonumber
actor User
participant UI as ViewerGL UI
participant State as ViewerGL State (show_collision/show_visual/show_static)
participant Instanced as Instanced Objects
User->>UI: Toggle Show Collision / Show Visual
UI->>State: update boolean
UI->>Instanced: set object.hidden per batch
note over Instanced: hidden=true -> skip transform pushes / mark invisible
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: Miles Macklin <mmacklin@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
newton/_src/viewer/viewer.py (1)
718-727: Dynamic color generation improves visual distinction.The switch from a fixed palette to golden-ratio-based hue generation provides better visual separation between shapes. The pastel HLS values (L=0.6, S=0.65) work well on dark backgrounds.
The variable name
lon line 725 could be renamed tolightnessfor better readability:- l, s = 0.6, 0.65 - r, g, b = colorsys.hls_to_rgb(h, l, s) + lightness, saturation = 0.6, 0.65 + r, g, b = colorsys.hls_to_rgb(h, lightness, saturation)newton/examples/robot/example_robot_allegro_hand.py (1)
103-107: Tighten the collision regex; viewer logs hidden shapes so toggles will work if flags/overrides are changedVerified: viewer.log_instances accepts a hidden flag and viewers use it (GL sets objects[name].hidden; USD sets instancer visibility). viewer computes visible from ShapeFlags.VISIBLE and calls log_instances(hidden=not visible), so clearing VISIBLE will log collisions as hidden but they can be re‑shown if a runtime toggle updates shape_flags or viewer overrides.
- Replace the regex with a precompiled, anchored pattern (optional refactor — diff below).
- Ensure any viewer collision toggle updates shape_flags or the viewer's visibility overrides at runtime (otherwise collisions will remain hidden).
- for i, key in enumerate(allegro_hand.shape_key): - if re.match(".*Robot/.*?/collision", key): - allegro_hand.shape_flags[i] &= ~newton.ShapeFlags.VISIBLE + pattern = re.compile(r'/Robot/[^/]+/collision(?:$|/)') + for i, key in enumerate(allegro_hand.shape_key): + if pattern.search(key): + allegro_hand.shape_flags[i] &= ~newton.ShapeFlags.VISIBLE
📜 Review details
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
newton/_src/viewer/gl/opengl.py(1 hunks)newton/_src/viewer/viewer.py(7 hunks)newton/_src/viewer/viewer_file.py(1 hunks)newton/_src/viewer/viewer_gl.py(3 hunks)newton/_src/viewer/viewer_null.py(1 hunks)newton/_src/viewer/viewer_rerun.py(1 hunks)newton/_src/viewer/viewer_usd.py(1 hunks)newton/examples/robot/example_robot_allegro_hand.py(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (6)
newton/_src/viewer/viewer_file.py (5)
newton/_src/viewer/viewer_gl.py (1)
log_instances(230-257)newton/_src/viewer/viewer.py (1)
log_instances(385-386)newton/_src/viewer/viewer_null.py (1)
log_instances(68-80)newton/_src/viewer/viewer_rerun.py (1)
log_instances(133-203)newton/_src/viewer/viewer_usd.py (1)
log_instances(187-271)
newton/_src/viewer/viewer_null.py (5)
newton/_src/viewer/viewer_gl.py (1)
log_instances(230-257)newton/_src/viewer/viewer.py (1)
log_instances(385-386)newton/_src/viewer/viewer_file.py (1)
log_instances(106-108)newton/_src/viewer/viewer_rerun.py (1)
log_instances(133-203)newton/_src/viewer/viewer_usd.py (1)
log_instances(187-271)
newton/_src/viewer/viewer_usd.py (5)
newton/_src/viewer/viewer_gl.py (1)
log_instances(230-257)newton/_src/viewer/viewer.py (1)
log_instances(385-386)newton/_src/viewer/viewer_file.py (1)
log_instances(106-108)newton/_src/viewer/viewer_null.py (1)
log_instances(68-80)newton/_src/viewer/viewer_rerun.py (1)
log_instances(133-203)
newton/_src/viewer/viewer_rerun.py (5)
newton/_src/viewer/viewer_gl.py (1)
log_instances(230-257)newton/_src/viewer/viewer.py (1)
log_instances(385-386)newton/_src/viewer/viewer_file.py (1)
log_instances(106-108)newton/_src/viewer/viewer_null.py (1)
log_instances(68-80)newton/_src/viewer/viewer_usd.py (1)
log_instances(187-271)
newton/_src/viewer/viewer.py (8)
newton/_src/sim/builder.py (3)
flags(176-182)flags(185-190)color(4015-4056)newton/_src/viewer/viewer_gl.py (1)
log_instances(230-257)newton/_src/viewer/viewer_file.py (1)
log_instances(106-108)newton/_src/viewer/viewer_null.py (1)
log_instances(68-80)newton/_src/viewer/viewer_rerun.py (1)
log_instances(133-203)newton/_src/viewer/viewer_usd.py (1)
log_instances(187-271)newton/_src/geometry/flags.py (1)
ShapeFlags(30-42)newton/_src/geometry/types.py (1)
GeoType(25-64)
newton/_src/viewer/viewer_gl.py (6)
newton/_src/viewer/viewer.py (1)
log_instances(385-386)newton/_src/viewer/viewer_file.py (1)
log_instances(106-108)newton/_src/viewer/viewer_null.py (1)
log_instances(68-80)newton/_src/viewer/viewer_rerun.py (1)
log_instances(133-203)newton/_src/viewer/viewer_usd.py (1)
log_instances(187-271)newton/_src/viewer/gl/opengl.py (2)
MeshInstancerGL(528-755)update_from_transforms(673-696)
🪛 Ruff (0.13.1)
newton/_src/viewer/viewer_usd.py
187-187: Unused method argument: materials
(ARG002)
187-187: Unused method argument: hidden
(ARG002)
newton/_src/viewer/viewer_rerun.py
133-133: Unused method argument: materials
(ARG002)
133-133: Unused method argument: hidden
(ARG002)
newton/_src/viewer/viewer.py
718-718: Unused noqa directive (non-enabled: PLC0415)
Remove unused noqa directive
(RUF100)
725-725: Ambiguous variable name: l
(E741)
⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Run GPU Unit Tests on AWS EC2 (Pull Request)
- GitHub Check: Run GPU Benchmarks (Pull Request)
- GitHub Check: run-newton-tests / newton-unittests (windows-latest)
- GitHub Check: run-newton-tests / newton-unittests (ubuntu-latest)
🔇 Additional comments (13)
newton/_src/viewer/gl/opengl.py (1)
777-777: Update the sky_lower color change looks good.The darker tone (40, 44, 55) provides better contrast for visualization, which aligns well with the broader viewer improvements in the PR.
newton/_src/viewer/viewer_file.py (1)
106-106: LGTM!The signature update to include the
hiddenparameter aligns perfectly with the API changes across all viewer implementations.newton/_src/viewer/viewer_rerun.py (1)
133-133: LGTM!The signature update correctly extends the API to match other viewers, maintaining consistency across the codebase.
newton/_src/viewer/viewer_usd.py (1)
187-187: LGTM!The signature update properly extends the public API to include the
hiddenparameter, consistent with the other viewer implementations.newton/_src/viewer/viewer_null.py (1)
68-68: LGTM!The signature update to include the
hiddenparameter maintains API consistency across viewer implementations.newton/_src/viewer/viewer_gl.py (2)
230-257: Good implementation of the hidden parameter logic.The implementation correctly avoids updating transforms when
hidden=True, which prevents unnecessary GPU work for non-visible instances. The logic also ensures that newly created instancers are always updated initially.
891-897: UI toggles are properly separated.The replacement of the single "Show Collision Geometry" toggle with separate "Show Collision" and "Show Visual" toggles provides better control over visibility, aligning with the PR objectives.
newton/_src/viewer/viewer.py (5)
63-65: Well-structured visibility control attributes.The addition of
show_collision,show_visual, andshow_staticprovides clear and intuitive control over shape visibility. The defaults (visual on, collision/static off) are sensible for typical use cases.
111-124: Efficient visibility handling in log_state.The implementation correctly applies visibility checks before updating transforms, avoiding unnecessary GPU work for hidden shapes. The
hiddenparameter is properly passed tolog_instances.
416-421: Good refactor of the ShapeInstances class.The addition of
staticandflagsattributes toShapeInstancesenables proper visibility determination and shape batching. This design cleanly separates shape properties from rendering logic.
465-466: Proper shape hashing for batching.The
_hash_shapemethod correctly includesstaticandflagsin the hash, ensuring that shapes with different visibility properties are batched separately.
468-489: Well-designed visibility logic.The
_should_show_shapemethod provides clear precedence rules: static override → collision toggle → visual toggle → shape flags. This gives users intuitive control over visibility.newton/examples/robot/example_robot_allegro_hand.py (1)
99-101: Palm visuals now included — filter update LGTM.Dropping ".*palm_link/visuals" aligns with the PR goal to show the palm. Expect a small increase in draw calls/GPU memory.
Please sanity‑check that the palm visuals appear as intended with the default viewer toggles (both visual+collision), and that no unintended prims slipped through the filters.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
newton/_src/viewer/viewer.py (2)
720-720: Remove unnecessary noqa directive.The
# noqa: PLC0415comment is no longer needed since the import is now at the function level and doesn't trigger the linting rule.Apply this fix:
- import colorsys # noqa: PLC0415 + import colorsys
727-727: Use more descriptive variable name.The variable name
l(lowercase L) is ambiguous and could be confused with1(one) orI(capital i). Consider usinglightnessfor clarity.Apply this fix:
- h = (i * _PHI) % 1.0 - l, s = 0.6, 0.65 - r, g, b = colorsys.hls_to_rgb(h, l, s) + h = (i * _PHI) % 1.0 + lightness, s = 0.6, 0.65 + r, g, b = colorsys.hls_to_rgb(h, lightness, s)
📜 Review details
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
newton/_src/viewer/gl/opengl.py(1 hunks)newton/_src/viewer/viewer.py(10 hunks)newton/_src/viewer/viewer_file.py(1 hunks)newton/_src/viewer/viewer_gl.py(3 hunks)newton/_src/viewer/viewer_null.py(1 hunks)newton/_src/viewer/viewer_rerun.py(1 hunks)newton/_src/viewer/viewer_usd.py(1 hunks)newton/examples/robot/example_robot_allegro_hand.py(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (6)
newton/_src/viewer/viewer_null.py (5)
newton/_src/viewer/viewer.py (1)
log_instances(387-388)newton/_src/viewer/viewer_gl.py (1)
log_instances(230-257)newton/_src/viewer/viewer_file.py (1)
log_instances(106-108)newton/_src/viewer/viewer_rerun.py (1)
log_instances(133-203)newton/_src/viewer/viewer_usd.py (1)
log_instances(187-271)
newton/_src/viewer/viewer_usd.py (5)
newton/_src/viewer/viewer.py (1)
log_instances(387-388)newton/_src/viewer/viewer_gl.py (1)
log_instances(230-257)newton/_src/viewer/viewer_file.py (1)
log_instances(106-108)newton/_src/viewer/viewer_null.py (1)
log_instances(68-80)newton/_src/viewer/viewer_rerun.py (1)
log_instances(133-203)
newton/_src/viewer/viewer_rerun.py (5)
newton/_src/viewer/viewer.py (1)
log_instances(387-388)newton/_src/viewer/viewer_gl.py (1)
log_instances(230-257)newton/_src/viewer/viewer_file.py (1)
log_instances(106-108)newton/_src/viewer/viewer_null.py (1)
log_instances(68-80)newton/_src/viewer/viewer_usd.py (1)
log_instances(187-271)
newton/_src/viewer/viewer_file.py (5)
newton/_src/viewer/viewer.py (1)
log_instances(387-388)newton/_src/viewer/viewer_gl.py (1)
log_instances(230-257)newton/_src/viewer/viewer_null.py (1)
log_instances(68-80)newton/_src/viewer/viewer_rerun.py (1)
log_instances(133-203)newton/_src/viewer/viewer_usd.py (1)
log_instances(187-271)
newton/_src/viewer/viewer_gl.py (6)
newton/_src/viewer/viewer.py (1)
log_instances(387-388)newton/_src/viewer/viewer_file.py (1)
log_instances(106-108)newton/_src/viewer/viewer_null.py (1)
log_instances(68-80)newton/_src/viewer/viewer_rerun.py (1)
log_instances(133-203)newton/_src/viewer/viewer_usd.py (1)
log_instances(187-271)newton/_src/viewer/gl/opengl.py (2)
MeshInstancerGL(528-755)update_from_transforms(673-696)
newton/_src/viewer/viewer.py (8)
newton/_src/sim/builder.py (3)
flags(176-182)flags(185-190)color(4015-4056)newton/_src/viewer/viewer_gl.py (1)
log_instances(230-257)newton/_src/viewer/viewer_file.py (1)
log_instances(106-108)newton/_src/viewer/viewer_null.py (1)
log_instances(68-80)newton/_src/viewer/viewer_rerun.py (1)
log_instances(133-203)newton/_src/viewer/viewer_usd.py (1)
log_instances(187-271)newton/_src/geometry/flags.py (1)
ShapeFlags(30-42)newton/_src/geometry/types.py (1)
GeoType(25-64)
🪛 Ruff (0.13.1)
newton/_src/viewer/viewer_usd.py
187-187: Unused method argument: materials
(ARG002)
187-187: Unused method argument: hidden
(ARG002)
newton/_src/viewer/viewer_rerun.py
133-133: Unused method argument: materials
(ARG002)
133-133: Unused method argument: hidden
(ARG002)
newton/_src/viewer/viewer.py
720-720: Unused noqa directive (non-enabled: PLC0415)
Remove unused noqa directive
(RUF100)
727-727: Ambiguous variable name: l
(E741)
🔇 Additional comments (18)
newton/_src/viewer/gl/opengl.py (1)
777-777: Minor visual refinement.The sky lower color has been changed from a lighter blue-gray to a darker, more muted color. This aligns with the broader viewer improvements mentioned in the PR summary and creates a more subdued background that likely enhances visibility of collision and visual geometries.
newton/examples/robot/example_robot_allegro_hand.py (2)
99-99: Simplified ignore paths for better palm visibility.The removal of ".*palm_link/visuals" from the ignore paths enables showing the palm, which aligns with the PR's goal of improving viewer visibility and allowing users to observe correspondence between collision and visual geometries.
105-106: Simplified collision visibility logic.The updated condition removes the palm_link exclusion, applying visibility masking consistently to all collision shapes. This change aligns with the centralized visibility control introduced in the viewer modules.
newton/_src/viewer/viewer_null.py (1)
68-68: API consistency maintained.The signature extension with
hidden=Falsemaintains consistency across all viewer backends while preserving the no-op behavior appropriate for the null viewer.newton/_src/viewer/viewer_usd.py (1)
187-187: API signature extended for consistency.The
hiddenparameter has been added to maintain API consistency across all viewer backends. The parameter is currently unused in the implementation but provides a foundation for future visibility control in USD output.newton/_src/viewer/viewer_rerun.py (1)
133-133: API signature standardized.The
hiddenparameter addition ensures consistent API surface across all viewer backends. While unused in the current implementation, this prepares the ReRun backend for unified visibility control.newton/_src/viewer/viewer_file.py (1)
106-106: Consistent API extension.The
hiddenparameter addition maintains API compatibility across all viewer backends. The no-op implementation is appropriate for the file viewer which focuses on data recording rather than rendering.newton/_src/viewer/viewer_gl.py (2)
230-257: Enhanced visibility control with smart update logic.The new
hiddenparameter enables fine-grained visibility control while optimizing performance by skipping unnecessary updates for hidden instances. The logic correctly forces updates when creating new instancers and respects the hidden state for existing ones.
892-897: Improved geometry visibility toggles.The replacement of a single "Show Collision Geometry" toggle with separate "Show Collision" and "Show Visual" toggles provides better granular control. This allows users to toggle collision and visual shapes independently, addressing the PR objective of allowing both to be shown together for correspondence observation.
newton/_src/viewer/viewer.py (9)
63-65: Enhanced visibility control attributes.The new toggles (
show_collision,show_visual,show_static) provide granular control over shape visibility, replacing the previous per-shape inference with centralized policy. This supports the PR's goal of allowing collision and visual geometries to be shown together.
111-124: Centralized visibility decision with performance optimization.The new
_should_show_shapemethod centralizes visibility logic, and the conditional update prevents unnecessary computation for hidden shapes. Thehiddenparameter threading throughlog_instancesenables backends to optimize rendering accordingly.
418-423: Enhanced shape instance data structure.The renamed and expanded
ShapeInstancesclass now includesstaticandflagsattributes, enabling the new visibility policy. This supports per-batch visibility decisions based on shape properties rather than individual shape flags.
467-468: Shape batching with visibility-aware hashing.The new
_hash_shapemethod enables batching shapes by geometry, static state, and flags. This supports the centralized visibility policy by grouping shapes with similar rendering characteristics.
470-491: Comprehensive visibility policy implementation.The
_should_show_shapemethod implements the new visibility logic with clear precedence: static override → collision override → visual override → fallback to shape visibility flag. This provides users with intuitive control over what gets rendered.
584-610: Optimized shape population with improved batching.The updated shape population logic uses the geometry cache effectively and creates shape batches based on the new hashing strategy. This avoids repopulating viewer instances when toggling visibility, addressing a key PR objective.
617-617: Per-shape-type color scheme for collision geometries.The new
_shape_color_mapfunction generates colors based on geometry type rather than instance, implementing the PR's objective of using a per-shape-type color scheme for better visual distinction.
719-729: Improved color generation with mathematical distribution.The new color mapping uses the golden ratio for hue distribution, creating visually distinct pastel colors that work well on dark backgrounds. This replaces hard-coded colors with a mathematically sound approach for better visual differentiation.
387-387: API signature updated consistently.The
hiddenparameter addition maintains consistency across all viewer backend signatures and enables the new visibility control features.
…etry Signed-off-by: Miles Macklin <mmacklin@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
newton/_src/viewer/viewer.py (1)
228-233: Fix isinstance union usage (will raise TypeError at runtime).
isinstance(..., tuple | list | np.ndarray)is invalid at runtime. Use a tuple of types.Apply this diff:
- def _as_float_list(value): - if isinstance(value, tuple | list | np.ndarray): + def _as_float_list(value): + if isinstance(value, (tuple, list, np.ndarray)): return [float(v) for v in value] else: return [float(value)]- # normalize - if isinstance(geo_scale, list | tuple | np.ndarray): + # normalize + if isinstance(geo_scale, (list, tuple, np.ndarray)): scale_list = [float(v) for v in geo_scale] else: scale_list = [float(geo_scale)]Also applies to: 507-511
🧹 Nitpick comments (3)
newton/_src/viewer/viewer.py (3)
100-102: Remove duplicate is_paused definition.There are two identical
is_paused()methods; keep one.Apply this diff to remove the later duplicate:
- def is_paused(self): - return False
190-194: Contact color comment mismatch.Comment says orange-red but code uses green.
Pick one. Example to match the comment:
- # Use orange-red color for contact normals - colors = (0.0, 1.0, 0.0) + # Use orange-red color for contact normals + colors = (1.0, 0.35, 0.0)
444-451: Parent index dtype: consider explicit 32-bit.Kernel/index buffers are typically 32-bit. Using bare
intmay vary by platform.If kernels expect 32-bit, apply:
- self.parents = wp.array(self.parents, dtype=int, device=self.device) + self.parents = wp.array(self.parents, dtype=wp.int32, device=self.device)
📜 Review details
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
newton/_src/viewer/viewer.py(9 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
newton/_src/viewer/viewer.py (8)
newton/_src/sim/builder.py (3)
flags(176-182)flags(185-190)color(4015-4056)newton/_src/viewer/viewer_file.py (1)
log_instances(106-108)newton/_src/viewer/viewer_null.py (1)
log_instances(68-80)newton/_src/viewer/viewer_rerun.py (1)
log_instances(133-203)newton/_src/viewer/viewer_usd.py (1)
log_instances(187-271)newton/_src/viewer/viewer_gl.py (1)
log_instances(230-257)newton/_src/geometry/flags.py (1)
ShapeFlags(30-42)newton/_src/geometry/types.py (1)
GeoType(25-64)
⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Run GPU Benchmarks (Pull Request)
- GitHub Check: Run GPU Unit Tests on AWS EC2 (Pull Request)
- GitHub Check: run-newton-tests / newton-unittests (windows-latest)
🔇 Additional comments (5)
newton/_src/viewer/viewer.py (5)
524-536: Unsupported geo types: ELLIPSOID/HFIELD not mapped.
_populate_geometry()lacks entries forGeoType.ELLIPSOIDandGeoType.HFIELD. If the model uses them, this will raise.Please confirm these types cannot appear here. If they can, add mappings or guard earlier to skip with a clear message.
325-356: log_geo doesn’t handle ELLIPSOID/HFIELD.
log_geo()raises for these types.Confirm they’re unreachable. If not, either implement or explicitly skip them in
_populate_shapes()with a user-facing warning.
614-618: Per-hash collider coloring — confirm palette and intent.Switch to Paul Tol palette and hash-based grouping addresses earlier “too few colors” concern. Looks good; just confirm this matches desired UX for Allegro.
111-124: Visibility-driven updates: behavior is consistent with “no repopulate”.Updating transforms only when visible and passing
hidden=not visiblealigns with GL backend’sneeds_updatelogic.Toggle test recommended to verify no one-frame lag: hide → simulate → show; instances should snap to current pose on the reveal frame.
387-388: API change LGTM — viewers & caller updated.Confirmed log_instances signatures and caller accept hidden=False in: newton/_src/viewer/viewer.py, viewer_gl.py, viewer_usd.py, viewer_rerun.py, viewer_file.py, viewer_null.py.
Signed-off-by: Miles Macklin <mmacklin@nvidia.com>
Signed-off-by: Miles Macklin <mmacklin@nvidia.com>
Description
Newton Migration Guide
Please ensure the migration guide for warp.sim users is up-to-date with the changes made in this PR.
docs/migration.rstis up-to dateBefore your PR is "Ready for review"
newton/tests/test_examples.py)pre-commit run -aSummary by CodeRabbit
New Features
Refactor
Style
Chores