Jump to content

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


chriscalef

Recommended Posts

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.

Link to comment
Share on other sites

  • Replies 59
  • Created
  • Last Reply

Top Posters In This Topic

That is very interesting, @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?


@Timmy, how do you handle this?

Link to comment
Share on other sites

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:


 

sceneDesc.filterShader = physx::PxDefaultSimulationFilterShader;

 

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


WHEW. :-P

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...