Add glTF coordinate conversion for nodes
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## What problem does this solve or what need does it fill?
#20394 changed how glTF coordinate conversion worked to [avoid bugs](https://github.com/bevyengine/bevy/issues/20621) and support more use cases. However, it did so by removing support for node conversion - it only supports converting the scene and meshes. This was a pragmatic choice to keep the changes simple, but the long-term goal should be to support node conversion if possible.
```diff
pub struct GltfConvertCoordinates {
pub rotate_scene_entity: bool,
+ pub rotate_nodes: bool,
pub rotate_meshes: bool,
}
```
The main case for node conversion is when glTF is used as a scene format for gameplay entities. So the user isn't just importing a mesh to be rendered - they expect the nodes within the glTF scene to have meaning and an appropriate `Transform::forward`. Node conversion will allow them to follow their DCC's standard forward and (assuming the glTF is exported correctly) have the glTF loader convert them to Bevy forward.
## What solution would you like?
Add node conversion as an option alongside scene and mesh conversion.
Contributor guide
Research direction
Start by tracing GltfConvertCoordinates and the existing scene and mesh coordinate-conversion paths. Add node conversion as an option alongside those conversions, then verify that glTF scene nodes receive the expected converted transforms and forward direction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics, game-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100