U3D性能优化之MeshBaker(带光照)

①首先选中将要拖入场景的模型,如图勾选"Generate Lightmap UVs",然后将该模型拖入场景,勾选Static,接着把光源改成点光源方便观察,并把Mode改成Baked

U3D性能优化之MeshBaker(带光照)_第1张图片

U3D性能优化之MeshBaker(带光照)_第2张图片

 U3D性能优化之MeshBaker(带光照)_第3张图片

②点击Unity窗口上方"Window一>Rendering一>Lighting Settings",在弹出的窗口中点击"Generate Lighting",等待生成光照贴图

U3D性能优化之MeshBaker(带光照)_第4张图片

③点击Unity窗口上方"GameObject一>Create Other一>Mesh Baker一>TextureBaker and MeshBaker",选中Hierarchy面板中的"TextureBaker (0)",点击Inspector面板中的"Open Tools For Adding Objects",在新弹窗中先点击"Search For Meshes To Add",然后选中"bigPlatform 1",最后点击"Add Selected Meshes To Target".操作完成后关闭该弹窗

④选中Hierarchy面板中的"MeshBaker",将"Lightmapping UVs"设置为"Generate_new_UV2_layout"

U3D性能优化之MeshBaker(带光照)_第5张图片

⑤选中Hierarchy面板中的"TextureBaker (0)",然后依次点击"Create Empty Assets For Combined Material","Bake Material Into Combined Material","Bake All Child MeshBakers"

U3D性能优化之MeshBaker(带光照)_第6张图片

你可能感兴趣的:(U3D游戏开发之性能优化,3d,性能优化)