[Plugin] ClothWorks v1.8.0 - 28 Apr 2024
-
@jiminy-billy-bob said:
Hey Anton, I was wondering today: what's the performance bottleneck? Is it the physics simulation itself, or moving the whole geometry at each frame?
There are three components to simulation:
- Physics computation
- Vertex transformations via transform_by_vectors
- Dynamic texture UV updating for faces with texture (which can be disabled)
The
transform_by_vectors
takes quite a reasonable amount of performance out of this (and I do wrap every frame in its own operation with second parameter set to true). On a draping cylinder sample (with no textures), withtransform_by_vectors
enabled, the performance is 17 FPS; withtransform_by_vectors
disabled, the performance is 32 FPS.However, the physics computation also takes its chunk out of performance. Assuming
transform_by_vectors
is off, with physics enabled, the performance is 32 FPS; with physics disabled, the performance 60 FPS.The physics computation aspect can and will be improved, if not so much algorithm and optimization-wise, then with multithreading. At the moment, the part of physics that consumes most performance is collision detection and contact processing.
Thus at the moment there are no bottlenecks but as physics computation performance is improved,
transform_by_vectors
(and rendering) might become the bottleneck. I would be interested in finding out if SU could optimize this, say avoid updating edge lengths (in case they do) or other things that occur. -
@anton_s said:
The
transform_by_vectors
takes quite a reasonable amount of performance out of this (and I do wrap every frame in its own operation with second parameter set to true). On a draping cylinder sample (with no textures), withtransform_by_vectors
enabled, the performance is 17 FPS; withtransform_by_vectors
disabled, the performance is 32 FPS.That's what I was suspecting.
Have you considered displaying an openGL preview during the simulation, instead of the full geometry? Like a wireframe of the cloth, or even a fully shaded preview using Christina's FaceShader.Considering it would instantly double the performance, and more orders of magnitude once you implement multi threading, you should seriously consider it.
Or am I missing something? Is there a particular reason why you need to transform the whole SU geometry at each frame?
-
Personally I prefer the full preview during simulation, especially when it comes to live dragging to create a little randomness. I canāt say that Iāve noticed a performance issue unless using super dense grids (which generally arenāt necessary).
-
Well, this would look identical as the full geometry:
@jiminy-billy-bob said:
or even a fully shaded preview using Christina's FaceShader.
EDIT: Without textures, actually.
-
@hieru said:
Personally I prefer the full preview during simulation, especially when it comes to live dragging to create a little randomness. I canāt say that Iāve noticed a performance issue unless using super dense grids (which generally arenāt necessary).
People will push the limits and Thomas has experience in this with skatter. It's a very nice suggestion.
Anton, I've downloaded but not tested yet, but ever since seeing this plugin I have wondered if you are not the guy who will create bones structure for sketchup. With clothworks and physics, that's the next most natural step.
-
@jiminy-billy-bob said:
Have you considered displaying an openGL preview during the simulation, instead of the full geometry?
Considering it would instantly double the performance, and more orders of magnitude once you implement multi threading, you should seriously consider it.
That's a good idea! I'm thinking of adding a cloth quality option. Users will simulate what they draw, regardless of the resolution. But behind the scenes, if the cloth quality is set to more than 1, like 2 or 4, a higher poly version of the user-drawn cloth will be simulated on the physics side (but a lower, user-drawn quality will be rendered). When simulation ends, a higher quality cloth will replace the lower quality. If the user plans to continue simulation, a lower quality will replace the higher quality and then back to a higher quality after simulation... I think this will cope well with current ClothWorks functionalities.
@jql said:
Anton, I've downloaded but not tested yet, but ever since seeing this plugin I have wondered if you are not the guy who will create bones structure for sketchup. With clothworks and physics, that's the next most natural step.
Would indeed be interesting! Always want to see how dinosaurs and real locomotion would behave in SU. If another developer doesn't start this, then...
-
@box said:
A feature request of sorts, more of a think about this and see if it is possible.
Can you make the shape of the geometry of the pin the thing that does the pinning rather than the bounding box of the pin/pin object.The thing with this, the reason I went with bounding boxes is that it is easy to determine if a vertex is inside it. Doing it other way, for complex shapes it's hard. But of course, a simple variant can be created. If you treat all edges of groups as cylinders you can also, in reasonable time, determine which vertices overlap the cylinders. If you want to lock something along an arc, then you would need to assign a some sort of thickness (or edge cylinder radius) to a pin, so it knows how much each edge should capture. But this sort of approach would make this plugin a bit too complicated.
A feature request was made for Grouped Vertices. I have a really good plan for this feature. So basically, there will be a highlighting tool, where users could adjust the highlighting circle radius, and use it to basically highlight vertices they would want to treat as pins. With a snap option, I'm pretty sure it would be easy to inference highlighting along an arc or any other curve. And of course, a dehighlighting variant of the tool will be added to unhighlight the highlighted vertices. This would be another way to lock vertices without using pins. I think it would be a user friendly in terms of locking vertices along a desired path/shape.
For now, as a workaround, you can just copy pins along the arc and adjust their scale via (Menu) Extensions->ClothWorks->Edit Pins Scale so they capture the desired amount of vertices. CopyAlongCurve could be used to copy pins along an arc.
-
Amazing tool! just got it and paid for it! Thanks!
-
how do we use the material editor?
i'm trying to create a curtain that stays almost strait - like a textile with almost no elasticity.
but it seems that the cloth keeps behaving like it's silk - the curtain extends very much, and 'feels' very light when i push it.
i have messed around with the material editor, but it does not seem to have any influence on the behavior of the cloth.
jorgensen
-
I don't think converging pins works on MacOS. The handles change while holding the control-key but I can't actually converge them. Anton can you check?
-
@marvsweden said:
I don't think converging pins works on MacOS. The handles change while holding the control-key but I can't actually converge them. Anton can you check?
This has been fixed. Update to version 1.1.1, and use the SHIFT key for converging/diverging.
-
@jorgensen said:
how do we use the material editor?
i'm trying to create a curtain that stays almost strait - like a textile with almost no elasticity.
but it seems that the cloth keeps behaving like it's silk - the curtain extends very much, and 'feels' very light when i push it.
i have messed around with the material editor, but it does not seem to have any influence on the behavior of the cloth.
jorgensen
The material manager is just another way to adjust cloth properties and doesn't have any special things to it other than it can be saved and then used as a preset.
Does increasing shear stiffness not help? If so, try reducing update timestep, to like 1/520. Reducing update timestep makes cloth stiffer.
-
Hey, I'm trying to understand all the settings. I can't see anything about it in the manual. I'm talking about thickness, bend, damper, shear and all that. Am I missing something?
I'm trying to drape an object with a silk cloth and either it falls through the colliders or the thickness makes it sit up above the colliders too much. Also from what I understand there is an interplay between the grid size and some of the settings for cloth/collider. Is that right? It would be great if that could be covered in some way. Also, tooltips would be welcome for the settings. What are the numbers really, are they linked to the used unit or are they percentage? It's a little unclear. Don't get me wrong, I love it. I just don't understand it. I wanna learn more. -
@marvsweden said:
Hey, I'm trying to understand all the settings. I can't see anything about it in the manual. I'm talking about thickness, bend, damper, shear and all that. Am I missing something?
If you assume that each edge is a linear spring and each two linked edges are an angular spring, then the shearcontrols the linear spring stiffness and bend controls the angular spring stiffness. As for the damping, it controls the drag factor for both type of springs.
@marvsweden said:
What are the numbers really, are they linked to the used unit or are they percentage?
Cloth/collider thickness denotes an offset in mm. Other parameters are more associated to cloth mass ratio.
@marvsweden said:
I'm trying to drape an object with a silk cloth and either it falls through the colliders or the thickness makes it sit up above the colliders too much.
Increase simulation viscosity, before draping, to allow the cloth settle in a less impactive way. That way you can avoid most overlaps.
@marvsweden said:
Also from what I understand there is an interplay between the grid size and some of the settings for cloth/collider. Is that right?
Yes. The smaller the grid spacing, the better is the result, but the less stiffer the cloth becomes. This is something that I have to consider improving in next version.
To sum it up, the object is to release new version with improved physics and then make tutorials about other ClothWorks options.
-
Hello Anton, maybe I missed something, why does ClothWorks ask for the license number every time? (Windows 10)
Thank you for your help -
Hallo Anton!
I bought you plugin "Clothworks" today (2 hours ago). How long does it usually take for the license to arrive? -
@kugelfisch said:
Hallo Anton!
I bought you plugin "Clothworks" today (2 hours ago). How long does it usually take for the license to arrive?It should arrive right away unless you entered a wrong email. I will send you a private message regarding this.
-
@sofie9536 said:
Hello Anton, maybe I missed something, why does ClothWorks ask for the license number every time? (Windows 10)
Thank you for your helpHi, Sofie,
If you're referring to your licence constantly deactivating, there is an issue with the current version of SketchUcationTools, which I presume would be fixed upon next release cumming soon. We'll see if the issue is fixed then. Other than that, in the meantime, if your licensing seats fill up, let me know via a private message and I will reset them.
Anton
-
This is a fun one! Having a great time playing with it and V-Ray Fur. TAKE MY MONEY!!!
-
A little inspiration for all the scifi modelers out there.
A flexible hatch.
Advertisement