libgdx / fbx-conv

Command line utility using the FBX SDK to convert FBX/Collada/Obj files to a custom text/binary format for static, keyframed and skinned meshes.
Apache License 2.0
448 stars 116 forks source link

Max vertices error #46

Closed Hungary-Dude closed 10 years ago

Hungary-Dude commented 10 years ago

After running:

fbx-conv -p -v "path to file"

FBX-conv gives me a warning that there are too many mesh vertices. So I try setting the maximum allowed indices with this command:

fbx-conv -p -v -m 64k "path to file"

It prints the warning again and tells me the max is now "64." If FBX-conv does not accept *k numbers then please do not put them in the help printout. So I ran:

fbx-conv -p -v -m 64000 "path to file"

Now what does it do, it says "Error, maximum vertex count must be between 0 and 32k" This is annoying, as now I have to go back into my model editor and split up the node.

So in conclusion, please make FBX-conv accept *k numbers, and please make it accept larger vertex counts if possible.

xoppa commented 10 years ago

Libgdx uses signed short indices, which makes it impossible to index (and therefor use) more than 32k vertices within a mesh. Technically it could be possible for fbx-conv to allow more than 32k vertices, but it would not be possible to render those with libgdx (hence the warning). The string "64k" is not an accepted number by atoi, I'm not sure why you would expect it to be so. However, I think that it would be appreciated if we can accept that number formatting. So please send a pull request if possible.

Hungary-Dude commented 10 years ago

I expected *k numbers like 32k to be accepted because "32k" was listed in the help printout as the "default." So I assumed it was an accepted value.

JonasVautherin commented 9 years ago

Is it still the case that libgdx uses signed short indices? Is there no way to have more than 32k triangles in a mesh?

ferrolho commented 8 years ago

So this explains why I am not able to load complex models... @xoppa, why does libgdx use signed short indices? Is there any workaround so I can load models like this one: http://tf3dm.com/3d-model/sa342-gazelle-97281.html ? Thanks!

xoppa commented 8 years ago

Because java doesn't support unsigned short. Don't expect random high poly models to work. Use low poly models instead. See https://github.com/libgdx/libgdx/wiki/Importing-Blender-models-in-LibGDX#maximum-vertices

ferrolho commented 8 years ago

Thanks @xoppa, and Merry Christmas!

dpproduction commented 7 years ago

Hi guys, I started use libGDX for our project, but limitation 32k is too small for us. If I fork engine and change all short values for example to int does it work good? Or short value is system restriction?
Can somebody explain me please?