网格材质
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 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 网格材质
- 所属包
- 图像处理