Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
122 stars 2 forks source link

Blendshape name duplicated #813

Open Drafy07 opened 7 months ago

Drafy07 commented 7 months ago

Describe the bug?

since the new blendshape sorting feature got added to resonite it apear that evrything being imported tend to have the blendshape's name duplicated twice.

To Reproduce

import a model with blendshape , check the names ingame and they will be duplicated

Expected behavior

blendshape name to properly show once and not twice seperated by a "."

Screenshots

image 20231128051517_1

Resonite Version Number

since 2023.11.18.1263

What Platforms does this occur on?

Windows

What headset if any do you use?

desktop , steamvr

Log Files

Additional Context

No response

Reporters

No response

TisFoolish commented 7 months ago

What format are you using? Can you provide a link to the troublesome file?

Drafy07 commented 7 months ago

any file does this when exported as .fbx , problem didnt appear before this new feature froox added

epicEaston197 commented 7 months ago

Can you please try GLTF

shiftyscales commented 7 months ago

As others indicated- can you please verify if other formats like gltf/glb also cause the issue described, @Drafy07? Or is it just FBX that causes that?

Frooxius commented 7 months ago

Which feature are you talking about that caused this? We didn't touch how blendshape importing itself works that I'm aware of.

shiftyscales commented 7 months ago

I believe they are referring to the option you added to sort blendshape lists by name, and by length/name, @Frooxius. I don't know if that's related- but it sounds like that is around the build they first started noticing the issue.

I believe we also had updated assimp around the same time, so it's possible that could have been related too because that also happened earlier this month.

shiftyscales commented 7 months ago

2023.11.7.274

  • Updated Assimp library (used to import and export 3D models) to latest from the source -- This includes hundreds of commits of updates to the library since the previous version

2023.11.18.1263

  • Added "Sort Blendshapes (by name)" processing to SkinnedMeshRenderer -- This will sort and remap blendshapes, which allows ensuring a consistent ordering of the blendshapes

  • Add "Sort Blendshapes (by name length, then name)" -- This is similar, but will sort blendshapes by the name length first - this is useful if you want to group them by short names first

  • Blendshape names in the inspector will now auto-update when the target mesh is changed (e.g. when recomputing or sorting blendshapes)

Frooxius commented 7 months ago

@shiftyscales That's what it sounds like to me, but that one doesn't touch how blendshapes are imported at all, so it doesn't make much sense to me, which is why I'd ask them to clarify.

shiftyscales commented 7 months ago

Would updating the assimp library be a likely candidate for this regression? I haven't tested other formats yet- but I've definitely seen this happen with FBX files as OP has indicated.

Frooxius commented 7 months ago

Maybe? We need more info on the formats. Did anyone else encounter this too?

It could be a bug in Blender too, the way it exports blendshapes.

shiftyscales commented 7 months ago

Made a test skinned mesh (a cube weighted to a single bone with two blendshapes).

GLB imported without the name duplication. FBX imported with the name duplication.

Below are the log file, Blend file (produced in Blender 3.3), as well as the GLB and FBX exports (using default export settings), @Frooxius.

Zipped them up as GitHub doesn't support upload of .blend or .glb files.

SHIFTY-LAPTOP - 2023.11.28.1365 - 2023-11-28 16_39_36.log BlendshapeNameTest.zip

Frooxius commented 7 months ago

Thanks for the info, that helps!

That does sound like there's some change how assimp handles blendshape names for FBX for some reason. We'd have to kick it to them or check their sources.

gentlecolts commented 6 months ago

I will also add here that if you have shapes like "shape", they get turned into "shape.shape", but if you already have a prefix, for example "prefix.shape", then their names are preserved. I've been using a convention of appending "ft." in front of all of my face tracking shapes and their names are preserved, while assimp makes a mess of non-prefixed names. It also seems like shape order is not preserved either, for example in the following, shapes like AA, CH, are some of the first ones I make, and are supposed to come before any of the face tracking ones

image