Timmy Posted December 22, 2015 Share Posted December 22, 2015 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.3Once you have cloned the repository you should have a directory structure like sohttp://i.imgur.com/R0nOot1.jpgIf 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 sohttp://i.imgur.com/4MLp8mx.jpgDue 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 dayshttp://i.imgur.com/u75sxP7.jpgJust 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 Quote Link to comment Share on other sites More sharing options...
Timmy Posted December 22, 2015 Author Share Posted December 22, 2015 *Reserved for linux guide Quote Link to comment Share on other sites More sharing options...
chriscalef Posted December 22, 2015 Share Posted December 22, 2015 Wow, that's very interesting, thanks for the research @Timmy!Open source or not, compiling it ourselves certainly could help a bit with tracking down some of those weird bugs that crop up... Quote Link to comment Share on other sites More sharing options...
Timmy Posted December 23, 2015 Author Share Posted December 23, 2015 Do try out the new CMake module i created above [mention]chriscalef[/mention] (if get a chance of course ).Got linux working too now, i will upload these changes to the CMake module soon.Talking of linux [mention]JeffR[/mention] , 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.http://i.imgur.com/KwBqPVZ.jpg Quote Link to comment Share on other sites More sharing options...
JeffR Posted December 23, 2015 Share Posted December 23, 2015 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. Quote Link to comment Share on other sites More sharing options...
Timmy Posted December 23, 2015 Author Share Posted December 23, 2015 No i didn't use that pr but yeah that was one of the problems [mention]JeffR[/mention] Quote Link to comment Share on other sites More sharing options...
JeffR Posted January 6, 2016 Share Posted January 6, 2016 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? Quote Link to comment Share on other sites More sharing options...
Timmy Posted January 6, 2016 Author Share Posted January 6, 2016 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 /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. Quote Link to comment Share on other sites More sharing options...
JeffR Posted January 8, 2016 Share Posted January 8, 2016 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... Quote Link to comment Share on other sites More sharing options...
Timmy Posted January 8, 2016 Author Share Posted January 8, 2016 Oh yeah you do need to restart or even log out and back in. Quote Link to comment Share on other sites More sharing options...
noemen Posted June 13, 2018 Share Posted June 13, 2018 PhysX 3.3.4I was getting error at compile time, using vc14win64 on VS2015 SP3. Severity Code Description Project File Line Suppression StateError C2373 '__pfnDliNotifyHook2': redefinition; different type modifiers PhysXCooking C:\Users\Red\Documents\PhysX-3.3-master\PhysXSDK\Source\PhysXCooking\src\windows\WindowsCookingDelayLoadHook.cpp 64which links too:PfnDliHook __pfnDliNotifyHook2 = delayHook; The solution I had was to have created a "#define DELAYIMP_INSECURE_WRITABLE_HOOKS" in PhysX-3.3-master\PhysXSDK\Source\ PhysX\src\ windows\NpWindowsDelayLoadHook.cpphttps://github.com/NVIDIAGameWorks/PhysX-3.3/pull/73/commits/dcd8d9e256bbfd8b41a39b1a30666a60447fb608 Quote Link to comment Share on other sites More sharing options...
XeonRU Posted June 24, 2018 Share Posted June 24, 2018 PhysX 3.3.4I was getting error at compile time, using vc14win64 on VS2015 SP3. Severity Code Description Project File Line Suppression StateError C2373 '__pfnDliNotifyHook2': redefinition; different type modifiers PhysXCooking C:\Users\Red\Documents\PhysX-3.3-master\PhysXSDK\Source\PhysXCooking\src\windows\WindowsCookingDelayLoadHook.cpp 64which links too:PfnDliHook __pfnDliNotifyHook2 = delayHook; The solution I had was to have created a "#define DELAYIMP_INSECURE_WRITABLE_HOOKS" in PhysX-3.3-master\PhysXSDK\Source\ PhysX\src\ windows\NpWindowsDelayLoadHook.cpphttps://github.com/NVIDIAGameWorks/PhysX-3.3/pull/73/commits/dcd8d9e256bbfd8b41a39b1a30666a60447fb608 Heyfix codePfnDliHook __pfnDliNotifyHook2 = delayHook; to const PfnDliHook __pfnDliNotifyHook2 = delayHook;everything will be fine ;) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.