From 42fa942142d233b8e164073e45940f085a727951 Mon Sep 17 00:00:00 2001 From: Schaken Date: Thu, 23 Jan 2025 12:22:45 -0500 Subject: [PATCH] Add GPU_vs_CPU --- GPU_vs_CPU.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 GPU_vs_CPU.md diff --git a/GPU_vs_CPU.md b/GPU_vs_CPU.md new file mode 100644 index 0000000..4c41cba --- /dev/null +++ b/GPU_vs_CPU.md @@ -0,0 +1,25 @@ +# The power of the GPU + + +*Comparisons between CPU and GPU cloth +Tested on: Windows 10, i7-6500U @ 2.50GHz 12GB RAM, GeForce 940M 8GB (A Laptop)* + +The timestep of the simulation determines how many times the entire algorithm is run per frame. A lower timestep is generally required as the resolution of the cloth increases, though the cloth will appear very stiff when the timestep is too low. In the below graph, we can see that the GPU version of the algorithm handles a decreasing timestep a lot better than the CPU. | ![https://i.imgur.com/1Gd72Yl.png](https://i.imgur.com/1Gd72Yl.png) | +| -------- | -------- | + + + +| The iteration number controls the number of times the constraints are enforced. Similar to the timestep, a higher iteration number is usually required as the simulation gets more complex; an overly-high iteration number will also make the cloth seem stiff due to the over-enforcement of the constraints. The GPU version of the algorithm also does a much better job here than the CPU version. The framerate remained consistently over 60 and did not suffer any dips like it did with the timestep. This is probably because an decreased timestep increases the number of times the entire algorithm is run, while an increased iteration number only increases the number of times the constraint portion of the algorithm is run. | | +| -------- | -------- | + + + +| Finally, the GPU and CPU versions of the algorithm were tested on different resolutions of the cloth. The resolution of the cloth is essential to how real the cloth simulation looks, as a low resolution will make the cloth look blocky. The CPU version proved unable to handle anything more than 10x10, while the GPU version could handle 30x30 at a reasonable framerate. | | +| -------- | -------- | + + + + + + +