- Messages
- 32,883
- Country
Hi all,
Since there are often questions how big and complex can my object be, I have done some research to try to find which limits there are. In this post I will try to give an overview of my findings. Please let me know if you have other information or experiences. I plan to turn this into a article on the wiki once we really know what is going on.
At first I have looked at the FSX MDL format only, I will do the FS2004 MDL format later.
The only hard limit I have found is when XtoMDL gives this error message:
ERROR: Vertex list has too many vertices (79208), max allowed: 65535
ERROR: Attempting to add an invalid vertex buffer!
ERROR: Vertex list failed allocating. Most likely exceeds the 65535 limit.
So this means that there can be a maximum of 65535 texture vertices within one model part. If you have different parts (and thus different materials) you can have more texture vertices.
I did also try to alter a X file to have different parts, but with the same material. But XtoMDL does combine them to one model part and you still get this error. So the only way to work around this error seems to be to have a different material. Of course it can be a very small difference, so that you hardly see it.
Is there a hard limit to the amount of triangles/vertices in one object? I could not find the exact number yet. The GMax gamepack quite quickly throws out of memory errors when you have a lot of triangles/vertices. But I am not sure if this is a gamepack limit or a XtoMDL limit. Some more research to be done on that.
Then to another common warning with XtoMDL:
WARNING: Index buffer exceeds maximum size.
This warning appears as soon as you have a model part that has more than 21845 triangles (21845 * 3 = 65535 indices). But since it is not an error, it seems you can ignore this warning. Objects with more than 21845 triangles still show fine in FSX (until you hit the vertex limit as discussed above it seems).
I found one catch though. When the object is prepared for drawcall batching there is another limit. In that case any object with more than 43690 triangles does not show anymore. The same applies to multiple instances of an object that are one drawcall. If the sum of all triangles in the drawcall gets above 43690 none of the objects show anymore. If the object is compiled with an empty xanim (as GMax does) more triangles can be shown.
This interesting find might lead to the conclusion that drawcall batching is not always interesting. If you place really a lot of instances or if the objects are relatively complex, it might be better to not use the drawcall batching. As your objects can disappear.
Since there are often questions how big and complex can my object be, I have done some research to try to find which limits there are. In this post I will try to give an overview of my findings. Please let me know if you have other information or experiences. I plan to turn this into a article on the wiki once we really know what is going on.
At first I have looked at the FSX MDL format only, I will do the FS2004 MDL format later.
The only hard limit I have found is when XtoMDL gives this error message:
ERROR: Vertex list has too many vertices (79208), max allowed: 65535
ERROR: Attempting to add an invalid vertex buffer!
ERROR: Vertex list failed allocating. Most likely exceeds the 65535 limit.
So this means that there can be a maximum of 65535 texture vertices within one model part. If you have different parts (and thus different materials) you can have more texture vertices.
I did also try to alter a X file to have different parts, but with the same material. But XtoMDL does combine them to one model part and you still get this error. So the only way to work around this error seems to be to have a different material. Of course it can be a very small difference, so that you hardly see it.
Is there a hard limit to the amount of triangles/vertices in one object? I could not find the exact number yet. The GMax gamepack quite quickly throws out of memory errors when you have a lot of triangles/vertices. But I am not sure if this is a gamepack limit or a XtoMDL limit. Some more research to be done on that.
Then to another common warning with XtoMDL:
WARNING: Index buffer exceeds maximum size.
This warning appears as soon as you have a model part that has more than 21845 triangles (21845 * 3 = 65535 indices). But since it is not an error, it seems you can ignore this warning. Objects with more than 21845 triangles still show fine in FSX (until you hit the vertex limit as discussed above it seems).
I found one catch though. When the object is prepared for drawcall batching there is another limit. In that case any object with more than 43690 triangles does not show anymore. The same applies to multiple instances of an object that are one drawcall. If the sum of all triangles in the drawcall gets above 43690 none of the objects show anymore. If the object is compiled with an empty xanim (as GMax does) more triangles can be shown.
This interesting find might lead to the conclusion that drawcall batching is not always interesting. If you place really a lot of instances or if the objects are relatively complex, it might be better to not use the drawcall batching. As your objects can disappear.