Rick Posted August 9, 2013 Author Share Posted August 9, 2013 Just tried it and no change for me. Downloaded the LE 3 example program Aggror posted in this thread (falling boxes). Put the line of code in the same spot in the VS project that I mentioned above, rebuilt the Release version. Closed all programs so as to not have anything sucking resources. Ran the test program and no difference. App froze about 3 seconds into the run. Not even close to the LE 2 test that does the same thing. 1 Link to comment Share on other sites More sharing options...
Josh Posted August 9, 2013 Share Posted August 9, 2013 Okay, something strange is definitely going on in that demo. I suspect it has to do with critical section locks. 1 My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Admin Posted August 9, 2013 Share Posted August 9, 2013 In Aggror's script there are a few problems. The boxes are using swept collision mode, which will make them very slow. His Leadwerks 2 example does not use swept mode. The for loop is iterating by one instead of two, creating twice as many boxes when the same boxAmount value is set. (I know he has it set to 150 in the Leadwerks 3 script.) The boxes are all unique which will make rendering slower. Creating a box once and then making instances of it is faster. context->Sync() should be passing false in to get an accurate reading of the true speed. I did a little tuning and came up with this build: Link to comment Share on other sites More sharing options...
neseir Posted August 9, 2013 Share Posted August 9, 2013 Hi using the physicstest I get a sluggish respons (and sometimes a crash) while the physicstestold is smooth. It looks like the difference in the lua script is just that the app.lua creates one box (base) prior to the loop while the the appold.lua creates just the boxes in the loop (no base). The other changes mentioned seems to be in both lua script. Does the size of the .exe file reflects other changes to (the file marked as old is some bigger than the other exe file) ? BR Eirik Link to comment Share on other sites More sharing options...
shadmar Posted August 9, 2013 Share Posted August 9, 2013 Here is a 500 box test using non swept, and Newton 3.1, and Joshs' solvermodel setting (instanced boxes derived from Aggros script), runs 40ish fps on my gear: HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
AggrorJorn Posted August 9, 2013 Share Posted August 9, 2013 Sorry for the errors in my script. I hadn't seen them. Do we always need to use Sync(false) when using a lot of physics? I can't test this right now unfortunately but will post back after I am back home. Link to comment Share on other sites More sharing options...
neseir Posted August 9, 2013 Share Posted August 9, 2013 Hi Testet shadmars program on my laptop and I get steady 45 + (starts on 55+) frames per sec. using 1000 boxes (Lenovo 530W with nVidia card). Setting the amount of boxes to 500 gives an average of 400+ frames (difficult to see because it changes a lot but it looks like the average is around 400). BR Eirik Link to comment Share on other sites More sharing options...
Josh Posted August 9, 2013 Share Posted August 9, 2013 Sorry for the errors in my script. I hadn't seen them. Do we always need to use Sync(false) when using a lot of physics? I can't test this right now unfortunately but will post back after I am back home. If the optional parameter is left to the default (true) vertical syncing will be enabled. This caps the screen refresh rate to 60 FPS, so you cannot measure performance faster than that. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
YouGroove Posted August 9, 2013 Share Posted August 9, 2013 What have you changed Agrorr ? Is it LE2 ? I tested on my Tower PC : Over 200 FPS all time ,no slow down even on last cubes. That's totally different from previous versions in terms of speed, it's fast and smooth. But perhaps it's different when using otehr stuff than cubes, like Rick project ? Stop toying and make games Link to comment Share on other sites More sharing options...
Rick Posted August 9, 2013 Author Share Posted August 9, 2013 I think my issue is the shape I generated from the model. I removed all of those and just made a csg floor and I get about 40 fps on average, which is about the same thing I get with Josh's new demo. The LE2 demo is still smoother but oh well. Link to comment Share on other sites More sharing options...
YouGroove Posted August 9, 2013 Share Posted August 9, 2013 Strange ? It is not something special on your PC ? or on your game physics ? I see a big difference between previous LE3 demo fo Agrorr and this new one from Shadmar. Stop toying and make games Link to comment Share on other sites More sharing options...
Josh Posted August 9, 2013 Share Posted August 9, 2013 I think my issue is the shape I generated from the model. I removed all of those and just made a csg floor and I get about 40 fps on average, which is about the same thing I get with Josh's new demo. The LE2 demo is still smoother but oh well. Convex hulls and polygonal geometry can be very slow if the shape is complex. Not sure exactly what you are doing, but you can build a shape for your model out of CSG brushes and save that, to make a good low-res physics shape. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Rick Posted August 9, 2013 Author Share Posted August 9, 2013 Yeah, I have to find time to do that because it's boring stuff if I want to get the nooks and crannies of the walls. Link to comment Share on other sites More sharing options...
Josh Posted August 10, 2013 Share Posted August 10, 2013 Those walls in dungeon master don't look too high-poly. They should be fine. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Rick Posted August 10, 2013 Author Share Posted August 10, 2013 I did make polymesh shapes for all of those walls/floor and that's why it was slow. Those walls don't have backfaces and they are really cut down on polygons with faces being removed so not sure if that screws up the "Make shape from mesh" functionality to cause slowness, but when I took the shape off them I get higher FPS. It also made the shape VERY thin meaning I could move through them fairly easily even with swept collision on the player. Link to comment Share on other sites More sharing options...
AggrorJorn Posted August 10, 2013 Share Posted August 10, 2013 After trying shadmar's demo with - 500 box - using non swept, - Newton 3.1, - and Joshs' solvermodel setting - instances instead of create new I have a solid performance of 40-50 fps. Link to comment Share on other sites More sharing options...
Recommended Posts