Skip to content

Major export improvements#18

Open
niello wants to merge 5 commits intoPlattar:masterfrom
niello:master
Open

Major export improvements#18
niello wants to merge 5 commits intoPlattar:masterfrom
niello:master

Conversation

@niello
Copy link
Copy Markdown

@niello niello commented Feb 23, 2023

Export skin when SkinnedMeshRenderer.bones is empty

Sometimes SkinnedMeshRenderer has an empty array of bones. This is most likely due to an option "Optimize Game Object" on an Import settings Rig tab. This contribution restores skinning information from raw Unity asset data. I can't guarantee that it handles any possible situation but it proved useful in some real cases.

Export skin without animations

Before these changes it was possible to only export both skin & animations or neither of them. Now you can disable animation export but still get skinned meshes exported.

Humanoid animation export

Humanoid animations don't have SRT tracks but instead have special float tracks which control various conceptual properties of the human body. Instead of trying to repeat these calculations, an exporter now plays the final animation in the scene and samples SRT from affected nodes. This allows exporting humanoid animations as regular glTF animations easily.

Export objects without geometry

Commented out a condition which blocked exporting a hierarchy without meshes. It is completely artificial limitation for both Unity and glTF.

Fixes

Accessor bounds (min, max) are now correctly calculated in a case of switching vector handedness.

Minor changes

Empty .bin file is not saved anymore.
Unnecessary fake animation tracks are not allocated.

@niello niello changed the title Export skin when SkinnedMeshRenderer.bones is empty Major export improvements Mar 27, 2023
@niello
Copy link
Copy Markdown
Author

niello commented Mar 9, 2024

@DavidArayan please consider merging this

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.

1 participant