Outerra forum

Anteworld - Outerra Game => Modding: Importer, Tools & Utilities => Topic started by: zzz on October 16, 2016, 05:00:59 pm

Title: Anyone found a way to beat the 64kb memory limit on the importer?
Post by: zzz on October 16, 2016, 05:00:59 pm
The importer throws an error when the mesh exceeds 65535 polys. I can sub-divide a mesh into smaller groups but it keeps saying it's exceeded the limit even when it expressly says "error: mesh xyz has 4000 polys". Any tricks on beating it?
Title: Re: Anyone found a way to beat the 64kb memory limit on the importer?
Post by: KW71 on October 16, 2016, 07:14:20 pm
Mhh... I have imported hundreds of thousands of polygons without problem, as long as each mesh is below the limit...
Title: Re: Anyone found a way to beat the 64kb memory limit on the importer?
Post by: necro on October 17, 2016, 01:45:45 am
In blender i can split the mesh into several sub meshes which are exported to fbx afterwards. Each splitted mesh has to be below this polycount. Could you upload the fbx file or send me an pm?
Title: Re: Anyone found a way to beat the 64kb memory limit on the importer?
Post by: zzz on October 17, 2016, 07:54:34 am
https://www.mediafire.com/?5v214yr7yxysch6

here it is, though it might be simpler to walk me through the FBX importer step by step. I still can't get it to import vehicles without crashing.
Title: Re: Anyone found a way to beat the 64kb memory limit on the importer?
Post by: KW71 on October 17, 2016, 09:35:42 am
In this model there is at least one mesh with over 120,000 triangles (part of the main body). I guess the limit is for triangles, not for quads.
Title: Re: Anyone found a way to beat the 64kb memory limit on the importer?
Post by: zzz on October 17, 2016, 11:41:09 am
This version should definitely be below the limit
https://www.mediafire.com/?5v214yr7yxysch6
Title: Re: Anyone found a way to beat the 64kb memory limit on the importer?
Post by: KW71 on October 17, 2016, 02:30:04 pm
"deflector_grid" mesh, for example,   is 99151 triangles... There could be more...
Title: Re: Anyone found a way to beat the 64kb memory limit on the importer?
Post by: zzz on October 17, 2016, 03:25:26 pm
https://www.mediafire.com/?sys6vvs4b2lkuog

Went through all the meshes and made sure they're all below 65535 triangles. It currently throws an error on topphas2, which is 55521 tris.
Title: Re: Anyone found a way to beat the 64kb memory limit on the importer?
Post by: cameni on October 18, 2016, 06:21:43 am
The limit is for vertices (16bit vertex addressing within triangles), otherwise the mesh size would double for everything.

Also note that even if you have vertex count < 65536 on input, it may end up above the limit if the source vertices need to be duplicated, which happens whenever the model has multiple normals sharing a single vertex.
Title: Re: Anyone found a way to beat the 64kb memory limit on the importer?
Post by: KW71 on October 18, 2016, 09:22:45 am
ZZZ, you'll need to analyze that model to figure it out what is producing that huge amount of vertices... The vertices are also duplicated on UV islands  or materials splits...

(http://www.ericchadwick.com/examples/provost/byf2_figure2.jpg)

The models needs to be optimized for games.

Edit.

I uploaded an image that might help, but for some reason sometimes it won't showup, so here is the full document:

http://www.ericchadwick.com/examples/provost/byf2.html
Title: Re: Anyone found a way to beat the 64kb memory limit on the importer?
Post by: zzz on October 19, 2016, 11:47:50 am
Thanks.

Got them all under the limit with no errors reported but when I spawn the model it shows nothing. Just the camera attached to an empty space.

https://www.mediafire.com/?69k7s2ouyndn6tf

here's the import log
http://pastebin.com/YLew7hJ6

and I've attached the engine log