FBX Import At Runtime
Asked Answered
P

1

6

I did many tests to import FBX at runtime in unity and I'm testing more. The FBX file has to be in ASCII format when imported. It needs to export to ASCII from 3dsMax or Maya. ASCII FBX file has bigger size depending on the file.

On the other hand, the binary FBX format has a smaller size compared to ASCII.

My script works with ASCII FBX (for most models). It uses a parse method to read all the plain text, including vertices, triangles and normals in a FBX file and constructs the mesh in GameObjects.

The problem is size of model and speed of import. Asset Bundles is not a good solution.

If anyone knows a method to import BINARY FBX at RUNTIME please share your knowledge. Also, if you know how to deserialize binary fbx to ASCII FBX in Unity at runtime please let me know.

I need to deserialize FBX from Binary to ASCII. Because this is a reduced version.

Prophetic answered 7/1, 2017 at 16:10 Comment(4)
same issue: did you find a way?Toh
Not really, I'm building for Hololens, I tried assimp libs in unity, they work for other platforms and in the editor but not in emulator or device, I get a System.Runtime.Serialization.ISerializable error at runtimeProphetic
I seems that deserialization is not supported in uwp :(Prophetic
You could write the code to do it from scratch by following the spec. FBX Binary Format SpecificationCaraway
C
0

If I understood correctly your problem is that the game stuck while you are importing the FBX.

Have you tried to use a Coroutines?

Coroutine will execute parallel to your update function so it won't get stuck in the middle of the execution.

If you only have 1 FBX it won't be faster unless you divide the work into multiple coroutines (be careful with the performance).

Castrate answered 1/3, 2019 at 14:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.