Maciej Główka
Blog Games Contact

← Return to Blog Index

zamek.jpg
April 15, 2021

Pre-export file flattening in Blender

python blender

Quite recently I have been creating a Blender model that was intended for further animation and rendering in Lightwave. We were using FBX as an exchange format. Unfortunately there were lots of issues with the transfer.
One thing I have noticed that helped significantly was model triangulation before the export. The asset was actually a quite complex gothic-style castle, build from many many Blender objects - so naturally it did not want to convert everything manually.

That was the beginning of the script.
Later on I have discovered more processing steps that smoothened model transfer. We had eg. flipped normals issues for mirrored objects, so the script takes care of that as well. We have also added modifier and particle system collapsing, as well as conversion of all the objects into single user data.

One last thing that was causing import problems into Lightwave turned to be non-standard characters in the objects' names. Somehow Lightwave could not resolve paths to those, while converting the FBX file. So we cut those pesky Polish letters before the export as well.
The script was kind of a one off tool for a specific project, so it might not handle all the specific edge cases, but maybe sharing it will be useful for some :)

← Excel based batch rendering in Blender Batch GLTF material variants in Blender→