I am not sure if this is the right forum for this, but I am working on a project which will, eventually, allow users to create complex objects such as buildings, vehicles, or machinery, from many smaller objects. I am hesitant to compare my work to other projects for fear of making it look like I am making a knock-off, but if you imagine "Kerbal Space Program", then that is the general type of concept that I am going for.
However, I just conducted some test in T3D regarding this, and, as I suspected, there is a problem.
As I discussed on my blog, I noticed that even with a similar polycount, the FPS is vastly reduced as object count increases.
For my tests, I did this:
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.
To go from 50 FPS down to 9.3 with a similiar polycount indicates a serious problem with my concept.
Can anyone shed any light on how I would conceptually solve this? I am not planning to work on it in any major way at the moment, but I will need to in the future.
I am just creating TSStatic's in script at the moment, is there a way to combine the distinct object meshes into one logical object?
So, I might have 10 meshes drawing, but they would be logically grouped into one object?
I think I got some advice before on this, and I was told to look into the vehicle code (since it allows mounting of objects into a single, driveable, object). Can anyone see any major problems, or solutions, to connecting many objects together like this?
Something tells me this is going to be very hard to do, performance wise.
Thanks for any advice!