PhysX SDK with Torque
by Luke Griffin · in Torque 3D Professional · 05/20/2011 (2:31 am) · 8 replies
Hi all,
After some very lengthy browsing I managed to come up with a fair few threads on how to get physx working with my torque project. I have installed the SDK and used the generateProjects.bat method but I get an error when doing that, which states that the physx directory is invalid.
This problem was mentioned in this thread: https://www.garagegames.com/community/forums/viewthread/94889 But I didn't see a clear fix. A lot of the threads I have come by have said that you need to change the TORQUE_PHYSX_PATH variable like its something you do every day. I'm a bit of a noob to programming and would like an idiots answer to fixing this. Where is TORQUE_PHYSX_PATH located or defined, how can I change it ect. My directory is "C:/Program Files/NVIDIA Corporation/NVIDIA PhysX SDK/v2.8.4_win"
Any help would be really appreciated.
Thanks
After some very lengthy browsing I managed to come up with a fair few threads on how to get physx working with my torque project. I have installed the SDK and used the generateProjects.bat method but I get an error when doing that, which states that the physx directory is invalid.
PHYSX_SDK_PATH is set to C:/Program Files/NVIDIA Corporation/NVIDIA PhysX SDK/v2 .8.1 ******* The PHYSX_SDK_PATH variable does not point to a valid directory! ******* ******* You must install the PhysX SDK and set the path via in your ******* ******* buildFiles/project.conf file or by setting the TORQUE_PHYSX_PATH *******
This problem was mentioned in this thread: https://www.garagegames.com/community/forums/viewthread/94889 But I didn't see a clear fix. A lot of the threads I have come by have said that you need to change the TORQUE_PHYSX_PATH variable like its something you do every day. I'm a bit of a noob to programming and would like an idiots answer to fixing this. Where is TORQUE_PHYSX_PATH located or defined, how can I change it ect. My directory is "C:/Program Files/NVIDIA Corporation/NVIDIA PhysX SDK/v2.8.4_win"
Any help would be really appreciated.
Thanks
#2
http://www.garagegames.com/community/forums/viewthread/126410
Thanks for your response anyway, I've spent months trying to get a physics engine working, just hope I can get it done eventually :P.
06/13/2011 (9:18 pm)
Hi, thanks for the reply. I did succeed in getting it to build correctly after a lot of hard work, and by changing all of the lib and include directories and manually altering the environmental variable to look in the right direction. Unfortunately I ran into another problem where it would insist that "Error code 1: Physx is not installed" at start up. I decided to try bullet instead but have ran into some other problems with that, which I have posted in another thread.http://www.garagegames.com/community/forums/viewthread/126410
Thanks for your response anyway, I've spent months trying to get a physics engine working, just hope I can get it done eventually :P.
#3
the Pacific demo. You can see what parts are needed to get PhysX
activated in a T3D project.
Alternatively, you could copy the pacific demo into the templates
directory and with a few tweaks, set it up as another template.
06/15/2011 (5:11 am)
Its not that hard.. Take a look at the Project files (VC++) forthe Pacific demo. You can see what parts are needed to get PhysX
activated in a T3D project.
Alternatively, you could copy the pacific demo into the templates
directory and with a few tweaks, set it up as another template.
#4
06/16/2011 (7:44 am)
John, you seem to be mixing v2.8.3 and v2.8.4_win. Could cause some problems.
#5
06/16/2011 (9:42 am)
The problem I was having is I am also trying to get it working with GMK as well. Seems to be having a few problems. I had physx in the code, compiling with not so much as a warning, but it was crashing on start up of the game with the "physx not installed" error. This probubly is because the two different versions were being mixed together. Unfortunatly, the only method I have been able to find to get physx working is using other projects as templates "unless there is a how to do it from scratch tutorial out there somewhere that I dont know about". Most of these methods are also based around older versions of physx and torque and don't accomodate the GMK as well that has its own physics code that you have to tie it in with. Being a noob programmer its not very easy to get around. 2 or 3 months i've been trying :P.
#6
I'm too lazy to type it all out.. *grin*.
They were just examples of the correct directories, just need to be
correct for your install :)
06/16/2011 (5:31 pm)
actually not mixing, those were just old lines i had written down..I'm too lazy to type it all out.. *grin*.
They were just examples of the correct directories, just need to be
correct for your install :)
#7
cudart32_30_9.dll
PhysXCooking.dll
PhysXCore.dll
PhysXDevice.dll
PhysXLoader.dll
I've heard that with the most recent version you no longer have to do a separate client install of the PhysX engine but I can't say for sure on that.
Haven't worked with GMK at all so I can't help there.
06/16/2011 (6:13 pm)
Luke, you also need to have the dlls in the game dir. Take a look at the Pacific demo. They have the following:cudart32_30_9.dll
PhysXCooking.dll
PhysXCore.dll
PhysXDevice.dll
PhysXLoader.dll
I've heard that with the most recent version you no longer have to do a separate client install of the PhysX engine but I can't say for sure on that.
Haven't worked with GMK at all so I can't help there.
#8
06/17/2011 (12:36 pm)
Rex, I did include some of those, but not all of them as the old demo projects only had a hand full. Might try adding them too it.
Torque 3D Owner John "Mythic" Henry
EveronWorlds
Project Properties->C/C++->General->Additional Include Directories
PhysX
Locate your actual PhysX SDK installation folder
instead of C:/Program Files/NVIDIA Corporation/NVIDIA PhysX SDK/v2.8.3
C:/Program Files/NVIDIA Corporation/NVIDIA PhysX SDK/v2.8.3/SDKs/Physics/include
C:/Program Files/NVIDIA Corporation/NVIDIA PhysX SDK/v2.8.3/SDKs/Foundation/include
C:/Program Files/NVIDIA Corporation/NVIDIA PhysX SDK/v2.8.3/SDKs/PhysXLoader/include
C:/Program Files/NVIDIA Corporation/NVIDIA PhysX SDK/v2.8.3/SDKs/Cooking/include
C:/Program Files/NVIDIA Corporation/NVIDIA PhysX SDK/v2.8.3/SDKs/NxCharacter/include
C:/Program Files/NVIDIA Corporation/NVIDIA PhysX SDK/v2.8.3/Tools/NxuStream2
Change it to your installed version and directorys
As well as under Linker->General->Additional Libaries
C:/Program Files/NVIDIA Corporation/NVIDIA PhysX SDK/v2.8.4_win/SDKs/lib/Win32
I dont think I forgot anything
*edit*
Woops, your using the Generate Batch file, which accesses the build files
I'm thinking in terms of actually using the VC++ IDE...
You would have to manually edit the Build files the Batch file accesses
to build with and manually edit them with a text editor..
PS: VC++ build files / Solution / Project files can be manually edited.