Incorrect results from Transfer Shape Key #90002

Closed
opened 2021-07-21 04:15:35 +02:00 by Grumpy Weasel · 15 comments

System Information
Operating system: Win 10
Graphics card: GTX 1650

Blender Version
Broken: (example: 2.93 and all previous

Short description of error
Transferring corrective shape keys (from now SK) from sculpted model (source) to another with armature (target) produces incorrect results. In opposite to traditional way of making corrective shape keys directly in Edit mode, which works fine, the other method which relies on using 3d party applications like ZBrush to fix armature deformations is currently impossible. I'm not an expert, but it feels like Blender treats native and transferred SK differently: in first case it takes armature deformation into account first and then applies shape key after it, while in second scenario (with transferred SK), it applies SK first and then mixes it with bone's transformations, resulting in skewed shapes.

Exact steps for others to reproduce the error
Create an elongated cylinder which represents a finger and put two bones inside with automatic weights. Flex upper bone at 90 degree. Duplicate the cylinder and apply Armature modifier, so it stays bent. This duplicated mesh represents imported sculpt (which shows that issue is not within Zbrush or any other application, but within Blender). Make a shape key on the duplicated finger and do some corrections, for example changing rather smooth arc from automatic weights to more angular as if in the real life finger. Now use Transfer Shape Key option and see how wrong it looks on the target mesh. The vertexes that were modified indeed move, but only partially to their supposed destination.

PS Please, this critical bug ruins my whole workflow and because of it I'm now ready to give up with animation whatsoever. I'd really appreciate this issue being addressed. Thank you

**System Information** Operating system: Win 10 Graphics card: GTX 1650 **Blender Version** Broken: (example: 2.93 and all previous **Short description of error** Transferring corrective shape keys (from now SK) from sculpted model (source) to another with armature (target) produces incorrect results. In opposite to traditional way of making corrective shape keys directly in Edit mode, which works fine, the other method which relies on using 3d party applications like ZBrush to fix armature deformations is currently impossible. I'm not an expert, but it feels like Blender treats native and transferred SK differently: in first case it takes armature deformation into account first and then applies shape key after it, while in second scenario (with transferred SK), it applies SK first and then mixes it with bone's transformations, resulting in skewed shapes. **Exact steps for others to reproduce the error** Create an elongated cylinder which represents a finger and put two bones inside with automatic weights. Flex upper bone at 90 degree. Duplicate the cylinder and apply Armature modifier, so it stays bent. This duplicated mesh represents imported sculpt (which shows that issue is not within Zbrush or any other application, but within Blender). Make a shape key on the duplicated finger and do some corrections, for example changing rather smooth arc from automatic weights to more angular as if in the real life finger. Now use Transfer Shape Key option and see how wrong it looks on the target mesh. The vertexes that were modified indeed move, but only partially to their supposed destination. PS Please, this critical bug ruins my whole workflow and because of it I'm now ready to give up with animation whatsoever. I'd really appreciate this issue being addressed. Thank you
Author

Added subscriber: @HappyOtter

Added subscriber: @HappyOtter
Author

2021-07-21.png
Here is an image showcasing how exactly it looks like. Bear in mind,

![2021-07-21.png](https://archive.blender.org/developer/F10232287/2021-07-21.png) Here is an image showcasing how exactly it looks like. Bear in mind,

Added subscriber: @iss

Added subscriber: @iss

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

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

Please provide simple .blend file that demonstrates this issue.

Please provide simple .blend file that demonstrates this issue.
Author

TransferSKFail.blend
Here is an example. But really, it happens to any two possible objects to greater or lesser degree. The central piece is a rigged object. The object to the right is a corrective shape (made in Blender, but can also be an imported mesh from Zbrush or any other app). Just click Transfer Shape Keys from that little dropdown menu under the little arrow. See how the verticles try to move to the desired position but fail half the way. Then clear the shape keys on the armatured object and try the same transfer from the left object and see how the problem intensifies.

[TransferSKFail.blend](https://archive.blender.org/developer/F10233627/TransferSKFail.blend) Here is an example. But really, it happens to any two possible objects to greater or lesser degree. The central piece is a rigged object. The object to the right is a corrective shape (made in Blender, but can also be an imported mesh from Zbrush or any other app). Just click Transfer Shape Keys from that little dropdown menu under the little arrow. See how the verticles try to move to the desired position but fail half the way. Then clear the shape keys on the armatured object and try the same transfer from the left object and see how the problem intensifies.

Thanks for file.

I get better result, whenn I press F9 and select Relative Face, but it's not perfect. Don't think this is bug, but will double check.

Thanks for file. I get better result, whenn I press F9 and select Relative Face, but it's not perfect. Don't think this is bug, but will double check.
Author

Yeah, if it transfers vertexes not 100%, then it pretty much defeats the purpose of tool's existence. No point sculpting dozens of corrective shape keys for a character if they all end up wrong.

Yeah, if it transfers vertexes not 100%, then it pretty much defeats the purpose of tool's existence. No point sculpting dozens of corrective shape keys for a character if they all end up wrong.

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

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

Commit message for this feature says: "Useful if you have 2 different characters with the same base mesh (matching indicies), and want to copy a facial expression for eg, from one to another."
Problem is when you apply pose, it modifies base mesh and when you sculpt deformed area this doesn't transfer quite well.

This can be done in blender though, if you just duplicate object, add shape keys and sculpt. Then the shape can be transfered perfectly. Not sure about Zbrush feature set, but if you can replicate this workflow there, it should still be possible.

I would recommend to ask for advice on one of the community websites: https://www.blender.org/community/

It should be possible to implement shape key transfer after sculpting deformed mesh, perhaps there is some addon, that can do this.
But missing features aren't considered to be a bug, so I will close this report.

Commit message for this feature says: "Useful if you have 2 different characters with the same base mesh (matching indicies), and want to copy a facial expression for eg, from one to another." Problem is when you apply pose, it modifies base mesh and when you sculpt deformed area this doesn't transfer quite well. This can be done in blender though, if you just duplicate object, add shape keys and sculpt. Then the shape can be transfered perfectly. Not sure about Zbrush feature set, but if you can replicate this workflow there, it should still be possible. I would recommend to ask for advice on one of the community websites: https://www.blender.org/community/ It should be possible to implement shape key transfer after sculpting deformed mesh, perhaps there is some addon, that can do this. But missing features aren't considered to be a bug, so I will close this report.
Author

I believe we have Join as Shape for this. If so, then looks like Transfer Shape Key function just duplicates it.
Transfer is clearly designed for posed meshes, it obviously tries to calculate delta transformation but fails to do this 100% accurately.
Already found such an addon. It's made in 2010, which is bizarre that current Blender still can't do it in 2021 natively. I love Blender and work in it for 11 years already, but it will never be the industry standard if it doesn't play well with other industry standard tool like Zbrush. All the artists, making mind blowing sculpt, will just look past Blender if they'd choose to animate their stuff, just because one of the crucial feature is considered as non-important by a dev team
https://wiki.blender.jp/Extensions:2.6/Py/Scripts/Animation/Corrective_Shape_Key

I believe we have Join as Shape for this. If so, then looks like Transfer Shape Key function just duplicates it. Transfer is clearly designed for posed meshes, it obviously tries to calculate delta transformation but fails to do this 100% accurately. Already found such an addon. It's made in 2010, which is bizarre that current Blender still can't do it in 2021 natively. I love Blender and work in it for 11 years already, but it will never be the industry standard if it doesn't play well with other industry standard tool like Zbrush. All the artists, making mind blowing sculpt, will just look past Blender if they'd choose to animate their stuff, just because one of the crucial feature is considered as non-important by a dev team https://wiki.blender.jp/Extensions:2.6/Py/Scripts/Animation/Corrective_Shape_Key

You are absolutely right about blender not becoming industry standard ever. This is a bug or at least wrong implementation of how shapekeys work with armatures. Not the first time and definitely not the last time blender developers just ignore the problem and move on to making a new feature that no one needs or add a new brush in scuplting mode.
Right now i believe it is impossible to make a corrective shape outside of blender. You have to pose and modify it inside of it to make it work properly.

Update 0: So while trying to understand the situation and possibly find the fix, i stumbled upon an interesting issue. If vertex is moved by armature its point of origin in global coordinates also is transformed by the said armature. I believe it is what is causing the problem for shapekeys.
I will try to write a script that would take this into account and copy vertex position from deformed mesh to original posed mesh in edit mode.

You are absolutely right about blender not becoming industry standard ever. This is a bug or at least wrong implementation of how shapekeys work with armatures. Not the first time and definitely not the last time blender developers just ignore the problem and move on to making a new feature that no one needs or add a new brush in scuplting mode. Right now i believe it is impossible to make a corrective shape outside of blender. You have to pose and modify it inside of it to make it work properly. Update 0: So while trying to understand the situation and possibly find the fix, i stumbled upon an interesting issue. If vertex is moved by armature its point of origin in global coordinates also is transformed by the said armature. I believe it is what is causing the problem for shapekeys. I will try to write a script that would take this into account and copy vertex position from deformed mesh to original posed mesh in edit mode.
Author

Hey, at least you can enjoy all the Grease pencil fluff now, after they dedicated so much time to it last year. Or witness another revolution of never ending "Smooth by angle->Edge Split Modifier->Auto Smooth->Geometry node split modifier" cycle. Or all those fancy Cycles optimizations that upon testing give no visible advantages but cumulatively prolonging render time dramatically. Or still an archaic UV approach, still split to two modes for some reason

Hey, at least you can enjoy all the Grease pencil fluff now, after they dedicated so much time to it last year. Or witness another revolution of never ending "Smooth by angle->Edge Split Modifier->Auto Smooth->Geometry node split modifier" cycle. Or all those fancy Cycles optimizations that upon testing give no visible advantages but cumulatively prolonging render time dramatically. Or still an archaic UV approach, still split to two modes for some reason

Update: i have tried brute force method and it did not work. Editing vertex positions with active armature is impossible. Just like i said it not only changes its origin with the armature, but does so depending on its position in space, meaning that moving the vertex in any axis is unreliable and would give unpredictable results.

So, i believe problem runs deeper than i thought. Without looking at implementation of all operations in the source code it will be very hard to understand why it behaves this way, which, of course, i have no plans on doing.

Update: i have tried brute force method and it did not work. Editing vertex positions with active armature is impossible. Just like i said it not only changes its origin with the armature, but does so depending on its position in space, meaning that moving the vertex in any axis is unreliable and would give unpredictable results. So, i believe problem runs deeper than i thought. Without looking at implementation of all operations in the source code it will be very hard to understand why it behaves this way, which, of course, i have no plans on doing.
Author

Chad move. If Blender devs don't do their job, neither should you. That's also taking into account they don't even acknowledge there is a real problem

Chad move. If Blender devs don't do their job, neither should you. That's also taking into account they don't even acknowledge there is a real problem
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
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#90002
No description provided.