-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instancing Model Group #424
Conversation
Output/Instancing/Instancing_00.gltf
Outdated
] | ||
}, | ||
{ | ||
"mesh": 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the mesh is not instanced here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, this is an issue. I could make a short term fix by removing the indices from both meshes, otherwise this will require the same solution needed by other models with properties added to the buffer.
@bghgary Do we want to use instancing everywhere applicable in all of the model groups, or only in the instancing model group? Should it be opt out or opt in? My inclination is for it to be opt out. If we want to test having multiples of a property, we should specifically make a model or model group for that. Lets use instancing by default. |
…ding to the buffer
Per our discussion, instead of checking models for equivalence we should implement a dictionary in the runtime layer. We should also convert objects that can't be instances from classes to structs. |
This has been covered by a commit by @kcoley |
Readme : https://github.com/stevk/glTF-Asset-Generator/blob/instancing/Output/Instancing/README.md
In order to instance properties I had to change the runtime code to make some equivalency checks. This caused models in other model groups to use instancing where appropriate, but no visible changes with the models.
There are more models that need to be added to this model group (see #419) but they will required a different kind of equivalency check due to the properties being added to the buffer, which makes it harder to compare values after the fact. My thought is to add some kind of list(s) that will act in parallel with what is added to the buffer.