Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds GLTF support via Bevy's scene loading mechanisms
This is a little sketchy but mostly works. Right now, we support creating a GLTF scene via
load_gltf. This API object is just a container for the underlying Bevy scene and by default doesn't have any impact on the sketch.The user can then "request" meshes or materials via GLTF node name, in which case we will clone out the relevant data and return the respective
GeometryorMaterialAPI object. There's some careful work that needs to be done here to ensure that we keep the correct transform data for the mesh in the event it was parented in the GLTF hierarchy.Users can also retrieve lights by index (lights have no name in GLTF). They can also call
gltf.camerato update theGraphicstransform to match the GLTF camera found at that index. This leaves a little bit to be desired from an API perspective and should be iterated on.I'll leave an explanation of Bevy's scene mechanics to your exploration. Note, some of these mechanics are likely changing soon with BSN.
Long term, I think we want to consider what APIs look like for this kind of scene data with deep transform hierarchies. For example, right now we require explicitly pulling each item out of the scene you want to render, but perhaps it would make sense to render an entire scene as "static" data and then only have the user pull out the items they want to animate. But other questions remain like, how do we let the user parent new items to this hierarchy? Etc.