节点着色器的导入与导出

While Blender now only supports the advanced node-based shading model for its materials, most IO formats only support a basic shading model, similar to the legacy fixed pipeline of old GPUs.

Blender features a way to convert between those, which any add-on can use, but it is currently pretty basic still. Especially for exporting from Blender materials, the node system must follow some strict requirements.

Note

Currently, only the OBJ and FBX IO add-ons uses that method.

Tip

The glTF format uses a more detailed conversion to and from shader nodes.

Note

The wrapper is designed to be as symmetrical as possible (i.e. it is expected to give reproducible results across several import/export cycles).

../../_images/addons_import-export_node-shaders-info_example.png

A typical setup of shader nodes that is can be exported.

Supported Node Setup

This is especially important for exporting, importing will simply re-generate a similar setup.

Note that the features listed below are those supported by the wrapper. Each add-on may have its own way to adapt them to its material system, some may not be handled by it, etc.

原理化BSDF

The main shader must be a Principled BSDF. Only parameters defined there, and textures linked to it, will be exported.

Currently handled parameters:

  • 基本颜色

  • Specular intensity

  • Specular tint (no texture support)

  • 粗糙度

  • 金属度

  • IOR

  • 发射

  • Alpha

法线贴图

If linked to the Normal input of the Principled BSDF node, the Normal Map node is also supported (including its texture obviously).

纹理

Only Image textures using a UV mapping are supported. You may also use a Mapping node to move/rotate/scale it.