fix: xmodel glTF dumps dropping COLOR_0 vertex attributes#760
Merged
Conversation
Laupetin
approved these changes
Apr 27, 2026
Owner
Laupetin
left a comment
There was a problem hiding this comment.
Good find, thanks :D I adjusted the code a bit to only dump the color data when there is non-default data, meaning not every vertex has a color value of 1,1,1,1.
Just so that it's maybe easier to work with models that do not require handling a separate color layer on vertices.
19469bb to
1d6a9d6
Compare
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.
I ran into this while working in my Xenon fork, but the root cause turned out to be upstream.
Preserve
COLOR_0in xmodel glTF dumps. The writer was dropping vertex colors from dumped GLBs, causing readers to fall back to default white and breaking flag/cloth deformation masks.The video shows the original map on the left and an OAT-linked version on the right using the
.glbloader forxmodel,bro_tarp_crate_animfrommp_osg_cargo.iw3_oat_xmodel_bug.mp4
EDIT: You can also observe the issue on stockmaps with flags e.g.
mp_showdown