0
$\begingroup$

Question

Dear all,

I'm trying to make a simulation in which Suzanne moves in a straight line through a piece of rubber cloth. Getting the settings of the cloth modifier right is quite hard due to the long rendering times in the viewport. It takes 3 minutes to (preview)render just 30 frames. I am trying to figure out whether these long rendering times are caused by (A) an underequipped CPU, or (B) by the polycount/settings of the cloth/cloth modifier.

Concerning option A (the CPU): my laptop has a i5-8250U, with 4 cores and a clockspeed of 1,60 GHz. This CPU has a benchmark of 7,679 (on https://www.cpubenchmark.net/), whereas the CPU of a recommended laptop for animation (e.g. the MSI GS65 Stealth THIN-050, acoording to https://www.cgdirector.com/best-laptop-for-animation/) has a benchmark of 12,446. No doubt a big difference, but I'm trying to animate a very basic scene, so shouldn't a CPU with half the power of a topnotch model suffice?

Concerning option B (the cloth settings/polycount): the 'cloth' consists of 576 squares. I have added a subsurf modifier with view/render set to 2. In the physics tab, under the 'cloth'-section, I have set the quality to 7 (in the screenshot below I put it to 20 to make it look better, but that increased the rendering time to 4 minutes). Under the 'cloth collision'-section, the quality is set to 2.

Question: Is it normal that with these settings and this CPU, it takes 3 minutes to render 30 frames in the viewport? If it is, I will postpone my project until I can afford a computer with a better CPU. If it is not, then what am I missing?


Screenshot

enter image description here


What I've Learned So Far

For others who are fairly new to physics simulations: the main thing I learned is that there is an important distinction between viewport rendering/preview rendering, and final rendering. When people talk about 'rendering' they usually refer to final rendering, not to preview rendering (i.e. the basic preview render while working in the viewport). As it turns out, preview rendering depends more on the CPU, while final rendering makes more use of the GPU. The hardware side is very accessibly explained in this article:

https://www.cgdirector.com/best-computer-3d-modeling-rendering/

Yet the distinction is also important when trying to reduce the preview render time in the viewport. For instance, I tried to reduce it with the tips from this post:

https://www.blenderguru.com/articles/13-ways-to-reduce-render-times

but that did not significantly reduce my preview rendering times; although I'm sure these tips are important when it comes to final rendering (a stage which I have yet to reach).

Knowing this distinction does not immediately solve my problem, but it is at least a first step.

$\endgroup$
  • 1
    $\begingroup$ I'd suggest, always cache your sim to the disc for better review, if you are satisfied at some point, render it. Also I'd use Blender 2.8x (Cloth Solver has been improved). IMHO the solver is doing a great job. However, it is a bit slow in general because it still not multithreaded so I think it is probably don't worth doing any kind of benchmark. $\endgroup$ – p2or Aug 22 at 9:10
  • $\begingroup$ Thanks for the advice! I have downloaded 2.8. It looks really different - it's a bit alienating - but the preview render is indeed a lot faster! And that is even without baking. I'll read in on the baking process and report back later. $\endgroup$ – Mathew Aug 22 at 17:15
2
$\begingroup$

Cloth Simulation can be pretty heavy. The normal usage is to cache your cloth simulation first, then render using the cached data.

enter image description here

Once you have your cloth sim cached to disc, it doesn't take any extra time to render each frame. But caching/baking the simulation can still take a while so it's important to use settings that fit your system and needs.

All the rendering settings won't have any real impact on the time calculating the cloth simulation takes. That time it takes depends heavily on the mesh complexity and your cloth quality settings.

The first step you should take is to use as simple a mesh as possible. You can add an additional subdivision modifier AFTER your cloth simulation to make the mesh smoother, while not adding tons of extra detail to your simulation.

Start with a very simple mesh and low quality settings on the simulation. Try to make the result look better with modifiers applied after the simulation before you increase subdivisions or quality settings that are part of the simulation.

$\endgroup$
  • $\begingroup$ Thank you for your response, Hekete! As you might've guessed, I'm quite new to physics simulation, so I really appreciate your help. // Good to know that rendering settings won't have any real impact // Regarding the stackorder: I tried to move the subdivision modifier after the cloth simulation, but than the profile of Suzanne's head is no longer sufficiently visible 'through' the cloth... // I first have to get used to Blender 2.8, in the meantime I'll read in on the baking process, and in a week or so I'll report back with my findings. $\endgroup$ – Mathew Aug 22 at 18:03
  • $\begingroup$ @Mathew Often it can be good to use two subdivision modifiers. A low value one before the simulation and then a higher value one after to smooth it out. $\endgroup$ – hekete Aug 23 at 4:13
  • $\begingroup$ I never thought of that. Great tip! With the viewport-setting of the first subdivision modifier set to 1 (instead of 2), the preview render was still a bit too bulky for my purposes (even with a second subdivision modifier after the collision modifier), but I think its still a great tip to keep in mind. $\endgroup$ – Mathew Aug 27 at 14:54
  • $\begingroup$ I've tried to cache my results, but it did not really solve my problem. For when I change a cloth setting (e.g. the stifness) after a first chache, it takes pretty much the same time as before that cache. But perhaps that's normal. As I understand it, when you cache a collision it saves the calculations (either to your RAM, or harddrive, I've tried both). But when I change the stifness of the cloth, doesn't it then have to REcalculate the collision for all my cloth vertices? In my case: for my whole simulation? $\endgroup$ – Mathew Aug 27 at 16:08
  • $\begingroup$ @Mathew Yes, unfortunately if you modify the simulation your cache data will no longer be valid. There isn't a lot you can do about that. That's why I suggest using really simple geometry at the start so you can refine your settings without long delays. Once you get where you want, add detail and cache it. You're aware you can just play the simulation without rendering everything right? $\endgroup$ – hekete Aug 28 at 5:39
0
$\begingroup$

Answer

I asked whether the slow viewport rendering was caused mainly by a slow CPU or by bad settings. It think, in my case, it was mainly caused by 'bad settings', i.e. by settings that are too high for a viewport render. In my case a collision between the 32,000 vertices of Suzanne and 41,000 vertices of the cloth (after subdivison) was too much for my CPU. Although my CPU isn't the fastest, it's benchmarked somewhere halfway the benchmarklist (@ https://www.cpubenchmark.net/), so I don't think my CPU was the problem. In the end, the most succinct advice to my question was summarized by Hekete's remark: "start with a very simple mesh and low quality settings on the simulation."

A summary of other tips that helped me:

  • Again: keeping things very simple at the start;
  • Making the transition to Blender 2.8. The viewport render was significantly faster in 2.8, which presumably has to do with the new Eevee-engine;
  • Using two subdivison surface modifiers (one before, and one after the collion);

Although I haven't managed to get the right cloth-settings too simulate what I have in mind, I have at least found the right settings to render it fast enough in the viewport to play around with the settings. What I'm trying to achieve is probably a bridge too far a newbie, so I'll keep practicing and eventually I'll get it right.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.