这两天在用蓝图做模型顶点编辑的功能。看一些插件大概的思路都是自己利用ue4开源代码自己重写来实现相关功能,无奈刚UE4才入门。新手还是从一切还得从蓝图入手比较友好。
(1)UE4 ProceduralMeshComponent 中有两个蓝图节点可以对当前Mesh中的顶点做编辑。一个是UpdateMeshSection。另一个是CreateMeshSection。
两个蓝图节点的区别就是UpdateMeshSection只是对当前的点进行修改不能新增顶点,看传入值就能发现它没有Triangles 三角形点索引参数。CreateMeshSection 则可以重新定义创建不一样的mesh。
UpdateMeshSection例子:
CreateMeshSection例子:
生产一个actor并添加ProceduralMeshComponent。把cube的mesh数据拷贝到新的actor,此时ProceduralMesh应该也是一个正方体的模型。然后自己给了一个三角形的数据给 CreateMeshSection 蓝图节点,结果就是把cube模型变成了一个三角面。和UpdateMeshSection不同,CreateMeshSection中的数据可以都是新的。
结果
UE4 模型编辑顶点位置思路(蓝图)
最新推荐文章于 2023-06-20 19:02:38 发布