PhysX hardware enabled. YAY!!
by deepscratch · in Torque 3D Professional · 06/17/2009 (11:33 am) · 22 replies
so I got the physx simulation to be enabled on hardware (if you have a physx ppu installed).
I need some testers to see/compare frame rates with it enabled and not enabled.
also, if you got the GMK, I've enabled the cloth to simulate on hardware (if you have a physx ppu installed), and I intend to try extend the hardware simulation to all the physx physics, if I can.
wanna try it out??
I need some testers to see/compare frame rates with it enabled and not enabled.
also, if you got the GMK, I've enabled the cloth to simulate on hardware (if you have a physx ppu installed), and I intend to try extend the hardware simulation to all the physx physics, if I can.
wanna try it out??
Connection established 3207 PhysXWorld::init() - Created hardware simulation! CADD: 3208 local
About the author
email me at medan121@gmail.com
Recent Threads
#2
06/17/2009 (11:53 am)
Nice work! Does it work with NVidia's G80/G90/G200 cards?
#3
But I can't offer one of those stone age slow PPUs ^^
06/17/2009 (12:04 pm)
if you need testers with CUDA enabled I'm available to it.But I can't offer one of those stone age slow PPUs ^^
#4
any Nvidia CUDA-enabled GPU
@Manoel,
thats why I need testers, to see what it will work with
@Marc,
great, I'll quickly put together a "how to get it enabled", and post here, just a few moments...
BTW, I'm testing on my beautiful new GTX295 ;)
06/17/2009 (12:17 pm)
@Novack,any Nvidia CUDA-enabled GPU
@Manoel,
thats why I need testers, to see what it will work with
@Marc,
great, I'll quickly put together a "how to get it enabled", and post here, just a few moments...
BTW, I'm testing on my beautiful new GTX295 ;)
#5
06/17/2009 (12:29 pm)
Let me guess, you sold one of your kidneys..?
#6
06/17/2009 (12:33 pm)
Should work with any Nvidia GPU series 8 or higher.
#7
in pxWorld.cpp
in PxWorld::PxWorld()
change
add this
under a protected:
add
then just below
if you got GMK, and you want the cloth and softbodies to be hardware, then in physShapeSoftPhysX.cpp
add this include
#include "T3D/physics/physx/pxWorld.h"
then just add this
thats all.
when you run the game, you'll get a print of either
PhysXWorld::init() - Created hardware simulation!
if you got compatable hardware
or
PhysXWorld::init() - Created software simulation!
if you dont.
I think thats all, lets see.
06/17/2009 (12:35 pm)
ok, heres how,in pxWorld.cpp
in PxWorld::PxWorld()
change
mEditorTimeScale( 1.0f )to
mEditorTimeScale( 1.0f ), HW ( false )then, in PxWorld::_init
add this
NxHWVersion hwCheck = gPhysicsSDK->getHWVersion();
if (hwCheck == NX_HW_VERSION_NONE)
{
HW = false;
}
else
{
HW = true;
}just above// Create the scene description. NxSceneDesc sceneDesc; sceneDesc.userData = this;then add
if (HW) sceneDesc.simType = NX_SIMULATION_HW; else sceneDesc.simType = NX_SIMULATION_SW;below
sceneDesc.gravity.set( smDefaultGravity.x, smDefaultGravity.y, smDefaultGravity.z );then change
/*
// Make note of what we've created.
String simType = sceneDesc.simType == NX_SIMULATION_SW ? "software" : "hardware";
String clientOrServer = this == isServer ? "server" : "client";
Con::printf( "PhysXWorld::init() - Created %s %s simulation!",
clientOrServer.c_str(),
simType.c_str() );
*/to this// Make note of what we've created. String simType = sceneDesc.simType == NX_SIMULATION_SW ? "software" : "hardware"; //String clientOrServer = this == isServer ? "server" : "client"; Con::printf( "PhysXWorld::init() - Created %s simulation!", simType.c_str() );then add this to the end of the file
bool PxWorld::getHWMode()
{
return HW;
}now in pxWorld.hunder a protected:
add
bool HW;I put mine under " void _releaseQueues();"
then just below
const F32 getEditorTimeScale() const { return mEditorTimeScale; }put thisbool getHWMode();thats it.
if you got GMK, and you want the cloth and softbodies to be hardware, then in physShapeSoftPhysX.cpp
add this include
#include "T3D/physics/physx/pxWorld.h"
then just add this
if(m_world->getHWMode()) meshDesc.flags |= NX_CLF_HARDWARE;above the line that says
NxInitCooking();
thats all.
when you run the game, you'll get a print of either
PhysXWorld::init() - Created hardware simulation!
if you got compatable hardware
or
PhysXWorld::init() - Created software simulation!
if you dont.
I think thats all, lets see.
#8
It will be interesting to see if the Cuda backend is better then the old PPU.
06/17/2009 (5:17 pm)
When we originally wrote much of this PhysX code it was over 2 years ago. At that time we had bought a PhysX PPU card and found that for our project the PPU was slower than software simulation on a 4 core CPU. So we just commented out the hardware switch.It will be interesting to see if the Cuda backend is better then the old PPU.
#9
06/17/2009 (7:41 pm)
Works like a charm :)
#11
I got a 7 FPS increase in the physx enabled genre kit...
06/18/2009 (3:49 am)
yeah, yhat was what I wanted people to do....I got a 7 FPS increase in the physx enabled genre kit...
#12
06/18/2009 (5:55 am)
Too bad I got a Radeon =P. Maybe when we get a Havok plugin.
#13
also dumb question but how do I see the stats like fps is there a way to make them overlay on the screen?
06/18/2009 (7:18 am)
isn't Havok middleware that you have to pay for though?also dumb question but how do I see the stats like fps is there a way to make them overlay on the screen?
#14
If your game is sold by more than $10 all you need to do is fill a request form in order to comply with logos and copyright notices. Otherwise it's completely no-frills.
Note that this doesn't apply to non-game products: in that case you need a license.
06/18/2009 (7:21 am)
I thought so, but for PC games (I assume this include Mac/Linux) it has been free since Intel acquired Havok.If your game is sold by more than $10 all you need to do is fill a request form in order to comply with logos and copyright notices. Otherwise it's completely no-frills.
Note that this doesn't apply to non-game products: in that case you need a license.
#15
www.garagegames.com/community/forums/viewthread/94889
trying to test the PhysX hardware but there seem to be some hard coded paths. I'm on x64 so they are different paths.
06/18/2009 (1:01 pm)
can anyone tell me how to fix this?www.garagegames.com/community/forums/viewthread/94889
trying to test the PhysX hardware but there seem to be some hard coded paths. I'm on x64 so they are different paths.
#16
pixollusion.com/T3D/beta2/BuildLog.htm
look about 90% of the way down the buildLog
there are about 30 errors with the last one being:
..\..\..\..\..\Engine\source\T3D\physics\physX\pxWorld.cpp(818) : fatal error C1004: unexpected end-of-file found
almost sound like my copy of torque is corrupt or something maybe?
06/18/2009 (4:23 pm)
Wouldn't fit in here but getting from really odd error now:pixollusion.com/T3D/beta2/BuildLog.htm
look about 90% of the way down the buildLog
there are about 30 errors with the last one being:
..\..\..\..\..\Engine\source\T3D\physics\physX\pxWorld.cpp(818) : fatal error C1004: unexpected end-of-file found
almost sound like my copy of torque is corrupt or something maybe?
#17
Any link on that?
I recently visited the page as I was told a similar thing but all I found on their page was a trial, which does not allow you any commercial use
06/18/2009 (5:18 pm)
Quote:I thought so, but for PC games (I assume this include Mac/Linux) it has been free since Intel acquired Havok.
Any link on that?
I recently visited the page as I was told a similar thing but all I found on their page was a trial, which does not allow you any commercial use
#18
try following the instructions again, I see you say you are new to coding? I was too, try again, read the instructions a few times, then try again.
maximum, if you still dont get it right, post your whole pxworld file, and we'll work it together from there
06/18/2009 (5:31 pm)
@James,try following the instructions again, I see you say you are new to coding? I was too, try again, read the instructions a few times, then try again.
maximum, if you still dont get it right, post your whole pxworld file, and we'll work it together from there
#19
Here's the page on professional games: www.havok.com/content/view/622/
06/19/2009 (10:29 am)
Quote:Any link on that?In the trial page, click on the link that says "Try Havok General Information pages". It mentions the restrictions on various uses of the trial version.
I recently visited the page as I was told a similar thing but all I found on their page was a trial, which does not allow you any commercial use
Here's the page on professional games: www.havok.com/content/view/622/
#20
What kind of testing are you looking for? I am willing to test as I have some free time. Just let me know what the baselines are. I have 2 GTX280s and interested to see how Physx works with Vista now that they have the new patch in place on the new drivers. I originally had to dedicate one GPU/monitor to Physx.
06/21/2009 (10:46 am)
@Tom,What kind of testing are you looking for? I am willing to test as I have some free time. Just let me know what the baselines are. I have 2 GTX280s and interested to see how Physx works with Vista now that they have the new patch in place on the new drivers. I originally had to dedicate one GPU/monitor to Physx.
Torque 3D Owner Novack
CyberianSoftware