Game Development Community

New 1.1 beta physics questions and propositions

by Zealander · in Torque 3D Professional · 02/12/2010 (12:46 pm) · 4 replies

Hi all.

I have some questions about physics implementation in new Torque3D 1.1 Beta 1.

First of all, i am glad physics developers did it almost the same way , as i did for my PhysX vehicle.
It is very easy for me to switch to new physics.

So my questions.

1. I notice physics shapes jittering when run PhysX room level. I have the same issue with my vehicle,
what could it be? It happens not every time, but often.

2. Do Physics work in multiplayer mode now?

and here is propositions:

1. Put joints to PhysicsCollision.
We will be able to implement ragdolls a turret jointed to tank and so on and even replace pxMultiActor.

3. Devide pxMultiActor to PhysicsShape + PhysicsCollision + PhysicsStreamReader(or whatever name).
The main purpose of ths reader will be just read data from nxb or xml files exported by Physx DCC plugin for Max or Maya or Bullet plugins(Bullet could be serialized too in new 2.76 beta version) or i heard about Havok in Torque, simply new deserialize reader for new Physics engine.

There is great ragdoll tool implemented in new PhysX DCC plugin 2.01, just push the button and you have physX ragdoll, just load it to Torque3D.

Shortly it is devide PxMultiActor to 3 independent modules for better scalibility, bugfixing, easy of use, usefulness...

P.S. More i read new collision source code, more i like it! Great job!

Thanks.


#1
02/12/2010 (6:53 pm)
Thanks for all the feedback. This version is only the start of what we want to do.

The PxMultiActor stuff is very hard to use and PhysX specific. When we wrote it originally it was only intended for our demo, but GG really wanted it and we added it into Torque core.

Quote:1. I notice physics shapes jittering when run PhysX room level
That is a network syncronization issue. PxMultiActor and the physics abstraction in T3D 1.0 was based on some hacks to make things look good for our demo which was single player only. With the new physics API i removed that logic as it was the wrong way to do things. In a future version of Torque we will have a true single player mode and physics will just work without special hacks.

Quote:2. Do Physics work in multiplayer mode now?
The Player and PhysicsShape are network syncronized with corrections. PhysicsShape has options to work different ways base on the 'simType' setting.

PxMultiActor is not networked and will never be.

Our goal is to provide some new objects in T3D 1.2 that allow for the same type of features as PxMultiActor, is networked, and will work with Bullet also.

Quote:1. Put joints to PhysicsCollision.
Adding support for a PhysicsJoint will happen, but i don't think it will exist for creation of ragdolls.

Ragdolls are more specialized and will most likely be a special PhysicsRagdoll object to manage them. That object can then be used with Player to do various ragdoll effects.

Quote:3. Devide pxMultiActor to PhysicsShape + PhysicsCollision + PhysicsStreamReader(or whatever name).
Something along those lines will happen soon.
#2
02/13/2010 (3:27 am)
Very cool things are happening with physics here, thank you Tom for reply and your great commitment to make Torque3D multiphysical out of the box.

I will replace my PhysicsDynamic class by your PhysicsShape and report you, how it will work with vehicle, turrets and so on.

I have a one more question about PhysicsPlayer.

1. How to change up player direction?
I mean to direction dependent to normal to the ground.

This is code from PxPlayer init method desc.upDirection = NX_Z; NX_Z not a vector it is just integer constant 2.

Yes, human is always vertically oriented when moving or staying, but if player is dying or crawling on a hill for example a half of his body always hanging in the air... not naturally.

Or better way to orient animation to the ground?

I had this issue before and do not decide how to deal with it before, maybe you have some advice for this.

Maybe it is time to change PhysX character controller code, i am glad it is open sourced.





#3
02/17/2010 (2:29 pm)
What place PhysicsShape will occupy in the Torque class hierarchy in the future, is it replacement to ShapeBase or a stand-alone class?

I placed my own class with similar functionality as ShapeBase inheritor and had access to all ShapeBase methods, it was easy to implement Physics vehicles this way, but PhysicsShape has it's own rendering and cannot be ShapeBase inheritor...

and i cannot decide to stay with my class or switch to PhysicsShape and bring a half of ShapeBase functionality to PhysicsShape or it's inheritor.

#4
02/18/2010 (6:22 pm)
Quote:1. How to change up player direction?
I mean to direction dependent to normal to the ground.
There is no support for changing the up direction to match the surface normal. Its not supported by PhysX character controller at least.

If you had a game where this was critical you would need to write a custom character controller amongst other things.

Quote:is it replacement to ShapeBase or a stand-alone class?
Its not ment to replace ShapeBase. Its ment to be its own stand alone object for simple single body physics shapes. Think crates, barrels, rocks, etc.