Oh, this again - conflict over "StringTable" between T3D and PhysX

Expanding and utilizing the engine via C++.
60 posts Page 6 of 6
deathbravo
Posts: 50
Joined: Mon Feb 01, 2016 7:06 am
by deathbravo » Sat Dec 24, 2016 11:22 am
I found some clues on my cloth crash.
the cloth is enabled to be simulated in both server and client side.
I am not sure why 2 identical clothes run in physx could cause invalid particle data.
the crash occurs while creating cloth enabled tsStatic using script in console.
the reason is Andrew's cloth code check physics world of client side while creating cloth, if the client world doesn't exist, nothing will happen. If client world exist, then create cloth in the world.
when loading the test mission with cloth in it, the server world will be created first, then load the shapes to the server side, create client world , then load shapes in client. while enabling cloth in server side, the code ask for client world, but the world doesn't exist, then nothing to do.
while create shape in the console, the client world is already there, the shape will be added twice in both server and client side, and are both created in the client world.

I tried to check isServerObject() in _enableCloth(), and it stopped crashing.
chriscalef
Posts: 326
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Sat Dec 24, 2016 8:53 pm
That is very interesting, @
User avatar
deathbravo
. I'm still very much up in the air on what to do about server/client physics in my own build. Early on, personally I took the perhaps controversial step of ignoring server physics entirely and doing everything I do on the client side only. Since I'm making a single user app rather than a multiplayer game, it makes sense for me, but I'm still very curious about the best way to manage the two simulations in the context of a game. I would think you'd want to only have things like cloth and particles happening on the client, anyway, unless you have bulletproof cloth or something that makes it actually have an impact on gameplay, and then have things like rolling boulders, player projectiles, and vehicles etc. exist in the server simulation. But then would you make them kinematic in the client sim and push positions/orientations from the server sim to all the clients every tick?

@
User avatar
Timmy
, how do you handle this?
chriscalef
Posts: 326
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Sat Dec 24, 2016 9:56 pm
OH MY GOD, YES YES YES.

Hehe, sorry, just found and fixed my bug, collisions work fine now, and my ragdolls look better than they have since PhysX 2.8. WHEW.

It was indeed a filter issue, sometime way back when I was floundering around trying to get things working at all in PhysX3, I tried changing to a CCD enabled filter shader, and it apparently fixed something or at least didn't break everything at the time, but now it was breaking everything.

The critical line I had modified was in Px3World::initWorld, and should look like this:


Code: Select all

sceneDesc.filterShader = physx::PxDefaultSimulationFilterShader;


But like I say, this was entirely my own doing, shouldn't be an issue for anybody else.

WHEW. :-P
chriscalef
Posts: 326
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Sun Dec 25, 2016 1:25 am
Hey Timmy, do you know anything about mWorld->releaseWriteLock()? I'm accustomed to locking and unlocking the scene whenever I'm going to add, delete or modify parts of the simulation, but instead we now seem to be calling releaseWriteLock() once before this sort of operation and doing nothing afterwards. I just switched everything from lock/unlock style to releaseWriteLock style in my own build, while searching for my collision bug, but can you elaborate at all about what's going on here?
Timmy
Posts: 250
Joined: Thu Feb 05, 2015 3:20 am
by Timmy » Sun Dec 25, 2016 1:59 am
Oh yes that is my bad, ignore releaseWriteLocks , that static function is not used with the physx3 plugin and should be deleted. Use World->lock/unlockScene methods
chriscalef
Posts: 326
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Sun Dec 25, 2016 6:26 am
Ah, okay, thanks, I'll put them back!
chriscalef
Posts: 326
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Sun Dec 25, 2016 9:52 pm
Well, so far so good:

https://vimeo.com/197044468
Timmy
Posts: 250
Joined: Thu Feb 05, 2015 3:20 am
by Timmy » Tue Dec 27, 2016 7:09 am
Nice chris, looking good mate.
chriscalef
Posts: 326
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Wed Dec 28, 2016 12:36 am
Thanks! Sorry for drifting a little off topic here, but the navmeshes are working fine now too! After a few hiccups.

https://vimeo.com/197230243
JeffR
Steering Committee
Steering Committee
Posts: 694
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Fri Dec 30, 2016 6:56 pm
Hah, that's really cool.
60 posts Page 6 of 6

Who is online

Users browsing this forum: No registered users and 4 guests