PhysX 3.3.x guide

Expanding and utilizing the engine via C++.
  • 1
  • 2
12 posts Page 1 of 2
Timmy
Posts: 366
Joined: Thu Feb 05, 2015 3:20 am
by Timmy » Tue Dec 22, 2015 3:26 am
Well it has been a very long time since I touched the standard PhysX 3 in T3D so thought i better write a guide how to use it now as a few things have changed from the PhysX side.

NVidia no longer supply up to date binaries of PhysX 3 but they will give access to the complete source code instead on github(don't mistake this as PhysX is now Open Source because it's not). I won't run through how to clone a repository as there are so many great guides on the net but firstly you will want to go here and follow the instructions about how to access the source code https://developer.nvidia.com/physx-source-github . Once you have an account the source code is here https://github.com/NVIDIAGameWorks/PhysX-3.3

Once you have cloned the repository you should have a directory structure like so

Image

If you go into PathToPhysxSource\PhysXSDK\Source\compiler you should find you IDE choice. With Visual Studio just open up and compile a debug and a release build. Should be fairly straight forward no other mods etc needed here.

Now when that is complete we need to create an environment variable called TORQUE_PHYSX3_PATH and point it to the PhysXSDK within your PathToPhysxSource directory like so

Image

Due to the changes in how PhysX is now distributed it's almost impossible to make the default project manager work with all the different IDE versions and folder names, so i have created a CMake module to handle this. The PR for that is here https://github.com/GarageGames/Torque3D/pull/1488 and will most likely be in the main T3D development branch sometime in the near future.

Anyway back to CMake, it's pretty easy just select PhysX 3 and if all of the above is ok it should be happy days

Image

Just don't forget to build the INSTALL project in Visual Studio to actually install the DLL files into your project. I will try and find time to get this working in Linux too as the current CMake module only supports windows for now.

*Tested with PhysX 3.3.4
Timmy
Posts: 366
Joined: Thu Feb 05, 2015 3:20 am
by Timmy » Tue Dec 22, 2015 1:22 pm
*Reserved for linux guide
chriscalef
Posts: 381
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Tue Dec 22, 2015 7:02 pm
Wow, that's very interesting, thanks for the research @
User avatar
Timmy
!

Open source or not, compiling it ourselves certainly could help a bit with tracking down some of those weird bugs that crop up...
Timmy
Posts: 366
Joined: Thu Feb 05, 2015 3:20 am
by Timmy » Wed Dec 23, 2015 4:26 am
Do try out the new CMake module i created above chriscalef (if get a chance of course ).

Got linux working too now, i will upload these changes to the CMake module soon.

Talking of linux JeffR , the latest development branch doesn't compile, there are a few minor problems with the taml stuff that was added. Will do a seperate PR for that.

Image
JeffR
Steering Committee
Steering Committee
Posts: 878
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Wed Dec 23, 2015 7:49 am
Is that the latest, with https://github.com/GarageGames/Torque3D/pull/1473/ included in it?

There was a duplicate declaration in there that somehow got past me that was causing some problems Linux-side, and that PR should fix it.
Timmy
Posts: 366
Joined: Thu Feb 05, 2015 3:20 am
by Timmy » Wed Dec 23, 2015 8:02 am
No i didn't use that pr but yeah that was one of the problems
User avatar
JeffR
JeffR
Steering Committee
Steering Committee
Posts: 878
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Wed Jan 06, 2016 11:00 pm
Went to try testing this last night(sorry for taking a bit to get to it) and I went about grabbing the github build of PhysX, set up the environment variable, and then made sure I was using the latest of CMAKE. Ran through the config step though, and I got no errors, but it wasn't able to find the PhysX paths.

Any ideas?
Timmy
Posts: 366
Joined: Thu Feb 05, 2015 3:20 am
by Timmy » Wed Jan 06, 2016 11:50 pm
Hey all good @ JeffR there is no hurry with it, i still gotta add the linux side to the original PR i sent as i got all that working too.

What compiler/ide are you using there jeff? Is the environment variable you set definitely pointing to <path>/PhysX-3.3/PhysXSDK ? Perhaps i should have set it up to just point to the root physx folder rather than the PhysXSDK folder within it.

For anyone else reading that folder called PhysX-3.3 could be named anything you like, i just left it at that because if you clone the physx repo that is the default folder name.
JeffR
Steering Committee
Steering Committee
Posts: 878
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Fri Jan 08, 2016 4:00 pm
Was using VS2013.

And yeah, I put it to the PhysXSDK path specifically from the grabbed repo and extracted folder. Pretty sure you don't have to restart Windows to get env vars to take effect, or at least I don't remember needing to do that...
Timmy
Posts: 366
Joined: Thu Feb 05, 2015 3:20 am
by Timmy » Fri Jan 08, 2016 11:47 pm
Oh yeah you do need to restart or even log out and back in.
  • 1
  • 2
12 posts Page 1 of 2

Who is online

Users browsing this forum: No registered users and 4 guests