ipc-sim / Codim-IPC

Source Codes for Codimensional Incremental Potential Contact (C-IPC)
https://ipc-sim.github.io/C-IPC/
Apache License 2.0
197 stars 35 forks source link

About simulation time #17

Open MontaEllis opened 4 months ago

MontaEllis commented 4 months ago

Great job! I'm curious, how long will the code take to run? I've been running the garment simulation code for about half a day, and it's still going!

liminchen commented 4 months ago

Thanks! Most examples should finish running in one or several hours. See timing table here:

Screen Shot 2024-07-03 at 09 41 12

https://github.com/KemengHuang/GPU_IPC has an efficient GPU implementation of our simulator, and it shuold be orders-of-magnitude faster.

MontaEllis commented 4 months ago

It appears that there is no Python version...

MontaEllis commented 4 months ago

It seems like the 5_garments demo will take a lot of time.

liminchen commented 4 months ago

Is it getting stuck at a specific frame or just generally slow? Our code is only tested on Ubuntu with MKL compiled CHOLMOD, so using different environment may also cause performance differences.

MontaEllis commented 4 months ago

How can I tell if it's stuck or not? I'm new to this and not very familiar with simulations. Your repository is my guide. I'm still learning and trying my best.

liminchen commented 4 months ago

So the simulator will output an obj file for the result of each frame, and you can take a look at the files, if the last output file was a long time ago, much longer than the adjacent time interval between earlier output files, then it means it get stuck at this frame.

You could also take screenshot of the command line output here.

If you are new to simulation, I guess you may find https://phys-sim-book.github.io/ and https://github.com/phys-sim-book/solid-sim-tutorial helpful.

MontaEllis commented 4 months ago

Thank you! I will read the physics simulation book carefully. Can I leave this issue open to ask more questions about garment simulation later?

MontaEllis commented 4 months ago

Actually, I'm trying to reimplement PhysAvatar, a nice project using your great C-IPC.

liminchen commented 4 months ago

Great! You can feel free to email me if you have followup questions. But note that sometimes I may be slow to reply :)

MontaEllis commented 4 months ago

Should we determine the pinned vertices ourselves in the garment demo?

liminchen commented 4 months ago

Yes, seams should be part of the input file, and dirichlet BC is set via python. Please see the example.

MontaEllis commented 4 months ago

When I run the code, the initial results seem very strange. Could you provide some advice?

input: image

image

results: image

MontaEllis commented 4 months ago

Also, I'm curious why the drape and stage are vertical?

MontaEllis commented 4 months ago

I believe I followed the same structure as the demo, but the face might be incorrect. How should the face pattern and body be combined?

image

MontaEllis commented 3 months ago

How do you achieve seams like this? I can't load it in Blender.

image