Jump to content

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


chriscalef

Recommended Posts

  • Replies 59
  • Created
  • Last Reply

Top Posters In This Topic

And, hehe, yup, that worked better! With my new environment variable working this time, and your old module_physx file, I was able to see all my directories and get them added to the project. The only hiccup I had was that I didn't have your version of basics.cmake in my repo. I haven't updated for a few days, maybe that's been committed to T3D development by now? It couldn't find AddLibRelease, Debug, but when I grabbed basics.make from your other repo it worked.


RE: 3.3.4 vs 3.4.0, ORLY, well yeah that would be a problem too. :-P


EDIT: But anyway, yeah I seem to be running fine now with 3.3. Only things I'm lacking now are probably script side, as in World Editor support for PhysicsShape.

Link to comment
Share on other sites

In the mean time, PhysX 3.3.4 procedure updated if anyone else stumbles across this


Step 1) git clone https://github.com/GarageGames/Torque3D

Step 2) git clone https://github.com/NVIDIAGameWorks/PhysX-3.3

Step 3) Download https://raw.githubusercontent.com/rextimmy/Torque3D/1770ed01ce45affc76e6ae48278153d93fda58bc/Tools/CMake/modules/module_physx3.cmake and place it into T3DFolder/Tools/Cmake/Modules

Step 4) Download https://raw.githubusercontent.com/rextimmy/Torque3D/physx_34/Tools/CMake/basics.cmake and place it in T3DFolder/Tools/Cmake

Step 5) compile the above physx using whatever version of VS you will use in T3D (don't forget both debug and release if you plan on using both in t3d). Currently the cmake file only supports VS 2013/15 32 or 64bit. Go into /where_you_cloned_physx_above/PhysXSDK/source/compiler for the visual studio solution files.

Step 6) make an environment variable called TORQUE_PHYSX3_PATH that points to /where_you_cloned_physx_above/PhysXSDK/ You may need to reboot for this to take affect depending on how you do it.

Step 7) Run cmake and make sure it finds all the physx libraries.

Link to comment
Share on other sites

Ah, there it is. I had the right objectBuilderGui.ed.gui, but I had to make a physicsShape.cs file up in art/datablocks/ to define a PhysicsShapeData, and then I had to include that file in datablockExec.cs, and NOW I can actually drop a physx3 box into the world!


Now, off to start porting the rest of my code. If I ever see you at a conference I owe you many beers! Definitely would have been in a bad way here without you!!

Edited by chriscalef
Link to comment
Share on other sites

Hey @Timmy, sorry to bug you again... and this one is entirely coming from my code, because I know I didn't have this problem before I did my mega merge... but I was just wondering if you have any thoughts as to what I might have messed up. Since moving to Physx3 from 2.8 I've been having a long and complex battle with the finer settings, trying to get joints and collisions working - when I started things were straight falling through the floor, and joints were terrible, but I got most of my problems beaten into submission in my last build. However, now that I've dragged everything forward to current T3D HEAD and PhysX 3.3.4, my joints are still doing pretty good but my collisions seem to have gone away entirely. When I set a box on the ground and let it go dynamic, it falls right through the floor, or another box, and my ragdoll falls right through boxes and floor without slowing down or showing any sign of contact. I _think_ the ragdoll parts are successfully colliding against each other, but it could just be the joint limits giving that impression.


Anyway, like I said, nothing coming from any code you worked on, I'm sure it's operator error on my part, but if there's any settings or anything you can think of that would cause this behavior I'd be all ears. I can see the groundplane in debug render, and on the empty terrain map I can see the ground mesh, so I know PhysX knows about the objects... it just completely fails to collide them. In my first test before I ported in all my work, I did drop a box on the hill and it stopped and rolled down the hill, and in my old build I also had terrain collision working (mostly) fine. Very curious what I could have done to cause this one. :-p

Link to comment
Share on other sites

If you can verify with physics debug that all objects definitely have a physics representation and you can actually see that representation going through other objects with the debugger on, it's highly likely an issue with groups. I would be connecting to a PVD session first to 100% verify everything is where it should be in physics world before looking any further

Link to comment
Share on other sites

Hm, yeah okay, I'll try that. I can see the actors in debug render inside Torque, but haven't gone to PVD yet. But yeah, the whole filters and groups thing confuses the heck out of me.


EDIT: Hm, I get an assert when trying to run PVD, in PvdDataStream.cpp, line 638, assert failed on isInstanceValid( instance ).


But anyway, gotta go AFK for a while, so I guess this might be where I have to leave it for a bit. At least the rest of my merge went pretty well!

Link to comment
Share on other sites

With PVD you have to run in debug mode or if release, pretty sure you gotta link against the checked lib/dlls as the pvd stuff in full release mode is disabled(for performance reasons i'm guessing). If you can verify everything is where it should be, yeah it's gotta be the filters/groups.

Link to comment
Share on other sites

hi, anybody merged Timmy's & Andrew's advanced physx cloth into 3.9?

I tried it but lockParticleData at line 315 of px3ClothShape.cpp returns data with invalid particle array, crashes the program.

I tried step by step F10 trace the engine running, to ensure the vertices of cloth mesh passed in to createCloth properly.

and the mesh is Andrew's flag model.

Link to comment
Share on other sites

Yep so it's rather useless to be honest ;)


Anyway @chriscalef i have chucked up the physx 3.3 cmake files here with an updated branch https://github.com/rextimmy/Torque3D/tree/physx3 . Hopefully no dramas in the future, just compile physx 3.3 yourself still but in cmake no environment variables, just point cmake to the root folder of physx folder you cloned and away you go.


If anyone has trouble compiling physx with VS 2015 with update 3, see this for a simple fix https://github.com/NVIDIAGameWorks/PhysX-3.3/issues/49

Link to comment
Share on other sites

For anyone trying to get it to work, here is the folder setup, just choose the base path and it will detect the rest


http://i.imgur.com/CS7ppHq.png


*edit:


Oh yeah don't forgot in Visual Studio after you compile T3D to build the install project, this copies the physx dll's into place, it won't work without it.

Link to comment
Share on other sites

@deathbravo i'm sorry i told a huge big fat porkie, the cloth has not been deprecated in physx 3.4, it's only the particles that have. The cloth stuff from that old advanced physx branch would need adapting to work with tsMesh properly now as a few things have changed in that class since gpu skinning was introduced. I'll see how the motivation levels go, if i build up enough i'll fix it all up.

Link to comment
Share on other sites

Thanks for all your work, guys! I've been busy AFK this week but hope to jump on my problems again this weekend. After looking through the physx samples it seems that I may be manufacturing my rigid actors with antiquated syntax, I'm going to do an overhaul there and see if it fixes my collision problems.

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...