Surface Deform modifier - distortion on bind (depending on scale) #73348
Labels
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
7 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#73348
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.18362 64 Bits
Graphics card: GeForce GTX 660/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 436.15
Blender Version
Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-11-20 14:27, hash:
26bd5ebd42
Same on blender 2.82 daily build
Worked: (optional)
Short description of error
When pressing 'Bind' in surface deform modifier, some small distortion is applied to mesh, even though is should not change at all.
Exact steps for others to reproduce the error
Blend file:
bind_problem.blend
Gif showing problem:
Simplified test case:
#73348.blend
Added subscriber: @JoseConseco
Added subscriber: @lichtwerk
Changed status from 'Needs Triage' to: 'Confirmed'
Can confirm, checking...
Seems to be a precision problem somewhere, if I scale the whole thing by 10, issues seem to vanish...
Surface Deform modifier - distortion on bindto Surface Deform modifier - distortion on bind (depending on scale)Added subscriber: @LucaRood-3
Well, even if this can be worked around by scaling, will still keep open, since there seems to be some mismatch going on [which really shouldnt be the case]
@LucaRood-3 : Known Isssue?
Added subscriber: @Mets
Added subscriber: @CodyWinchester
Looking into this and I found the problem lies in the Ngon method bindings. It is the only method that returns errors on the small scale that go away once scaled up.
In MOD_surfacedeform.c the line:
is where things go wrong. The weight gets calculated incorrectly due to the small size of the geometry, which causes the calculations to be off.
Inside of interp_weights_poly_v2 is the line:
in this function if the area it calculates is too small it returns 0.0f which causes the weights to be wrong. Since the geometry is so small some polys return an area of 0.0f when scaled up they are correct.
If I scale the data put into interp_weights_poly_v2 and interp_weights_tri_v3 and then unscale it afterwards the bug goes away as the weight calculation is using much larger values and doesn't fail due to float precision. Depending on the factor I scale the data is how much smaller the geometry can be.
If I remove the Ngon method as an option entirely it works with no errors at the current scale, but if scaled down again by .1 it still fails.
@lichtwerk, kinda known issue. The whole SDef code is kinda unstable, and in ideal circumstances I'd like to completely rewrite it. I've had some thoughts on better algorithms, though no time for that at the moment.
But @CodyWinchester seems to have tracked down where this issue lies, and it seems like it could be a simple fix. I expressed my thoughts at D6782.
This issue was referenced by
c5d0a23204
Changed status from 'Confirmed' to: 'Resolved'