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

Shape keys marked as "Relative To" non-basis shapekeys are exported wrongly. #1403

Open
chemicalcrux opened this issue Jun 1, 2021 · 1 comment
Labels
enhancement New feature or request exporter This involves or affects the export process Mesh_&_Object

Comments

@chemicalcrux
Copy link

Describe the bug
If a shape key is set to be Relative To a non-Basis shape key, turning it on should only apply the deformation that would go from the Relative To shape key to itself. See below for a visual example.

Exporting to .gltf doesn't preserve this behavior.

To Reproduce
Steps to reproduce the behavior:

These are probably excessively detailed!

  1. Delete the camera and light (they're just clutter)
  2. Add a Basis shape key to the cube
  3. Add another shape key, Key 1, and, with it selected, go into Edit Mode and raise the top face of the cube
  4. Go back into Object Mode.
  5. Set the influence of Key 1 to 1. The top of the cube should rise
  6. Click New Shape from Mix to create a new shape key, Key 2
  7. Set the influence of Key 2 to 1. Note how this further raises the cube's top face.
  8. Set the Relative To property of Key 2 to Key 1. The cube should now go back to how it looked at step 6.
  9. Go into Edit Mode and pull out one of the side faces of the cube.

At this point, turning on Key 1 but not Key 2 should raise the top of the cube, turning on Key 2 but not Key 1 should move the side of the cube, and turning on both should raise the top and the side of the cube.

  1. Export this cube as an .fbx and as a .glb/.gltf (same behavior with both options).
  2. Import the .fbx file
  3. Try turning on Key 1 and Key 2. They should behave exactly as they did on the cube you just created.
  4. Import the .glb file
  5. Try turning on Key 2. The cube's top and side will both move.

Expected behavior
Key 2 should only make the cube's side move. This should mirror the behavior of the FBX exporter, which modifies the shape keys so that they keep working properly.

Screenshots

From left to right: Both keys off, Key 1 on, Key 2 on, both keys on. Key 2 is marked as relative to Key 1.

Expected behavior:

image

GLTF behavior:

image

.blend file/ .gltf
Here's the original .blend file, plus the resulting FBX and GLTF files.

shape-key-bug.zip

Version

  • OS: Ubuntu 20.04
  • Blender Version: 2.93 (checked in 3.0.0, just in case)

Additional context
The FBX exporter doesn't actually preserve the Relative To property, since I don't think that concept exists outside of Blender.

@julienduroure julienduroure added enhancement New feature or request exporter This involves or affects the export process Mesh_&_Object labels Jun 3, 2021
@julienduroure
Copy link
Collaborator

This blender feature is not yet implemented in glTF exporter.
Setting this ticket as "enhancement"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request exporter This involves or affects the export process Mesh_&_Object
Projects
None yet
Development

No branches or pull requests

2 participants