Cloth collision system improvements #81864
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#81864
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?
Status:
Work in progress
Team
Commissioner:
?
Core developer or artist, sign off the project, works as client.Project leader:
?
Main developer responsible for the implementation, only in one project.Project members:
-
Optional other developers, can be in multiple projects at once.Description
Big picture:
Currently, blender uses a method adapted from the
"Discrete Collision Detection"
- Between each step of the frame, it is detected when a triangle invades the collision margin of the other and thus an impulse vector is added to move the triangles away.However, the blender solution is inefficient as it uses the same solver steps (called in the UI as "quality steps") to test the collision.
The ideal would be to interpolate the triangles of the a previous and current frame according to the "collision steps".
But even interpolating the triangles of the previous frame, this solution is limited because if the triangle moves too fast, the collision is missed.
Those impulses can also cause random explosions in complex simulations.
The idea of the new system is to use a method of
"Continuous Continuous Detection"
and make the collision more independent of the quality steps.Use cases:
Design:
Engineer plan:
Work plan
**{icon check-circle color=green} Milestone 1 **
New system.
Time estimate:
1 week
if the secant method proves appropriate,2 weeks or more
otherwise.Added subscriber: @mano-wii
Added subscriber: @TheRedWaxPolice
Added subscriber: @JosephEagar
IIRC, isn't this how the cloth code originally worked? I know researchers disagree on whether it's a good idea or not; the consensus seems to be that it is (or at least, is unavoidable), I think? Impulse collisions are tricky in general. IIRC some papers combine the two approaches along with a third one:
Btw, is the cloth code not doing continuous collision detection?
Okay, I have written a small set of slides introducing continuous collision detection.
https://docs.google.com/presentation/d/1XW4_czKu6wB7JRnxTReaHI2q3GLI6jr7BaIyZ93z3JY/edit?usp=sharing
Here are a more comphrensive set of slides:
http://www.cs.unc.edu/~lin/COMP259-S05/LEC/14.ppt
It's really not that hard.
Thanks for the papers @JosephEagar!
As far as I could see in the code, the cloth collision system does not work with "continuous collision detection".
I tried to implement something like that. But I haven't found any papers on
Triangle x Triangle
collisions (which is currently used in the code).I only find information about this type of collision detection with
Point x Triangle
orEdge x Edge
.I was informed of a detection solution that tests the distances procedurally between each frame until it finds the exact collision interval.
If I'm not mistaken this solution is currently used for particles, but something similar can be implemented for cloths.
But before delving further into this, I developed a simple but not so accurate algorithm that simply considers what direction each pair of triangles should take at the end of the collision.
Initial testing shows a promising result (1 sample):
You don't really need triangle/triangle testing per se. IIRC you only need triangle/point and edge/edge, you can build triangle/triangle out of those.
Well noted. I don't know why I didn't think about it. It is worth the implementation.
But since I already developed a simple collision detection algorithm between "morphing" triangles, this new algorithm could stay for a milestone 2 (I don't intend to spend much time on that).
It is also good to consider the efficiency of this new algorithm since it will test all combinations Vert_a x Tri_b, Vert_b x Tri_a, Edge_a x Edge_b.
Added subscriber: @dfelinto
Hi Germano, without any real production-like file showing the limitations of the current system, there is no way to show that this project is really needed. It also works as a way to validate the project success.
Added subscriber: @plasmasolutions
Changed status from 'Needs Triage' to: 'Archived'
I'm closing this task for now.
Changed status from 'Archived' to: 'Needs Triage'
Added subscriber: @dodo-2
Update ?
I am removing the
Needs Triage
label. This is under the general rule that Design and TODO tasks should not have a status.If you believe this task is no longer relevant, feel free to close it.
I believe this deserves new planning.
Therefore, closing.