元編程參考文件

材質匯出

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.

返回

結果文字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
材質匯出
所屬包
影像處理