with one click
unreal-modeling-uv
GeometryScript UV 操作。当用户要求生成、投影、布局、变换 UV 或进行 UV 相关处理时使用。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
GeometryScript UV 操作。当用户要求生成、投影、布局、变换 UV 或进行 UV 相关处理时使用。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
GeometryScript 资产读写与碰撞操作。当用户要求精细控制 StaticMesh 资产加载/保存选项、创建新资产、生成碰撞体时使用。
GeometryScript 网格属性操作。当用户要求设置/查询顶点色、Polygroup、材质 ID 时使用。
Create geometry through the GeometryScript modeling workflow. Use when the user asks to create primitives, generate profile-based shapes, or produce mesh assets or working meshes for downstream pipelines.
GeometryScript 变形与变换操作。当用户要求弯曲、扭曲、平滑、噪声、位移、平移、旋转、缩放网格时使用。
GeometryScript 网格处理操作。当用户要求修复、简化、Remesh、布尔运算、体素化、分解、基础编辑或细分网格时使用。
GeometryScript 法线与切线操作。当用户要求重算法线、分裂法线、翻转法线、计算切线或修复法线方向时使用。
| name | unreal-modeling-uv |
| description | GeometryScript UV 操作。当用户要求生成、投影、布局、变换 UV 或进行 UV 相关处理时使用。 |
前置条件:先阅读 unreal-modeling。
CDO:/Script/GeometryScriptingCore.Default__GeometryScriptLibrary_MeshUVFunctions
TargetMesh 为 UDynamicMesh* 路径字符串。UVSetIndex(别名 UVChannel)为 int,通常 0。Debug 省略。需要 FGeometryScriptMeshSelection 的函数,用 MeshOperationLibrary 桥接(见 unreal-modeling)。
| 函数 | 关键参数 | 说明 |
|---|---|---|
SetNumUVSets | TargetMesh, NumUVSets | 设置 UV 通道数量 |
ClearUVChannel | TargetMesh, UVChannel | 清空指定 UV 通道 |
CopyUVSet | TargetMesh, FromUVSet, ToUVSet | 复制 UV 通道 |
| 函数 | 关键参数 | 说明 |
|---|---|---|
AutoGenerateXAtlasMeshUVs | TargetMesh, UVSetIndex, Options | XAtlas 自动展开(推荐通用方案) |
AutoGeneratePatchBuilderMeshUVs | TargetMesh, UVSetIndex, Options | PatchBuilder 自动展开(更多控制) |
RecomputeMeshUVs | TargetMesh, UVSetIndex, Options, Selection | 基于已有岛或 Polygroup 重新计算 UV |
| 函数 | 关键参数 | 说明 |
|---|---|---|
SetMeshUVsFromPlanarProjection | TargetMesh, UVSetIndex, PlaneTransform, Selection | 平面投影。PlaneTransform 的 Scale 定义映射到 1 UV 的世界尺寸 |
SetMeshUVsFromBoxProjection | TargetMesh, UVSetIndex, BoxTransform, Selection, MinIslandTriCount | 盒体投影 |
SetMeshUVsFromCylinderProjection | TargetMesh, UVSetIndex, CylinderTransform, Selection, SplitAngle | 圆柱投影 |
| 函数 | 关键参数 | 说明 |
|---|---|---|
RepackMeshUVs | TargetMesh, UVSetIndex, RepackOptions | 重新打包 UV 岛 |
LayoutMeshUVs | TargetMesh, UVSetIndex, LayoutOptions, Selection | 布局 UV(支持多种模式) |
ApplyTexelDensityUVScaling | TargetMesh, UVSetIndex, Options, Selection | 按纹素密度缩放 UV |
| 函数 | 关键参数 | 说明 |
|---|---|---|
TranslateMeshUVs | TargetMesh, UVSetIndex, Translation, Selection | 平移 UV |
ScaleMeshUVs | TargetMesh, UVSetIndex, Scale, ScaleOrigin, Selection | 缩放 UV |
RotateMeshUVs | TargetMesh, UVSetIndex, RotationAngle, RotationOrigin, Selection | 旋转 UV(角度制) |
| 函数 | 关键参数 | 说明 |
|---|---|---|
GetMeshUVSizeInfo | TargetMesh, UVSetIndex, Selection | 返回 3D 面积、UV 面积、3D 包围盒、UV 包围盒等 |
GetMeshPerVertexUVs | TargetMesh, UVSetIndex | 获取每顶点 UV 列表 |
| 函数 | 关键参数 | 说明 |
|---|---|---|
TransferMeshUVsByProjection | TargetMesh, TargetUVChannel, TargetSelection, TargetTransform, SourceMesh, SourceMeshOptionalBVH, SourceUVChannel, SourceSelection, SourceTransform, Settings, ProjectionDirection | 通过投影从源 mesh 传输 UV |
SetUVSeamsAlongSelectedEdges | TargetMesh, UVChannel, Selection, bInsertSeams | 沿选中边设置/移除 UV 接缝 |
| 函数 | 关键参数 | 说明 |
|---|---|---|
SetMeshTriangleUVs | TargetMesh, UVSetIndex, TriangleID, UVs | 设置单个三角形的 UV |
AddUVElementToMesh | TargetMesh, UVSetIndex, NewUVPosition | 添加 UV 元素 |
SetMeshUVElementPosition | TargetMesh, UVSetIndex, ElementID, NewUVPosition | 设置 UV 元素位置 |
CopyMeshUVLayerToMesh | CopyFromMesh, UVSetIndex, CopyToUVMesh | 将 UV 通道导出为独立 mesh |
CopyMeshToMeshUVLayer | CopyFromUVMesh, ToUVSetIndex, CopyToMesh | 将 mesh 写回 UV 通道 |
FGeometryScriptRecomputeUVsOptions| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
Method | EGeometryScriptUVFlattenMethod | SpectralConformal | 展平算法 |
IslandSource | EGeometryScriptUVIslandSource | UVIslands | 岛来源 |
ExpMapOptions | struct | — | ExpMap 专用选项 |
SpectralConformalOptions | struct | — | SpectralConformal 专用选项 |
GroupLayer | FGeometryScriptGroupLayer | 默认层 | Polygroup 层(当 IslandSource=PolyGroups 时) |
bAutoAlignIslandsWithAxes | bool | true | 自动对齐岛到坐标轴 |
EGeometryScriptUVFlattenMethod| 值 | 说明 |
|---|---|
ExpMap | 指数映射 |
Conformal | 保角映射 |
SpectralConformal | 谱保角映射(推荐) |
EGeometryScriptUVIslandSource| 值 | 说明 |
|---|---|
PolyGroups | 按 Polygroup 分岛 |
UVIslands | 按已有 UV 岛分岛 |
FGeometryScriptXAtlasOptions| 字段 | 类型 | 默认值 |
|---|---|---|
MaxIterations | int | 2 |
FGeometryScriptPatchBuilderOptions| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
InitialPatchCount | int | 100 | 初始 patch 数量 |
MinPatchSize | int | 2 | 最小 patch 大小 |
PatchCurvatureAlignmentWeight | float | 1.0 | 曲率对齐权重 |
PatchMergingMetricThresh | float | 1.5 | 合并度量阈值 |
PatchMergingAngleThresh | float | 45.0 | 合并角度阈值 |
bRespectInputGroups | bool | false | 尊重输入 Polygroup |
bAutoPack | bool | true | 自动打包 |
PackingOptions | FGeometryScriptRepackUVsOptions | — | 打包选项 |
FGeometryScriptRepackUVsOptions| 字段 | 类型 | 默认值 |
|---|---|---|
TargetImageWidth | int | 512 |
bOptimizeIslandRotation | bool | true |
FGeometryScriptLayoutUVsOptions| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
LayoutType | EGeometryScriptUVLayoutType | Repack | 布局类型 |
TextureResolution | int | 1024 | 纹理分辨率 |
Scale | float | 1 | 打包后缩放 |
Translation | FVector2D | (0,0) | 打包后平移 |
bPreserveScale | bool | false | 保留岛缩放 |
bPreserveRotation | bool | false | 保留岛旋转 |
bAllowFlips | bool | false | 允许翻转 |
EGeometryScriptUVLayoutType| 值 | 说明 |
|---|---|
Transform | 应用 Scale/Translation |
Stack | 每个岛独立缩放到单位正方形 |
Repack | 集体打包到单位正方形(无重叠) |
Normalize | 归一化纹素密度 |
XAtlas 自动展开:
{"object":"/Script/GeometryScriptingCore.Default__GeometryScriptLibrary_MeshUVFunctions","function":"AutoGenerateXAtlasMeshUVs","params":{"TargetMesh":"/Engine/Transient.DynamicMesh_0","UVSetIndex":0,"Options":{"MaxIterations":2}}}
盒体投影:
{"object":"/Script/GeometryScriptingCore.Default__GeometryScriptLibrary_MeshUVFunctions","function":"SetMeshUVsFromBoxProjection","params":{"TargetMesh":"/Engine/Transient.DynamicMesh_0","UVSetIndex":0,"BoxTransform":{"Rotation":{"X":0,"Y":0,"Z":0,"W":1},"Translation":{"X":0,"Y":0,"Z":0},"Scale3D":{"X":100,"Y":100,"Z":100}},"Selection":{},"MinIslandTriCount":2}}
重新计算 UV(SpectralConformal):
{"object":"/Script/GeometryScriptingCore.Default__GeometryScriptLibrary_MeshUVFunctions","function":"RecomputeMeshUVs","params":{"TargetMesh":"/Engine/Transient.DynamicMesh_0","UVSetIndex":0,"Options":{"Method":"SpectralConformal","IslandSource":"UVIslands","bAutoAlignIslandsWithAxes":true},"Selection":{}}}
对 CDO 路径调用 DescribeObject 可查看完整函数列表和参数签名。