Page MenuHome

Baked Cloth Sim read/sync to device for Cycles to Render, causes geometry errors
Closed, ResolvedPublic

Description

--- Operating System, Graphics card ---
Windows 8,
3x nVidia Geforce 580 3GB

--- Blender version with error, and version that worked ---
Blender 2.68.2 - r59254

--- Short description of error ---
Setup a scene with a cloth sim on one object, ad another object with collision.
Now make them interact,

OK = play animation in 3d view, bake cache even to RAM or DISK. Do a preview render and it works.
BUG = now try do a real render, first it has to sync objects to device, but when it renders geometry is all messed up.

--- Steps for others to reproduce the error (preferably based on attached .blend file) ---
Im attaching a simple .blend scene of a part of a much larger scene I am doing.

Event Timeline

The problem is that you have a subsurf modifier before your cloth modifier, and it has different viewport/render levels and is disabled in the viewport. The cloth simulation is baked for one particular mesh resolution, so any modifier preceding it should be the same for viewport and render.

I would expect it to check if the resolution matches instead of giving a garbled mesh like this tough, and maybe give a warning in the modifier.

Tried the simple scene at work, gah. What a n00b mistake. It´s the modifier stack order and that I had the subsurf hidden in viewport. Need to rebake my sim when I get home. You could close this bug!

And your suggestions sounds great, if a / ! \ warning triangle flashes in the info header it would be great, when you hit render and it starts syncing to device. with the message about resolution mis-match

Ok back home, tested to bake the scene instead of taking ~30-50minutes, it took maybe 3-4minutes.
To render the scene, the sync to device, was neglitable. compared to before.

So I think something is happening there, that could be looked over. because it went so much faster now to bake the sim when cloth was before subsurf. and also to render.

If you bake with subsurf before the cloth it will have to do cloth simulation on a much higher resolution mesh, so it makes sense that it would take longer. A physics simulation like this often doesn't scale linear with the number of faces either so this difference isn't entirely unexpected.

Brecht - is this a report to keep open as issue?

Yes, I'd like to check why it gives this corrupted mesh, it should be checking if the number of vertices matches the point cache.

Yeah shortly after writing the report, and saw your answer and did a quick test. I was explaining it to a co-worker and realized when I was explaining the non-linear expansion for the cloth sim to take care of. Compared to doing sim on lower vertices then subsurf the result.

Thanks for looking into it brecht!

It shows a message in the cloth modifier now in revision 59777. Thanks of the report, closing.

Brecht Van Lommel (brecht) changed the task status from Unknown Status to Resolved.Sep 3 2013, 9:58 PM