Material Export
6 nodes
On this page 6
Export Blender
FunctionWrites 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.
ExportBlender -> Text
material: PBR Material
folder: Text
previewPlane: Truth
textureSize: Integerstring ExportBlender(
PbrMaterial material,
string folder,
bool previewPlane = true,
int textureSize = 0)Parameters
| name | type | default | description |
|---|---|---|---|
| material | PBR Material | — | The material. |
| folder | Text | — | The folder to write the script and its maps into. |
| previewPlane | Truth | True | Whether the script also adds a plane wearing the material. |
| textureSize | Integer | 0 | The maps' size in pixels; 0 keeps the material's. |
Returns
| result | Text |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Material Export
- Package
- Image Processing
Export Glb
FunctionWrites 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.
ExportGlb -> Text
material: PBR Material
path: Text
shape: PreviewShape
displaceGeometry: Truth
textureSize: Integerstring ExportGlb(
PbrMaterial material,
string path,
PreviewShape shape = PreviewShape.Plane,
bool displaceGeometry = false,
int textureSize = 0)Parameters
| name | type | default | description |
|---|---|---|---|
| material | PBR Material | — | The material. |
| path | Text | — | The file to write, ending .glb. |
| shape | PreviewShape | Plane | The shape it is shown on. |
| displaceGeometry | Truth | False | Whether the height moves the shape's surface in the file, rather than only shading it. |
| textureSize | Integer | 0 | The maps' size in pixels; 0 keeps the material's. |
Returns
| result | Text |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Material Export
- Package
- Image Processing
Export Material X
FunctionWrites 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.
ExportMaterialX -> Text
material: PBR Material
folder: Text
textureSize: Integerstring ExportMaterialX(
PbrMaterial material,
string folder,
int textureSize = 0)Parameters
| name | type | default | description |
|---|---|---|---|
| material | PBR Material | — | The material. |
| folder | Text | — | The folder to write the document and its maps into. |
| textureSize | Integer | 0 | The maps' size in pixels; 0 keeps the material's. |
Returns
| result | Text |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Material Export
- Package
- Image Processing
Export Mesh Glb
FunctionWrites 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.
ExportMeshGlb -> Text
mesh: MaterialMesh
material: PBR Material
path: Text
textureSize: Integerstring ExportMeshGlb(
MaterialMesh mesh,
PbrMaterial material,
string path,
int textureSize = 0)Parameters
| name | type | default | description |
|---|---|---|---|
| mesh | MaterialMesh | — | The model. |
| material | PBR Material | — | The material. |
| path | Text | — | The file to write, ending .glb. |
| textureSize | Integer | 0 | The maps' size in pixels; 0 keeps the material's. |
Returns
| result | Text |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Material Export
- Package
- Image Processing
Export Texture Set
FunctionWrites 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.
ExportTextureSet -> Text Array
material: PBR Material
folder: Text
preset: Texture Set Preset
textureSize: Integerstring[] ExportTextureSet(
PbrMaterial material,
string folder,
TextureSetPreset preset = TextureSetPreset.Gltf,
int textureSize = 0)Parameters
| name | type | default | description |
|---|---|---|---|
| material | PBR Material | — | The material. |
| folder | Text | — | The folder to write into. |
| preset | Texture Set Preset | Gltf | The engine. |
| textureSize | Integer | 0 | The maps' size in pixels; 0 keeps the material's. |
Returns
| result | Text Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Material Export
- Package
- Image Processing
Export Usd
FunctionWrites 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.
ExportUsd -> Text
material: PBR Material
folder: Text
shape: PreviewShape
textureSize: Integerstring ExportUsd(
PbrMaterial material,
string folder,
PreviewShape shape = PreviewShape.Plane,
int textureSize = 0)Parameters
| name | type | default | description |
|---|---|---|---|
| material | PBR Material | — | The material. |
| folder | Text | — | The folder to write the stage and its maps into. |
| shape | PreviewShape | Plane | The shape it is shown on. |
| textureSize | Integer | 0 | The maps' size in pixels; 0 keeps the material's. |
Returns
| result | Text |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Material Export
- Package
- Image Processing