Mesh is not being deformated correctly via Mesh Deform Modifier (quads, tris behave better) #91777

Open
opened 2021-09-28 14:17:38 +02:00 by Arthur Shapiro · 18 comments

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

Blender Version
Broken: version: 2.93.4, branch: master, commit date: 2021-08-31 09:23, hash: b7205031ce
Worked: (newest version of Blender that worked as expected)

Short description of error
I have an Object 1 that I use as a Mesh Deformer target to on Object 2. Both are meshes, of course. Object 1 is parented to an Armature with just 1 Bone.
When I rotate the bone, the Object 2 is deformed incorrectly. It looks like "waves" are going through it.

Exact steps for others to reproduce the error
Bind Object 2 to and Object 1 with Mesh Deform Modifier. I use Precision of 6 which I think must be enough for such a simple construction. Then Rotate the Main Bone.
I also added the Camera parented to the Bone, so that you could use view from camera to see changes, relative to the rotation movement itself.

Note: triangulating the cage mesh with a modifier during bind seems to eliminate most of the wiggeling.

Mesh_Deform_Bug.blend

Mesh_Deform_Bug.mp4

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1050/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 471.41 **Blender Version** Broken: version: 2.93.4, branch: master, commit date: 2021-08-31 09:23, hash: `b7205031ce` Worked: (newest version of Blender that worked as expected) **Short description of error** I have an Object 1 that I use as a Mesh Deformer target to on Object 2. Both are meshes, of course. Object 1 is parented to an Armature with just 1 Bone. When I rotate the bone, the Object 2 is deformed incorrectly. It looks like "waves" are going through it. **Exact steps for others to reproduce the error** Bind Object 2 to and Object 1 with Mesh Deform Modifier. I use Precision of 6 which I think must be enough for such a simple construction. Then Rotate the Main Bone. I also added the Camera parented to the Bone, so that you could use view from camera to see changes, relative to the rotation movement itself. Note: triangulating the cage mesh with a modifier during bind seems to eliminate most of the wiggeling. [Mesh_Deform_Bug.blend](https://archive.blender.org/developer/F10650284/Mesh_Deform_Bug.blend) [Mesh_Deform_Bug.mp4](https://archive.blender.org/developer/F10650323/Mesh_Deform_Bug.mp4)
Author

Added subscriber: @zickkie

Added subscriber: @zickkie
Author

I am sorry but I am a bit emotional on this issue. There are multiple 3D projects and dozens of 3D animators in our studio - and all this made with Blender. We really love it and appreciate its functionality.
And then we create a project with characters, which rigs made with Mesh Deform - and what I get? Totally unstable and non-viable midifier that forces me to spend hundred of hours to rebuild all the project pipeline from the beginning. That is totally disappointing. Especially when I inderstand that this big - I am sure!- didn't appeared yesterday. That is just me who accidentally faced it.
Why do we ever need the tool that is broken from the beginning?

I am sorry but I am a bit emotional on this issue. There are multiple 3D projects and dozens of 3D animators in our studio - and all this made with Blender. We really love it and appreciate its functionality. And then we create a project with characters, which rigs made with Mesh Deform - and what I get? Totally unstable and non-viable midifier that forces me to spend hundred of hours to rebuild all the project pipeline from the beginning. That is totally disappointing. Especially when I inderstand that this big - I am sure!- didn't appeared yesterday. That is just me who accidentally faced it. Why do we ever need the tool that is broken from the beginning?

Added subscriber: @angavrilov

Added subscriber: @angavrilov

Maybe I'll have a look later - it could be something as simple as a floating point precision issue. Could be something difficult as well of course, so no guarantees.

Maybe I'll have a look later - it could be something as simple as a floating point precision issue. Could be something difficult as well of course, so no guarantees.
Author

In #91777#1227380, @angavrilov wrote:
Maybe I'll have a look later - it could be something as simple as a floating point precision issue. Could be something difficult as well of course, so no guarantees.

Thanks in advance!

> In #91777#1227380, @angavrilov wrote: > Maybe I'll have a look later - it could be something as simple as a floating point precision issue. Could be something difficult as well of course, so no guarantees. Thanks in advance!
Member

Added subscribers: @brecht, @lichtwerk

Added subscribers: @brecht, @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Member

Can at least confirm the behavior (have not checked further).

Note though that it is somewhat noted as a possible limitation here https://docs.blender.org/manual/en/dev/modeling/modifiers/deform/mesh_deform.html

Significant changes to the entire cage mesh (such as rotating the cage upside down) can cause noticeable artifacts.

@brecht might also know more?

Can at least confirm the behavior (have not checked further). Note though that it is somewhat noted as a possible limitation here https://docs.blender.org/manual/en/dev/modeling/modifiers/deform/mesh_deform.html > Significant changes to the entire cage mesh (such as rotating the cage upside down) can cause noticeable artifacts. @brecht might also know more?

Added subscriber: @jpbouza-4

Added subscriber: @jpbouza-4

Further investigation yesterday in #blender-riggers with hints from @jpbouza-4 revealed this is fixed by triangulating the mesh with a modifier during bind, so it seems the binding code does something funky with quads - possibly it's too sensitive to non-planar quads or something.

So while I think this still needs investigation, at least there seems to be a workaround now.

Further investigation yesterday in #blender-riggers with hints from @jpbouza-4 revealed this is fixed by triangulating the mesh with a modifier during bind, so it seems the binding code does something funky with quads - possibly it's too sensitive to non-planar quads or something. So while I think this still needs investigation, at least there seems to be a workaround now.
Member

In #91777#1227913, @angavrilov wrote:
Further investigation yesterday in #blender-riggers with hints from @jpbouza-4 revealed this is fixed by triangulating the mesh with a modifier during bind, so it seems the binding code does something funky with quads - possibly it's too sensitive to non-planar quads or something.

So while I think this still needs investigation, at least there seems to be a workaround now.

Wow, good to know!

> In #91777#1227913, @angavrilov wrote: > Further investigation yesterday in #blender-riggers with hints from @jpbouza-4 revealed this is fixed by triangulating the mesh with a modifier during bind, so it seems the binding code does something funky with quads - possibly it's too sensitive to non-planar quads or something. > > So while I think this still needs investigation, at least there seems to be a workaround now. Wow, good to know!
Philipp Oeser changed title from Mesh is not being deformated correctly via Mesh Deform Modifier to Mesh is not being deformated correctly via Mesh Deform Modifier (quads, tris behave better) 2021-09-29 12:11:06 +02:00

Changed status from 'Needs Developer To Reproduce' to: 'Needs User Info'

Changed status from 'Needs Developer To Reproduce' to: 'Needs User Info'

The algorithm is known to not be rotation invariant, I don't think there's a way to eliminate the wiggling without using a very different implementation. It's a documented limitation and not a bug by itself, but if there's ways to improve accuracy that's interesting.

The binding process already triangulates the mesh internally, but that triangulation may be different, or there may be a bug in the implementation.

However I saw no improvement triangulating the cage mesh in this example .blend file.

The algorithm is known to not be rotation invariant, I don't think there's a way to eliminate the wiggling without using a very different implementation. It's a documented limitation and not a bug by itself, but if there's ways to improve accuracy that's interesting. The binding process already triangulates the mesh internally, but that triangulation may be different, or there may be a bug in the implementation. However I saw no improvement triangulating the cage mesh in this example .blend file.
Author

@brecht In my file I do these steps:

@brecht In my file I do these steps: - deleted existing MDef Modifier - add Triangulate Modifier to MDef Cage - Bind at 6 level of Precision - Delete Triangulate Modifier ... and that produces very accurate result. [Mesh_Deform_Bug_Triangulated.blend](https://archive.blender.org/developer/F10677920/Mesh_Deform_Bug_Triangulated.blend) [MD_Triangulation.mp4](https://archive.blender.org/developer/F10677932/MD_Triangulation.mp4)

I have tested this with Arthur and can say that triangulating before binding removes almost all of the distortion when rotating.

In this video, the first model is bound with quads and it wobbles a lot. The second model was bound with a triangulated cage and the result is almost perfect. At the end you can see the comparison between the wires of both meshes.

I guess that the triangulation @brecht and @angavrilov have mentioned is not occurring at the binding process, otherwise there shouldn't be any difference in the result.

wobbly_mdef.webm

I have tested this with Arthur and can say that triangulating before binding removes almost all of the distortion when rotating. In this video, the first model is bound with quads and it wobbles a lot. The second model was bound with a triangulated cage and the result is almost perfect. At the end you can see the comparison between the wires of both meshes. I guess that the triangulation @brecht and @angavrilov have mentioned is not occurring at the binding process, otherwise there shouldn't be any difference in the result. [wobbly_mdef.webm](https://archive.blender.org/developer/F10679738/wobbly_mdef.webm)

Added subscriber: @ideasman42

Added subscriber: @ideasman42

@zickkie you also ended up turning off the Dynamic option in the video, which makes a difference. But without that indeed I can see triangulation helps.

This problem may have been introduced by 368bd3457. @ideasman42, do you remember if that was to fix a specific bug?

I can see how a discrepancy between the intersected coordinate in a triangle and the interpolated coordinate in non-planar polygons would cause problems. It's not clear to me what the problem is described in that commit.

@zickkie you also ended up turning off the Dynamic option in the video, which makes a difference. But without that indeed I can see triangulation helps. This problem may have been introduced by 368bd3457. @ideasman42, do you remember if that was to fix a specific bug? I can see how a discrepancy between the intersected coordinate in a triangle and the interpolated coordinate in non-planar polygons would cause problems. It's not clear to me what the problem is described in that commit.

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

Changed status from 'Needs User Info' to: 'Confirmed'
Philipp Oeser removed the
Interest
Animation & Rigging
label 2023-02-09 14:35:30 +01:00
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
5 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#91777
No description provided.