Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Collision Handling of Cloth in ZENO #1988

Open
WYK96 opened this issue Aug 16, 2024 · 3 comments
Open

[Question] Collision Handling of Cloth in ZENO #1988

WYK96 opened this issue Aug 16, 2024 · 3 comments
Labels
question Further information is requested

Comments

@WYK96
Copy link

WYK96 commented Aug 16, 2024

Dear all,

Thanks for the great work! I am a beginner in cloth simulation. The collision handling technique in ZENO has inspired me a lot. After learning the code in ZENO, I am still struggling in some issues:

Q1: Imminent Collision Handling. In collision_utils.hpp, there is a function compute_imminent_collision_impulse which applies repulsion impulses to prevent imminent contacts, which is similiar to the method proposed by Brdison et al.[1] that handles repulsions utilizing inelastic collision and spring based force. The repulsions are applied to the velocities of cloth nodes in [1] with $I_{c}=mv_{n}/2$ for inelastic impulse and $I_{r}=-min(\Delta tkd,m(\frac{.1d}{\Delta t}-v_{N}))$ for spring based force. However, I noticed that the repulsions in compute_imminent_collision_impulse are applied to the positions of the cloth nodes with $I=(target\_repulsive\_dist - vr\_nrm) * pr$. My concern is: how is the magnitude of $I$ determined?

I tried integrating repulsion forces into my simulation framework. Although some imminent collisions have been detected and handled, the simulation result is sensitive to the configurations of imminent collisions. If I select a large repulsive thickness or scale up the magnitude of imminent repulsion, the cloth vertices suffers from jittering issue, whereas a small value makes the repulsive force does not take effect. Are there any references about how to evaluate the repulsive impulse in PBD framework for me to learn from?

Q2: Unhandled Collisions in CCD. In CollisionSolver.cu, a node named DetangleCCDCollisionWithBoundary is defined and implemented. The method iteratively performs continuous collision detection and solves it in a Jacobi fashion. If I understood correctly, the method never guarantees convergence. Alternatively, the CCD exits when the number of collisions is smaller than the number of acceptable collisions. In the Jacobi solve step that applies CCD impulse, the impulses whose magnitude is smaller than a pre-defined threshold will be ignored. Since the algorithm may exit at a failsafe state, how do you resolve the remaining unhandled collisions? If the remaining collisions are close with each other after performing CCD step, the simpliest way to resolve the collisions seems to be using the collision reponse method describled in Section 3.4 of Position Based Dynamics proposed by Müller et al.[2]. More specifically, for a detected VF collision, the vertex is projected onto the face with an extra thickness along the face normal. The approach can be also extended to the EE case.

Unfortunately, I did not find any code that achieve the goal in ZENO. What I've found is that ZENO provides a DCD constraint solver in ConstraintsSolver.cu. What makes me confused is that the DCD here is handled via imminent impulse, e.g., in node XPBDSolveSmooth, the DCD is solved with compute_imminent_collision_impulse. The impulse applied here is only helpful to prevent incoming collisions. For collisions that have already happened, e.g., a cloth penetrated with an obstacle or went into a tangled state, the method does not seem to work well. Is the exsiting collisions resolved by untangling approaches such as intersection contour minimization[3] or other techniques such as impact zone optimization? Please correct me if I missed or misunderstood anything.

Q3: Integration of Imminent Collision into Simulation Pipeline. I wonder how the imminent collision handling is integrated into the simulation pipeline, is it an one-pass approach or an interative approach? I wrote two possible pipelines:

Pipeline A: Regard imminent collisions as a constraint and solve it with the internal cloth dynamics

simulation_pipeline_A

Pipeline B: Resolve repulsive forces as a post-process procedure. After advancing to the candidate positions with internal cloth dynamics, the repulsion impulses are iteratively evaluated and solved.

simulation_pipeline_B

Could you please give me some advice on which approach of integrating repulsive forces is correct?

References

[1]. Bridson R, Fedkiw R, Anderson J. Robust treatment of collisions, contact and friction for cloth animation[J]. ACM Transactions on Graphics (TOG), 2002, 21(3): 594-603.
[2]. Müller M, Heidelberger B, Hennix M, et al. Position based dynamics[J]. Journal of Visual Communication and Image Representation, 2007, 18(2): 109-118.
[3]. Volino P, Magnenat-Thalmann N. Resolving surface collisions through intersection contour minimization[J]. ACM Transactions on Graphics (TOG), 2006, 25(3): 1154-1159.

@WYK96 WYK96 added the question Further information is requested label Aug 16, 2024
@WYK96
Copy link
Author

WYK96 commented Aug 16, 2024

Since much of code regarding PBD collision handling were written by @ShuliangLu , your advice will be very helpful for me :)

@zhxx1987
Copy link
Collaborator

zhxx1987 commented Aug 21, 2024 via email

@WYK96
Copy link
Author

WYK96 commented Aug 23, 2024

Thank you for your reply. May I ask if the contact information for ShuLiang @ShuliangLu is publicly available(e.g., WeChat or E-mail)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants