Jump to content

Cloth simulation without simulation


jrx

Recommended Posts

Hi Everyone,

I am doing some procedural modeling in Houdini and I have come to the point, where I would like to model one object to be wrapped in some kind of material, paper, etc.

Of course it can be modelled by hand, but if we have all these marvelous procedural modeling tools, there must be something to help with that.

I have tried using some curves with ray sop, triangulate 2D sop, fit sop, etc. but the results were still quite far from satisfactory.

Then, it popped into my mind that Houdini has some cloth simulation tools, maybe they can help. Without the simulation part, but as a modeling tool. Is it possible. I have tried looking for any materials helping learning cloth simulation in Houdini, but it appears there is not too much of them, or maybe I am missing something.

Does anyone have any hints what I can use and where can I learn helpful tools for that task?

Link to comment
Share on other sites

I already looks pretty cool, but I'm just wondering, whether I can do this with a stripe (select and pinch) and make it a bit like a rubber band - to be initially slightly larger than the object and then wrap around it, taking it's shape.

Link to comment
Share on other sites

One of my favourite convex hull wrapping approximation techniques is to put a low polygon sphere (not the triangulated sphere) around an object, ray it onto the mesh (using minimum distance), then subdivide it, peak it a little, ray it again, subdivide it, peak it, ray it again,... you can smooth (smooth sop) it or play with the creasing of the subdivisions. I tend to use that to make SDF's out of crappy non-closed topology - but it does often look like aluminium foil or something similar :).

Of course this is limited to certain shapes, but you may be able to stich a few of those together by fuse/snapping them.

Link to comment
Share on other sites

Thank you very much for a very valuable help. I will take some time now exploring possibilities your hints give me, but it looks very promising.

Ok, here is what I discovered. Cloth simulation is a very good tool, but until I buy a much better machine I must try some other way, it is way to slow to be able to interactively look how to change parameters to tweak the results.

The second approach is much faster, but did not perform well on a highly irregular mesh I am wrapping around. So I have come up with another solution:

I created a highly detailed mesh, to be my material to wrap, call it 'cloth'. I isolated with clip sop parts of the object I will be wrapping material around, call it 'object'. I used ray two times one time I rayed cloth on the object,

and the second time I rayed cloth on the convex hull of the object (by accident I have discovered tetrahedralize sop). Then, I have created a point attribute, and in the point sop set blending between these two rayed shapes depending on the painted attribute. I have also used some peak sop with small displacement. I started with the attribute everywhere 1 and then painted with brush some deformations of the material, which gave me pretty accurate wrap and ability to control it in a way I like. Thank you very much for help!

Link to comment
Share on other sites

You mean something like this Peter?

yep, like that.

I am currently dealing with wrapping things around each other. I tend to rely on sdf approximations quite a bit. The trick is to get a good sdf.

Imagine a character made out of various pieces of cloth (with a body inside) and you want an all encompassing sdf out of that, so you could generate an isosurface out of that, that you can then use to ray against. Or use the sdf for a softdisplace, a normal lookup, an inside/outside lookup, a closest point on surface lookup,... whatever.

I would loop over the different pieces of geometry and calculate an sdf per piece, then combine the sdf's into one using a volume mix (making sure the bounds of the sdf are the same).

The difficulty lies in finding a good way to close off the pieces...

Either with the above mentioned sphere wrapping technique or by using another useful combo of nodes to seal off holes:

group -> by edges (unshared)

polycap -> use the previously generated group

divide -> (turn off convex), turn on bricker (sometimes the resulting polycap returns hugely deformed non-planar polygons which you can chop up into smaller slightly more regular polygons with the bricker)

Or by polyextruding to get some thickness.

It can be a pain sometimes, but once you get a good sdf out, it is sooo useful.

Anyway, glad to hear the ray sop worked out for you. Did you know you can color your mesh before (with a noise or so) and use $CR in the "lift" parameter of the ray. That way some areas aren't rayed against it completely... You can also do it after the ray operation with the kind of custom attribute you are using, blending the meshes together.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...