Trying out physics in Carrara

Hermit CrabHermit Crab Posts: 841
edited December 1969 in Carrara Discussion

Hi everyone,

Over the past few days I've found time to experiment a bit with Physics. It has involved a good amount of trial and error but I've learned a lot in that way. There really is an amazing amount 'under the hood' of those few sliders and dialogues.

So, I've posted a short video of where I've reached in creating clothing which drapes. There is a lot more I wish to try out when I get a chance. My computer is fairly feeble for this kind of processing.

I have no idea whether all this is standard fare for everyone - whether it has been done to death already. I'm not claiming to be trying anything new - just showing what I've learned.

The video came through to youtube at very low resolution so I would suggest going to full-screen if you care to watch.

The link is: http://youtu.be/7radMxgLA8Q

Regards to all

«13

Comments

  • Steve KSteve K Posts: 3,232
    edited December 1969

    Very good. I've been using Carrara for years and have yet to get into the physics. This has inspired me to do it.

    What version of Carrara are you using? I'm still on 8.1 Pro.

  • wetcircuitwetcircuit Posts: 0
    edited December 1969

    Looks good! Seems you have something useable by the end...

  • TGS808TGS808 Posts: 168
    edited December 1969

    It has involved a good amount of trial and error but I've learned a lot in that way.

    Pretty much the only way to do it.

    Good results!

  • Hermit CrabHermit Crab Posts: 841
    edited December 1969

    Thanks to those who posted replies.

    @steve k: I am using 8.5 pro. I'll try later to compare your version physics-wise. I'm not at my desktop and can't recall whether I uninstalled 8.1. I'm pleased that you were inspired!

    To anyone else: Physics is to me a bit like 3D was when it first appeared. Then it all seemed to be about chrome spheres floating in chequered rooms. Likewise, physics recently seemed to me all about dominoes falling over or a sphere falling onto a see-saw.

    But now I see it as a possible way to realistically drape clothing and to create animated cloth and hair (are these not the Holy Grail for many people?). This way of thinking comes directly from seeing it done by one or two innovators in the Iclone world. (I posted a video of this in an earlier thread where I was interested in discovering whether Carrara could do the same).

    The video posted above in this thread is my first attempt to put the necessary elements together in Carrara as they were done in Iclone.

    These are:

    1 discover which settings (of bending, self collision, etc) are necessary to obtain realistic cloth which doesn't bounce or stretch all over the place;

    2 work out which mesh topology looks best (my 'poncho' above was only a spider's web of quads - with triangles in the outermost rings). When I get round to building a simple outfit I may find that nothing will work - probably others know already and could save me the trouble;

    3 I've learned what settings impart stiffness to objects and have played a bit with collision margins but now I need to build a 'hybrid avatar'. In such an avatar, the limbs hidden under clothing need only consist of collision geometry - not high-poly, sculpted muscles. I'm thinking of working on a Makehuman export for this.

    4 The cloth needs to move with the avatar. It is one thing for collision to be calculated when the figure is standing in place but what about when jumping or skating? I need to try some of this out but have some possible solutions in mind for minimising damage.

    Obviously none of this will cause Marvelous Designer salesmen any sleepless nights! But I think a study of physics effects could be useful even for making still renders: suppose you want a figure in a given pose for a still render. With even a touch of moving cloth you could animate for a couple of seconds into that pose from an earlier position. The cloth folds could possibly be better than you could arrange by hand.

    That is true at least for the (admitedly poor) poncho in my video.

  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    PhilWhas a low poly conforming figure (for V4 I think) at his ShareCG account. It was for hair collisions so I don't know how well it works for cloth sims.
    http://www.sharecg.com/philw

  • Hermit CrabHermit Crab Posts: 841
    edited February 2014

    @evilproducer: Thanks for providing the interesting link. I took a look but haven't signed up to download yet. It did confirm for sure that
    others with much greater knowledge of Carrara have long since been down this route. Come to think of it, I own Phil's Advanced Carrara tutorials (for 8.1) and didn't think to check them out!

    When I bought the tutorials I was just at the beginner level with version 7 which I haven't advanced much beyond. I tend to jump in deep on certain things such as rigging and now physics. But I know next to nothing about the many other features of Carrara - replication, lighting, terrains, clouds, oceans, god-rays (barn doors - I take it these are shafts of light through slats?), tree building, UV unwrapping, etc, etc! The texture room is fantastic but I am only on its doorstep. Life really is too short.

    @steve k: I took some screen-shots of the physics windows in 8.1 an 8.5.

    If you select 'Scene' and then go to the Physics tab these are the same in both versions.

    If you select an object and go to the physics modifier, the 'soft body attach' is the same in both programs.

    The other choice is different in 8.5 as shown in the screen-shots. (Sorry - problem with image file-type - will get back)

    Post edited by Hermit Crab on
  • Hermit CrabHermit Crab Posts: 841
    edited December 1969

    Screenshots hopefully.

    I've tried a few formats but can't see the pictures in the preview.

    Eight1.GIF
    252 x 492 - 27K
    eight5.GIF
    255 x 664 - 37K
  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    Screenshots hopefully.

    I've tried a few formats but can't see the pictures in the preview.

    You won't see the screen shots in the preview. You can use .jpg or .png. My Mac defaults to .png for screen shots.

  • 3DAGE3DAGE Posts: 3,311
    edited December 1969

    HI Marcus :)

    Here's some doc's from a while back when Bullet Physics was added to C8, but should still be helpful.

    https://dl.dropboxusercontent.com/u/7907045/First_step_Physics_C8.pdf

    Right now, softbody physics objects don't correctly interact with animated objects,.
    for example, If you add a sphere,. then animate it moving around,. then add something like a Vertex object "Grid" and set it's motion to physics, add the softbody modifier, and set the Stiffness and bending low,.
    Position the vertex grid (Softbody) above the animated sphere ..and simulate..

    what will happen is that the object will fall onto the sphere, but as the sphere moves , it'll pass through the softbody object, and leave it behind.

    Physics simulations can be useful and fun, but it's important to note there is a Huge difference between a "Soft-Body" simulation and a Clothing simulator,.
    there's also a big difference between a Physics engine which was originally developed for use in a Game, ...and an accurate physical simulator

    One final note,. Bullet physics is still in "Beta" stage, so some elements may or may not work correctly.

    Keep playing with it, you never know what can be achieved, and have fun with it.

    Hope it helps :)

  • Steve KSteve K Posts: 3,232
    edited December 1969


    @steve k: I took some screen-shots of the physics windows in 8.1 an 8.5.

    If you select 'Scene' and then go to the Physics tab these are the same in both versions.

    If you select an object and go to the physics modifier, the 'soft body attach' is the same in both programs.

    The other choice is different in 8.5 as shown in the screen-shots. (Sorry - problem with image file-type - will get back)

    OK, many thanks. I will be getting into it.

  • Hermit CrabHermit Crab Posts: 841
    edited December 1969

    @3dage:

    Thank you for posting the pdf link - it was very helpful as was the information you provided. You confirmed further that the limitations within Carrara are well-known and that I'm mistaken in thinking that several different technologies are alike underneath.

    I also learned that there are more settings within Carrara than I knew about - I was only looking at the Scene physics tab and the 'soft body' and 'soft body attach' dialogues. I didn't know that there were physics functions in the motion tab or the settings tab. So I have even more variables to take into account.

    The one setting I'm pleased to find - sad man that I am - is the tick-box for removing all collision. This means that a high-poly figure can be left out of the equation. But the figure's limbs can be clad with cigar-shaped 'spheres'. These shapes are what I've been referring to as collision geometry. They collide even when invisible. Now I don't need to build or download a special avatar.

    As time allows I will try out a further idea which I have for building draping cloth. It would take a long post to explain but I'll try to get a chance later in the weekend to try it out. If it works I can share the settings.

    So thanks again from a fellow Scotsman.

    @evilproducer: thanks for the image info.

  • Hermit CrabHermit Crab Posts: 841
    edited December 1969

    Hi All,

    Well I found time to have another session and decided to show the results at the risk of all this become boring to everyone. I won't have any chance for a while to continue trying out my ideas but I do think that simple draping cloth is worth pursuing.

    Imagine a Roman soldier. His torso would have a solid covering and from the waist down the lower tunic would be visible along with vertical leather straps. The tee-shirt sleeves would show and his helmet might have a long plume. He might have a cape. I think the flexible parts of that outfit could drape using home-made meshes. My video shows a weird one-piece mesh - but I'm not suggesting that kind of construction for the soldier - I was just playing with shapes.

    The various twirling cloths I've tried are mostly failures but it should be remembered that the stiffness and bending spring settings can be adjusted along the timeline. So, if a cloth starts to twist too far, perhaps those settings could be altered at that point and the simulation re-run. But it's time-consuming.

    Here is the link:

    http://youtu.be/wIB2fouHgn0

  • DUDUDUDU Posts: 1,945
    edited December 1969

    Very interesting experiments!
    A tutorial would be welcome while waiting for that DAZ perhaps decides a day, to think of more important things for the users than Genesis…

  • Hermit CrabHermit Crab Posts: 841
    edited February 2014

    Hi DUDU_0001

    This week I am extremely busy but will try to give some ideas. I'm not at my desktop but will try to explain from memory.

    First check out the tutorial pdf which 3dage linked to.

    From me, try the following:


    1 Build a flat mesh like a grid 40x40. Place it horizontally in the scene

    2 bring three cones or other primitives into the scene and place them above three corners of the mesh and reduce them in size if need be. Name them cone1, etc.

    3 select the mesh and add a soft body modifier

    4 Now add a soft body attach modifier. Use the button to select one of the cones. Use the other button to bring up a brush which you can re-size. Paint a few vertices at the mesh corner below the cone you selected earlier. If you paint too many you can subtract a few (look at the buttons at the top left of the scene window)

    5 Do the same for the other two cones (ie add a soft body attach - you don't need to re-do step 3)

    6 try running a physics simulation of about 2.5 seconds

    7 Now play with moving the three cones towards the centre above the mesh over the course of the timeline. Re-run the simulation

    8 If the mesh is too rigid try adjusting the bending and stiffness sliders. (remember to do this at the beginning of the timeline. There is also a smoothing tick-box - best left till later. This seems to increase the density of the mesh

    9 Try the whole thing over from the beginning in a new scene with only one cone above the centre of the mesh and you will be ready to try your own 'poncho'. My poncho was made from a disc of concentric circles - a spiders web - with a slice removed. Try with and without the self collision box ticked.

    Notice that when you paint part of a mesh it becomes solid and doesn't drape any more. Also if the vertices are dense and you use self-collision the mesh will sizzle.

    Another thing I've found is that if a mesh is exported at a point along the timeline it will be saved as a solid object with all the distortions (or draping) in place. Imperfections could be fixed in the vertex modeller or the assembly room.

    So - you could (I think) drape a sleeveless tunic on a figure by fixing (painting) the shoulder vertices and also a 'belt line' around the waist. Then save it as a solid OBJ file. Bring it back into the scene and delete the soft body version.

    Now drape a soft body cape over the figure wearing the draped solid-object tunic. By using physics in layers the Roman soldier imagined in a post above should be possible. (I haven't tried it!!)

    Another idea: could a log rolling under a horizontal grid mesh (which has one edge fixed/pinned) simulate waves breaking as the log emerges? The log would need to be made solid with the paintbrush and given a collision margin. (When I bring primitives to a scene I convert them to vertex objects before use).

    I would love to see others experiment along these lines if parts of it haven't been tried already.

    Please excuse if I'm not around to take this further.

    Edited to clarify one of the steps.

    Post edited by Hermit Crab on
  • Hermit CrabHermit Crab Posts: 841
    edited December 1969

    Hi everyone,

    Well I stole time I just cannot afford this week to take another try at cloth draping.

    The video is self explanatory - I think my posts are too verbose!

    I hope that some of you may be intrigued by the possibilities.

    http://youtu.be/HkLebfIzJaU

    Regards to all.

  • DUDUDUDU Posts: 1,945
    edited December 1969

    Hi, Marcus,

    I had already made tests with a sphere in lower part of a skirt…
    Then, the skirt (home made), placed on V4, disappeared at the first image although I had put the distance of collision of the scene on 1.
    I linked the sphere with the animated character (that I had moved back far from the sphere + skirt) and I made a simulation.
    I then replaced V4 in the center of the skirt.
    That did not function too badly but you arrive at very impressive results!
    Two questions:
    - Did you test with rigged characters like V4 ?
    - Can we attach a vertex object to three others (here, your dress with the three cones), in the modifier tab?

    Thanks.

  • Steve KSteve K Posts: 3,232
    edited December 1969

    Hi everyone,

    Well I stole time I just cannot afford this week to take another try at cloth draping.

    ...

    Impressive, thanks for posting it. I may have to rethink my long standing policy of buying only tight fitting clothes, i.e. pants instead of skirts, to avoid poke thru problems in animations.

  • Hermit CrabHermit Crab Posts: 841
    edited December 1969

    Hi there Dudu_00001

    I'll try to answer your questions but first I need to say that I'm not any expert in this. The tutorial with the cones was written from memory of trying things out.

    I've just attempted the three cone 'tutorial' and, yes, I can attach three cones to one cloth. But when I moved them, the cloth didn't behave cleanly.

    One cone seemed to take priority and there were other problems. Therefore I apologise to you and anyone else who tried this. But you saw how to 'soft body attach' at least?

    To answer your questions. Yes, you can have one cloth mesh with one 'soft body' modifier and three 'soft body attach' modifiers. But, as I've now found, it isn't a good idea and I apologise again.

    You can apply a 'soft body attach' modifier to a cloth mesh and simply go to the edit button and paint over some vertices. You don't need to attach it to a cone or anything else. (I attached cones in my videos just to rotate the cloth easily.)

    Any painted vertices will remain in place during a physics simulation and will prevent gravity from causing the whole mesh to fall downwards and disappear.

    Painting vertices is also how you can make a portion of a mesh solid.

    In my videos I've shown tests that were aimed at achieving more than one result.

    I am trying (1) to simulate draping cloth. The cloth could drape over a throne or hanging from a canopy or it could be a trampoline - it doesn't need to be on a figure - it only needs to be flexible enough. As I've shown in my last video, the starting point of physics clothing can be a bizarre-looking mesh. New rules of clothes modelling might be needed for clothes using physics draping.

    I'm also trying (2) to see if I can animate a figure wearing physics cloth so that the cloth will seem to collide with the figure's limbs. I will try to achieve that by attaching invisible spheres to the figures limbs. In fact, that is how the figure with the poncho worked. I attached a sphere to each forearm and made it invisible.

    Each of those spheres was a vertex object - not a primitive - and had all the vertices painted which made them solid and capable of having a useful collision margin set.

    In my latest video there is only the mannequin and the cloth object I created in Hexagon. I only used a 'soft body' modifier on the Hexagon object and also one 'soft body attach' modifier attached to nothing. I dont have invisible spheres, cones or anything else in that video. I painted the cloth exactly as shown. Also in the latest video you may be able to see my settings for the cloth. From memory
    stiffness was about 10% and everything else was zero except smoothing, which was level 2 and quality (?) was at the default 10%

    I always use self-collision for the cloth but never tick collision margin at the same time. If I create a solid sphere, I use a collision margin of 200% but not self-collision at the same time.

    Your second question - yes - I used Poser's Kate2 for the poncho but she was only standing still until the arms moved. I think it is best to let most of the draping take place before beginning animation movement.

    The last thing I can say (because in this thread I've told everything I know) is that a piece of cloth which is loose enough seems to drape nicely over figures or other objects if the collision box is ticked in the effects tab.

    But after that, an arm or other limb moving will probably penetrate the cloth. That is why we need to add collision spheres to the limbs as I did in the poncho video. But if cloth or anything else breaks through the collision margin - which can happen - then it gets caught up and ruined.

    It is nice to know that you are also working on this. If I may advise (1) remember that I am only learning myself and (2) try to separate draping alone from draping and animating.

    Steve K thanks for the comments.

  • Hermit CrabHermit Crab Posts: 841
    edited December 1969

    Hi everyone,

    For better or worse I returned today to Carrara to continue where I left off. (I was inspired by a discussion in The Commons which referred in passing to what I've been trying out).

    So here is a gif consisting of screen-shots from some of the renders.

    The cloth is a one-piece mesh modelled by me in Hexagon last year (but tweaked today for draping tests).

    The figure was brought as an OBJ from Makehuman last year and rigged in Carrara. The only meshes in the scene are the figure plus hair and my cloth mesh. There is still much to try out - assuming that more CAN be done - which is questionable - I'm about a quarter way to what I want to achieve.

    Regards to all.

    DRAPEsmaller.gif
    640 x 480 - 299K
  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    Sparrowhawke has released an updated beta version his soft cloth deformer to work with Windows C8.5 and also made some improvements according to a recent thread he started.

  • Hermit CrabHermit Crab Posts: 841
    edited December 1969

    Hi Evilproducer

    Thanks for the info - I knew nothing about the existence of the cloth plugin but I found the thread and the links to three fantastic tutorial videos by Sparrowhawke.

    It looks like the research has indeed been fully done. I'm guessing that the plugin harnesses the physics functions already there in Carrara and adds a lot more besides.

    In particular, some things I was about to look into have been done - eg I was going to try cloth with dense polygon structures colliding against very low poly objects and vice-versa to try to find the optimum settings. Sparrowhawke has nailed this down I think. Also he has a deep understanding of the collision of moving objects and a better idea of what won't work and why.

    Also I never thought of the simulation being affected by frames per second - interesting.

    He also recommends using primitives - I always converted these to vertex objects because I thought primitives were mathematically-calculated entities and reckoned that the processor could do with fewer calculations. But that's an example of how I've been proceeding - guessing and trying.

    I downloaded the plugin but probably won't install it just yet - I'm interested in continuing with what I started for a while longer. However I don't want to try people's patience much more with this - I'll leave the topic unless I come up with something worth sharing.

  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    I wouldn't worry about people getting impatient with this discussion. Cloth simulations are a very popular topic for some people, and the ideas and testing that is done is invaluable.

  • DartanbeckDartanbeck Posts: 21,528
    edited December 1969

    Hi Evilproducer

    Thanks for the info - I knew nothing about the existence of the cloth plugin but I found the thread and the links to three fantastic tutorial videos by Sparrowhawke.

    It looks like the research has indeed been fully done. I'm guessing that the plugin harnesses the physics functions already there in Carrara and adds a lot more besides.

    In particular, some things I was about to look into have been done - eg I was going to try cloth with dense polygon structures colliding against very low poly objects and vice-versa to try to find the optimum settings. Sparrowhawke has nailed this down I think. Also he has a deep understanding of the collision of moving objects and a better idea of what won't work and why.

    Also I never thought of the simulation being affected by frames per second - interesting.

    He also recommends using primitives - I always converted these to vertex objects because I thought primitives were mathematically-calculated entities and reckoned that the processor could do with fewer calculations. But that's an example of how I've been proceeding - guessing and trying.

    I downloaded the plugin but probably won't install it just yet - I'm interested in continuing with what I started for a while longer. However I don't want to try people's patience much more with this - I'll leave the topic unless I come up with something worth sharing.

    Yeah, I think he's still researching this as well. I have yet to try this thing, But I need to get going with it. I am with you on the whole confusion around 'primitives'. Since I've converted on into a vertex object I've realized that they really aren't low-poly by any measure... but they must be quickly recognizable to the software somehow. 3DLUST also recommends using primitive spheres as the only thing to use for Carrara dynamic hair collisions. So there must be some magic behind them.

    Like ep says, no need to worry about impatience.

  • Hermit CrabHermit Crab Posts: 841
    edited December 1969

    To Dartanbeck & Evilproducer,

    Thanks for your replies. I just made my post and logged off, so I was gone when you replied. Now its well after midnight here so I'll be gone again in minutes.

    I appreciate the many posts from both of you on so many topics and the enthusiasm which keeps others like me interested.

    Regards

  • DartanbeckDartanbeck Posts: 21,528
    edited December 1969

    Well Marcus, I truly appreciate the post and the thread. It's really cool to be reminded of the things that are tops on my list. That list has a huge roof, so trying to get to all of the stuff at the top can be daunting ;)

    Sparrowhawke really is putting heart and soul, and a lot of research into that plugin... I hope to repay him by using it. I already gave him a small donation as a thank you... just something to show him some well deserved appreciation from the crowd! ;)
    Fact is, I have all of his plugins, and I would like to try them all, but this one has some specific hope for a problem that's been nagging me forever - I hope that this solves it. But I have other experiments in mind for it as well!

    Anyways, we all have different times when we can be at our computers, and times when we can read/respond forums. No big deal if you're gone when we reply. No worries...

    We just hope that you come back and share your results - or even lack thereof... so we can continue to dig... and to be reminded! :)

  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    Well said and surprisingly succinct ( ;-P ) my friend!

  • Hermit CrabHermit Crab Posts: 841
    edited December 1969

    Hi all,

    Taking the friendly hint, this will be brief!

    I've posted another video of about five minutes or so.

    The first third shows some renders of draping attempts; the rest is a screenshot slide-show in case anyone wants to take a closer look.

    http://youtu.be/ywzfn9AYCz4

    It should be called 'Flogging a Dead Horse' perhaps.

  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    Back before my income took long walk off a short pier and I thought I would be updating Carrara beyond C7 (and my hardware) I did try and follow the dynamic clothing discussion. I do recall a thread when Sparrowhawke was talking about the challenges of building dynamic cloth, that triangles, rather than quads were preferred in other simulators. Unfortunately I don't recall which ones. I don't recall the entire discussion, but it had to with simplifying the math I think.

    It was just brought to mind watching your video and you mentioned how a certain example was built of quads. It may be worth experimenting with, if you haven't done so already.

  • Hermit CrabHermit Crab Posts: 841
    edited December 1969

    @evilproducer,

    Thanks for watching the video in spite of the rather slow slideshow. Also for the helpful advice re quads and tris. I think it was the density of polygons that was the problem actually: there may even have been a glitch in exporting from Hexagon resulting in an invisible version of the figure going out with the clothing. I didn't figure it out (accidental pun).

    Here are some shots of two meshes I've tried. The one with triangles is more crimped but I don't save every project to be able to check what else is different (smoothing perhaps). Sparrowhawke's findings will be the ones to go for.

    I'm about to upload yet another video on draping. Short with no long pauses and a sort of joke at the end.

    Thanks again.

    QuadMesh.jpg
    841 x 561 - 252K
    QuadDrape.jpg
    841 x 561 - 132K
    TriangleMesh.jpg
    841 x 561 - 272K
    TriangleDrape.jpg
    841 x 561 - 168K
  • DartanbeckDartanbeck Posts: 21,528
    edited December 1969

    Cool. So the first video (above) was using Sparrowhawke's plugin?
    Looks like you're certainly getting there. There is a lot to consider for cloth dynamics toward tweaking optimal results. So it's really neat to see how some of those tests worked out - even if not perfect or as intended. The fact that the resulting movements are so fluid is nice to see.

    Having never tried soft body of any kind in Carrara yet, plugin or no, I am wondering if you can have more than one cloth simulation in the same scene? Like a bottom skirt and a top, for example.

Sign In or Register to comment.