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] self.model.enable_tri_collisions = True makes particle_q = state.particle_q.numpy() super slow #405

Open
ywu110 opened this issue Dec 21, 2024 · 0 comments
Labels
question The issue author requires information

Comments

@ywu110
Copy link

ywu110 commented Dec 21, 2024

Issue Overview:

I am working on a cloth simulation using the example provided here. In addition to handling collisions between the cloth and the Bunny model, I aim to incorporate cloth self-collision into the simulation.

Steps Taken:

  1. Enabled Self-Collision: I added the following line to the example code to enable cloth self-collision:
self.model.enable_tri_collision = True
  1. Observed Issues:
  • Persistent Penetration: Despite enabling self-collision, the simulation still exhibits significant penetration within the cloth itself.

  • Performance Degradation: Enabling self.model.enable_tri_collision drastically increased the rendering time from approximately 2ms to 800ms. Using wp.ScopedTimer, I traced the slowdown to the following line in warp/sim/render.py:

particle_q = state.particle_q.numpy()

Link to the specific line

Questions:

  1. Self-Collision Effectiveness:
  • Is adding self.model.enable_tri_collision = True sufficient to enable effective cloth self-collision?

  • If not, what additional steps or configurations are necessary to achieve reliable self-collision handling?

  1. Performance Impact:
  • Why does enabling self.model.enable_tri_collision cause such a significant increase in rendering time, especially when the shape of particle_q remains unchanged?
  • Are there recommended optimizations or alternative approaches to mitigate this performance hit while maintaining accurate self-collision?

Additional Information:

Warp Version: Both V1.3.0 and V1.5.0
Hardware: GPU 3090 CUDA 12.2 Driver Version: 535.183.01
Operating System: Ubuntu 22.04
Python Version: Python 3.10.13

Thank you in advance!!

I am keen to resolve these issues to advance my simulation work. Any guidance or suggestions you can provide would be greatly appreciated.
Thank you once again for developing and maintaining such an amazing project!

@ywu110 ywu110 added the question The issue author requires information label Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question The issue author requires information
Projects
None yet
Development

No branches or pull requests

1 participant