{"id":928,"date":"2020-01-09T17:51:24","date_gmt":"2020-01-09T09:51:24","guid":{"rendered":"http:\/\/blog.coolcoding.cn\/?p=928"},"modified":"2020-12-25T11:27:50","modified_gmt":"2020-12-25T03:27:50","slug":"%e7%83%98%e7%84%99%e8%ae%b0%e5%bd%95","status":"publish","type":"post","link":"https:\/\/blog.coolcoding.cn\/?p=928","title":{"rendered":"[Unity]\u70d8\u7119\u76f8\u5173\u8bb0\u5f55"},"content":{"rendered":"\n<p>[Mixed Lighting]<\/p>\n\n\n\n<p>1.Baked Indirect mode<br>\n\u95f4\u63a5\u70d8\u7119\u6a21\u5f0f<br>\nMixed lights provide realtime direct light while indirect light is baked into lightmaps and light probes<br>\n\u5b83\u53ea\u70d8\u7119\u95f4\u63a5\u5149\uff0c\u5176\u4ed6\u7684\u5168\u90e8\u662f\u5b9e\u65f6\u7684<\/p>\n\n\n\n<p>2.Subtractive<br>\nSubtractive\u6a21\u5f0f<\/p>\n\n\n\n<p>((Subtractive is the only Mixed lighting mode that bakes direct lighting into the light map, and discards the information that Unity uses to composite dynamic and static shadows in other Mixed lighting modes. Because the Light is already baked into the lightmap<br>\n, Unity cannot perform any direct lighting calculations at run time.))<br>\nSubtractive\u53ea\u70d8\u7119\u76f4\u63a5\u5149\u5230lightmap\u4e0a,\u5e76\u4e22\u5f03\u5176\u5b83\u6df7\u5408\u6a21\u5f0f\u4e0b\u7684\u52a8\u6001\u548c\u9759\u6001\u9634\u5f71\u4fe1\u606f\uff0c\u706f\u5149\u5df2\u7ecf\u70d8\u7119\u5230\u5149\u7167\u8d34\u56fe\u4e2d\u4e86\uff0c\u4e5f\u65e0\u6cd5\u5728\u8fd0\u884c\u4e2d\u8fdb\u884c\u76f4\u63a5\u5149\u7167\u8ba1\u7b97<br>\n((Mixed lights provide baked direct and indirect lighting for static objects. dynamic objects receive realtime direct lighting and cast shadows on static objects using the main direction light in the scene\u3002))<\/p>\n\n\n\n<p>\u9759\u6001\u5bf9\u8c61\u5b8c\u5168\u4e0d\u663e\u793a\u6df7\u5408\u5149\u4e2d\u7684\u4efb\u4f55\u955c\u9762\u53cd\u5c04\u6216\u5149\u6cfd\u9ad8\u5149\uff0c\u4e5f\u4e0d\u80fd\u4ece\u52a8\u6001GameObjects\u63a5\u6536\u4efb\u4f55\u9634\u5f71\uff0c\u9664\u4e86\u4e3b\u8981\u7684\u76f4\u63a5\u5149\u3002<br>\n\u52a8\u6001GameObjects\u63a5\u6536\u5b9e\u65f6\u5149\u7167\uff0c\u5e76\u652f\u6301\u5149\u6cfd\u53cd\u5c04\u3002\u4f46\u53ea\u80fd\u901a\u8fc7LightProbes\u4ece\u9759\u6001GameObjects\u63a5\u6536\u9634\u5f71\u3002<\/p>\n\n\n\n<p>\u4e00\u4e2a\u4f8b\u5b50\u662f\u6784\u5efa\u4e00\u4e2a\u5e26\u6709\u5916\u90e8\u5173\u5361\u4e14\u52a8\u6001\u6e38\u620f\u5bf9\u8c61\u5f88\u5c11\u5373\u5361\u901a\u98ce\u683c\u6e38\u620f\u65f6\u3002<\/p>\n\n\n\n<p>Substractive\u6a21\u5f0f\u7684\u6027\u80fd\u8981\u6c42\u4f7f\u5176\u6210\u4e3a\u6784\u5efa\u4f4e\u7aef\u79fb\u52a8\u8bbe\u5907\u7684\u4e0d\u9519\u9009\u62e9<br>\n\u4f18\u70b9\uff1a<br>\na.\u5b83\u5728\u5149\u7167\u56fe\u4e2d\u7684\u9759\u6001GameObjects\u4e4b\u95f4\u63d0\u4f9b\u4e86\u9ad8\u8d28\u91cf\u7684\u9634\u5f71\uff0c\u800c\u6ca1\u6709\u5176\u4ed6\u6027\u80fd\u8981\u6c42\u3002<br>\nb.\u7740\u8272\u5668\u4e2d\u7684\u4e00\u9879Texture\u64cd\u4f5c\u53ef\u5904\u7406\u9759\u6001GameObjects\u4e4b\u95f4\u7684\u6240\u6709\u5149\u7167\u548c\u9634\u5f71\u3002<br>\nc.\u63d0\u4f9b\u95f4\u63a5\u7167\u660e\u3002<br>\n\u7f3a\u70b9\uff1a<br>\na.\u5b83\u4e0d\u63d0\u4f9b\u5b9e\u65f6\u76f4\u63a5\u7167\u660e\uff0c\u56e0\u6b64\u4e0d\u63d0\u4f9b\u955c\u9762\u7167\u660e\u3002<br>\nb.\u9664\u4e86\u4e00\u4e2a\u5b9a\u5411\u5149\u6e90\uff08\u4e3b\u5149\u6e90\uff09\u4ee5\u5916\uff0c\u5b83\u4e0d\u4e3a\u9759\u6001GameObject\u63d0\u4f9b\u52a8\u6001\u9634\u5f71\u3002<br>\nc.\u53ea\u80fd\u901a\u8fc7\u5149\u63a2\u6d4b\u5668\u63d0\u4f9b\u4ece\u9759\u6001\u6e38\u620f\u5bf9\u8c61\u5230\u52a8\u6001\u6e38\u620f\u5bf9\u8c61\u7684\u4f4e\u5206\u8fa8\u7387\u9634\u5f71\u3002<br>\nd.\u63d0\u4f9b\u4e86\u4e0d\u7cbe\u786e\u7684\u52a8\u6001\u548c\u9759\u6001\u9634\u5f71\u7ec4\u5408\u3002<br>\ne.\u589e\u52a0\u4e86lightmapp\u7eb9\u7406\u7684\u5185\u5b58\u9700\u6c42<\/p>\n\n\n\n<p>5.x\u4e2d\u4e70\u662f\u7684Geomerics\u516c\u53f8\u7684Enlighten(\u542f\u53d1\u5f0f)<br>5.6\u4e4b\u540e\u662fProgressive(\u6e10\u8fdb\u5f0f)<\/p>\n\n\n\n<p>Lightmapping Settings:<\/p>\n\n\n\n<p>Lightmapper<br>\n1.Progressive GPU Lightmapper(Preview)<br>\n\u9884\u89c8\u7248\u672c\uff0c\u6bd4CPU\u7248\u672c\u66f4\u5feb<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[Mixed Lighting] 1.Baked Indirect mode \u95f4\u63a5\u70d8\u7119\u6a21\u5f0f Mixed lig [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/928"}],"collection":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=928"}],"version-history":[{"count":2,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/928\/revisions"}],"predecessor-version":[{"id":933,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/928\/revisions\/933"}],"wp:attachment":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}