Game Development Community

Maximum tri counts

by Rick Austinson · in Artist Corner · 12/19/2008 (12:24 pm) · 11 replies

Is there some kind of upward limit to triangles when exporting from max? I have been attempting to move some particularly large models, and I'd like to know if the issue is the tri count before I continue trouble-shooting.

To be clear, these are not ridiculously huge poorly made, the modeling actually follows all the ruls and regs of modeling for game engines. They are just really, really big. To give an example, I have a building that is about 40,000 tris. It's also probably 10 stories tall and higly detailed. All the polygons are legal, so the question is: why is the export failing? Is the object just to big, or is there something else?

#1
12/19/2008 (2:04 pm)
I know a lot of exporters have export limits of 10k poly's per mesh. There usually isn't a total poly limit however. So try converting your 40,000 tri building into 4-5 meshes of less than 10,000 each, and see if it exports then.
#2
12/19/2008 (2:34 pm)
Is that 10k including the colision mesh?

This may just be a dumb n00b mistake, but so far I've been having the exporter create a copy of the mesh to use for collisions.

Oh, maybe this will help, the error message from the dumb file:

Errors:
Error #35:Assertion failed when stripifying (1)
#3
12/19/2008 (3:50 pm)
Hey, just tired your suggestion, broke a 25,000-tri suspension bridge down into 3 pieces, each piece exported without difficulty.

The problem came on the import. Torque moves the object's pivot-point to a central location, which makes piecing the model back together extremly difficult, especially with larger-sized models. With my bridge, it was a fairly straightforward process, but for more complex items, I'm not sure what i'll do. In UnrealEd, I solved this problem by simply leaving the cut-up object's pivot point at zero, so when all the pieces were in the editor, it was just a matter of making sure they were all at the exact same coordinates.

I'll keep experimenting, I have a massive 71,000-tri environment I have been dieing to see in-engine, so that's my encouragement.
#4
12/20/2008 (9:56 am)
No, I don't mean break them into seperate models. There is a way to have different meshes that are still in the same model in 3d max, is there not? Maybe someone could explain this better, as I'm no artist.

Also, collision meshes shouldn't just be copied from objects, it won't export properly (or if it manages to somehow, will not work in-game) because all the calculations for collision detection assume that the collision meshes are convex. If you want to have collision enabled for every face, you should try polysoup. But really for objects like buildings that require players to collide with them, run inside them, etc... should be .dif's for collision simplification and rendering efficiency. Also, if you're going to be using a 40,000 tri building, you may want to look up Level of Detail.
#5
12/20/2008 (10:46 am)
I'm afraid I'm not understanding you fully. Most of my models are not continous, seamless meshes, but have instead consist of multiple elements stuck together. In fact, this is more so often the case with the more complex, higher-tri models, as I often create one piece of geometry, unwrap it, then duplicate it several times.

Now, I've notices while using the Torque exporter that I can select multiple objects in a scene to export. Perhaps I should try breaking down my model and selecting the entire thing to export? It's worth a shot, worst case scenario it doesn't work.

Now, as for the collissions, I honestly have no idea exactly what I'm doing there. Those who have been using the exporter longer and are more familliar with it might have a better understanding, but to be honest I kind of just mashed buttons until it worked. I know I can get my models into Torque, and I know I smack into them.
#6
12/20/2008 (6:49 pm)
What do you mean by "stuck together" in MAX? Are your pieces in a Hierarchy?
#7
12/20/2008 (9:37 pm)
No, different elements of the same object. Like if you change the selection to 'element', you can grab different pieces? I'm not sure I'm explaining it clearly.

Anyways, I tried breaking the object down into pieces no bigger than 9000 tris, Max was abot to export it no problem, but Torque was unable to put it into the engine properly. I'm sure it had something to do with the fact that it was a 56,000-tri object, but remember this was supposed to take up most of the level. Anyway, the model was only partially visible after sticking it in the level, and then it lagged up so badly in first-person mode I had to end-task the program. I'm checking now to see if the level still works or if I have a problem.

Todays lesson is: save incrementally.
#8
12/21/2008 (11:52 am)
I was told by someone at one time that VERY large DTS files, as in, 3d geometry this is physically large, can be problematic in Torque. We were building huge chunks of the landscape with DTS once and asked someone at GG why the framerate would drag everytime one would come into view....I think that is where I was told this.

I'm pretty sure that, even though in MAX, you can still select "elements" of your 3d object one by one, It still gets exported as a big, giant, SINGLE 3d model.
#9
12/21/2008 (5:32 pm)
Well, the skyship is around 1500 feet long, scale, so yes I would say it is physically very large. I have however broken it down into 9000-tri 'chunks' which shouldn't be very big by themselves. I already used this method on a massive suspension bridge, and so far it's worked ok.

I am hopping my perpensity for very large models won't be TO big of a problem. I spents at least 200 hours on this particular model in the hopes of one day being able to throw it in an engine and explore.
#10
12/21/2008 (7:41 pm)
Quote:I know a lot of exporters have export limits of 10k poly's per mesh.

It's not an exporter limit, but rather a limitation of the DTS file format. (Before tri-stripping) DTS stores the triangles for each mesh as 3 indices into the arrays of vertex, normal and uv data. These indices are stored as signed 16-bit values. 2^15 / 3 is just under 11k.
#11
12/21/2008 (9:10 pm)
That's actually a really neat detail, it's nice to know why something works a certain way, instead of just starting with 10k as an arbitrary limit.

I was eventually able to get my massive skyship into the level without much difficulty by breaking it down into 9k chunks and bringing each piece in individually. Part of the issues I am running into has to do with draw distance, the pieces are not being 'drawn' by the engine even when they should be visible against the FOV fog. I was able to remedy this partially by re-thinking my cutting scheme (using a few more pices so that more of it will be in view at a time) but now I'm running into issues with frame rates when I try to enter the interior of the model. I have a feeling, however, that this is the result of my own lack of understanding of the engine, and not some error in the exporting process.

This is a learning experience, to be sure.