Mirrored shape key isn't exported as it should I think #102452

Closed
opened 2022-11-12 03:57:25 +01:00 by Ricky Manalo · 10 comments

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 522.25

Blender Version
Broken: version: 3.3.1, branch: master, commit date: 2022-10-04 18:35, hash: blender/blender@b292cfe5a9
Worked: (newest version of Blender that worked as expected)

Short description of error
I imported a fbx to unity with a character made of separated multiple parts. It got a part that I needed to be mirror to make life easier. On blender, doing "Mirror Shape Key(Topology)", the parts looks as intended. But when I imported it on unity, the part still on it's not mirrored position.
skull_boy applied.blend

Exact steps for others to reproduce the error
Just follow this brilliant tutorial(https://www.youtube.com/watch?v=D-HDrhHgATo) on how to export fbx and import it to unity, then add the model to a scene

**System Information** Operating system: Windows-10-10.0.19044-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 522.25 **Blender Version** Broken: version: 3.3.1, branch: master, commit date: 2022-10-04 18:35, hash: `blender/blender@b292cfe5a9` Worked: (newest version of Blender that worked as expected) **Short description of error** I imported a fbx to unity with a character made of separated multiple parts. It got a part that I needed to be mirror to make life easier. On blender, doing "Mirror Shape Key(Topology)", the parts looks as intended. But when I imported it on unity, the part still on it's not mirrored position. [skull_boy applied.blend](https://archive.blender.org/developer/F13893985/skull_boy_applied.blend) **Exact steps for others to reproduce the error** Just follow this brilliant tutorial(https://www.youtube.com/watch?v=D-HDrhHgATo) on how to export fbx and import it to unity, then add the model to a scene
Author

Added subscriber: @halfblue3

Added subscriber: @halfblue3
Member

Added subscriber: @OmarEmaraDev

Added subscriber: @OmarEmaraDev
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

Can you provide more detailed instruction for reproduction? Which part are you talking about? the Jaw?
Is the attached file after mirroring or before? Can you show the expected output and what you get in Unity instead?

Can you provide more detailed instruction for reproduction? Which part are you talking about? the Jaw? Is the attached file after mirroring or before? Can you show the expected output and what you get in Unity instead?
Author

It's the eye. The attached file is already mirrored. Here's the screenshots:

skull blend.png
This is what it should look like

skull unity.png
skull unity2.png
And this is what gets exported

When I slide the BlendShapes, the eye goes to where it should be.
skull eye.mp4

It's the eye. The attached file is already mirrored. Here's the screenshots: ![skull blend.png](https://archive.blender.org/developer/F13972571/skull_blend.png) This is what it should look like ![skull unity.png](https://archive.blender.org/developer/F13972574/skull_unity.png) ![skull unity2.png](https://archive.blender.org/developer/F13972581/skull_unity2.png) And this is what gets exported When I slide the BlendShapes, the eye goes to where it should be. [skull eye.mp4](https://archive.blender.org/developer/F13972582/skull_eye.mp4)
Member

Changed status from 'Needs User Info' to: 'Needs Triage'

Changed status from 'Needs User Info' to: 'Needs Triage'

Added subscriber: @Mysteryem-2

Added subscriber: @Mysteryem-2

It looks like using Mirror Shape Key (Topology) on the reference ('Basis') shape key is another way to cause a desynchronization between the mesh's vertices and it's reference shape key, causing the same issues as in https://developer.blender.org/T98890 (other ways I know are directly using a script or by moving a shape key up the list until it becomes the reference key).

I'm thinking that you might have duplicated the eyes_L mesh, renamed the duplicate to eyes_R2 and then run Mirror Shape Key(Topology) on every shape key (including Basis) on that eyes_R2 mesh, since if you delete all shape keys on the eyes_R2 mesh, the eye moves from the character's right to the character's left because this is where the vertices are in the mesh data itself.

You see the exported FBX not match what you see in Blender because Blender's FBX exporter exports the mesh based on the mesh's vertices and not the reference shape key.

A workaround for this issue is to select the mesh with this issue (eyes_R2 in this case), enter edit mode and then exit edit mode. This will re-synchronize the mesh's vertices with the reference ('Basis') shape key, fixing the issue that occurs when exporting as FBX.

I'm not sure how Mirror Shape Key(Topology) works to be able to set up an as simple as possible example for reproduction, but given the provided skull_boy applied.blend:

  • Select the eyes_L mesh
  • Select Basis as the active shape key
  • From the Shape Key Specials menu, run Mirror Shape Key (Topology)
  • The mesh's vertices and the Basis shape key are now desynchronized (exporting as an FBX would produce undesired results)
  • From the Shape Key Specials menu, run Delete All Shape Keys
  • Observe that the mesh reverts back to how it was before running Mirror Shape Key (Topology) (since the mesh's vertices remained unchanged)
It looks like using `Mirror Shape Key (Topology)` on the reference ('Basis') shape key is another way to cause a desynchronization between the mesh's vertices and it's reference shape key, causing the same issues as in https://developer.blender.org/T98890 (other ways I know are directly using a script or by moving a shape key up the list until it becomes the reference key). I'm thinking that you might have duplicated the eyes_L mesh, renamed the duplicate to eyes_R2 and then run Mirror Shape Key(Topology) on every shape key (including Basis) on that eyes_R2 mesh, since if you delete all shape keys on the eyes_R2 mesh, the eye moves from the character's right to the character's left because this is where the vertices are in the mesh data itself. You see the exported FBX not match what you see in Blender because Blender's FBX exporter exports the mesh based on the mesh's vertices and not the reference shape key. A workaround for this issue is to select the mesh with this issue (eyes_R2 in this case), enter edit mode and then exit edit mode. This will re-synchronize the mesh's vertices with the reference ('Basis') shape key, fixing the issue that occurs when exporting as FBX. I'm not sure how Mirror Shape Key(Topology) works to be able to set up an as simple as possible example for reproduction, but given the provided `skull_boy applied.blend`: - Select the `eyes_L` mesh - Select `Basis` as the active shape key - From the Shape Key Specials menu, run `Mirror Shape Key (Topology)` - The mesh's vertices and the `Basis` shape key are now desynchronized (exporting as an FBX would produce undesired results) - From the Shape Key Specials menu, run `Delete All Shape Keys` - Observe that the mesh reverts back to how it was before running `Mirror Shape Key (Topology)` (since the mesh's vertices remained unchanged)
Author

Yeah, you are right. Because that's the only way I found that I could "mirror" the eye for my use case, I did duplicate eyes_L then did the Mirror Shape Key(Topology) for each shape key. Quite surprised and glad that the workaround is quite simple. I'll try that as soon as I can.

Ok, I think that workaround fixed the issue. Thank you very much guys

Yeah, you are right. Because that's the only way I found that I could "mirror" the eye for my use case, I did duplicate eyes_L then did the Mirror Shape Key(Topology) for each shape key. Quite surprised and glad that the workaround is quite simple. I'll try that as soon as I can. Ok, I think that workaround fixed the issue. Thank you very much guys
Member

Closed as duplicate of blender/blender#98890

Closed as duplicate of blender/blender#98890
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#102452
No description provided.