FBX import/export


photo

Recommended Posts

Hello,

Working with rich CAD meshes, I want to understand how to best import/export to FBX and simplify the meshes with 3rd party tools.

Let's start with a basic example: the model is initially imported from STEP files in Unigine, then parts are grouped together under dummy nodes for articulation. Let's say I have a single root node (a dummy), then for each articulated part an "articulation" child (a dummy) and then the real mesh (repeated for all parts). All meshes have a material and a base albedo texture applied.

I click on the root node and select "export Fbx". This creates a fbx and a fbm folder, with a copy of the textures. But the FBX itself actually embed the textures. So what is the fbm folder used for?

If I now drop the fbx onto the Unigine scene, then an additional root node have been created: the hierarchy is now root/root/articulated/mesh. I guess I shouldn't select the root before exporting but rather all 1st level children? Is this correct?

I now import the FBX into my tool of choice to simplify the mesh (which is Simplygon), and export all my LODS into a new folder. The process actually creates one folder per LOD, each with a FBX with embedded textures.

Now, in the editor, the newly created export folder hierarchy is imported. Let's say "simplified/LOD0/root.fbx" etc. The Unigine import creates the fbm folders again. I can drop the LOD1/root.fbx in my scene and its look correct. The imported LOD surface material name is the same as my source material. So far so good.

Now save world, quit Editor and reload. BAM the imported FBX surfaces are now a flashy red,  and the surface material are just showing a red unknown guid. What am I doing wrong? This is the case for both the fbx that was created by Unigine and the simplified ones.

Finally, I'd like all the generated LOD fbx to be manipulated as a single object. I know about the "combine by postfixes" import option and looked at the video tutorial, but I couldn't make it work with this process (multiple fbx with an identical hierarchy of nodes inside). Is there any hope here or should I script my own way out?

Thanks!

 

 

data.zip

Link to post

Hi Stephane,

Quote

and the surface material are just showing a red unknown guid

That's actually a bug. It has been already fixed in the internal builds.

 

Quote

So what is the fbm folder used for?

Why DCC tool created fbm folder on FBX export it's hard to say. I know why it may be created on import - to unpack and store the embedded into the FBX textures.

 

Quote

I guess I shouldn't select the root before exporting but rather all 1st level children?

There is no strict pipeline for exporting, because every case is different. You can stick to what gives best/desired results for you. If you do not want to have 2 root nodes, you can export only the contents of the model without selecting the root node in the first place.

 

Regarding the combine by postfix - it combines surfaces only from the single FBX, so it will not work in your case with multiple separated FBX files. You can merge this multiple files in 3rd party DCC tool before importing. Or you can continue to use a separate meshes as LODs by tweaking their visibility distances after import.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to post