Skip to content
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

Major export improvements #18

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Major export improvements #18

wants to merge 5 commits into from

Conversation

niello
Copy link

@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
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