Cloth simulator improvements

Hi, thanks for the builds. Sim_Piko.

Luca - currently anything that has more than (n) tris crashes, I guess this happens somewhere between 15000 - 30000 triangle count.

@pildanovak, hey, thanks for the report, fixed it in the branch (build is updated).

@Sim_Piko, thank you very much for providing these builds :slight_smile:
They are really helping people test, and I have already gotten feedback and reports from people here and on IRC, thanks to your help!

I hope you don’t mind that I have added your latest build to the first post in this thread, to make it more accessible to people.
If you want to keep providing builds, that would be great! And if you do so, can I ask you to always make a quick post here, notifying about the latest build? That way, I’ll be reminded to update the link in the first post :slight_smile:

Oh, and also, since your first post here, I have actually made speed improvements to cloth, which should now simulate much faster. You can expect improvements of about 20-40% in speed, in relation to the simulator before the optimizations, and I have seen speed-ups of up to 3x in relation to the Blender release version. And that is without mentioning that collisions remain reliable with far fewer subframes, and that you can now use the new “adaptive subframes” feature, both of which enable further speedups.

I didn’t want to not ‘spam’ the thread with new builds to leave some place for discussion (that’s why i was updating my previous post few times).

Yeah, I saw options for that, both in commit’s logs and in builds.

Anyway, here’s new build, from 12-Feb-2017
https://www.dropbox.com/s/xh2b4m3zlcodaeb/cloth-improvements-branch-git.7b6d09e-win64.zip?dl=0

@Sim_Piko, thanks for the new build, updated the link.
Don’t worry about spamming, build updates aren’t spam, they remind people that they can test new stuff :wink:
But if you prefer, you can PM me instead, it is up to you.

I’m testing, it looks like sewing are totally gone at the moment, I also tried with hooks but I got weird results (the mesh stretch a lot and the cloth effect is weak) eheh
Also setting an object as collision, changes the shading in viewport for some reasons.
Anyway I think everything is still on heavy work in progress :smiley:
good luck!

how did you make your “ribbon test” on vimeo?

1 Like

I was going to ask the same thing.

@MmAaXx, hey, sewing is working fine for me. What I think is going on, is that you are using too low “Sewing Force” values. In fact, that property is just a clamp for the actual force, while the “Tension” property is actually used as the force property. This might be a bit counter-intuitive, and I’ll probably change the way that works in the future… In the meantime, either crank the “Sewing Force” value way up, or set it to zero, in which case, no clamp will be used for the sewing forces.

What do you mean by “tried with hooks”? Could you give an example .blend (or video) of what is failing for you?

Regarding collision objects, I don’t experience this “shading change” here. Could you provide a screen-capture of this behavior?

Finally, I’m glad to report that for some time now, cloth is actually no longer heavily WIP, as pretty much all the core stuff is done. My current work is not so prone to tricky bugs anymore, so I can assure you that the simulator does generally work, and whatever bugs can be found, are most likely small and trivial to fix. :slight_smile:

And lastly, about the ribbon simulation, that was just a very repetitive process, of animating the pinned ends for a little bit, simulating that portion, seeing where the cloth ended, then animating a bit more, simulating again, and so on… Just very boring and time consuming stuff :stuck_out_tongue:

nice work with the new bending sim. Would it be possible to paint a blending weight map in areas you want more bending and areas that are flat?

Wow! This is really an awesome improvement Luca. I’m just figuring it now with some clothing ideas I am sewing up. It works much better and faster. Thank you! :slight_smile:

is cloth pressure still being implemented?

ok, here is the scene

LINK

My bad, the shading problem is present only when you open a scene made in the official blender, no problem when assign a material
My bad n2, hooks work!

sew maybe works in a different way now,
in the attached scene you will find both, hooks and sew.

With sew I got this result.

https://s3.postimg.org/llr4ioczn/sew.jpg

I’m on windows7 64bit

@melvi, if I understand correctly, you want to modulate the bending stiffness with vertex weights, right? You can find that in the “Cloth Property Scaling” panel.

@rampa, thanks, look forward to hearing more about your “cloth adventures” :slight_smile:

