[Blender Script] Convert Principled BSDF to MSFS Material Params

Hey everyone!

(sorry, I’ve made a mess with the topics)

I’m sharing a little script I made for Blender that helps convert from regular Blender Principled BSDF materials to the MSFS Material Params type. This is useful for those who only use Blender as a bridge from another 3D modeling software to the MSFS exporter.

I do most of the modeling and texturing in SketchUp and only use Blender to export to MSFS. When importing skp files into Blender, it uses Blender’s Principled BSDF materials by default, so I had to manually change every material to MSFS Material Params every time I had to do another export.

This scripts automates the process. It still has a lot of room for improvement, as I’m new to Blender and also it’s scripting API, but for the moment it does the job.

How it works

It’s was created with the workflow of importing SketchUp models with the Sketchup Importer for Blender, but might work with other imported meshes too.

As SketchUp only supports diffuse maps, it will convert from Principled BSDF Base Color to MSFS Material Params Base Color. It will try to find the NORMAL and ARM (Ambient Occlusion, Rooughness and Metallic) maps from the Base Color texture file name by searching the texture_path variable. For example (and by default): if the Base Color texture map is called Wood_DIFFUSE.png, it will try find the textures named Wood_NORMAL.png and Wood_ARM.png

To use other naming schemes, see below.

How to use

  1. Load converter_sketchup.py in Blender’s Scripting tab
  2. Change the variable texture_path to the path where your other texture maps are located
  3. Change the suffix_ variables to the suffixes you use for those maps. This script will try to automatically find the NORMAL and ARM maps based on the base color map
  4. Run the script

Hope it helps!

KR,
Fergo