Skip to content

Merge VRM1.0 rendering (#47)#48

Merged
tattn merged 8 commits into
mainfrom
feature/vrm10-render
Jun 26, 2026
Merged

Merge VRM1.0 rendering (#47)#48
tattn merged 8 commits into
mainfrom
feature/vrm10-render

Conversation

@tattn

@tattn tattn commented Jun 26, 2026

Copy link
Copy Markdown
Owner
  • Add VRM1.0 rendering

  • Address VRM1 rendering review feedback

  • Fix VRM1 first-person and spring bone review issues

  • Fix SceneKit VRM0 material lighting regression

  • Add MacExample renderer and expression controls

* Add VRM1.0 rendering

* Address VRM1 rendering review feedback

* Fix VRM1 first-person and spring bone review issues

* Fix SceneKit VRM0 material lighting regression

* Add MacExample renderer and expression controls

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request adds comprehensive VRM 1.0 support to VRMKit, VRMRealityKit, and VRMSceneKit, including support for VRM 1.0 expressions, first-person annotations, node constraints, spring bones with capsule colliders, and MToon materials. It also updates the Mac example app to support switching between SceneKit and RealityKit renderers. Feedback on the changes focuses on improving robustness and preventing crashes or physics simulation failures. Key recommendations include replacing a force-unwrap of parent.parent with a safe optional binding, handling zero-distance collisions to avoid NaN propagation in spring bone physics, using Float.ulpOfOne as a safe epsilon threshold for vector length checks, and using try? to gracefully skip invalid material indices in custom expressions instead of failing the entire avatar load.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread Sources/VRMSceneKit/CustomType/VRMSpringBone.swift Outdated
Comment thread Sources/VRMRealityKit/CustomType/VRMEntitySpringBone.swift Outdated
Comment thread Sources/VRMSceneKit/CustomType/VRMSpringBone.swift Outdated
Comment thread Sources/VRMRealityKit/CustomType/VRMEntitySpringBone.swift Outdated
Comment thread Sources/VRMSceneKit/CustomType/VRMSpringBone.swift Outdated
Comment thread Sources/VRMRealityKit/CustomType/VRMEntity.swift Outdated
Comment thread Sources/VRMSceneKit/CustomType/VRMNode.swift Outdated
Comment thread Sources/VRMSceneKit/CustomType/VRMNode.swift Outdated
tattn added 7 commits June 26, 2026 22:20
- Introduced `ExampleExpression` and `MacExampleExpression` enums to manage expressions for VRM 1.0 models.
- Updated `VRMEntity` and `VRMNode` classes to support setting and retrieving expressions using the new `setExampleExpression` and `expression` methods.
- Refactored UI components in `RealityKitViewController` and `ViewController` to utilize the new expression handling.
- Removed legacy `Expression` enum and related code to streamline the expression management.
- Updated documentation to reflect changes in expression handling for VRM 1.0.
- Added compatibility bridges for legacy blend shape keys to ensure backward compatibility with VRM 0.x models.
…pe enum and simplify expression handling

- Removed the FirstPersonAnnotationType enum from VRMEntity.swift and its associated methods.
- Simplified the color handling in VRMEntityLoader by removing unnecessary checks for explicit color factors.
- Updated VRMNode to ensure expression values are clamped between 0.0 and 1.0.
- Enhanced VRM1Tests to allow for missing entries in expressions presets and updated assertions for optional chaining.
@tattn tattn marked this pull request as ready for review June 26, 2026 17:03
@tattn tattn merged commit 5b3ea39 into main Jun 26, 2026
5 checks passed
@tattn tattn deleted the feature/vrm10-render branch June 26, 2026 17:15
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