92 lines
3.6 KiB
Markdown
92 lines
3.6 KiB
Markdown
|
---
|
|||
|
title: UE5 MergeActor使用笔记
|
|||
|
date: 2022-09-23 14:28:31
|
|||
|
excerpt:
|
|||
|
tags:
|
|||
|
rating: ⭐
|
|||
|
---
|
|||
|
## MergeActor
|
|||
|
文档地址:文档地址:https://docs.unrealengine.com/5.0/zh-CN/merging-actors-in-unreal-engine/
|
|||
|
|
|||
|
UE5针对Nanite增加了Approximate。使用这些功能建议点MergeActorSettings确认完设置再执行功能。
|
|||
|

|
|||
|
|
|||
|
### Merge
|
|||
|
合并模型与材质,DrawCall等于材质数量,不会保留UV。
|
|||
|
|
|||
|
比较适合这种由多种小零件组合成的模型:
|
|||
|

|
|||
|
|
|||
|
Merge还有一个作用就是可以合并重复的材质、去掉LightMapUV以及生成Nanite。左下角有个Replace Source Actor选项可以代替场景中的Actor。
|
|||
|

|
|||
|
|
|||
|
|
|||
|
### Batch
|
|||
|
用于创建instanced Static Mesh components。
|
|||
|
|
|||
|

|
|||
|

|
|||
|
|
|||
|
|
|||
|
### Simplify
|
|||
|
用于生成Proxy Geometry 适合远景物体,**不能用于处理Nanite物体**。 https://docs.unrealengine.com/5.0/zh-CN/proxy-geometry-tool-overview-in-unreal-engine/
|
|||
|
|
|||
|
#### HLOD
|
|||
|
- 把模型分组降低Draw calls
|
|||
|
- 合并材质和贴图(atlas)
|
|||
|
- 在远处时自动替换成合并后的Static Meshes
|
|||
|
- 100% 非破坏性流程,可以随意更改
|
|||
|
|
|||
|
### Approximate
|
|||
|
可以**用于处理Nanite物体**的Simplify版本。
|
|||
|
|
|||
|
|
|||
|
|
|||
|
#TODO
|
|||
|
|
|||
|
https://docs.unrealengine.com/5.0/zh-CN/building-hierarchical-level-of-detail-meshes-in-unreal-engine/
|
|||
|
|
|||
|
### 减少Draw calls
|
|||
|
少量的大物体 替代大量的小物体
|
|||
|
- 糟糕的剔除
|
|||
|
- 糟糕的光照贴图
|
|||
|
- 糟糕的碰撞计算(精度低)
|
|||
|
- 糟糕的内存占用
|
|||
|
|
|||
|
### LODs
|
|||
|
- 简化模型
|
|||
|
- 把模型换成另一个更简单的
|
|||
|
- 远处的模型面数少
|
|||
|
- 可以把多材质换成单材质
|
|||
|
|
|||
|
### 模块化
|
|||
|
- 模块化可以节省制作时间和内存
|
|||
|
- 会增加Draw calls
|
|||
|
- 可以用merge meshes(merge actors)
|
|||
|
|
|||
|
### Instanced Rendering
|
|||
|
- 自动合批:相同网格相同材质 自动合并成一个Draw call
|
|||
|
- 有时候仍然需要手动设置
|
|||
|
- 植被和草工具可以帮助做Instancing
|
|||
|
|
|||
|
### HLOD
|
|||
|
- 把模型分组降低Draw calls
|
|||
|
- 合并材质和贴图(atlas)
|
|||
|
- 在远处时自动替换成合并后的Static Meshes
|
|||
|
- 100% 非破坏性流程,可以随意更改
|
|||
|
|
|||
|
## 其他
|
|||
|
### Merge 规则
|
|||
|
- The more common a mesh AND the lower poly the better (合并常用且面数低的)
|
|||
|
- Merge only meshes within the same area (只合并同一区域的网格体)
|
|||
|
- Merge only meshes sharing the same material(合并具有相同材质的mesh)
|
|||
|
- Meshes with no or simple collision are better for merging(没有或只有基础collision的mesh适合merge)
|
|||
|
- Smaller meshes or meshes receiving only dynamic are better candidates(小的mesh或者dynamic的mesh适合merge)
|
|||
|
- Distant geometry is usually great to merge(远处的mesh适合merge , 类似HLOD)
|
|||
|
|
|||
|
### Material
|
|||
|
- 在远距离时,禁用顶点偏移(world position offset),因为在距离很远时,几乎看不到动画效果
|
|||
|
- 在低性能设备上,可以启用 full rough,慎用 high quality reflection, 启用single-pass linear rendering
|
|||
|
- Additive can only brighten the material ,while Modulate can only darken the material(**贴花**)
|
|||
|
- 材质数量要少,使用要尽可能频繁,这样可以减少GPU切换着色器的频率 (减少draw call)
|