Add sewing seams to cloth simulation #31269
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
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
13 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#31269
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?
%%%Use loose edges marked as seams as sewing springs.
All this patch does is set the rest length to 0 and the stiffness to 1 for springs for loose edges marked as seams so that during the cloth simulation they will be brought together.
Example: http://www.youtube.com/watch?v=-Y_bC0gjoM0%%%
Changed status to: 'Open'
%%%Assigned to Daniel.
I don't think this feature can go in as is though. The seam flag on edges is for UV unwrapping, and we can't let that same flag influence cloth as well, it needs to be a separate thing. It would also break existing files with cloth simulation that have seams in them.%%%
%%%A simple solution might be an option that enables using all loose edges as sewing springs.%%%
%%%Made some modifications, it is now toggleable with a "Use Sewing Springs" checkbox and force control.
I've also added a vertex group and settings for shrinking the fabric.%%%
%%%I like how the patch progresses! Nice changes.
a) I could imagine a seperate tab where "preroll" and the sewing options can be put.
b) It would be nice if people wouldn't have to press alt-a to see the sewing effect. Maybe "preroll" and "sewing" can be somehow combined in a way that the sewing outcome is saved automatically as shapekeys. Do you know what i mean? :-) Using shapekey positions for the spring rest length was introduced during BBB production.
This work got quite the potential!
%%%
%%%Hi Jez Kabanov,
Your patch is great! I merged your patch to my patch (cloth air pressure, #30941), and changed your code to allow negative shrinking factor (i.e. expanding the cloth).%%%
%%%I would like to spend some words for this patch, that is very useful, easy to use, robust, unobtrusive, and above all, it offers a more powerful approach to the making of garments or composed/patched items, similar to the Marvelous Designer concept (just the starting point...).
It would be nice, and harmless I guess, if it could be included in trunk.
Thank you,
paolo%%%
Added subscriber: @pyrochlore
Added subscriber: @kevindietrich
Added subscriber: @SusanSpencer
Added subscriber: @CodeManX
Merged with recent trunk and attached git-diff of patch version 1.2
Seems to work, any reason why it wasn't applied so far?
Changed status from 'Open' to: 'Resolved'
Commited, thanks people! Please test and tell me if there are any problems (with a blend file please!)
It looks like shrinking vertex group doesn't work, but there is already related code in patch file. It works if I leave the vertex group empty and change the Min and Max value, but nothing happens if the vertex group is not empty. Is it unimplemented or am I doing something wrong? This is test blend file in archive: test123.zip
Changed status from 'Resolved' to: 'Open'
Re-opening as there are a few issues:
shrink_max
not initialized with 1.0f (line lost during auto-merge?)thanks for the issue report codemanx, i'll see if i can fix those up.
Okay, I've figured out why it wasn't working.
I've uploaded a patch which fixes shrinking with vertex groups and readded initialising shrink_max.
the
cloth_uses_vgroup
function is rather odd and unclear about what it's doing and why.I think it needs a good looking over to ensure it's doing what it's supposed to do.
"Possibly crashing for certain complex setups (no testcase yet, please try Mirror
modifier, single loose edges as well as loose edge strings and change Collision settings during simulation)"
Tested all these situations and was unable to crash it.
Added subscriber: @jesus650rwc
How do i install this addon to blender?
Hey,
I did take another look at the bugfix patch and looks not bad.
But I htink we need to introduce some checks if we are actually using SEWING mode: "if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SEW)" before checking the vertex groups: "if(clmd->sim_parms->vgroup_shrink > 0)".
My patch is not perfect, it could be that i "fixed" something which results in a bug. And I also know that there are some "if"'s missing to check for FLAG_SEWING.
Maybe you can help me getting this stuff production ready - patch.diff
Forgot the file...
A note: "cloth_uses_vgroup"
"cloth_uses_vgroup" is used by the modifier stack to ensure that the necessary custom data layers are generated. In this case we need vertex group layers sometimes. It saves alot of time, if we don't request the custom data layers for vgroups if we don't use them. That's how every modifier does it :-)
@jesus650rwc: It's not an addon. Get a recent build from buildbot or graphicall, it's integrated in those.
Thanks genscher for the explanation.
I'll fix up the SEW flag stuff.
One thing to note is that the sewing and shrinking functionality are not really related, it just so happens they're handy together for clothing design.
I might seperate them in the UI as you may want to just build a larger cloth mesh and shrink it over a collision model.
Hi genscher,
I added some missing if's for you, and fixing some bugs in your patch, and refined cloth_uses_vgroup() function.
As thesleepless said, maybe the sewing and shrinking functionality should be separated.
Is there a build for Mac OSX 64-bit with the sewing patch?
Added subscriber: @bgebhard
Added subscribers: @LucaRood-3, @Blendify
Can this be closed? @LucaRood-3
Changed status from 'Open' to: 'Resolved'
No idea why this stayed open so long...