Siccity / GLTFUtility

Simple GLTF importer for Unity
MIT License
976 stars 217 forks source link

Added functional BlendShape importer #207

Open Wunder-Wulfe opened 2 years ago

Wunder-Wulfe commented 2 years ago

There were several issues with the BlendShape importer that I have managed to fix. Primitives were behaving rather oddly and trying to stack BlendShapes leading to errors in the console and failures when loading larger meshes. I believe I have been able to repair it with a rather jank method, but it seems to work on all my current models. It works by making sure that all BlendShapes are combined into a master BlendShape, making sure to place all of the targets of each submesh/primitive into its appropriate slot on the complete mesh (converting local primitive vertex to global mesh vertex). This also allowed each master BlendShape to be added to the Unity mesh individually without collisions.

Wunder-Wulfe commented 2 years ago

I have not managed to be able to replicate the FBX import behavior of blendshape weights ranging from 0.0-1.0 rather than 0.0-100.0 though