https://www.cnblogs.com/eangulee/p/3877824.html unity 3d 之合并网格和贴图(combine mesh and texture) 本人是个小白,但是有个做技术的理想. 关于合并网格和贴图这个问题困扰了我好久,问群友,逛论坛,翻帖子,或者说是我的愚笨吧,不过经过努力还是我解决了,测试通过,一个8drawcall的模型,合并后降到2drawcall,当然现在移动设备的性能都比较高了,不必过多纠结于drawcall,如果没这需要请路过吧...
从 https://earthexplorer.usgs.gov/ 下载高程数据 从谷歌地球上保存对应地区卫星图像 从灰度图创建地形模型,并将卫星影像作为贴图 using System.Collections; using System.Collections.Generic; using UnityEngine; public class mapMeshCreate : MonoBehaviour { private Texture textureGray;//灰度图 private Text
准备灰度图 IGray.png及草地贴图 IGrass.jpg ,放入Assets下StreamingAssets文件夹中. 创建空材质,用作参数传入脚本. 脚本如下,挂载并传入材质球即可根据灰度图生成mesh. using System.Collections; using System.Collections.Generic; using UnityEngine; //根据灰度图创建mesh地形 public class MeshTerrainCreate : MonoBeh