Timmy Posted December 15, 2016 Share Posted December 15, 2016 Aah i think i know what is happening, you are getting physx 3.3.4 mixed up with physx 3.4.0 Quote Link to comment Share on other sites More sharing options...
chriscalef Posted December 15, 2016 Author Share Posted December 15, 2016 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. :-PEDIT: 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. Quote Link to comment Share on other sites More sharing options...
Timmy Posted December 15, 2016 Share Posted December 15, 2016 Oh yeah i forgot about the addLibRelease/addLibDebug thing. As before once 3.4 is properly released the procedure is a little easier. Glad it's working anyway Quote Link to comment Share on other sites More sharing options...
Timmy Posted December 15, 2016 Share Posted December 15, 2016 (edited) I must update the basics.cmake with the GG repo. When 3.4.0 is out i'll do up an official wiki page explaining how to use it, to avoid any confusions. Edited December 15, 2016 by Timmy Quote Link to comment Share on other sites More sharing options...
Timmy Posted December 15, 2016 Share Posted December 15, 2016 In the mean time, PhysX 3.3.4 procedure updated if anyone else stumbles across thisStep 1) git clone https://github.com/GarageGames/Torque3DStep 2) git clone https://github.com/NVIDIAGameWorks/PhysX-3.3Step 3) Download https://raw.githubusercontent.com/rextimmy/Torque3D/1770ed01ce45affc76e6ae48278153d93fda58bc/Tools/CMake/modules/module_physx3.cmake and place it into T3DFolder/Tools/Cmake/ModulesStep 4) Download https://raw.githubusercontent.com/rextimmy/Torque3D/physx_34/Tools/CMake/basics.cmake and place it in T3DFolder/Tools/CmakeStep 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. Quote Link to comment Share on other sites More sharing options...
chriscalef Posted December 15, 2016 Author Share Posted December 15, 2016 Okay, last thing to bug you with, I hope: where does PhysicsShape get defined as a type for the WorldEditor? I'm running Full, and have RigidShape and everything else, do I need to include a physics script somewhere? Quote Link to comment Share on other sites More sharing options...
Timmy Posted December 16, 2016 Share Posted December 16, 2016 https://github.com/GarageGames/Torque3D/blob/development/Templates/Full/game/tools/worldEditor/gui/objectBuilderGui.ed.gui#L1118-L1133 Quote Link to comment Share on other sites More sharing options...
chriscalef Posted December 16, 2016 Author Share Posted December 16, 2016 (edited) 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 December 16, 2016 by chriscalef Quote Link to comment Share on other sites More sharing options...
Timmy Posted December 16, 2016 Share Posted December 16, 2016 haha no worries chris. I'll try and get all this in the official repo in the future, it will cut the required steps right down. Quote Link to comment Share on other sites More sharing options...
chriscalef Posted December 18, 2016 Author Share Posted December 18, 2016 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 Quote Link to comment Share on other sites More sharing options...
Timmy Posted December 18, 2016 Share Posted December 18, 2016 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 Quote Link to comment Share on other sites More sharing options...
chriscalef Posted December 18, 2016 Author Share Posted December 18, 2016 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! Quote Link to comment Share on other sites More sharing options...
Timmy Posted December 18, 2016 Share Posted December 18, 2016 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. Quote Link to comment Share on other sites More sharing options...
deathbravo Posted December 19, 2016 Share Posted December 19, 2016 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. Quote Link to comment Share on other sites More sharing options...
Timmy Posted December 19, 2016 Share Posted December 19, 2016 I wouldn't bother with it, i deleted the branch as it is been deprecated in the upcoming physx 3.4 and they encourage everyone to use flex https://developer.nvidia.com/flex for similar functionality. Quote Link to comment Share on other sites More sharing options...
chriscalef Posted December 20, 2016 Author Share Posted December 20, 2016 Ah, that's good to know, I tried to make it work too, but ran into conflicts in tsMesh that I had no idea how to resolve. I hammered on it for a while but ended up resetting tsMesh and dropping the cloth files out of my build. Quote Link to comment Share on other sites More sharing options...
deathbravo Posted December 20, 2016 Share Posted December 20, 2016 ok, I am now looking at UE's repo and flex Quote Link to comment Share on other sites More sharing options...
deathbravo Posted December 20, 2016 Share Posted December 20, 2016 but flex runs only on CUDA Quote Link to comment Share on other sites More sharing options...
Timmy Posted December 20, 2016 Share Posted December 20, 2016 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 Quote Link to comment Share on other sites More sharing options...
Timmy Posted December 20, 2016 Share Posted December 20, 2016 For anyone trying to get it to work, here is the folder setup, just choose the base path and it will detect the resthttp://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. Quote Link to comment Share on other sites More sharing options...
Timmy Posted December 20, 2016 Share Posted December 20, 2016 @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. Quote Link to comment Share on other sites More sharing options...
deathbravo Posted December 20, 2016 Share Posted December 20, 2016 Thanks Timmy,I have seen the source code of physx 3.4 in UE's repo.If the problem is caused by modified tsMesh, I think I am not too far from solution. Quote Link to comment Share on other sites More sharing options...
Timmy Posted December 20, 2016 Share Posted December 20, 2016 If ya going to use physx 3.4, grab my physx_34 branch, nvidia changed a few things up with it and the current physx plugin in t3d won't compile with 3.4 Quote Link to comment Share on other sites More sharing options...
deathbravo Posted December 20, 2016 Share Posted December 20, 2016 thanks again Timmy, I want to make 3.3 works at first.I am progressively studying the engine Quote Link to comment Share on other sites More sharing options...
chriscalef Posted December 23, 2016 Author Share Posted December 23, 2016 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.