IrrPhysx 0.2 - Nvidia Physx 2.8.1 wrapper
-
- Posts: 288
- Joined: Wed Apr 16, 2008 1:45 am
- Contact:
threading is enabled by default in physx. The only change that can be made is using the non-blocking fetch results which will allow you to continue running until the results are in from the last simulate. With a large number of objects this will increase your fps but the physx itself will still be the same speed. This doesn't make much of a difference but if you are getting 50fps but are having to wait .2 seconds for physx to return then you need to optimize your physx objects. I have thought of making the fetch results non blocking, I will prolly have to write a different function for it to work well with how things are currently set up.
I would suggest not using triangle meshes as your physx objects. This makes a very large number of triangles for each object, if you need it to be close but not exactly the same try the convex meshes. Or Make a less detailed representation of the object and make that into a triangle mesh to reduce the poly count.
I am currently focusing on learning shaders since that is going to be one of my parts on the game I am working on. So I haven't had much time to work on irrphysx. I will try to set up the svn today when I get home and that should help with things like character controller and let you help debug some of the issues. I lost my train of thought... so I will stop.
I would suggest not using triangle meshes as your physx objects. This makes a very large number of triangles for each object, if you need it to be close but not exactly the same try the convex meshes. Or Make a less detailed representation of the object and make that into a triangle mesh to reduce the poly count.
I am currently focusing on learning shaders since that is going to be one of my parts on the game I am working on. So I haven't had much time to work on irrphysx. I will try to set up the svn today when I get home and that should help with things like character controller and let you help debug some of the issues. I lost my train of thought... so I will stop.
Hi, guys !!!!!!!!!!!!!!!!!!
Could someone gime me an advice ??
This is dangling vertically revolute joints
How to do the same, but for the horizontall position, to make this looks like a door ????????????????????????
Thanks in advance !!!!!!!!!!!!!!!
Could someone gime me an advice ??
This is dangling vertically revolute joints
Code: Select all
NxRevoluteJoint* revJoint = NULL;
PhysXNode* box1 = physx->CreateBox(smgr->addCubeSceneNode(4), 4,4,4, vector3df(0,14,0));
box1->GetActor()->raiseBodyFlag(NX_BF_KINEMATIC);
SetActorCollisionGroup(box1->GetActor(), GROUP_COLLIDABLE_NON_PUSHABLE);
physx->Nodes.push_back(box1);
PhysXNode* box2 = physx->CreateBox(smgr->addCubeSceneNode(4), 4,4,4,vector3df(0,10,0));
SetActorCollisionGroup(box2->GetActor(), GROUP_COLLIDABLE_PUSHABLE);
physx->Nodes.push_back(box2);
int x = box1->GetActor()->getGlobalPosition().x-2;
int y = box1->GetActor()->getGlobalPosition().y-2;
int z = box1->GetActor()->getGlobalPosition().z;
NxVec3 globalAnchor = NxVec3(x,y,z);
NxVec3 globalAxis = NxVec3(0,0,1);
revJoint = CreateRevoluteJoint(physx->pscene, box1->GetActor(), box2->GetActor(), globalAnchor, globalAxis);
Thanks in advance !!!!!!!!!!!!!!!
-
- Posts: 168
- Joined: Sun Feb 04, 2007 3:30 pm
- Location: France
-
- Posts: 288
- Joined: Wed Apr 16, 2008 1:45 am
- Contact:
awesome, I am having trouble setting up svn on my web-site but it should be up shortly unless someone lied to me and I can't do it. Once it is up it would be nice if people could help debug the last few issues in the todo list then we would be able to release the next version and start adding fluids and joints and things like that.
Do you mean global performance, or fluid performance ??
In global case we can just use active transforms, this will increase speed.
But with fluids I'm thinking for another way of drawing, because when we draw less than 10 000 particles everything is ok, but when we trying to draw more than 20000 particles fps is too slow, and it was a message about 16 bit index buffers Currently, I haven't ideas how to speed up fluid drawing,
but in my example I did it in the same way like sio2 did
In global case we can just use active transforms, this will increase speed.
But with fluids I'm thinking for another way of drawing, because when we draw less than 10 000 particles everything is ok, but when we trying to draw more than 20000 particles fps is too slow, and it was a message about 16 bit index buffers Currently, I haven't ideas how to speed up fluid drawing,
but in my example I did it in the same way like sio2 did
That makes sense. Assuming you have 6 indices per point sprite (I'm guessing that's what you are rendering with) then you will receive 6 indices per point sprite:rootroot1 wrote:Do you mean global performance, or fluid performance ??
In global case we can just use active transforms, this will increase speed.
But with fluids I'm thinking for another way of drawing, because when we draw less than 10 000 particles everything is ok, but when we trying to draw more than 20000 particles fps is too slow, and it was a message about 16 bit index buffers Currently, I haven't ideas how to speed up fluid drawing,
but in my example I did it in the same way like sio2 did
6 indices/particle * 10,000 particles = 60,000 indices <= 2^16 = 65,536
6 indices/particle * 20,000 particles = 120,000 indices > 2^16 = 65,536
Therefore you will receive that message about 16-bit index buffers. You can use 32-bit index buffers (I don't know how PhysX works) to solve the problem. I have one question for you. Do you receive that poor performance when PhysX starts complaining about 16-bit index buffers?
Also, what is your graphics card? I've looked up some videos on YouTube and it appears as though the GTX 280/275 both get around 60,000 particles at 23-30 FPS
TheQuestion = 2B || !2B
-
- Posts: 222
- Joined: Mon Jan 19, 2009 10:03 pm
- Location: Miami, Florida
- Contact:
Im trying to make a character controller for my game by using a sphere or capsule for the players collision.
Is there a way to disable physics simulations on some axis or something because when I add a constant force for movement it causes him to start rolling and looks like the node jumps when I disable rotations
Is there a way to disable physics simulations on some axis or something because when I add a constant force for movement it causes him to start rolling and looks like the node jumps when I disable rotations
In the IrrPhysx Game Example i did a very simple character controller made from a sphere which worked roughly ok so you might want to look at that. The next version of IrrPhysx will have character controllers in it (dread to think how long i've been saying that for...) but i'm not sure when that release will make it out... we've got some nasty bugs and little time to work on them