Alienhead 23 Posted April 28 Share Posted April 28 I find myself concerned as of late with some performance issues I've stumbled across. I'm hoping for some information I may not have heard about thus far. OKay, here's the situation - To better test this I created a complete blank project that consists of - 1 terrain 256x256, 32x32 color texture for the terrain. I have NO PHYSICS working whatsoever, I have set the light quality to its lowest setting. In other words pretty much a bare bones scene. The towers in the scene are less than 300 polys each. When I get 2 or more animated models on the screen I start getting some serious jerky camera motion and the overall smoothness flies out the window. The model consists of 1293 Polys, 19 bones and 2 animation sequences with 21 frames per sequence ( very light and minimal for an animated model ), further more I took the animated shadow shader off and I have all my marterials set for Non-Picking. I'm running a AMD Ryzen 9 5900X, and a GTX 1080 geforce. The system runs nearly anything on the market ( so hardware isnt a concern ). In the video below I demo the results. And thats just with a few models on the screen. Is this normal? I'm looking to have many many more of these guys on a map at once, this is the reason I kept all the assets very very low. The funny thing is I can load the scene up with 2million polys and for the most part everything stays smooth. It just when I introduce animation to the scene that problems start to occur. I have also tried different models thinking my animation or bone setup may have had something to do with it, but no such luck. Quote Link to post Share on other sites
Alienhead 23 Posted April 29 Author Share Posted April 29 Problem solved, I've been hunting this for days now.. In case anyone else is running this setup - I suggest not. The cause was Tab-Nine intellisense engine combined with Lua debugger ( SubDebug ) running in Sublime 4. The reason it was so hard to find; the debugger stayed running as a service even when I shutdown Sublime, so I didnt look any further with sublime since I had shut it down. 1 1 Quote Link to post Share on other sites
Alienhead 23 Posted May 3 Author Share Posted May 3 I may of jumped the gun, while killing the debugger did help, I still have noticed that 10 or more animated models causes a huge jerkiness in the overall performance of the app. The test was ran on a blank map, 433 poly model with only 13 bones, no physics involved and I shut down the lighting. I'm starting to lean toward the idea that the desktop refresh rate the the virtual window aren't syncing. Quote Link to post Share on other sites
Josh 10,847 Posted May 3 Share Posted May 3 Enable physics visualization so we can see the collision shapes. Quote Link to post Share on other sites
Alienhead 23 Posted May 3 Author Share Posted May 3 That's just it, I have ZERO physics working in this simulation, I'm building a top down tower-defense game and it requires no collisions. Just waypoint pathfinding. Also testing the simulation out on another PC, I noticed my camerapicks to map objects were way off, do I need to adjust entity picks from camera based on resolutions ? Quote Link to post Share on other sites
Josh 10,847 Posted May 3 Share Posted May 3 The navmesh system uses the collision shape to build the navmesh. Your players would drop through the ground. Quote Link to post Share on other sites
Alienhead 23 Posted May 3 Author Share Posted May 3 No no no... No mass or physics of any kind is being used.. simple waypoint movement.. no navmesh. This simple scene right here is jerky on very decent hardware. Quote Link to post Share on other sites
Alienhead 23 Posted May 3 Author Share Posted May 3 The scene consists of a 256x256 terrain, no physics, very low poly meshes, characters have less than 20 bones. Quote Link to post Share on other sites
Josh 10,847 Posted May 3 Share Posted May 3 I think the models are probably using the model geometry for collisions and the player collision against that is very slow. Generating a convex hull or convex decomposition shape for them would make it lot faster. Quote Link to post Share on other sites
Alienhead 23 Posted May 3 Author Share Posted May 3 Heres the debug info - Quote Link to post Share on other sites
Alienhead 23 Posted May 3 Author Share Posted May 3 2 hours ago, Josh said: I think the models are probably using the model geometry for collisions and the player collision against that is very slow. Generating a convex hull or convex decomposition shape for them would make it lot faster. Surely not faster than faster than having no physics body to begin with ?. I have no player collision controller/body as the camera just floats in the air, its a town down tower defense style. Quote Link to post Share on other sites
Josh 10,847 Posted May 3 Share Posted May 3 Are your character models using the "Player" physics type? Are you using the navmesh system? Quote Link to post Share on other sites
Josh 10,847 Posted May 3 Share Posted May 3 What is the performance in release mode? Quote Link to post Share on other sites
Alienhead 23 Posted May 3 Author Share Posted May 3 release mode : 13 total animated entities on screen, less than 3000 poly, 21 bones, fps is at 39fps . Quote Link to post Share on other sites
Josh 10,847 Posted May 3 Share Posted May 3 If you upload the project I will take a look. It should be much faster than that. Quote Link to post Share on other sites
Alienhead 23 Posted May 3 Author Share Posted May 3 okay, I'm at work currently, but will send it up this evening, thanks ! Quote Link to post Share on other sites
Thirsty Panther 486 Posted May 3 Share Posted May 3 You could check this Blog post from Josh. It shows common bottlenecks with Leadwerks. Quote Link to post Share on other sites
Genebris 176 Posted May 4 Share Posted May 4 That blog post doesn't mention animations or skinning, which is probably the issue. I never could run more than a couple of characters in Leadwerks. You should probably try stopping all animations or deleting all the bones in your scene to check if it's because of animations. Quote Link to post Share on other sites
Josh 10,847 Posted May 5 Share Posted May 5 I disagree. But we also don't know what hardware he has: Quote Link to post Share on other sites
Alienhead 23 Posted May 5 Author Share Posted May 5 (edited) Okay, I've compiled a video - this video has a-LOT of animation stuff going on, birds, ants, butterflies, fish, mobs, players, wind .. its very animation heavy. What I did was remove the normal mob model I was using, which was 792 polys with 23 bones, and replaced it with a 200 poly 8 bone model just for testing.. I got 50 mobs running in the scene towards the end. It seems my frame rates were steady. Could this be the prior mob having 20+ bones in it ? Ahh hell, guess it would help if I upload the correct video .. one sec... Edited May 5 by Alienhead Quote Link to post Share on other sites
Alienhead 23 Posted May 5 Author Share Posted May 5 Okay uploaded, it's processing, guess it'll post live in a few. Quote Link to post Share on other sites
Genebris 176 Posted May 5 Share Posted May 5 Just post the project. Or just a goblin model, I'll see how many I can run. Quote Link to post Share on other sites
Alienhead 23 Posted May 6 Author Share Posted May 6 Youtube has been acting funny as of late with large uploads.. Anyways heres what I was trying to send up earlier today. \ 2 Quote Link to post Share on other sites
Josh 10,847 Posted May 6 Share Posted May 6 Your project looks cool and I want to help but I can't debug it just by watching it. We need at least the model file to load up ourselves and look ta. I won't be working all weekend long but I can examine it Monday, or maybe someone on the forum might find something. Quote Link to post Share on other sites
Alienhead 23 Posted May 6 Author Share Posted May 6 I'll upload some media when I get back home, but I think I finally figured it out. I dumped the navmesh system and took the mobs off their character rigs and went with a straight forward waypoint node ( aStar type pathfinding ) and the frame rates picked WAY WAY up. I've kept the navmesh system in tact for player pets to follow and occasional boss spawns that chase the player around the map, but for the 100's of minions I released from character rigs and it's really improved the frame rates, its playable now on my good coding rig and even on a mid-range testing rig I got.. Thanks ! Quote Link to post Share on other sites
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.
Note: Your post will require moderator approval before it will be visible.