PGD Home

P-0: Virtual World Concept: Update 6: Performance testing and optimisation of multi-part meshes

by on Feb.04, 2016, under Astral Realms, P-0, Servers and Networking, Spiritus Astrum

I spent some time today conducting some tests on large numbers of objects in torque. For my project, I intend to allow the user to combine many simple meshes together to make more complex meshes. So, a complex building might be modelled from individual wall segments, floor panels, doors, windows, etc, instead of being one large structure. The problem with this is that I suspected that loading many meshes would cause a far greater performance hit than loading one single one.

Based on some testing that I did, it turns out that I was right.

I conducted a very simple test. I created some spheres in a modelling tool, with a known number of polys. One high res sphere, with 10082 polys, one medium resolution at 1058, and one low res at 105.

I then wrote three drawing functions, which I executed separately:

Test 1: Draw 512 of the high res spheres (512*10082 = 5,161,984 polys),

Test 2: Draw 4,913 of the medium res spheres (4913*1058 = 5,197,954)

Test 3: Draw 46,656 of the low res spheres (46.656 * 105 = 4,898,880)

Since the polycount is quite similar in all cases, the FPS should be similar too, but it isnt. With nothing at all rendering, the polycount is about 200, after Test 1 (512 polys) the FPS is about 50, with all polys in view. However, Test 2, in the same conditions, produces a poly count of 9.3, and Test 3 wasnt really conclusive due to issues drawing all of those objects, but it was giving me about 5-9 fps, depending on the angle I looked at the objects at.

I was also getting script warnings about “too many ghosts” from NetConnection, so, clearly, there is an issue here. The problem now will be deciding how to fix it. The polycount isn’t the problem, with 512 objects and over 5 million polys on screen I get an easy 50 FPS in debug build. The problem is optimising the system to draw many small objects as quickly as one large one.

The main issues that I can imagine would slow this system down would be collision calculations for each objects, and network updates for each objects, but for this test, I used a single player game with no collision objects set, just simple TSStatic objects.

I haven’t finished my testing, but this will likely be a difficult challenge to overcome.

 

PhoenixGameDevelopment - 03_02_2016 , 11_40_09 PM PhoenixGameDevelopment - 03_02_2016 , 11_40_16 PM PhoenixGameDevelopment - 03_02_2016 , 11_44_20 PM PhoenixGameDevelopment - 04_02_2016 , 12_48_02 AM PhoenixGameDevelopment - 04_02_2016 , 01_37_01 AM PhoenixGameDevelopment - 04_02_2016 , 01_37_15 AM PhoenixGameDevelopment - 04_02_2016 , 01_39_12 AM

Facebooktwitterredditpinterestlinkedinmail

Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!