PhysX 3.x Plugin
by Timmy01 · in Torque 3D Professional · 10/28/2013 (5:11 am) · 500 replies
Update:
If you wish to follow this than please check here github.com/ChrisCalef/Torque3D/tree/physx3_advanced_WIP
If you wish to follow this than please check here github.com/ChrisCalef/Torque3D/tree/physx3_advanced_WIP
About the author
#482
Otherwise, you can also go into the code in Px3World and comment out the InitVehicle call.
(I'll make a note to remove the function call when I put up my next commit.)
01/29/2015 (2:40 pm)
Ah, sorry, I included the physx vehicle library and fired off the initVehicle function just to be ready for when I start working with physx vehicles. It's not doing anything yet, but you might want to just add it now, since it's fully on the list for development down the road. I'm on a different box at the moment and can't recall the exact name of the library, but if you look with the other physx libraries you will easily find it.Otherwise, you can also go into the code in Px3World and comment out the InitVehicle call.
(I'll make a note to remove the function call when I put up my next commit.)
#483
01/30/2015 (6:54 am)
Thanks for the heads up Chris! I dropped the function call and it all works perfectly.
#484
01/30/2015 (11:26 am)
Excellent, good to hear it! Let me know if you have any other problems. Might be a few days before I get back to the ragdolls, off on some other work now.
#485
like these
[Cloth]
Solid Cloths With More Realistic Colison
[Particles]
Particle Colison On Terrain.
Particle Bumping
[Sofbody] // New
Can Be Used To Simulate
Trees, Cae Wheels, Bags and Rubber Items
[Ragdolls]// I Think You Started It
Realistic Character Deaths, Fallings, Bouncing On Water
[Explosion]// Update Important
Rocket explosion Effects Rigidshapes
[Destruction]//New
Destructible Objects,"Like PhysXSDK>2.8.1>Bin>Win 32>Lesson1010_Metal.exe"
Please Include These Options On Your Next Update. The Coding Need A Long Time.I am New
To C++ Coding. But I Try Some Lines. Thankyou for Started Codings
02/07/2015 (8:34 am)
Ok Everyone, Old Physics IS Ending Now, Lets We Try Somthing Newlike these
[Cloth]
Solid Cloths With More Realistic Colison
[Particles]
Particle Colison On Terrain.
Particle Bumping
[Sofbody] // New
Can Be Used To Simulate
Trees, Cae Wheels, Bags and Rubber Items
[Ragdolls]// I Think You Started It
Realistic Character Deaths, Fallings, Bouncing On Water
[Explosion]// Update Important
Rocket explosion Effects Rigidshapes
[Destruction]//New
Destructible Objects,"Like PhysXSDK>2.8.1>Bin>Win 32>Lesson1010_Metal.exe"
Please Include These Options On Your Next Update. The Coding Need A Long Time.I am New
To C++ Coding. But I Try Some Lines. Thankyou for Started Codings
#486
02/07/2015 (10:23 am)
Ha, I think my next update will be lucky to have ragdolls working, but thanks for the list of suggestions. ;-) All things take time...
#487
This is a pretty much nonfunctional WIP so don't bother if you're looking for a working ragdoll, but I'm doing some branching and merging on related projects and wanted to commit up my current work before checking out another branch.
If you're following my progress intently, however, it could be worth checking it out. I have added my Michael4 test character to the game directory, and added a physicsShapePart table to the db, so as to describe the dimensions, etc. of the bodyparts and point at a joint in the joints table for each one.
I also added a couple of new console methods for physicsShapes: setHasGravity, which works and which causes the shape to turn gravity off or on in realtime, and setIsDynamic, which is supposed to change whether a shape is kinematic or not, but instead crashes instantly.
There is also a big problem with initial orientation of bodyparts, in that I'm not yet fully dealing with the default pose of the character, if it isn't a perfect T Pose, which in my case is evidenced by the slight curve of the arms and the corresponding errors in hand and arm bodypart placement.
Anyway, overall not much to see here, I'll be back when things are actually running as expected.
02/08/2015 (12:16 pm)
So, just for the eager and curious, I thought I should let it be known that I did release another update to my physx3_advanced_WIP branch and the corresponding project folder (phsyx3_advanced_game).This is a pretty much nonfunctional WIP so don't bother if you're looking for a working ragdoll, but I'm doing some branching and merging on related projects and wanted to commit up my current work before checking out another branch.
If you're following my progress intently, however, it could be worth checking it out. I have added my Michael4 test character to the game directory, and added a physicsShapePart table to the db, so as to describe the dimensions, etc. of the bodyparts and point at a joint in the joints table for each one.
I also added a couple of new console methods for physicsShapes: setHasGravity, which works and which causes the shape to turn gravity off or on in realtime, and setIsDynamic, which is supposed to change whether a shape is kinematic or not, but instead crashes instantly.
There is also a big problem with initial orientation of bodyparts, in that I'm not yet fully dealing with the default pose of the character, if it isn't a perfect T Pose, which in my case is evidenced by the slight curve of the arms and the corresponding errors in hand and arm bodypart placement.
Anyway, overall not much to see here, I'll be back when things are actually running as expected.
#488
02/09/2015 (3:15 am)
*Edit: Removed
#489
"are You A Developer Of Deadly Matter, Timmy"
02/09/2015 (6:13 am)
Is PhysX3 Used In Your Project (Deadly Matter)"are You A Developer Of Deadly Matter, Timmy"
#490
02/09/2015 (7:35 am)
Edit: deleted because of edits.
#492
02/09/2015 (9:02 pm)
Yes it uses Physx 3
#493
02/10/2015 (5:05 am)
Oh i missed that comment above, the hypocrisy around here really amuses me
#494
02/10/2015 (5:10 am)
@timmy hypocrisy?
#495
02/10/2015 (8:25 am)
Don't know about all that, but I did just notice a little confusion in the link to my repo - I'm committing to physx3_advanced_WIP, not physx3_advanced. I suppose I should go ahead and put it back to just advanced at some point, but for now that's where the latest goods are.
#496
02/10/2015 (3:28 pm)
OP updated. Feel free to create another thread if you find that easier, that way you can post details etc. Your call anyway
#497

I now have the bodyparts being simulated on the client (blue boxes) and haven't decided what to do on the server side, whether to do no physics at all, or maybe make it a capsule or player controller. For now it's just a tiny green box at the hip.
Which does bring up another change, I'm now rendering both client and server worlds, blue for client and dark green for server. Eventually I plan on making this a pref or setting somewhere.
03/09/2015 (2:04 pm)
So hey, just thought I'd bump this thread to let people know I've committed another update, bringing us a large step closer toward working ragdolls. Don't get too excited, though... it's still a messy hack, and if you turn on gravity he falls into a puddle and then explodes all over the map. But in zero G he's starting to look reasonably good.
I now have the bodyparts being simulated on the client (blue boxes) and haven't decided what to do on the server side, whether to do no physics at all, or maybe make it a capsule or player controller. For now it's just a tiny green box at the hip.
Which does bring up another change, I'm now rendering both client and server worlds, blue for client and dark green for server. Eventually I plan on making this a pref or setting somewhere.
#498
And, since it could be considered video-worthy now:
03/17/2015 (10:25 pm)
Well, it's gonna have to sit around again for a little while here, but I did get past the exploding all over the map and similar problems. Now I still have joint limit issues, and some much deeper problems such as not being able to create a ragdoll anywhere except the origin... but all the same, thought I'd let people know there is a new release that gets us that much closer.And, since it could be considered video-worthy now:
#499
forums.torque3d.org/viewtopic.php?f=17&t=128
Short story, I have fixed the last of the major transform problems in the way of functional client ragdoll in a single player game, but there is still a ton of tweaking to do and new features to add.

03/21/2015 (10:02 am)
Okay, for anyone following this thread, please move your attention to this thread on torque3d.org:forums.torque3d.org/viewtopic.php?f=17&t=128
Short story, I have fixed the last of the major transform problems in the way of functional client ragdoll in a single player game, but there is still a ton of tweaking to do and new features to add.

#500
forums.torque3d.org/viewtopic.php?f=17&t=128
But current status is: now we're driving bodyparts with animation data, and can start actors anywhere and change dynamic and gravity properties as well as add forces on an individual bodypart level.
The latest addition is being able to shoot them, which was accomplished by exposing the px3World castRay function to script and hooking it up in weaponImage::onFire().
Sorry for grainy quality but I was moving the camera a lot so it didn't compress well:
Oh BTW many thanks to Andy Wright for the gravel texture, although I think I'm still going to need some setup help to use it properly.
04/04/2015 (7:23 pm)
Just a quick update, again most of my status updates are going to the torque3d.org site at:forums.torque3d.org/viewtopic.php?f=17&t=128
But current status is: now we're driving bodyparts with animation data, and can start actors anywhere and change dynamic and gravity properties as well as add forces on an individual bodypart level.
The latest addition is being able to shoot them, which was accomplished by exposing the px3World castRay function to script and hooking it up in weaponImage::onFire().
Sorry for grainy quality but I was moving the camera a lot so it didn't compress well:
Oh BTW many thanks to Andy Wright for the gravel texture, although I think I'm still going to need some setup help to use it properly.
Is This Game Uses PhysX3
Torque Owner Richard Hebblewhite
RareBit Interactive
I'm getting an annoying Linker error when compiling (Chris Calef's Physx3_advanced build).
Error 2 error LNK2019: unresolved external symbol _PxInitVehicleSDK referenced in function "public: static bool __cdecl Px3World::restartSDK(bool,class Px3World *,class Px3World *)" (?restartSDK@Px3World@@SA_N_NPAV1@1@Z) C:\Torque\Torque3D-3-6-2\Torque3D-physx3_advanced\Torque3D-physx3_advanced\My Projects\PhysXTemplate1\buildFiles\VisualStudio 2010\projects\px3World.obj PhysXTemplate1 DLL
Am I missing something silly ?