網格材質
9 個節點
本頁內容 9
烘焙網格貼圖
函數Bakes a model's maps into its texture coordinates: ambient occlusion and thickness by tracing rays against the model, curvature from how its surface bends, and its position, world-space normal and parts.
烘焙網格貼圖 -> Mesh Maps
網格: MaterialMesh
尺寸: 整數
取樣數: 整數
遮蔽距離: 數字MeshMapSet BakeMeshMaps(
MaterialMesh mesh,
int size = 512,
int samples = 48,
double occlusionDistance = 0.25)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 網格 | MaterialMesh | — | The model, unwrapped. |
| 尺寸 | 整數 | 512 | The maps' width and height in pixels. |
| 取樣數 | 整數 | 48 | Rays per pixel for occlusion and thickness; more is smoother and slower. |
| 遮蔽距離 | 數字 | 0.25 | How far occlusion looks, as a share of the model's size. |
返回
| 結果 | Mesh Maps |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 網格材質
- 所屬包
- 影像處理
載入網格
函數A model read from an OBJ, glTF or GLB file: its triangles, normals and first texture coordinates. It must already be unwrapped.
載入網格(路徑: 文字) -> MaterialMesh
MaterialMesh LoadMesh(string path)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 路徑 | 文字 | — | The model file. |
返回
| 結果 | MaterialMesh |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 網格材質
- 所屬包
- 影像處理
按朝向生成蒙版
函數A mask from which way the model's surface faces: white where it faces the direction, falling off over the spread. Moss and snow on upward faces, drips under overhangs.
按朝向生成蒙版 -> Texture
烘焙貼圖: Mesh Maps
方向: Facing Direction
展開範圍: 數字
對比度: 數字Texture MaskFromDirection(
MeshMapSet maps,
FacingDirection direction = FacingDirection.Up,
double spread = 0.5,
double contrast = 0.5)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 烘焙貼圖 | Mesh Maps | — | The baked maps. |
| 方向 | Facing Direction | 上 | The direction that is white. |
| 展開範圍 | 數字 | 0.5 | How far round from the direction the mask reaches, 0 to 1. |
| 對比度 | 數字 | 0.5 | How hard its edge is, 0 to 1. |
返回
| 結果 | Texture |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 網格材質
- 所屬包
- 影像處理
按高度生成蒙版
函數A mask from height on the model: white below a level, black above, softened - rising damp, mud splashed at a base, a tide line.
按高度生成蒙版 -> Texture
烘焙貼圖: Mesh Maps
水位: 數字
柔和度: 數字
反轉: 真否Texture MaskFromHeight(
MeshMapSet maps,
double level = 0.25,
double softness = 0.1,
bool invert = false)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 烘焙貼圖 | Mesh Maps | — | The baked maps. |
| 水位 | 數字 | 0.25 | The level as a share of the model's height, 0 at its bottom. |
| 柔和度 | 數字 | 0.1 | How gradual the change is. |
| 反轉 | 真否 | False | White above the level instead. |
返回
| 結果 | Texture |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 網格材質
- 所屬包
- 影像處理
網格貼圖通道
函數The individual baked maps.
網格貼圖通道(烘焙貼圖: Mesh Maps) -> (結果: Texture, 曲率: Texture, 位置: Texture, 世界法線: Texture, 厚度: Texture, 部件編號: Texture)
Texture MeshMapChannels(
MeshMapSet maps,
out Texture curvature,
out Texture position,
out Texture worldNormal,
out Texture thickness,
out Texture partId)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 烘焙貼圖 | Mesh Maps | — | The baked maps. |
返回
| 結果 | Texture |
| 曲率 | Texture |
| 位置 | Texture |
| 世界法線 | Texture |
| 厚度 | Texture |
| 部件編號 | Texture |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 網格材質
- 所屬包
- 影像處理
在網格上預覽
函數A material rendered on a model, the camera placed to fit the model.
在網格上預覽 -> Pixel Image
網格: MaterialMesh
材質: PBR Material
環境: PreviewEnvironment
尺寸: 整數
旋轉: 數字
起伏: PreviewReliefPixelImage PreviewOnMesh(
MaterialMesh mesh,
PbrMaterial material,
PreviewEnvironment environment = PreviewEnvironment.Studio,
int size = 512,
double rotation = 30,
PreviewRelief relief = PreviewRelief.Parallax)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 網格 | MaterialMesh | — | The model. |
| 材質 | PBR Material | — | The material, in the model's texture coordinates (from a layer stack or a triplanar projection). |
| 環境 | PreviewEnvironment | 攝影棚 | The lighting. |
| 尺寸 | 整數 | 512 | The picture's width and height in pixels. |
| 旋轉 | 數字 | 30 | Turns the model, in degrees. |
| 起伏 | PreviewRelief | 視差 | How the material's height shows. Parallax works on any model; displacement moves the model's own vertices, so it needs a finely divided one. |
返回
| 結果 | Pixel Image |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 網格材質
- 所屬包
- 影像處理
示例網格
函數One of the sample shapes, unwrapped so that every point of its surface has its own texture coordinates: a model to bake and texture without leaving the graph.
示例網格(形狀: PreviewShape, 細分程度: 整數) -> MaterialMesh
MaterialMesh SampleMesh(
PreviewShape shape = PreviewShape.RoundedBox,
int detail = 64)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 形狀 | PreviewShape | 圓角立方體 | The shape. |
| 細分程度 | 整數 | 64 | How finely it is divided. |
返回
| 結果 | MaterialMesh |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 網格材質
- 所屬包
- 影像處理
三角形數
函數How many triangles a mesh has.
三角形數(網格: MaterialMesh) -> 整數
int TriangleCount(MaterialMesh mesh)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 網格 | MaterialMesh | — | The mesh. |
返回
| 結果 | 整數 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 網格材質
- 所屬包
- 影像處理
三平面投射
函數Projects a tiling material onto a model from three sides (triplanar), so it needs no seams in the model's own layout: each side of the model takes the projection facing it, blended where they meet. The result is laid out in the model's texture coordinates, ready for a layer stack.
三平面投射 -> PBR Material
材質: PBR Material
烘焙貼圖: Mesh Maps
單塊尺寸(米): 數字
銳利度: 數字PbrMaterial TriplanarProject(
PbrMaterial material,
MeshMapSet maps,
double tileMetres = 0.5,
double sharpness = 4)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 材質 | PBR Material | — | The tiling material. |
| 烘焙貼圖 | Mesh Maps | — | The model's baked maps. |
| 單塊尺寸(米) | 數字 | 0.5 | The width one tile covers on the model, in metres. |
| 銳利度 | 數字 | 4 | How narrow the blend between sides is: 1 soft, 8 nearly hard. |
返回
| 結果 | PBR Material |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 網格材質
- 所屬包
- 影像處理