元编程参考文档

材质导出

6 个节点

本页内容 6

导出 Blender

函数

Writes the material for Blender: its maps, each in its own file named so Node Wrangler finds them, and a Python script that builds it as a Principled BSDF whose height drives real displacement, with a finely divided plane wearing it if asked. Open the script in Blender's Scripting workspace and run it, or run blender --python on it.

签名
导出 Blender -> 文本
    材质: PBR Material
    文件夹: 文本
    预览平面: 真否
    贴图尺寸: 整数
string ExportBlender(
    PbrMaterial material,
    string folder,
    bool previewPlane = true,
    int textureSize = 0)

参数

名称类型默认值说明
材质PBR Material—The material.
文件夹文本—The folder to write the script and its maps into.
预览平面真否TrueWhether the script also adds a plane wearing the material.
贴图尺寸整数0The maps' size in pixels; 0 keeps the material's.

返回

结果文本
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
材质导出
所属包
图像处理

导出 GLB

函数

Writes the material on a sample shape as one GLB file, its maps embedded, with the height turned into real geometry if asked. Opens in Blender, three.js, Unity, Unreal, Godot and every glTF viewer.

签名
导出 GLB -> 文本
    材质: PBR Material
    路径: 文本
    形状: PreviewShape
    置换几何体: 真否
    贴图尺寸: 整数
string ExportGlb(
    PbrMaterial material,
    string path,
    PreviewShape shape = PreviewShape.Plane,
    bool displaceGeometry = false,
    int textureSize = 0)

参数

名称类型默认值说明
材质PBR Material—The material.
路径文本—The file to write, ending .glb.
形状PreviewShape平面The shape it is shown on.
置换几何体真否FalseWhether the height moves the shape's surface in the file, rather than only shading it.
贴图尺寸整数0The maps' size in pixels; 0 keeps the material's.

返回

结果文本
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
材质导出
所属包
图像处理

导出 MaterialX

函数

Writes the material as a MaterialX document - an OpenPBR surface reading the material's maps, with displacement from its height - for Houdini, Maya, Arnold, USD and any renderer reading MaterialX 1.39.

签名
导出 MaterialX -> 文本
    材质: PBR Material
    文件夹: 文本
    贴图尺寸: 整数
string ExportMaterialX(
    PbrMaterial material,
    string folder,
    int textureSize = 0)

参数

名称类型默认值说明
材质PBR Material—The material.
文件夹文本—The folder to write the document and its maps into.
贴图尺寸整数0The maps' size in pixels; 0 keeps the material's.

返回

结果文本
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
材质导出
所属包
图像处理

导出网格 GLB

函数

Writes a model with its material as one GLB file: for a model textured with a layer stack or a triplanar projection, whose maps are in its own texture coordinates.

签名
导出网格 GLB -> 文本
    网格: MaterialMesh
    材质: PBR Material
    路径: 文本
    贴图尺寸: 整数
string ExportMeshGlb(
    MaterialMesh mesh,
    PbrMaterial material,
    string path,
    int textureSize = 0)

参数

名称类型默认值说明
网格MaterialMesh—The model.
材质PBR Material—The material.
路径文本—The file to write, ending .glb.
贴图尺寸整数0The maps' size in pixels; 0 keeps the material's.

返回

结果文本
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
材质导出
所属包
图像处理

导出贴图集

函数

Writes the material's maps as image files named and packed for an engine: glTF and Godot pack occlusion, roughness and metallic into one image; Unreal does too with DirectX normals; Unity's pipelines have their own mask maps. Height is written as a 16-bit image so it keeps its precision.

签名
导出贴图集 -> 文本数组
    材质: PBR Material
    文件夹: 文本
    预设: Texture Set Preset
    贴图尺寸: 整数
string[] ExportTextureSet(
    PbrMaterial material,
    string folder,
    TextureSetPreset preset = TextureSetPreset.Gltf,
    int textureSize = 0)

参数

名称类型默认值说明
材质PBR Material—The material.
文件夹文本—The folder to write into.
预设Texture Set PresetglTFThe engine.
贴图尺寸整数0The maps' size in pixels; 0 keeps the material's.

返回

结果文本数组
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
材质导出
所属包
图像处理

导出 USD

函数

Writes the material as a USD stage: a UsdPreviewSurface reading its maps, its height as displacement in metres, on a sample shape. Opens in Blender, Houdini, Omniverse, usdview and any USD tool; a renderer that displaces shows the relief.

签名
导出 USD -> 文本
    材质: PBR Material
    文件夹: 文本
    形状: PreviewShape
    贴图尺寸: 整数
string ExportUsd(
    PbrMaterial material,
    string folder,
    PreviewShape shape = PreviewShape.Plane,
    int textureSize = 0)

参数

名称类型默认值说明
材质PBR Material—The material.
文件夹文本—The folder to write the stage and its maps into.
形状PreviewShape平面The shape it is shown on.
贴图尺寸整数0The maps' size in pixels; 0 keeps the material's.

返回

结果文本
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
材质导出
所属包
图像处理