Blend shapes not serialised

Discussion and help for Easy Save 3
Post Reply
chrisdjali-wrld3d
Posts: 3
Joined: Wed Jul 06, 2022 1:47 pm

Blend shapes not serialised

Post by chrisdjali-wrld3d »

This isn't something I personally need as I won't be storing mesh data via Easy Save, but noticed it anyway. The blend shapes of meshes aren't serialised and deserialised. These are settable via Mesh.AddBlendShapeFrame, and gettable by iterating over the Mesh.GetBlendShape* functions Mesh.blendShapeCount times. These aren't the same thing as the blend shape weights which are accessible via SkinnedMeshRenderer and are serialised - the blend shapes specify a modification to make to the mesh (e.g. raising the corners of the mouth into a smile) and the weights control the intensity of the effect of that modification (e.g. 0.0 to not smile, 0.5 to smile a bit, and 1.0 to smile a lot) as it's currently displayed.

I believe this is the cause of a

Code: Select all

The number of blend shape weights we are loading does not match the number of blend shapes in this SkinnedMeshRenderer's Mesh
error when loading a previously-serialised game object with a skinned mesh featuring blend shapes.



Side note: I'd suggest adding a [c] tag for inline monospaced code. It's pretty common on forums that deal with programming so shouldn't surprise anyone, and is only a few clicks in phpBB (although I can't remember what those clicks are off the top of my head).
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Blend shapes not serialised

Post by Joel »

Hi there, and thanks for getting in contact.

We'll add this in the upcoming update. I've also added the BB code you've requested :)

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply