help with PhysX Dynamic Objects?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  02 February 2013
help with PhysX Dynamic Objects?

Dear all,

I am a relative noob to physics simulations in Max, having only played with Rayfire some. So this project was my homework to myself, to learn more complicated relationship between objects. Unfortunately, I haven't been able to get anything that feels remotely like a solution, so I'd love some assistance clearing the first hurdles.

The scene is a truck with a demolition ball. Now, I realize I can do a fairly reasonable animation with keyframes, and make the ball appear to be swinging on the end of a cable, but I really want to learn how to simulate it, using PhysX.

The truck has a rotating platform, with an arm, from which swings the cable, from which swings the wrecking ball. I animated the truck's rotating platform and arm, for a wind-up swing and then, the follow-through. The arm I made a rigid body (kinematic), and then used a ball and socket constraint to connect to the cable (a slender cylinder). I used another ball and socket constraint to connect the cable to the wrecking ball. The wrecking ball is child to the cable, and the cable is child to the rotating arm.

If I leave the cable and wrecking ball as kinematic objects, then the simulation looks just like the animation: the rotating platform swivels, and the wrecking ball swivels with it, too rigid, without any delay or sway. But if I set them up as dynamic objects, then the simulation goes haywire, seemingly breaking both constraints and sending the wrecking ball flying off God only knows where.

I've also experienced this sometimes in Rayfire: dynamic objects sometimes immediately fly off, as soon as the simulation starts. It seems to happen especially when dynamic objects are next to each other. But I don't know why that is, or how to get around it. I've been scouring the 3DS Max reference, and tweaking all the parameters, hoping for a break-through, but so far, no good.

I tried uploading the scene here, but unfortunately, the model makes the zip file too large. If anyone wants to take a look at the scene, maybe I can e-mail it to you directly. Thank you, in advance, for any help you can provide!
  02 February 2013
Do you have max2013? In the subscription extension the PFlow toolbox#2 was included.

That's you best bet for physx dynamics in max. massfx is useless in a real production.

As for rayfire "physxposion" raise your substeps and make sure nothing is intersecting or concave. use the fragemnter modifier to prebreak your stuff maybe.
  02 February 2013
Thank you very much for your reply, Anselm. I'm still on Max2012, but maybe it's time for an upgrade. By "Pflow toolbox 2", I assume you mean the same as the Orbaz box 2?

In exploring different physics simulations, so far I've been bouncing back and forth between pflow and Rayfire, and am interested to see that they actually can cover a lot of overlapping territory. Specifically, it seemed like (vanilla) PFlow was good for simulating lots of moving objects at once, which Rayfire choked on, but Rayfire seemed well suited for handling a bunch of sleeping objects that only briefly got disturbed (and fragmenting, of course). I was hoping that by dealing directly with PhysX (when I installed PhysX' engine, it automatically disabled MassFX, but they seem to be the exact same interface), I could get "under the hood", and find more elegant solutions.

Thanks again for the lead, Anselm. I'll take a closer look at 2013 Max subscription.
  02 February 2013
In my experience constrained objects are a nightmare to get working with PhysX/ MassFX.

I've found after a LOT of trial and error and no help from the docs that you really need to keep the pivots of both parent and child objects the same orientation. (Reset Xform on everything first is best, but you might want the local rotation on the arm) And the constraint itself MUST be aligned to the pivot of the child then can moved but NOT rotated. If you move it away from the pivot it's more likley to go berzerk. This is most often a problem for hinges which will happily rotate in the object space of the parent object, not the apparent axis of the gizmo.

Here's a load of things to check.

Check your objects are sensible sizes in real world scale. cms seem better than m.

Make sure the objects are above the ground plane or turn it off in the toolbox (it defaults to on). Make sure there aren't any hidden static objects hanging around. They will still be in the sim.

And make sure that the constraint has the setting set to ignore collisions between parent and child or they're bound to intersect. (It defaults to off so it SHOULD be OK).

And make sure that the collision is set to Generate From Vertices NOT the default of Surface as that makes the volume bigger than the actual geometry (by 0.1 in world units, so much worse if you use m) and much more likely to intersect. Also crash. A LOT. Vertices is MUC more stable but for some reason no longer the default.

Oh, and make sure to whack the substeps up a LOT from the default of 3 in the toolbox. I tend to start about 30 and go from there.

Good luck. I tend to find it works ok if I start with a bare bones box scene, get it working there and try and transfer it to a real world scene. Only do one constriaint or change at a time and check it carries on working after every change. There's a lot of things that can screw it up.
  02 February 2013
Thank you so much, robinb, for such a thorough answer. I appreciate that you have had to suffer some, in order to gain this information, so I appreciate you saving me some of that.

I was hoping to reply that I had, since seeing your post, figured it all out, but I'm trying to do all my Max learning during little breaks at work, so I may have to wait until the weekend, when I can spend a bit more time and concentration, to work out this scene. But the ground work that you've laid out for me gets me a long way past where I was previously, so I'm less daunted by the task.

Thanks again!
  02 February 2013
Glad to help. I could have done with some of that info when I was working with constraints a while back. The docs are very sparse and there doesn't seem to be a specific forum for MassFX on The Area.

Hope it does help. Let me know if it doesn't. I might still not be understanding why some of my stuff failed.
  02 February 2013
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 03:13 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.