Game Development Community

Ok, could this be my issue?

by Svengali · in Torque 3D Professional · 04/12/2011 (7:46 pm) · 7 replies

So, after really trying to find the common link in why I can't build a complete level, without constant crashing, it really seems it might be the number of entities I'm using even though it doesn't seem like many. I think I may have figured it out, let me run it by everyone.
I'm using .dif for my roadways, and train tracks these actually number quite high, does this take more memory that using the build in road tool?

About the author

Creator of SvengaliGames, and developing the once up coming title NightLife: The MMORPG Of Dark Horror. Now named ATROX NOCTIS: Daemons Cradle- www.svengaligames.com


#1
04/12/2011 (9:14 pm)
That's a really hard question to answer, given the number of possible things one can get up to in a level... :)

You can open the console (press "~") and ask the engine how many polygons it is rendering by typing "metrics(gfx);" and pressing return. I've never seen the engine crash even with ridiculous numbers, but I have seen it chug down to 3 fps.

I experimented with building a huge level with roads made of DIF, but eventually gave up and decided to just paint roads onto terrain with a texture.

I don't think it was so much the format of the model as that models seem to work best if they follow a design pattern roughly square in base and that base is fairly compact in area. Their height seems largely irrelevant--it's the width which triggers the engine to trip the model's level of display.

Large, wide models which can't reasonably LOD from most angles of display perform horribly. Lengthy sections of train track would fall into this readily.
#2
04/12/2011 (9:38 pm)
Is Polycount: 2651295 DrawCalls: 7234 a lot? Is this a dumb question? Grant it this with quite a few models pulled to get it to load. lol

And Thank you very much for your time and advice!
#3
04/12/2011 (10:44 pm)
2 million polys wont be a problem but 7000 draw calls sounds like way too many.

As far as I know, and hopefully someone else can correct me if I'm wrong, the drawcalls are linked to how many different testure files your are using for each object.

You get twice as many drawcalls if you have 2 texture files for an object compared to using one texture file.

If you are using difs you would have one texture per brush, I don't know if there is any way to have multiple brushes share the same texture file so there might not be a way to easily reduce your drawcalls without converting your dif meshes to dts meshes.
#4
04/13/2011 (7:30 am)
Ok, textures, that's not surprising, as the material selector never works (crashes T3D). Are there any tools to convert .dif to .dts? Terrible as it sounds, all the art I got through GG, only has the difs. Everything else I have to source art for, so that's not an issue. I guess my last question then would be how many draw calls are healthy? And its only the active shapes that add to this correct? Not all the shapes in the project?
#5
04/13/2011 (9:42 am)
Quote:
Are there any tools to convert .dif to .dts?
Under the File menu in the World Editor you'll find "Export Interiors to Collada". Simply load the scene with your Interiors in it, select that option and let it do it's work.

It has been a while since I last used it, but seem to recall that it wasn't always 100% perfect about preserving texture coordinates. Also since it builds the collada shape from already optimized triangles the resulting mesh isn't necessarily 'artist friendly' -- but it is a great tool nevertheless.
#6
04/13/2011 (10:04 am)
For a bit of research and learning browse through some of Steve Acaster's blogs. In several of them he compares performance issues with large view scenes containing .dif versus .dts shapes. You'll also see discussions about the various ways in which he reduced his overall drawcalls.
#7
04/14/2011 (9:54 am)
Thank you everyone! All of your advice was indispensable. I actually do typically follow Acaster's blog, but I started right after he addresses my issues, hilarious. Although there does not seem to be any hard fast rule for what the limits are, I am most definitely overloading the software, apparently somewhere around 5000 draws on initialization causes the crash. I striped out all my roads and dropped nearly 3000 draws, allowing me to add back in the rest of the buildings, removed dif park structures and pained them on instead. I'm really beginning to appreciate the level designers among us. We have come a long way from building tribes levels... I got to set LOD on the models today, that will lower the draws even more, I can't wait to take that on as I never have done it before. Originally, we though the title was going to be overhead or 3/4 view, but that has since changed to a more orbital cam making LOD necessary.
Thank you very much again!