Animated Dynamic Clothing Technique (proof of concept)

145791017

Comments

  • DiomedeDiomede Posts: 15,194
    edited January 2015

    In addition to the "select by" polygon group for an obj that is in Carrara aready, it is useful to know that you can have Carrara create a mesh per group for an imported object. In other words, if you export an object with named polygon bodyparts, you can import it and have Carrara create a mesh per named polygon group, not just per material zone. This is more for people who stumble on the thread than for the exchange already happening here.

    create_obj_per_group_2.jpg
    898 x 925 - 172K
    Post edited by Diomede on
  • DiomedeDiomede Posts: 15,194
    edited December 1969

    I think it is a good idea to share failures as well as successes. This was definitely a failure.

    OK, I decided to use some lower polygon figures and props just to speed things up. I wanted bends in the shoulders, elbows, and torso. So, I took the Poser 3 male, exported it, and reimported it so that each polygon group (bodypart) would be imported as a separate mesh. I modeled a loose shirt. I then soft body attached each imported bodypart mesh to the corresponding bodypart on the Poser3 male tree. This gave me 100% underarmor coverage in the zero pose. I unchecked collisions for the Poser 3 male figure so that the low poly shirt would not interact with it. I moved up the timeline and put the Poser 3 male in a generic standing pose from the library.

    When I did the physics simulation, the underarmor shattered.

    My guess is that 100% coverage is too much coverage. The soft body attached parts collided with each other at the joints and had problems. That is just a guess. At least Carrara didn't freeze.

    m3_failure_2.JPG
    1662 x 850 - 164K
    m3_failure_1.JPG
    1627 x 898 - 143K
  • JonstarkJonstark Posts: 2,738
    edited December 1969

    Discovered this same phenomenon earlier today, only I had an even simpler scene, one cylinder with 2 bones, and 2 soft body objects attached to either bone, I wanted to see if how things would work for an 'elbow' type joint as I foresee that as being the trickiest to pull off.

    I found that if the 2 softbodies dropped on the bone hit each other at any point (whether they were intersecting at the default start or just part of the animation brings them into contact) then this kind of 'splosion' of tearing of polys results. It can be lessened a bit by having the softbodies way less stiff and bend, but even a 0% at both settings will not prevent tearing where they intersect. I think this approach will need small softbodies attached at key locations on the bones, so that there's no way they should ever come into contact with each other in the normal course of animation. This will make things tricky for elbows and knees if this is so, but I still think it's workable.

    Assuming I'm right and that's the only thing contributing to the problem... but you can imagine what it would look like if your softbody cloth was riding on one of those soft body attached objects that suddenly began to shred... not pretty I'm guessing :)

    Just my theory on what's happening though, and I haven't had much chance to do more testing and see if I'm wrong or not.

  • JonstarkJonstark Posts: 2,738
    edited December 1969

    By the way, the expression you've got on your character is pretty hilarious, and apropos to the situation he's experiencing. :) I imagine I'd have the same look on my face if my clothes suddenly started jaggedly exploding...

  • DartanbeckDartanbeck Posts: 21,627
    edited December 1969

    Hmnpf! Good call, Jon. He does seem to have the perfect expression, doesn't he?!

  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited December 1969

    Diomede, if I was you I'd take it in steps. And like I said, be very careful of "low poly meshes to speed things up". What's important is GOOD quality meshes, not low poly meshes.

    I'd try your shirt and make sure it collides okay with the base figure first. Then start worrying about the armor, and make sure it collides okay with the armour. Then do SB/SB attach....small steps

    And I'm sure you have your collision settings okay, right? You didn't leave a collision distance set at 100% did you ? :) :)

    And like I said in my little tutorial, crank up your accuracy just to make sure

  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited December 1969

    Okay I finally got off my butt and tried the steps I suggested earlier and did a simple cloth draping test on a V4 suit of armor. And it seems to work fine, but in this case I limited it to armor on just the hip, abdomen, and chest. The rest (as you can see in gray) is there except for the head, feet, and hands but set not to collide.

    Basically I just added a cloth object and directional force, and doing all the steps I mentioned, plus not forgetting to crank the collision distance up to 50% or so (very important), plus the things I mentioned in my tutorial regarding general settings.

    Now I need to add some motion I suppose, and make more of the suit of armor. It will be interesting to see how many cloth and SB attach objects Bullet can handle simultaneously... :)

    http://youtu.be/CLXDh0fNvoA

  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited December 1969

    Okay, I see what you guys are talking about. After adding the two collar bones and two thigh bones, I get the mesh explosions you're talking about. I even cranked the Accuracy up to 200% and it seems to get worse.

    Well, I guess this will require more effort....

    DARN IT DAZ, JUST PUT IT BACK THE WAY IT WAS SO WE DON'T HAVE TO RUN AROUND IN CIRCLES LIKE THIS !!!! >:(

  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited January 2015

    Hold on, I got a good result by cranking the collision distance down from 50% to 20%, using hip, abdomen, chest, two collarbones and two thighs, mashed potatoes, corn, and a biscuit....a little poke thru, but nothing too bad...

    Post edited by JoeMamma2000 on
  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited December 1969

    SUCCESS !!!!!! :) :)

    Kaboom.jpg
    1200 x 1316 - 78K
  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited December 1969

    My good result lasted for approximately 0.5 seconds of simulation time, and then KABOOM !!!!!

    Anyway, I think we'll close the books on this one, and just call it good for limited usage with a small suit of armor that covers maybe a few bones. Unless someone else wants to keep at it....

    I'm counting on jonstark to visit DAZ this week with pizza. I think that's our best bet... :) :) :)

    Scrumtrulescent, jonstark.... :)

  • DiomedeDiomede Posts: 15,194
    edited December 1969

    My good result lasted for approximately 0.5 seconds of simulation time, and then KABOOM !!!!!

    Anyway, I think we'll close the books on this one, and just call it good for limited usage with a small suit of armor that covers maybe a few bones. Unless someone else wants to keep at it....

    I'm counting on jonstark to visit DAZ this week with pizza. I think that's our best bet... :) :) :)

    Scrumtrulescent, jonstark.... :)

    Pages 4, 5, and 6 of this thread show examples of dresses across multiple moving limbs. I have one with Aiko3 wearing an ankle length dress over body armor bigger gaps between the pieces that does not explode. I did get a little poke through at the calf. Similarly, stringtheory had one where he bends and rotates the thigh which has multiple narrow armor bands. Again, no explosion but some poke through because of the gaps. Draping on a still figure or a single moving limb is no problem. The issue is the joints for complex movement. i am focused on behavior at the joints when limbs move in opposite directions.

    I don't consider the poser 3 male example a serious setback. I posted it as just one attempt to have the armor extend to the joint, which several people had raised by suggesting using the entire figure mesh with no gaps. Both my Aiko3 ankle length dress example and Stringtheory's thigh example had had gaps in the under armor.

    Persevere, folks. The explosions are from just one set of attempts.

  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited December 1969

    BTW, I realize that some here firmly believe that Carrara is handed down from above, but geez...I just checked the Poser wiki, and they introduced dynamic cloth and hair in 2003 !!! That's 12 years ago !!! And here we are 12 years later and we don't even have the most basic features of every 3D software out there.

    There's a reason why some people balk at constant pronouncements of how incredible Carrara is. In an objective analysis, it just ain't so.

  • DiomedeDiomede Posts: 15,194
    edited December 1969

    Jonstark said:
    By the way, the expression you've got on your character is pretty hilarious, and apropos to the situation he's experiencing. :) I imagine I'd have the same look on my face if my clothes suddenly started jaggedly exploding...

    Yeah, I had dabbled in 3D many years ago, primarily with Poser. The informal names of the female and male figures was Posette and Dork. He does look rather Dorky.

  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited December 1969

    diomede64 said:
    Persevere, folks. The explosions are from just one set of attempts.

    That's fine, and I really appreciate you guys working on it. But at some point, for me at least, the number of hoops you have to jump thru for a simple effect becomes greater than the benefit you get from doing it... :) :)

    And for me, that point has been reached. :) :) :)

  • RoygeeRoygee Posts: 2,247
    edited December 1969

    I've been lurking around this thread all the way with great interest because one of my personal requirements to ever upgrade is working dynamic clothing - but not having to jump through so many hoops to achieve it :)

    Has anyone recently tried SparrowHawke's dynamic cloth plugin? It showed great promise a few years back and was ahead of the native cloth sims.

  • DUDUDUDU Posts: 1,945
    edited December 1969

    I like a lot the plugins Sparrowhawkes but this one, I tested it and I found that he asked too many resources to the computer for results equivalent the native of Carrara.
    I'll try it again...

  • DUDUDUDU Posts: 1,945
    edited December 1969

    I have just made a very simple dress with a cone which I applied to V4 proxy.
    Carrara simulation = explosion / disappearance
    Sparrowhawkes: very stable, but pokes through (very fast test).
    I think that it is worth that one is interested in it !

  • stringtheory9stringtheory9 Posts: 411
    edited January 2015

    I didn't have a chance to finish the tutorial on this yet but I want to post a few pointers for those working on this.

    Here is a full body clothing animation: http://youtu.be/DBSv8ROGDlc
    Same dress with polygons subdivided: http://youtu.be/zbiIiFVmhFA
    Faster more dramatic movement: http://youtu.be/fq3aafg1qjA

    The dress used in this animation is here http://www.sharecg.com/v/67629/browse/11/Poser/Dress-for-Loretta-Lorez


    Do things in steps. Once you have your undercloth in place and soft body attached, run the sim and make sure it behaves. It is very important to confirm that there are no attached verticies crossing over from one bone section to another. To make it easier to examine your attached verticies just hide your character before inspecting your undercloth. If you are still running into problems run the sim with your model hidden so you can see problematic areas.

    I have found that leaving the Self Collision unchecked on the undercloth works best as it minimizes problems when bending joint parts of the attached undercloth touch. Also I prefer to check the margin checkbox in the modifier so that the undercloth and the outer cloth can have different collision values. I have found that a margin of around 30% works best on the undercloth and 70% for the outer.

    Once you can run the sim on the undercloth without issues then move on to the outer cloth. I have found that self collision doesn't need to be check here either.

    The stiffness and bending will be a factor in the stability of the simulation but since these depend very much on the density of the cloth meshes it will be something that has to be refined on a case by case basis. You may find that you need to attach certain parts of the outer clothing to the bone sections they cover to help prevent poke through (I did this on the shoulder in the video) and to keep the clothing from slipping or moving out of place.

    UPDATE: I thought it might be helpful to post the undercloth by itself. This is the 4k LOD version of the V4 geometry that I've sliced up at the bone section joints. For demonstration purposes I haven't gone to any great lengths to get the mesh to overlay the V4 character perfectly because it really doesn't matter. At a margin of 30% there isn't that much interaction between the two and with a margin of around 70% on the outer cloth, the outer cloth mesh is kept far enough away from the under cloth and the V4 character that poke through isn't a major problem most of the time. If there is some poke through I think it's ok to cheat and hide the characters bone section (if non of it is exposed of course) or use the alpha brush to make that area of the character transparent. You don't have to worry about any of the undercloth poke through though because you can hide that even while you are running the simulation and it won't make a difference to the outcome.
    Undercloth used in the video examples above: http://youtu.be/FfKfiP5YTto

    Post edited by stringtheory9 on
  • DiomedeDiomede Posts: 15,194
    edited December 1969

    I have found that leaving the Self Collision unchecked on the undercloth works best as it minimizes problems when bending joint parts of the attached undercloth touch.

    Ah, forgot that last time. Very important. Will repeat some trials with new settings. I had gotten very similar results as your video when I had used the Aiko 3 example around page 5 or so. Will go back to a configuration similar to that.

  • stringtheory9stringtheory9 Posts: 411
    edited December 1969

    diomede64 said:
    I have found that leaving the Self Collision unchecked on the undercloth works best as it minimizes problems when bending joint parts of the attached undercloth touch.

    Ah, forgot that last time. Very important. Will repeat some trials with new settings. I had gotten very similar results as your video when I had used the Aiko 3 example around page 5 or so. Will go back to a configuration similar to that.

    diomede64, You've done some great work! And I don't think you give yourself nearly enough credit (Future of Carrara).

  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    diomede64 said:
    I have found that leaving the Self Collision unchecked on the undercloth works best as it minimizes problems when bending joint parts of the attached undercloth touch.

    Ah, forgot that last time. Very important. Will repeat some trials with new settings. I had gotten very similar results as your video when I had used the Aiko 3 example around page 5 or so. Will go back to a configuration similar to that.

    diomede64, You've done some great work! And I don't think you give yourself nearly enough credit (Future of Carrara).

    Hear! Hear!

    I agree! Diomede is one to watch in this community! He's getting right up there with Dart, Phil and Andy (3dage). I was thinking of posting something similar in the Future of Carrara thread, but I un-subscribed as I feel what is useful has been said. It is now turning into egos and nit-picked analogies.

  • DiomedeDiomede Posts: 15,194
    edited February 2015

    These are 5 shots from an animation in which I had Aiko3 in a long dress (single softbody object, not a top and a skirt) and changed the pose to make sure the legs stepped in one direction, then came back the other, and also bent at the waist. I did have a little poke through (very minor), which I addressed by creating a new shading domain for Aiko3 and making that invisible.

    For the underarmor, I used a single vertex object, but divided up for panels for core bodyparts. The underarmor pieces do not touch in the default position, but may during movement, but that vertex object does not have self collision.

    ** setting the margin in soft body is VERY important

    Used the basic settings suggested by Stringtheory

    Soft Body
    Stiffness 80%
    Bending 5%
    Self collision: on
    Margin: Checked and set to 30%
    Quality: 10%

    Scene Physics
    Simulation Accuracy: 300% is the minimum I set this at.
    Geometric Fidelity: 100%

    EDIT: also make sure to turn off collisions for the Aiko3 figure and for the hair prop.

    EDIT2: Congratulations Patriots (thus her dress)

    EDIT 3: note - for lower body, the reason I think this is significant, joints had bodyparts moving in opposite directions, and it calculated quickly, and poke through was minor and easily dealt with.

    soft_test_5.jpg
    640 x 480 - 15K
    soft_test_4.jpg
    640 x 480 - 15K
    soft_test_3.jpg
    640 x 480 - 15K
    soft_test_2.jpg
    640 x 480 - 15K
    soft_test_1.jpg
    640 x 480 - 16K
    Post edited by Diomede on
  • JonstarkJonstark Posts: 2,738
    edited December 1969

    Diomede, this is fantastic work! Really excellent stuff here, and posting the settings will help light the way.

    All the softbody-armor is one single vertex object? How did you get it to follow the motion of the various bones? I thought surely we'd have to have multiple vertex object softbodies riding on each bone for movement.

    Very exciting to see the results you've achieved here :)

  • JonstarkJonstark Posts: 2,738
    edited December 1969

    I was just pondering how you could have a single vertex object, even if split into various pieces in the modeling room, that would follow the bone movement, when the possibility occurred to me... maybe the object isn't so much dropped on any specific bone at all, but rather it's soft-body attached at various points to the mesh of the character? Only way I could think of, if so this is a brilliant move as it seems like with it unchecked to collide against itself you'll solve multiple problems...

  • DiomedeDiomede Posts: 15,194
    edited December 1969

    Here is a shot of the underarmor panels. This was still just a proof of concept, not an attempt to get the best dress. My goal was to have a long single dress prop that soft body would work quickly and reasonably well when limbs moved first in one direction then back in the other with joints moving in opposite directions. The calculation was handled by Carrara very quickly. Just a few minutes.

    It was time consuming because it took a long time to create the panels, name the vertex groups and do the softbody attaches. However, I think that someone could refine the body panels for a figure, and set up the multiple softbody attaches, then save the result for future use. You can see how many softbody attaches I had to create for this sleeveless dress. As I attempt to refine this, there will also need to be sleeves for the arms.

    Not there yet, but from my perspective, this is another step forward.

    underarmor_panels_2.JPG
    881 x 882 - 126K
    underarmor_panels_1.JPG
    476 x 537 - 38K
  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited December 1969

    Could you try one thing for me?

    Could you cut down the stiffness of the dress, maybe lower the stretch and bend, and the quality, and throw a directional force, maybe 2 ft/sec pointing at the dress and see how it fares?

    Right now it's awfully stiff, and not much different from some conforming clothing... :)

  • stringtheory9stringtheory9 Posts: 411
    edited February 2015

    Could you try one thing for me?

    Could you cut down the stiffness of the dress, maybe lower the stretch and bend, and the quality, and throw a directional force, maybe 2 ft/sec pointing at the dress and see how it fares?

    Right now it's awfully stiff, and not much different from some conforming clothing... :)

    JoeMamma, from the 4th post on this page: http://youtu.be/zbiIiFVmhFA

    Post edited by stringtheory9 on
  • DiomedeDiomede Posts: 15,194
    edited February 2015

    The recent Aiko3 pics are intended to test what happens when the limbs widen to the circumference of the dress, and at the same time joints are bending. It should look stretched for that pose and that is the test. Even so, if you look at the transition from the first pic to the second (default status of dress to draping, but before the limbs are wide enough to stretch the dress), you will see the skirt area of the dress has pleated (not stiff at all). To my mind, a good example of the worth of this test was shown in the post your renders thread where I had Aiko3 sit. The dress draped over the hips and knees very well I thought, something that long conforming dresses require many morphs for.

    Plenty of more experiments need to be run to establish best practices, including settings to simulate different materials and different circumferences of clothes. I encourage everyone to dive in. Group think will get us there more quickly.

    At the moment, I am just reporting being successful in using this technique to quickly get results that would otherwise require many bend morphs, and for which the (hip actor) for many long dresses does not fare well if used as a conforming figure.

    Just one more step forward for me. Haven't reached the goal. As I continue experimenting, I am sure that I will be able to also report on simulating different fabrics, but that is not my focus right now. I do encourage people to report on their result with fabrics. Then I could use my method to compare a leather skirt and a cotton skirt, for example. Do the stretching results that I reported here hold up for both kinds of fabrics? Don't know yet.

    More to do.

    Post edited by Diomede on
  • DiomedeDiomede Posts: 15,194
    edited December 1969

    Ah, Stringtheory. Your post came in while I was typing. Yes, that video shows the movement of a full dress. You are a pioneer. I think your earlier videos with skirts with more pleats demonstrate general movement of cloth with no stiffness, if people want to see the ability to simulate that kind of cloth in that kind of shape.

    I don't have a youtube account because I still have never done an animation for the sake of doing an animation. I will see about setting up an account so I can post the actual tests that I am running instead of just stills at different points. I think it is my reporting that makes my results appear more stiff than they actually are.

    I encourage lurkers (don't mean that negatively) who are still experimenting to post results, even if a particular test seems like a failure. That is part of the learning curve, and we all benefit from seeing more approaches.

Sign In or Register to comment.