Page 1 of 4 123 ... LastLast
Results 1 to 15 of 50

Thread: Bullet Dynamic soft body

  1. #1
    Registered User
    Join Date
    Sep 2013
    Location
    Texas
    Posts
    46

    Bullet Dynamic soft body

    Although I'm not totally new to the 3d world, I'm bran-spanking new to lightwave. I'm attempting to use bullet dynamics' soft body deformer on a "cloth" skirt (shirt, too but that is a lesser problem) on a figure imported through FBX from DAZ. Things seem fine until I try to use a bone to move a limb. It seems as if the collision points on the figure don't follow the figure when deformed using bones. I'm obviously doing something wrong and/or missing some crucial step. I would appreciate any help anyone could offer. I can't help but think it has something to do with the bones imported with FBX.

    Click image for larger version. 

Name:	lightwave bullet softbody.png 
Views:	2111 
Size:	516.9 KB 
ID:	117668

  2. #2
    If you're using the model as the collision object then it must be deforming body as well.

  3. #3
    Eat your peas. Greenlaw's Avatar
    Join Date
    Jul 2003
    Location
    Los Angeles
    Posts
    7,290
    The easiest and most reliable way to do this is the parent collision objects for each limb to the bones and use Kinematic mode. Each limb can be as simple as a squashed sphere or a pill object. If you need the body collision with cloth to be more accurate, you might optionally consider cutting up your character and parenting the limbs to the bones. IMO, using primitives for collision limbs is perfectly acceptable most of the time--many production studios do it this way to speed up the dynamics calculations.

    Alternatively, you might get more accurate collision results if you use a baked MDD with the original mesh as your collision object, and use the Rigid setting in Bullet. TBH, I'm not 100% sure this actually works--it's been a while since I tried something like this--but if it does work, my guess is that it's going to be too slow to calculate if your mesh is very dense. FYI, MDD objects do work with Bullet but it might not be the most practical solution in this case.

    That said, normally, I like to go with the first suggestion and be done with it. That approach is more interactively tweakable and often produces good results. I only use another method when I run into a major problem with the first method, and there is time/budget available to set this up.

    G.

  4. #4
    Eat your peas. Greenlaw's Avatar
    Join Date
    Jul 2003
    Location
    Los Angeles
    Posts
    7,290
    Here's an example of the first method. Scrub to 0:54.

    Sister Motion Test

    Here I'm using four 'pill' objects for the arms and shoulders. The pills are set to Kinematic mode to move around the hair guides, and the guides are set to Deformable mode. You can see the effect of the collision when the character raises her arms. Oh yeah, here's another tip: use only as many collision objects as needed to speed up the calculations. In this case, I could have left out the lower limbs from Bullet since they're not actually colliding with anything.

    G.

  5. #5
    Registered User
    Join Date
    Sep 2013
    Location
    Texas
    Posts
    46
    I figured trying the deforming body was a quick thing to try, however after watching the figure turn to a gelatinous state I realized I had to change the shape retention to 100%... then she fell over after rubbing all the skin on her feet of on the ground plane. I could still be doing something wrong. Spline or null control for the hip (root) bone?

    Next attempt is the "pill" collision objects. This one makes the most sense to me, but I don't understand why it would make a difference making another object for collisions. I thought setting up the mesh as a whole as a kinematic object makes it all a giant collision object. It works as long as I don't deform the body.

    Although I'm figuring it out, it turns out I fail more at metric than modeling. I'll have to continue this tomorrow.

    Thanks for your help so far.

  6. #6
    Registered User
    Join Date
    Sep 2013
    Location
    Texas
    Posts
    46
    OK, so I couldn't help myself. I created more of a zeppelin rather than pills just out of laziness and speed placed and parented to her thigh (I'm coining the phrase "zeppelin thighs") and it appears better but tremendous poke-through. A quick attempt at collision margin up to 25mm didn't seem to help. Perhaps I'll "drug up" her thighs tomorrow to see if a higher polly count and better fit will help.

    Any other things I should try?

    Click image for larger version. 