@andrewflowers12, I made a quick patch for that a few months ago, but it is really a crappy implementation. For a proper implementation, we need actual mass distribution, so the plan is to address pressure once that is done. Mass distribution should still take some time, but after that, pressure is a 1/2 hour job…

@MmAaXx, indeed like I explained in my previous post, sewing is working fine, you are just using too low “Sewing Force” values. That property isn’t actually being scaled properly, but I intend to totally change the way that works anyway… For now just set it to something like 10000 (or 0), but rest assured that it is not a bug, and it is on my ToDo list to improve that :slight_smile:

Also, regarding opening scenes made with master, that does indeed not work currently. I have not yet written code to properly import the old cloth, as stuff is still changing a bit, but I should make some time for that soonish…

Hey, this is not per se a cloth thing, but just letting you guys know, as it is related…
The Surface Deform Modifier is now in master, thus you can grab it in the next daily build :slight_smile:

Dude, I know you´re going to Amsterdam to work on Blender already, but if there were a way to throw money directly at you I think many would :stuck_out_tongue:

Hi Luca,
I just downloaded the last build from buildbot to test the Surface Deform modifier, not playing with monkeys an cubes, but on real situations, and I got only objects exploding and messes like that.
Moreover, the interpolation falloff parameter, whose behavior apparently I don’t understand, doesn’t go below 2.0 (BU?, meters?).

Am I missing something, or are there any restrictions or incompatibility with other modifiers?

Thank you for your work!

paolo

@BrilliantApe, lol, I’m flattered :o

@sourvinos, sorry to hear you are having issues with SDef, though I’m glad to see more people using it in real situations. But unfortunately “exploding and messes like that” is not enough information for me to try and troubleshoot this issue. I need to actually look at your use-case, to be able to look into the issues… Could you perhaps post a simple .blend file that is causing you problems?

And regarding the falloff parameter, it is actually an exponent used on the relative distances, but it wouldn’t be helpful writing that in the tooltip, because from the perspective of the user, it is really more of an abstract value (as are many properties in Blender). And indeed it doesn’t go below 2, to prevent some undesirable artifacts that would happen then.

I hope we can figure out your issues soon :slight_smile:

Luca, I knew you would ask, unfortunately my current ‘real’ scenes are not shareable, however in recent tests I have found that it does not work even in simpler attempts, at least not as I think it should:

suppose to subdivide the default cube, ten times so to say.
Now add a mesh plane and subdivide it as well, then add to it a SDef modifier and bind it to the near cube.
From now on I expect that every deformation I perform on the cube will be roughly reflected in the plane shape but this doesn’t happen, only some meaningless stretching.
Am I misunderstanding something?

Anyway, if you think a blend file would be useful to better explain my issues, I will attach one, although I think it would be of little use.

Thank you for your time,
paolo

@sourvinos, That simple example works for me:
http://pasteall.org/blend/index.php?id=45778

It is very important to apply transformations to all objects.

Edit:
I updated the file, the previous one had a residual Hook modifier that was not being used.

@sourvinos, ah, you did indeed misunderstand the function of the SDef modifier. It seems that the functionality you are after is that of the Mesh Deform modifier. SDef is not a replacement for MDef. SDef is used to bind nearby surfaces of meshes of similar shapes, as you would do for instance if you wanted to use cloth simulation, but at the same time, have a mesh that is too detailed for sim, in which case you would make a simplified mesh for simulation, and would later bind the detailed mesh to it.

EDIT:
@YAFU, thanks for the example, indeed if you bind the plane near the surface of the cube, it works. Though I think @sourvinos was trying to bind the plane in the middle (inside) of the cube, in which case, the MDef modifier is the right tool for the job :slight_smile:

Thanks YAFU for the file!

Actually the example is very similar to what I did, the plane is in the same position respect the cube (before I was not clear, with ‘the near cube’ I meant just that);
the only difference is that I didn’t use an armature to deform the cube, rather I deformed it by sculpting, or by other deformers, thinking that it would work also on real deformations (why not?)

Thank you anyway,
paolo