Name:	Zeppelin Legs.png 
Views:	583 
Size:	449.0 KB 
ID:	117677

  7. #7
    Eat your peas. Greenlaw's Avatar
    Join Date
    Jul 2003
    Location
    Los Angeles
    Posts
    7,290
    Check your mass distribution for the cloth object. If the fabric has no thickness, you may need to set this property to Surface or Vertices for it to work properly.

    For the skirt, are you using a weight map in Mesh Filter around the waist? This should help control the motion. You also want to use Shape Retention to get the skirt to go back into it's shape when it's not moving around. For example, in the video above, I use Shape Retention to get Sister's hair to go back to it's combed state after it's been vigorously shaken. You'll want to use that on clothing, especially cloth that moves around a lot like a skirt or dress.

    Regarding Kinematic mode, its main use is for animating collision objects parented to bones. This feature isn't meant to pass mesh deformation to other objects--for that, you should use MDD. But if you have bones animation, parenting proxy objects is generally a better way to go with LightWave Bullet dynamics.

    Hope this helps. Good luck!

    G.

  8. #8
    Eat your peas. Greenlaw's Avatar
    Join Date
    Jul 2003
    Location
    Los Angeles
    Posts
    7,290
    Also, make sure the character mesh is not part of the Bullet calculation--you don't need it if you're using proxies for collision. In fact, the character mesh doesn't need to be in the scene at all unless it's to check for penetration. Leaving the mesh out of the scene during calculation may speed things up. To remove the mesh, use Replace with Null rather than deleting it. Then, when you're done and you have baked your cloth sim to MDD, you can use Replace Object to replace to the null with with original object--this way is cleaner and there's less chance of breaking things. (Naturally, this assumes that the character mesh and clothing are separate objects.)

    G.

  9. #9
    Eat your peas. Greenlaw's Avatar
    Join Date
    Jul 2003
    Location
    Los Angeles
    Posts
    7,290
    Getting back to the Sister demo, I forgot to mention that there is also a 'head' collision object. This is a simplified head-only object parented to the head bone. The neck of the object is sealed so I can use Solid mode with it--unnecessary details, like eyes and ears, have been left out of the collision object to improve the speed and stability of the simulation.

    G.

  10. #10
    Eat your peas. Greenlaw's Avatar
    Join Date
    Jul 2003
    Location
    Los Angeles
    Posts
    7,290
    One more thing to check: if the skirt is really low-poly, try sub-dividing it to give it more density for the collision to work with. I'm not 100% certain but I think Bullet ignores an object's sub-patched shape and uses its original polygon shape when it calculates--this might make the simulation appear to be less accurate.

    I'm might be wrong about that but it's worth a try anyway. Let me know how it goes--curious to hear what happens.

    G.

  11. #11
    Quote Originally Posted by jimbotini View Post
    ... it turns out I fail more at metric than modeling...
    The metric system is quite easy, much more logical, but you don't have to use it in LW. You can change the units to "english" in the options pannel (shortcut "o"). Or just input any value as inches or feet and LW will automatically convert it to metric, just add ' or " at the end of the number.

  12. #12
    Man I was too lazy to read the whole thread. I think my eyes glossed over at the point where Greenlaw said the easiest way.... and parent a collision object to each limb....

    OK I do know that technique and I am not being critical of the great help. Just trying to add some humor.

    But for something like character cloth it is not sounding like Bullet cloth is that great of a tool for the job. I thought you could deform the bullet cloth with a boned mesh. Is this not the case? Is it really that convoluted to set up?

    It kinda sounds like in a case like this the classic cloth solution is far more appropriate. You will get very predictable results, have a set up that makes sense and it is tired and true. The only missing ingredient would be self collision which does not look like you'd need in this case. You would however have to simulate the skirt first and then the blouse after it.

    I used this technique in the cloth sim that is in my reel. (brown dress green blouse)

    If you do want to go that route, I have a set up that will get you there in minutes and save hours of frustration. It is all documented on this site.

    Here is one thread that seems to have all of the steps laid out for your reference should you need it:

    http://forums.newtek.com/showthread....n-LW-still-bad

  13. #13
    Registered User
    Join Date
    Sep 2013
    Location
    Texas
    Posts
    46
    I will look over that thread with more detail and give it a try. I started with the clothFX first because that is where all the tutorials I found pointed me. When I had problems with several collision objects (legs and chair when the figure sits down) I tried bullet.

    The collision object attached to the bone makes sense to me and I'm working on an object to parent to the bones in question, but now I'm talking about collision objects for pretty much the whole figure if I do some full body outfit. I would have to agree with you, Surrealist, that I thought bullet was supposed to allow bone deformed meshes as opposed to only bone moved meshes. I wonder if just slicing off a thigh and scaling it slightly would make the collision object creation go faster. That of course brings up an interesting question, that I believe I asked before, why do creating collision objects attached to bones that deform another mesh make a difference?

    With the ClothFX approach, I can make the waist on the skirt "fixed" and the figure a collision object and the test I did before would work fine. Switched to bullet, I make collision objects attached to bones, what do I do to hold the skirt up if I don't use the figure as a kinematic body? Another collision object? The collision object worked better or I would be continuing on this path, but it does seem a pain. Lightwave has such marvelous features and they keep boasting "easy to use" and "save time" so I can't help but think I'm just doing something wrong or the FBX import from DAZ3d was bad. QQ

    Perhaps I just need to invest in some training on lightwave. Any suggestions? I've seen the rigging videos on this site and a few on some other sites.

  14. #14
    Eat your peas. Greenlaw's Avatar
    Join Date
    Jul 2003
    Location
    Los Angeles
    Posts
    7,290
    Quote Originally Posted by jimbotini View Post
    why do creating collision objects attached to bones that deform another mesh make a difference?
    There's a heck of a lot less calculation involved with simply translating rigid collision objects in space (parented to the bones) compare to deforming a dense mesh with a rigged skeleton, and it's even more so if IK is involved with that skeleton. Alternatively, you could MDD your character which would leave out the extra calculation involved with bones deformation. MDD, as mentioned above, does read correctly in Bullet and gives you the same deformation, but it's a lot faster since the 'motion' is baked in. This will still be much slower than proxies parented to bones though.

    FWIW, I did the same when I used to use ClothFX--normally, I can't afford the time for calculating full meshes for dynamics during production. The difference in time can literally be a few minutes vs. many hours for a solution.

    Hope that answers your question.

    G.

  15. #15
    I can not really comment on Bullet because it is another animal that I have not really gotten into. I just have seen a lot of threads end with no solutions that I could see for good character stuff. But classic cloth went that way for a lot of years too. There has been a lot of requests for new dynamics and Bullet was the answer.

    Have you seen this?:

    https://www.lightwave3d.com/learn/ar...a-lamborghini/

    Nothing to do with character stuff but it does go into a way to fix the cloth to something moving.

    It could be someone just needs to come along and crack this. Greenlaw has been very good a documenting stuff so maybe the answer is in there someplace.

    I am not 100 percent sure that even the Bullet soft body even the initial library is the best solution for character cloth. Seems that the cloth dynamics solution has more character related settings.

    What will happen in any cloth solution (syflex, ncCoth etc) when you try and make the character sit, is that the radius around the collision objects will intersect and the cloth, caught in the middle, will go nuts. This can happen under the arms too and nCloth at least has a push out value and self trapped check which intends to solve this and does pretty good for clothing draped on an animated body. I have not tried it for a sitting character though.

    So I think if you issue is sitting you will have to try and work around it somehow no matter which way you go. But that is out of my experience so far so I can not give any tips other than the logic of how the cloth sim is working that I gave you.

    EDIT:

    The mdd solution does sound like a viable alternative.

Page 1 of 4 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •