tag:blogger.com,1999:blog-63178419083772126262024-03-14T11:13:07.223-07:00Unity TaiwanUnity Taiwanhttp://www.blogger.com/profile/05195645646153478011noreply@blogger.comBlogger232125tag:blogger.com,1999:blog-6317841908377212626.post-81811162766260044012022-02-23T21:54:00.000-08:002022-02-23T21:54:02.809-08:00Unity 搜尋2021.2大耀進<span style="font-size: large;">原文:https://blog.unity.com/technology/the-latest-in-search-unity-20212<br /><br />過去一年裡,Unity 的搜索功能經歷了極大的轉變。除了能按名稱找尋物件的 Quick Search 套件,還有更為精細的核心搜索功能,能保存與查看搜索結果,並使用類似 LINQ 的語言來做複雜搜索。<br /><br />*安裝Quick Search 可以從 Project Settings啓用 Preview Packages 選項後從Package manager安裝。<br /><br /><br /></span><h2 style="text-align: left;"><span style="color: #ffa400; font-size: large;">改進後的數據排列</span></h2><span style="font-size: large;"><br />今天介紹的 Asset Indexing System(資源索引系統)比以往更好用。初次排列佔用更少的時間和空間,而且還支援在 Index Manager(Window > Search > IndexManager )中自訂擴充索引量。<br /><br /></span><a href="https://blog-api.unity.com/sites/default/files/2022-01/image6.png?imwidth=1920&" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="525" data-original-width="763" height="525" src="https://blog-api.unity.com/sites/default/files/2022-01/image6.png?imwidth=1920&" width="763" /></a><br /><i>像圖中一樣啓用列表中的 Properties 和 Dependencies,你就可以更充分地利用新的 Search Picker 和 Table。</i><br /><br /><br /><h2 style="text-align: left;"><span style="color: #ffa400; font-size: large;">搜索記錄組織</span></h2><br /><span style="font-size: large;">另一個重大改進是超好用的搜索記錄(Save Searches)。由於重復地搜索很麻煩,所以我們為搜索記錄加了新的組織選(Search Organization)。</span><br /><br /> <a href="https://blog-api.unity.com/sites/default/files/2022-01/image5.png?imwidth=1920&" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="462" data-original-width="800" height="462" src="https://blog-api.unity.com/sites/default/files/2022-01/image5.png?imwidth=1920&" width="800" /></a><br /><br /><br /><br /><span style="font-size: large;">新選項包含:只顯示在個人頁面的 User Searches(保存為偏好設定),以及所有專案參與人共享的 Project Searches (保存為專案資源)。你可以為結果設定圖標,並在新窗口中打開搜索結果。搜索窗口的狀態將被保留,搜索資料、圖標大小(特別是 Table layout)和打開的搜索欄將始終被恢復。</span><br /><br /><br /><br /><h2 style="text-align: left;"><span style="color: #ffa400; font-size: large;">Search Table視圖</span></h2><br /><span style="font-size: large;">搜索窗口允許以多種方式可視化對象,包括列表、大圖標列表及多種尺寸的塊狀視圖,如下圖所示。</span><br /><br /> <br /><a href="https://1.bp.blogspot.com/WwjzhoAJhxNaZEs4vaP3nS9YSh9qPQ4tB0LjxnwbQYfk3q_Yu0T080lnwIv7pDHiXDJRINDTVtui4odhPWpgK4ffJfImNwh1OxWikNn85wHsBz7nd7kicw5szInKppkvHVOgXB6m=s717" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="497" data-original-width="717" src="https://1.bp.blogspot.com/WwjzhoAJhxNaZEs4vaP3nS9YSh9qPQ4tB0LjxnwbQYfk3q_Yu0T080lnwIv7pDHiXDJRINDTVtui4odhPWpgK4ffJfImNwh1OxWikNn85wHsBz7nd7kicw5szInKppkvHVOgXB6m=s16000" /></a><br /><br /><br /><span style="font-size: large;">Unity 2021.2 支援在 Table 中可視化查詢結果:</span><br /><br /><a href="https://1.bp.blogspot.com/-E64IQv0ELmmcpFdBmbTJ8thdO0kh7wgZpS_La8IY5I9ugfz0hivagzp-6mlZ1MpkGZBXy1n6nz3x0iqg3oqTYCUUjW-EXfTLKMAVTriGRGd0ERvgDkDMKZhwzl87PTkXnp3sUpI=s627" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="432" data-original-width="627" src="https://1.bp.blogspot.com/-E64IQv0ELmmcpFdBmbTJ8thdO0kh7wgZpS_La8IY5I9ugfz0hivagzp-6mlZ1MpkGZBXy1n6nz3x0iqg3oqTYCUUjW-EXfTLKMAVTriGRGd0ERvgDkDMKZhwzl87PTkXnp3sUpI=s16000" /></a><br /><br /><br /><br /><span style="font-size: large;">你可以按名稱或描述來進行排序,甚至能用 Search Expression(搜索表達式)來找文件屬性,產生類似下方的列表:</span><br /><br /><a href="https://1.bp.blogspot.com/WGQ7MU0WB3II9p7lyvSsxX7TCGM3hWLl_BN60Ef2wS3WU0xteuc_hMnqMkjLVhvZv2AHVA7032C6Q6QZmNHVMvkUx7GdIEAXbiB1h19OabTpFLdpTpeNIWY8tV5BTh9QBrIk3sfz=s678" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="497" data-original-width="678" src="https://1.bp.blogspot.com/WGQ7MU0WB3II9p7lyvSsxX7TCGM3hWLl_BN60Ef2wS3WU0xteuc_hMnqMkjLVhvZv2AHVA7032C6Q6QZmNHVMvkUx7GdIEAXbiB1h19OabTpFLdpTpeNIWY8tV5BTh9QBrIk3sfz=s16000" /></a><br /><br /><br /><br /><span style="font-size: large;">當然,這些花時間弄的列表也是可以保存的。之前提到整個搜索窗口狀態將持續保留,這其中也包括這些列表格局。你甚至可以建立自己的資源管理器,同時比對多個文件的屬性值。</span><br /><br /><br /><a href="https://1.bp.blogspot.com/eWn5qnixmH3gMDJqq8gyF2V6HaGTRABLQWBblXSCpDJLQp7eIXnGc5d77SHP2d4dTb49L5LTtzx4W9MGMdnOSA0G3vJf5e3hElIV9uKAfRJgqgOSYrFezl578gJ7fTTb-yR54mmr=s1003" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="497" data-original-width="1003" src="https://1.bp.blogspot.com/eWn5qnixmH3gMDJqq8gyF2V6HaGTRABLQWBblXSCpDJLQp7eIXnGc5d77SHP2d4dTb49L5LTtzx4W9MGMdnOSA0G3vJf5e3hElIV9uKAfRJgqgOSYrFezl578gJ7fTTb-yR54mmr=s16000" /></a><br /><br /><br /><span style="font-size: large;">在建立好一個列表格局後,你可以點 Save 按鈕將詳細的報告保存為 CSV 或 JSON 文件,方便審查和比較同一專案的各個版本內容。</span><br /><br /><a href="https://1.bp.blogspot.com/MlpQozlzb2uGkPcqOcIUU6z2Q0U_HajK_FeQy4BWV1JBsMnOLOSosQycbBqn67SNj9fMEhlanWm7bw5ziU7C4OaEA_9yTUKYRDh4XpTjfZZWBkfQQrMBFCZeW1igVv_MElJ_7SDh=s1289" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="819" data-original-width="1289" src="https://1.bp.blogspot.com/MlpQozlzb2uGkPcqOcIUU6z2Q0U_HajK_FeQy4BWV1JBsMnOLOSosQycbBqn67SNj9fMEhlanWm7bw5ziU7C4OaEA_9yTUKYRDh4XpTjfZZWBkfQQrMBFCZeW1igVv_MElJ_7SDh=s16000" /></a><br /><br /><br /><br /><h2 style="text-align: left;"><span style="color: #ffa400; font-size: large;">Search Picker</span></h2><span style="font-size: large;">本功能更能滿足專業 Unity 開發者的需求。Unity 現在可以用搜索窗口用更為複雜的搜索指令來讓搜索更加精確。你可以在程式碼中指明搜索所涉及的腳本屬性。</span><br /><br /><span style="font-size: large;">先為任意參考屬性加上 [SearchContextAttribute] 特性,再指定每次搜索的 Search Provider,來發起一次範圍更小的初始搜索,或設定 Search View Flags 來更改 Search Picker 的外貌。</span><div class="max-w-content mx-auto sm:flex" style="--space-y-reverse: 0; border: 0px solid; box-sizing: border-box; display: flex; font-family: Inter, sans-serif; margin-bottom: calc(2rem * var(--space-y-reverse)); margin-left: auto; margin-right: auto; margin-top: calc(2rem * calc(1 - var(--space-y-reverse))); max-width: 63.75rem;"><div class="flex-grow max-w-content-inner" style="border: 0px solid; box-sizing: border-box; flex-grow: 1; max-width: 50.625rem;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhXBksQ5TqBZPVzVSys5Fn8GbwDuUDpPcIR3ae-kPsi12I3kRip-Hjmref0d-tUWB3zCJ9eSKvtmk1QLj8oxnlaWUV7t1gn_n3VrBzfPC2rk2Smot9xEXQndXT4HV7VH7k3WTQAZALaabRYAZO_Hl0lYXlpeYdMqUM1kwShOWAoGPzopkjhXLVi6HZ5=s1594" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="272" data-original-width="1594" height="109" src="https://blogger.googleusercontent.com/img/a/AVvXsEhXBksQ5TqBZPVzVSys5Fn8GbwDuUDpPcIR3ae-kPsi12I3kRip-Hjmref0d-tUWB3zCJ9eSKvtmk1QLj8oxnlaWUV7t1gn_n3VrBzfPC2rk2Smot9xEXQndXT4HV7VH7k3WTQAZALaabRYAZO_Hl0lYXlpeYdMqUM1kwShOWAoGPzopkjhXLVi6HZ5=w640-h109" width="640" /></a></div><br /><div style="border: 0px solid; box-sizing: border-box;"><br /></div></div></div><span style="font-size: large;"><i>上方設定結果看起來會像這樣:</i></span><br /><br /> <a href="https://1.bp.blogspot.com/SDc2PHsCQI9_qzPGde4EMIa32sEQAF86uJo-cqVQkQjv8Sz7kDFz37eZcM2HhHp48KL-KBP3p3_u_3LF9mRUQHPrgg-QM9jSChMe7F3RMuALXKRFF1GtnvKopQm1WeyYTJir5abP=s1004" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="622" data-original-width="1004" src="https://1.bp.blogspot.com/SDc2PHsCQI9_qzPGde4EMIa32sEQAF86uJo-cqVQkQjv8Sz7kDFz37eZcM2HhHp48KL-KBP3p3_u_3LF9mRUQHPrgg-QM9jSChMe7F3RMuALXKRFF1GtnvKopQm1WeyYTJir5abP=s16000" /></a><br /><br /><br /><span style="font-size: large;">Search Picker 視圖預設顯示格式</span><br /><br /><br /><h2 style="text-align: left;"><span style="color: #ffa400; font-size: large;">搜索表達式</span></h2><span style="font-size: large;">最後,我們加入了搜索表達式的概念。搜索表達式可讓搜索更強大。那它究竟能幫你做些什麼呢?</span><br /><br /><ol style="text-align: left;"><li><span style="font-size: large;">你能用它來發起一次交叉比對多個 Search Provider 的搜索,或同時發起多次搜索。 比如說,顯示場景內所有著色器無法編譯的物件。</span></li><li><span style="font-size: large;">在搜索中轉換和篩選結果,表達式非常像 LINQ 加上 SQL 加上 Lisp(S-Expression 句法)。<br /></span>sort{count{...groupby{a:assets, @type}}, @value, desc}<br />select{t:LODGroup, @lodsize}</li><li><span style="font-size: large;">在 Search Table 中就能做複雜的搜索,並將結果列為表格。Search Expression 可用作長期整合或驗證系統的基礎。</span></li></ol><br /><span style="font-size: large;">當然 Search Expression 的句法非常多,你可能會在搜索時用到以下內容:</span><br /><br /><span style="font-size: large;">找出所有帶有「rock」貼圖的Prefab:</span><br /><span style="font-size: large;"><br /></span><div><span style="font-size: large;">t:prefab ref={t:texture rock}</span><br /><br /><span style="font-size: large;">這時搜尋系統將根據 t:texturerock 開始找,然後到所有貼圖上查 t:prefabref=,最後匯總並顯示結果。</span><br /><br /><br /><span style="font-size: large;">找出專案中的資源種類數:</span><br /><br /><span style="font-size: large;">count{t={distinct{select{a:assets, @type}}}}</span><br /><br /><br /><span style="font-size: large;">求出專案中所有 LODGroup 設定文件的平均 LODSize:</span><br /><br /><br /><span style="font-size: large;">avg{select{t:LODGroup, @lodsize}}</span><br /><br /><br /><span style="font-size: large;">通常大括號就代表著搜索表達式。而前綴 avg、 select、 distinct 則表達搜索結果的處理方法。求值過程執行於Unity的背景,無論搜索有多複雜、數據有多大,搜索不會導致無回應的情況。</span><br /><br /><br /><span style="font-size: large;">搜索功能同樣支援保存非常長的搜索表達式,方便下次使用。</span><br /><br /><br /><a href="https://1.bp.blogspot.com/xpk8RIDyl7PpvNTwrqMB0_rlnT4E_Te1qeNer_nTipSGkTIeciiuW-cMJu44upuhiRp2NNRgAn5NcElbGSbSRyDEGpgugz9ZXoHfvobRi1YUZJc5GdVlErgSyI7Cu_YQtvKMrP6s=s870" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="492" data-original-width="870" src="https://1.bp.blogspot.com/xpk8RIDyl7PpvNTwrqMB0_rlnT4E_Te1qeNer_nTipSGkTIeciiuW-cMJu44upuhiRp2NNRgAn5NcElbGSbSRyDEGpgugz9ZXoHfvobRi1YUZJc5GdVlErgSyI7Cu_YQtvKMrP6s=s16000" /></a><br /><br /><br /><br /><h2 style="text-align: left;"><span style="color: #ffa400; font-size: large;">反饋</span></h2><br /><span style="font-size: large;">本文介紹的功能都在 Unity 編輯器<a href="https://docs.unity3d.com/2021.2/Documentation/Manual/search-usage.html" target="_blank">文件</a>中有說明。</span><br /><br /><span style="font-size: large;">並且,我們還製作了多個搜索功能<a href="https://github.com/Unity-Technologies/com.unity.search.extensions/wiki/Query-Examples" target="_blank">範例</a>和幾種基於 Search 功能打造的<a href="https://github.com/Unity-Technologies/com.unity.search.extensions/wiki/Dependency-Viewer" target="_blank">工具</a>,並上傳到 <a href="https://github.com/Unity-Technologies/com.unity.search.extensions" target="_blank">GitHub</a> 供大家下載使用。</span><br /><br /><span style="font-size: large;">我們的 Wiki 百科還收錄了幾篇非常不錯的搜索功能<a href="https://github.com/Unity-Technologies/com.unity.search.extensions/wiki/Blog-Search-21.2" target="_blank">文章</a>,其中有一篇詳細解讀了更為精密的<a href="https://github.com/Unity-Technologies/com.unity.search.extensions/wiki/Search-Expressions" target="_blank">搜索表達式</a>。</span><br /><br /><br /><span style="font-size: large;">Query Examples 頁面還偷放了 2022.1 新搜索功能的預覽。</span><br /><br /><a href="https://1.bp.blogspot.com/cxyybAIuVEnt0na44xuUTW4kxac-M1Og1DgUbWKYr35-DtTFb9zB80FyA53WTukD_tZ04gHvJ_rdA-6v4MCsNeqxiFnoI750sOvNqvbVyBpCvFdh7RXqnWBkQ_p0JqOEBO1L04aq=s1600" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="899" data-original-width="1600" height="360" src="https://1.bp.blogspot.com/cxyybAIuVEnt0na44xuUTW4kxac-M1Og1DgUbWKYr35-DtTFb9zB80FyA53WTukD_tZ04gHvJ_rdA-6v4MCsNeqxiFnoI750sOvNqvbVyBpCvFdh7RXqnWBkQ_p0JqOEBO1L04aq=w640-h360" width="640" /></a><br /><br /><br /><br /><span style="font-size: large;">歡迎大家下載體驗。</span><br /><br /><br /></div>Unity Taiwanhttp://www.blogger.com/profile/05195645646153478011noreply@blogger.com1tag:blogger.com,1999:blog-6317841908377212626.post-49286543601474152122021-06-29T06:02:00.000-07:002021-06-29T06:02:26.502-07:00Unity 2021.2 beta開放測試<span style="font-size: medium;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: left;">作者:<span style="border: 0px solid; box-sizing: border-box; font-family: Inter, sans-serif; font-size: 0.875rem;"><a class="" href="https://blog.unity.com/author/eduardo-oriz" style="border: 0px solid; box-sizing: border-box; text-decoration: inherit;"><span class="inline-flex items-center" style="align-items: center; border: 0px solid; box-sizing: border-box; display: inline-flex;">Eduardo Oriz,</span></a> </span><span style="border: 0px solid; box-sizing: border-box; font-family: Inter, sans-serif; font-size: 0.875rem;"><a class="" href="https://blog.unity.com/author/cap-thomas" style="border: 0px solid; box-sizing: border-box; text-decoration: inherit;">Thomas Petersen</a></span></div><div style="text-align: left;">原文:https://blog.unity.com/technology/unity-20212-beta-is-available-for-feedback</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br /><a href="https://blog-api.unity.com/sites/default/files/styles/focal_crop_ratio_3_1/public/2021-06/image9.png?imwidth=2048&h=b8ccb851&itok=5h7EUoyZ" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="267" data-original-width="800" src="https://blog-api.unity.com/sites/default/files/styles/focal_crop_ratio_3_1/public/2021-06/image9.png?imwidth=2048&h=b8ccb851&itok=5h7EUoyZ" /></a></div><br />Unity 2021.2 beta開放測試<br /><br />本次測試將帶大家領略Unity本年度即將推出的內容,所有新功能和改進皆已開放體驗。 最新Unity 2021.2的重點依舊在於穩定性、效能和工作流優化等優先級較高的事項上,同時也包含許多備受期待的功能,以及其他尚處早期測試的內容。本文將對這些新功能做逐一介紹。 下方為2021.2中部分編程與編輯器體驗的改進亮點:<br /><br /><b>編輯器</b>:場景視圖工具佈局、日常使用改進、編輯器效能優化,Apple Silicon 編輯器測試版、AI導航實驗包、眾多功能等等..<br /><b>程式</b>:效能改進、資源導入與SRP可編程構建管線優化<br /><b>效能分析</b>:優化了Profiler分析器的連續性、平台兼容及對可編程渲染管線的支援,新推出實驗性System Metrics Mali Package<br /><b>平台兼容</b>:新增Chrome OS、Android ABB的支援,改進了對安卓與WebGL的兼容,Adaptive Performance更新,UDP改進<br /><br /><br />Unity 2021.2還推出了大量的新功能與工具,恭候各位美術和團隊試用、反饋:<br /><br /><b>高清渲染管線(HDRP)</b>:體積雲、地形細節紋理、虛擬紋理流傳輸、Nvidia DLSS,光線路徑追蹤與貼花UX的改進<br /><b>通用渲染管線(URP)</b>:場景調試視圖,反射探針混合功能與對Box Projection(盒型投影)的支援,URP延遲渲染器、貼花系統、深度信息預傳輸、光照圖層、光照Cookie、SSAO效能改進、新範例項目等<br /><b>SRP</b>:Lens Flare系統、Light Anchor、GPU Lightmapper Lightmap Space Tiling、Enlighten Realtime GI、SRP設置改進<br /><b>創作工具</b>:地形工具更新、SpeedTree 8植被、Shader Graph改進、UI Toolkit執行時、更好的VFX 圖形和ShaderGraph集成、改進的URP支援等<br /><b>2D工具</b>:2D渲染器改進、Light Explorer中的2D光照、Shader Graph的自定義光照節點、VFX支援、新2D URP模板、Sprite Atlas v2新API和文件夾、2D動畫更新、2D Tilemaps和2D Physics<br /><b>影視製作</b>:實驗性Sequences工具包,Recorder、Alembic和Python的更新、簡化的Cinemachine Impulse功能、Unity Virtual Camera虛擬攝像機和Beta版面部捕捉<br /><br /><br />新版引擎即日起已在Unity Hub及官方<a href="https://unity3d.com/beta/2021.2b">下載頁面</a>開放下載,引擎迄今包含了3000多種修復與720多種新功能和修改。注意,測試版並不適用於實際的製作專案。若想用測試版中執行已有專案,請務必做好備份。<br /><br />開發者反饋是發佈測試版最為重要的目的之一。為了鼓勵開發者反饋,我們專門與NVIDIA開展合作:每位送出了至少一個未知Bug的開發者將有機會贏得一張GeForce RTX™ 3090顯卡,總共兩張。具體細節請在文末瞭解。<br /><br /></span><a href="https://blog-api.unity.com/sites/default/files/2021-06/image6_1.png?imwidth=2048&" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blog-api.unity.com/sites/default/files/2021-06/image6_1.png?imwidth=2048&" width="640" /></a><br /><br /><br /><h1 style="text-align: left;"><span style="font-size: x-large;">如何送出反饋</span></h1><h2 style="text-align: left;"><span style="font-size: medium;">試用新版引擎</span></h2><span style="font-size: medium;">歡迎各位前來探索和測試新功能,如有任何問題,請使用<b>Bug Reporter</b>進行上報:選擇Help>Report a Bug。詳盡的問題報告可幫助我們高效地調查問題、分配任務單,讓問題更快地解決。你也可以在</span><a href="https://forum.unity.com/categories/betas-experimental-features.86/" style="font-size: large;">論壇</a><span style="font-size: medium;">或</span><a href="https://answers.unity.com/index.html" style="font-size: large;">Unity Answers</a><span style="font-size: medium;">上提及問題,將Case ID送出給相關團隊。在實際上報Bug之前,你可以在公開的</span><a href="https://issuetracker.unity3d.com/product/unity/issues?category=&project=175&status=&unity_version=2021.2&view=newest" style="font-size: large;">Issue Tracker</a><span style="font-size: medium;">中查看Bug是否已被送出。</span><br /><br /><a href="https://blog-api.unity.com/sites/default/files/2021-06/image4_6.png?imwidth=2048&" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="623" data-original-width="800" height="498" src="https://blog-api.unity.com/sites/default/files/2021-06/image4_6.png?imwidth=2048&" width="640" /></a><br /><br /><br /><span style="font-size: medium;">以上便是參加Beta測試的好處了:你不僅能幫我們解決引擎的小問題、改進正式版外,還有機會參加Beta抽獎。注意,要想獲取抽獎資格,每個送出的Bug必須具有獨特性、且可以復現,並在報告中加入<b>#Beta2021Win_NVIDIA</b>標籤。</span><br /><br /><h2 style="text-align: left;"><span style="font-size: medium;">快來大顯身手吧</span></h2><a href="https://forum.unity.com/categories/betas-experimental-features.86/" style="font-size: large;">Beta and Experimental論壇</a><span style="font-size: medium;">是社區與Unity員工建立聯繫、討論預發佈技術和Beta版的地方。你的參與將幫助Unity團隊評估Beta版表現、規劃產品路線,更好地瞭解開發者的需求和水平,推動引擎工具的發展。請在</span><a href="https://forum.unity.com/forums/2021-2-beta.614/" style="font-size: large;">2021.2測試版論壇</a><span style="font-size: medium;">中分享任何關於Beta測試版的反饋。</span><br /><br /><span style="font-size: medium;">如果對Unity體驗持有意見、或想與我們一塑造引擎的未來,那就來加入</span><a href="https://unity.com/unity-pulse" style="font-size: large;">Unity Pulse</a><span style="font-size: medium;">吧。作為全新的開發者調研平台與社區,我們將在此積極舉辦開發者調查、意向調查、圓桌會談、開發者訪談和小組討論,以此作為調動資源力量的參考。更多詳情請在這篇</span><a href="https://blogs.unity3d.com/2021/04/15/join-unity-pulse-the-community-at-the-heart-of-building-a-better-unity/" style="font-size: large;">文章</a><span style="font-size: medium;">中瞭解。</span><br /><br /><span style="font-size: medium;">接下來,我們來瞭解下新Beta尚待測試的地方吧。</span><br /><br /><br /><br /><br /><h1 style="text-align: left;"><span style="font-size: x-large;">編輯器</span></h1><br /><span style="font-size: medium;">在 Unity 2021.2 中,我們繼續關注使用的改進,著重提高編輯器的效能、改進實用功能。</span><br /><br /><span style="font-size: medium;">在此版本中,我們重修了場景視圖UX,為美術相關的工具添加了操作界面,以及可定制的浮動工具欄。修整工作將從場景工具(移動、旋轉、縮放等)、組件工具、場景方向與搜索欄開展。新系統具備一定的可擴展性,支援用自定義工具及工具欄構成操作界面。</span><br /><br /><a href="https://blog-api.unity.com/sites/default/files/2021-06/image1.gif" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="517" data-original-width="800" height="413" src="https://blog-api.unity.com/sites/default/files/2021-06/image1.gif" width="640" /></a><br /><span style="font-size: medium;"> 全新場景視圖操作界面展開</span><br /><br /><br /><span style="font-size: medium;">編輯器中還有其它許多提高效率的改進,包括:</span><br /><br /><ul style="text-align: left;"><li><span style="font-size: medium;">Transform組件現在可以限定縮放比例。</span></li><li><span style="font-size: medium;">支援資源的複製/剪切/粘貼,多個對象從層級視圖拖入項目窗口時會生成多個預製物件。</span></li><li><span style="font-size: medium;">複雜預製物件的檢視器更為清晰,「Revert to Prefab(回滾至預製物件)」支援多選。</span></li><li><span style="font-size: medium;">遊戲視圖「Maximize on Play(在執行時最大化)」新增多個選項。</span></li></ul><br /><a href="https://blog-api.unity.com/sites/default/files/2021-06/image14_0.png?imwidth=2048&" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="172" data-original-width="800" height="138" src="https://blog-api.unity.com/sites/default/files/2021-06/image14_0.png?imwidth=2048&" width="640" /></a><br /><br /><br /><span style="font-size: medium;">我們還改進了檢視器中的數學表達:如sqrt(9) 或讓範圍內的值擴大2倍的*=2。各C#數值類型(如 Vector3)中的ToString() 現在預設顯示兩位小數而非一位小數。</span><br /><br /><span style="font-size: medium;">點擊Renderer組件的材質字段現在會高光顯示該材質。</span><br /><br /><a href="https://blog-api.unity.com/sites/default/files/2021-06/image18.gif" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="346" data-original-width="600" src="https://blog-api.unity.com/sites/default/files/2021-06/image18.gif" /></a><br /><br /><br /><br /><span style="font-size: medium;">此版本還包括了眾多可視化程式設計的日常使用改進:打開空白圖表編輯窗口會彈出創建/載入圖表的指南;圖標與Unity編輯器有更高的一致性;「Unit(單元)」重命名為「Node(節點)」,「Super Unit(超級單元)」現稱為「Sub-Graph(子圖表)」。我們還減少了可視化程式專案的資源導入時間,並推出了更易使用的Script圖表與State圖表呼叫節點。</span><br /><br /><span style="font-size: medium;">我們還針對<b>搜尋</b>功能進行了改進:新的Table View(列表視圖)可顯示出搜索結果的各個屬性、還支援按名稱或描述進行排序;新的Asset Picker支援根據參考資源來搜索其它相關項目。</span><br /><br /><span style="font-size: medium;">在此版本中,Package Manager新增「</span><a href="https://forum.unity.com/threads/introducing-feature-sets-to-package-manager.1122241/unread" style="font-size: large;">feature set(功能集)</a><span style="font-size: medium;">」概念,根據一定的開發目標來劃分軟體包,比如2D遊戲開發或手機開發。一組軟體包應該能很好地互補,而各種學習資源現在也可在Package Manager中直接下載。</span><br /><br /><span style="font-size: medium;">不僅如此,我們還於近期發佈了全新的Apple Silicon Editor Beta版,為M1 Mac開發者帶去了原生的Unity編輯器體驗。為了能在2021.2正式發佈前盡可能地改進編輯器,在測試期間我們歡迎大家的反饋。請在</span><a href="https://forum.unity.com/threads/now-available-native-apple-silicon-editor-preview-builds.1122712/" style="font-size: large;">論壇</a><span style="font-size: medium;">上詳細瞭解Beta版的下載方法或向我們提供反饋。</span><br /><br /><span style="font-size: medium;">此版本還包含了一系列資源處理的改進,新Beta版的迭代過程較之以往更加迅速。新的「</span><a href="https://forum.unity.com/threads/import-activity-window-2021-2-0a19-and-up.1115911/" style="font-size: large;">Import Activity(導入活動)」窗口</a><span style="font-size: medium;">可揭開詳細的導入流程——導入/重新導入的對象、導入時間、導入耗時。</span><br /><br /><a href="https://blog-api.unity.com/sites/default/files/2021-06/image21.png?imwidth=2048&" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="467" data-original-width="800" src="https://blog-api.unity.com/sites/default/files/2021-06/image21.png?imwidth=2048&" /></a><br /><span style="font-size: medium;"> 全新Import Activity窗口展開</span><br /><br /><br /><span style="font-size: medium;">得益於紋理、網格導入流程的優化以及新導入功能,資源導入流程有了全面的速度提升。請在</span><a href="https://forum.unity.com/threads/asset-importing-speedups-in-2021-2-call-for-feedback.1123690/" style="font-size: large;">該帖子</a><span style="font-size: medium;">中詳細瞭解此方面的改進。</span><br /><br /><a href="https://blog-api.unity.com/sites/default/files/2021-06/image23.png?imwidth=2048&" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="484" data-original-width="800" height="388" src="https://blog-api.unity.com/sites/default/files/2021-06/image23.png?imwidth=2048&" width="640" /></a><br /><br /><br /><span style="font-size: medium;">最後,我們研究了改進構建流程的方法,並優化了Scriptable Build Pipeline(可編程構建管線)與Build Cache(構建緩存)的效能。我們還引入了支援累加式C#編譯的編譯方案,升級了Windows、macOS、安卓與WebGL平台上的源碼加密流程。由此,項目在經過修改後,執行版本的構建時間將與修改的大小形成正比。這項改進將在未來逐步推廣到其它平台上。</span><br /><br /><span style="font-size: medium;">全新的IL2CPP源碼加密功能可產生較少的程式碼(最多可減少50%),降低構建耗時與可執行文件的體積。由於加密方法稍有不同,新功能可能會輕微影響執行時效能,因此其最適用於減少團隊內部的迭代時間。請在該</span><a href="https://forum.unity.com/threads/il2cpp-build-time-improvements-seeking-feedback.1064135/" style="font-size: large;">論壇</a><span style="font-size: medium;">中分享新功能對你專案速度的影響。</span><br /><br /><span style="font-size: medium;">我們還推出了AI Navigation實驗軟體包,它可為執行時及編輯器中NavMesh的規劃和使用提供額外的控制選項。詳情請參閱相關</span><a href="https://docs.unity3d.com/Packages/com.unity.ai.navigation@1.0/manual/index.html" style="font-size: large;">文件</a><span style="font-size: medium;">及</span><a href="https://forum.unity.com/threads/experimental-ai-navigation-package.1126961/" style="font-size: large;">論壇</a><span style="font-size: medium;">。</span><br /><br /><a href="https://blog-api.unity.com/sites/default/files/2021-06/image22.png?imwidth=2048&" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="543" data-original-width="800" height="435" src="https://blog-api.unity.com/sites/default/files/2021-06/image22.png?imwidth=2048&" width="640" /></a><br /><span style="font-size: medium;"> 你可以在Package Manager中下載com.unity.ai.navigation實驗軟體包</span><br /><br /><br /><br /><h1 style="text-align: left;"><span style="font-size: x-large;">程式工作流程</span></h1><br /><h2 style="text-align: left;"><span style="font-size: medium;">我們還新增了編程方面的效能改進,包括:</span></h2><br /><ul style="text-align: left;"><li><span style="font-size: medium;">更積極的函數內聯方法將提高C#數學運算效能</span></li><li><span style="font-size: medium;">Async Read Manager API現在支援在Burst的Job中呼叫,包括非同步開啟、關閉和取消讀取的API</span></li><li><span style="font-size: medium;">資源垃圾回收代碼現在支援多線程</span></li><li><span style="font-size: medium;">常見數據模式的GUID hash產生速度快6倍</span></li></ul><h2 style="text-align: left;"><span style="font-size: medium;">新版本還推出了一系列分析工具的改進:</span></h2><span style="font-size: medium;"><ul style="text-align: left;"><li><span style="font-size: medium;">改善了Profiler與接入安卓設備的連接效能</span></li><li><span style="font-size: medium;">Connection下拉菜單翻新為樹狀圖,玩家連接狀態將被分為本地、遠程和直連</span></li><li><span style="font-size: medium;">改進了平台支援,可更快獲取URP/HDRP代碼執行的GPU耗時</span></li><li><span style="font-size: medium;">全新API支援將隨機數據傳入Profiler,並可視化成單張圖表;支援在Profiler窗口中顯示遊戲及其它系統的效能指標,分析數據還能以不同的形式顯示</span></li><li><span style="font-size: medium;">改進了Profiler窗口中的Memory視圖。詳情請見</span><a href="https://forum.unity.com/threads/2021-2-0a19-memory-profiler-module-ui-changes.1117300/" style="font-size: large;">論壇</a><span style="font-size: medium;">。</span></li></ul></span><a href="https://blog-api.unity.com/sites/default/files/2021-06/image5.gif" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="627" data-original-width="800" height="502" src="https://blog-api.unity.com/sites/default/files/2021-06/image5.gif" width="640" /></a><br /><br /><br /><br /><span style="font-size: medium;">新的 實驗性System Metrics Mali軟體包允許開發者訪問搭載Mali架構的移動設備的底層系統或硬件效能指標,用於分析或執行時效能調整。請在</span><a href="https://docs.unity3d.com/Packages/com.unity.profiling.systemmetrics.mali@0.1/manual/" style="font-size: large;">文檔</a><span style="font-size: medium;">和</span><a href="https://forum.unity.com/threads/introducing-system-metrics-mali-package.1126178/" style="font-size: large;">論壇貼</a><span style="font-size: medium;">中瞭解詳情。你可以在Package Manager的「Add Package by Name(按名稱添加包)」功能中輸入 com.unity.profiling.systemmetrics.mali來獲取軟體</span><br /><br /><br /><h1 style="text-align: left;"><span style="font-size: x-large;">平台支援</span></h1><span style="font-size: medium;">我們增加了四個新的Screen API,方便使用多個顯示器的玩家自主選擇遊戲顯示屏、提供更為全面的顯示控制。它們分別是:Screen.mainWindowPosition、Screen.mainWindowDisplayInfo、Screen.GetDisplayLayout()和Screen.MoveMainWindowTo()。</span><br /><br /><span style="font-size: medium;">新版本還支援安卓環境下的Chrome OS。Unity將支援採用x86、x86–64與Arm架構的Chrome OS設備。此外,開發者們還可以構築自己的輸入操控方案,來充分利用起鍵鼠或模擬控制器。Unity生態中新增對Chrome OS的支援意味著更少的平台維護、更輕鬆的谷歌商店發佈流程。請在</span><a href="https://docs.unity3d.com/2021.2/Documentation/Manual/android-ChromeOS.html" style="font-size: large;">文件</a><span style="font-size: medium;">和</span><a href="https://forum.unity.com/threads/google-chrome-os-support-is-now-available-as-of-2021-2-0a14.1096996/" style="font-size: large;">論壇</a><span style="font-size: medium;">中瞭解詳情。</span><br /><br /><span style="font-size: medium;">在2021.2中,Unity將直接支援使用新的安卓擴展文件格式Android App Bundle(AAB)構建資源。開發者可採用符合Google Asset Delivery規定的AAB格式,將任意應用發佈至Google Play。</span><br /><br /><span style="font-size: medium;">Adaptive Performance 3.0也將登陸2021.2。新版本添加了Startup Boost模式,讓軟體在啓動時能選擇優先佔用CPU/GPU資源,讓遊戲啓動更快。它還集成了Unity Profiler,讓軟體執行分析更為高效。更多信息,請查看</span><a href="https://docs.unity3d.com/Packages/com.unity.adaptiveperformance@latest" style="font-size: large;">文件</a><span style="font-size: medium;">和</span><a href="https://forum.unity.com/threads/adaptive-performance-package.652306/page-2#post-6173569" style="font-size: large;">論壇</a><span style="font-size: medium;">。</span><br /><br /><span style="font-size: medium;">安卓端創作者們現在可以使用改進後的線程配置功能,來選擇應用優化方向:如節能或高效能。功能的預設設置可滿足大部分開發者的需求,但高級開發者也能進行精細化控制,最大限度地發掘應用在硬體上的效能。</span><br /><br /><span style="font-size: medium;">對WebGL的改進包括2.0.19版的Emscripten,它可更快地完成構建、為目標WebGL播放器生成更小的WebAssembly文件。</span><br /><br /><span style="font-size: medium;">新版引擎還預裝了部分手機瀏覽器上的WebGL播放器功能,包括陀螺儀、加速度計、重力傳感器和姿態傳感器(iOS和安卓瀏覽器),其他還包括前後置攝像頭,以及鎖定全屏屏幕方向的功能。</span><br /><br /><span style="font-size: medium;">對壓縮音頻的支援降低了背景音樂及其它音頻文件的體積,減少了WebGL播放器的內存佔用量。</span><br /><br /><span style="font-size: medium;">紋理現在有ASTC和ETC/ETC2兩種壓縮格式可供選擇,而桌面端的高質量紋理則可採用BC4/5/6/7格式。</span><br /><br /><span style="font-size: medium;">Unity Distribution Portal(UDP)的改進包括對執行模式的支援。此外,遊戲將提前下載新制定的IAP產品,讓購買和消費一定成功,方便開發者在播放模式下直接測試商品的兌現情況,不必等待UDP方法的回調。</span><br /><br /><span style="font-size: medium;">我們還加入了一份UDP應用指南,在明確而UDP應用方式後(即直接應用或借助Unity IAP),指南將提供步驟式說明以及代碼樣例。指南可在菜單的Implementation Guide(應用指南)部分找到。</span><br /><br /><br /><h1 style="text-align: left;"><span style="font-size: x-large;">影視製作</span></h1><span style="font-size: medium;">2021.2包含了許多對影片製作工具的改進及新的軟體包。</span><br /><br /><span style="font-size: medium;">新的實驗功能Sequences(com.unity.sequences)是一種全新的影片創作工具,可讓電影的內容編輯流程井井有條、便於協作、更加靈活。請在</span><a href="https://docs.unity3d.com/Packages/com.unity.sequences@latest" style="font-size: large;">文件</a><span style="font-size: medium;">中詳細瞭解功能。</span><br /><br /><span style="font-size: medium;">新版</span><a href="https://docs.unity3d.com/Packages/com.unity.recorder@3.0/manual/index.html" style="font-size: large;">Recorder</a><span style="font-size: medium;">集成了Arbitrary Output Variable(任意輸出變量,AOV),方便為VFX及圖像合成分割特效。我們還集成了光線路徑追蹤和Accumulation Motion Blur(累加式動態模糊),以獲得更逼真的渲染效果。</span><br /><br /><span style="font-size: medium;">最新的Alembic格式支援從任意路徑流傳輸Alembic文件,繞過了導入這一步,同時對材質的處理也有了進一步改進。</span><br /><br /><span style="font-size: medium;">簡化後的Cinemachine Impulse效果大大降低了爆炸等事件下的效果複雜度。</span><br /><br /><span style="font-size: medium;">Python for Unity拓寬了Unity對更廣範圍的媒體娛樂應用的支援,讓引擎的應用範圍更加廣泛。在4.0版本中,Python將直接內建到引擎安裝包中,並且還向下兼容Python 3.7,重新載入時進程中的Python程序也不會被再度初始化。PySide更為精簡且執行於進程內,支援的虛擬環境也較為有限。更多詳情請在</span><a href="https://docs.unity3d.com/Packages/com.unity.scripting.python@latest" style="font-size: large;">文件</a><span style="font-size: medium;">和</span><a href="https://forum.unity.com/threads/python-for-unity-release-announcements.1084688/" style="font-size: large;">論壇</a><span style="font-size: medium;">中查看。</span><br /><br /><span style="font-size: medium;">在2021.2中,新的實驗包將著重改進影片的高級製作方式。</span><br /><br /><span style="font-size: medium;">iOS應用Unity Virtual Camera可借助蘋果ARKit讓編輯器內攝像機的運動跟隨真實設備記錄在AR中的運動。</span><br /><br /><span style="font-size: medium;">Unity Face Capture(面部捕捉)支援用帶有Face ID的iPhone或iPad來捕捉、預覽和記錄面部表演,再將其綁定到模型上。要想試用Unity的Virtual Camera與Face Capture,就來</span><a href="https://create.unity.com/cinematics-beta" style="font-size: large;">報名參加Cinematics公開beta測試</a><span style="font-size: medium;">吧。</span><br /><br /><a href="https://blog-api.unity.com/sites/default/files/2021-06/image24.png?imwidth=2048&" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="559" data-original-width="800" height="447" src="https://blog-api.unity.com/sites/default/files/2021-06/image24.png?imwidth=2048&" width="640" /></a><br /><br /><br /><br /><h1 style="text-align: left;"><span style="font-size: x-large;">高清渲染管線(HDRP)</span></h1><span style="font-size: medium;">HDRP現在支援程序化Volumetric Clouds(體積雲),普通開發者可以通過調整參數來輕鬆做出不同類型的逼真雲彩,而高級開發者可以調整更詳細的設置或導入自制貼圖,更全面地掌控美術風格。</span><br /><br /><span style="font-size: medium;">NVIDIA Deep Learning Super Sampling(深度學習超級採樣,DLSS)是一種借助人工智能來改善圖形效能和質量的技術,可以切實提高實時光線追蹤的幀率與分辨率,顯著改善光柵化圖形的效能和畫質,增強VR應用的效能表現與執行幀率,有效防止由低幀率引起的眩暈、惡心及其他不良影響。DLSS技術目前已登陸HDRP。</span><br /><br /><a href="https://blog-api.unity.com/sites/default/files/2021-06/image10_0.jpg?imwidth=2048&" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blog-api.unity.com/sites/default/files/2021-06/image10_0.jpg?imwidth=2048&" width="640" /></a><br /><span style="font-size: medium;"> 《LEGO Builder’s Journey》,由Light Brick Studio出品,6月22日發行於Windows PC與Nintendo Switch展開</span><br /><br /><span style="font-size: medium;">為慶祝這項技術登陸Unity,我們與NVIDIA展開了合作,限量贈送兩張GeForce RTX™ 3090顯卡及限量版Unity x LEGOⓇ聯名人偶。具體細節請在文末瞭解。</span><br /><br /><a href="https://blog-api.unity.com/sites/default/files/2021-06/image12.jpg?imwidth=2048&" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blog-api.unity.com/sites/default/files/2021-06/image12.jpg?imwidth=2048&" width="640" /></a><br /><br /><br /><span style="font-size: medium;">HDRP光線路徑追蹤組件現在支援體積光散射(原先僅支援線性霧)。功能目前還支援發絲、織物、層疊光照和AxF材質,以及更為優秀的HDRI採樣。</span><br /><br /><span style="font-size: medium;">在體積密度的體積排布與混合方面,功能現在支援將一張Render Texture(渲染紋理)或Custom Render Texture(自定義渲染紋理)用作組件的體積遮罩。其他新增功能包括彩色體積遮罩、高清體積遮罩(在HDRP中最多可遮蓋256個立方體)以及衰減型密度體積混合距離(線性或指數型衰減)。3D紋理圖集現在支援不同的3D紋理分辨率和RGBA 3D紋理。</span><br /><br /><a href="https://blog-api.unity.com/sites/default/files/styles/focal_crop_ratio_16_9/public/2021-06/image15_0.png?imwidth=2048&h=866d526f&itok=Uq1gcOn8" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blog-api.unity.com/sites/default/files/styles/focal_crop_ratio_16_9/public/2021-06/image15_0.png?imwidth=2048&h=866d526f&itok=Uq1gcOn8" width="640" /></a><br /><span style="font-size: medium;"> HDRP體積雲展開</span><br /><br /><br /><span style="font-size: medium;">在聽取美術的反饋後,我們改進了HDRP Decals(貼花)擺放時的開發者體驗,新增Pivot支點工具,改進了UV修改操作,新增對縮放變換、預製物件的支援,以及小工具顏色編輯與多選編輯。</span><br /><br /><span style="font-size: medium;">Streaming Virtual Texturing(虛擬紋理流傳輸,SVT)是一種紋理傳輸功能,可降低GPU內存佔用與紋理加載時間。其原理是將紋理拆分為小圖塊,然後逐步將圖塊載入 GPU內存。作為一項實驗性功能,SVT目前僅支援HDRP,而本次更新新增了對PS5的支援等其它改進。</span><br /><br /><br /><h1 style="text-align: left;"><span style="font-size: x-large;">通用渲染管線(URP)</span></h1><a href="https://blog-api.unity.com/sites/default/files/2021-06/image15_1.png?imwidth=2048&" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="448" data-original-width="800" height="358" src="https://blog-api.unity.com/sites/default/files/2021-06/image15_1.png?imwidth=2048&" width="640" /></a><br /><br /><br /><span style="font-size: medium;">URP的Scene Debug View(場景除錯視窗)模式現在的功能更為貼近原內置渲染管線,Render Pipeline Debug(渲染管線除錯)窗口也新增了URP的調試工作流。開發者可以使用調試窗口來檢視渲染中材質的屬性、光線與材質的相互作用,以及最終效果中的陰影與LOD。</span><br /><br /><a href="https://blog-api.unity.com/sites/default/files/2021-06/image20.gif" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="449" data-original-width="800" height="359" src="https://blog-api.unity.com/sites/default/files/2021-06/image20.gif" width="640" /></a><br /><br /><span style="font-size: medium;">增加了對反射探針混合和盒型投影的支援,提高探針的反射質量,讓URP的功能更為貼近內置渲染管線。</span><br /><br /><a href="https://blog-api.unity.com/sites/default/files/2021-06/image22.gif" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="449" data-original-width="800" height="359" src="https://blog-api.unity.com/sites/default/files/2021-06/image22.gif" width="640" /></a><br /><br /><span style="font-size: medium;">URP Deferred Renderer(延遲渲染器)採用了一種特殊的渲染方法,即在所有頂點與像素的著色器渲染完成後,在另一條通道上完成光線投影在屏幕空間中的渲染。延遲渲染會分割幾何體與光照的渲染,僅有那些影響到可見像素的光線投影效果會被計算。此方法能夠在場景中渲染大量的光照,同時還不會對前向渲染造成顯著的效能影響。</span><br /><br /><a href="https://blog-api.unity.com/sites/default/files/2021-06/image8.gif" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="391" data-original-width="800" height="312" src="https://blog-api.unity.com/sites/default/files/2021-06/image8.gif" width="640" /></a><br /><br /><span style="font-size: medium;">新的貼花系統支援將貼花材質投射到物體的表面上。貼花可貼合模型並受到光照影響,常用於為場景添加額外細節、為材質及細節圖案增添隨機性。</span><br /><br /><span style="font-size: medium;">新增對深度預傳輸的支援,在這條渲染通道上,所有不透明網格的深度信息都會被載入深度緩衝區(不會產生片段著色成本),在後續渲染通道上使用。深度預傳輸可消除或顯著減少幾何渲染中的過度繪制現象,換句話說,任何後續的色彩渲染通道都可以復用這個深度緩衝區來為每塊像素呼叫一次片段著色器。</span><br /><br /><span style="font-size: medium;">Light Layers(光照層)是一種可以划定特定光照僅影響特定表面的渲染層。換句話說,它就像Photoshop的圖層蒙版一樣,特定層的燈光只會影響到同一圖層上的模型網格。</span><br /><br /><span style="font-size: medium;">URP Light Cookies可以通過遮擋或過濾外射光線來生成光照圖案,它可用於改變外射光線的外觀、形狀和強度來形成藝術效果,也能以極小的效能成本模擬出複雜的場景光照。</span><br /><br /><a href="https://blog-api.unity.com/sites/default/files/2021-06/image27_0.jpg?imwidth=2048&" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blog-api.unity.com/sites/default/files/2021-06/image27_0.jpg?imwidth=2048&" width="640" /></a><br /><span style="font-size: medium;"> 左圖啓用了SSAO,右圖並未啓用展開</span><br /><br /><br /><span style="font-size: medium;">Ambient Occlusion(環境光遮蔽)是指根據受光表面周圍的幾何形狀來估算出光照的亮度(或暗度)。SSAO在新版本中有了諸多改進,包括手機效能的改善、對延遲渲染的支援、深度/法線緩衝區中的法線貼圖、非受光表面和粒子特效。</span><br /><br /><span style="font-size: medium;">從內建渲染管線到URP的升級現在有了更為強大的轉換框架,現在材質以外的文件也可轉換。</span><br /><br /><span style="font-size: medium;">新的Motion Vectors(動作向量)可捕捉並記錄對象從前一幀到下一幀每塊像素及屏幕空間上的運動,再將其存儲到一個向量緩存中。</span><br /><br /><span style="font-size: medium;">URP Volume System Update Frequency(體積系統更新頻率)允許開發者根據內容和目標平台的要求來優化體積效果的效能。</span><br /><br /><span style="font-size: medium;">Package Manager現在為URP提供了新的範例場景,各個場景中將展示多個功能的配置與實際用例,以幫助開發者入門和學習。</span><br /><br /><h1 style="text-align: left;"><span style="font-size: x-large;">可編程渲染管線(SRP)</span></h1><span style="font-size: medium;">下列功能同時支援URP與HDRP。</span><br /><br /><a href="https://blog-api.unity.com/sites/default/files/2021-06/image17_0.jpg?imwidth=2048&" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blog-api.unity.com/sites/default/files/2021-06/image17_0.jpg?imwidth=2048&" width="640" /></a><br /><br /><br /><span style="font-size: medium;">本次更新推出了新的Lens Flare(鏡頭光暈)系統。Lens Flares可模擬光線在鏡頭內的折射,從而用以表現強烈的光照,或巧妙地用於營造氛圍。類似於內置渲染管線中的系統,新系統允許堆疊光效,改進了開發者界面與許多其它選項。</span><br /><br /><span style="font-size: medium;">Light Anchor(光照錨點)是一種設定光照中心支點的工具,能讓光照圍繞支點旋轉,讓影視製作的打光能更為輕鬆高效。工具帶有多種預設,可快速為角色或任意興趣點擺放好光照。此功能同樣兼容內置渲染管線。</span><br /><br /><a href="https://blog-api.unity.com/sites/default/files/2021-06/image16.png?imwidth=2048&" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="451" data-original-width="800" height="361" src="https://blog-api.unity.com/sites/default/files/2021-06/image16.png?imwidth=2048&" width="640" /></a><br /><br /><span style="font-size: medium;">GPU Lightmapper新增的Lightmap Space Tiling(光照貼圖空間平鋪)是一種圖塊烘焙技術,可將烘焙過程拆分成能隨時載入GPU內存的數據塊來減少對GPU內存的佔用。該功能可加快漸進式GPU光照貼圖器的烘焙速度,讓其能應對分辨率更高的光照貼圖。</span><br /><br /><span style="font-size: medium;">Enlighten Realtime GI能生成更具動態的光效,比如可影響全局光照的移動光照。功能的平台兼容範圍已延申至Apple Silicon、Sony PlayStation(R) 5和Microsoft Xbox Series X|S。</span><br /><br /><a href="https://blog-api.unity.com/sites/default/files/2021-06/image19.gif" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="303" data-original-width="720" src="https://blog-api.unity.com/sites/default/files/2021-06/image19.gif" /></a><br /><br /><span style="font-size: medium;">SRP還包含了一系列UI/UX改進,目的在於加快工作流程、提高管線間的連貫性。本次迭代的重點主要是統一URP與HDRP的光照和攝像機組件,包括標題、子標題、展開按鈕的樣式,設置排序、名稱和下屬字段的縮進。這些外觀上的修改對提高工具一致性具有很大的影響。</span><br /><br /><br /><h1 style="text-align: left;"><span style="font-size: x-large;">創作工具</span></h1><br /><span style="font-size: medium;">本次更新為Terrain(地形)工具增添了如下功能:</span><br /><br /><ul style="text-align: left;"><li><span style="font-size: medium;">新增橋接、複製、(噪點)散布、聯排和彎折地形筆刷</span></li><li><span style="font-size: medium;">高度圖侵蝕工具(水蝕、風蝕與熱蝕)</span></li><li><span style="font-size: medium;">改進了噪點/圖層過濾後的材質繪制操作</span></li></ul><span style="font-size: medium;">總體界面改進,更為精簡的Terrain Toolbox及創作流程</span><br /><br /><br /><a href="https://blog-api.unity.com/sites/default/files/2021-06/image8.jpg?imwidth=2048&" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="267" data-original-width="800" height="214" src="https://blog-api.unity.com/sites/default/files/2021-06/image8.jpg?imwidth=2048&" width="640" /></a><br /><span style="font-size: medium;">可詳細顯示Instanced Mesh的Terrain展開</span><br /><br /><span style="font-size: medium;">SpeedTree 8植被生成已整合至HDRP和URP,支援使用Shader Graph製作帶有風吹動畫的植被。</span><br /><br /><a href="https://blog-api.unity.com/sites/default/files/2021-06/image17.png?imwidth=2048&" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="381" data-original-width="800" height="305" src="https://blog-api.unity.com/sites/default/files/2021-06/image17.png?imwidth=2048&" width="640" /></a><br /><br /><br /><span style="font-size: medium;">在2021.2中,Visual Effect Graph迎來了以下更新:</span><br /><br /><span style="font-size: medium;">重修後的ShaderGraph集成讓Visual Effect Graph能支援用任意Shader Graph生成的HDRP著色器(非受光、受光、發絲、織物等)渲染原始形狀。此次更新在Shader Graph中替換了已遭棄用(但仍受支援)的Visual Effect target接口,還新增修改粒子特效頂點的功能,可做出著色器上的翅膀扇動動畫或肥皂泡一般的晃動粒子。</span><br /><br /><span style="font-size: medium;">新工具Signed Distance Field Baker(符號距離場烘焙器)可在編輯器中快速地將3D紋理的靜態幾何圖形烘焙成符號距離場。</span><br /><br /><a href="https://blog-api.unity.com/sites/default/files/2021-06/image11_0.gif" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="180" data-original-width="410" src="https://blog-api.unity.com/sites/default/files/2021-06/image11_0.gif" /></a><br /><br /><span style="font-size: medium;">我們還為Bounds助手添加了一些輔助建立粒子特效邊界的功能,來提高特效的剔除效果、防止不正確的邊界破壞特效。</span><br /><br /><span style="font-size: medium;">結構化/圖形緩存器支援將數據經由結構化/圖形緩存器傳入Visual Effect Graph,並獨立於紋理。此功能專門針對複雜的發絲或流體運動模擬,或借助Visual Effect Graph完成的動態數據(如敵人位置)分配。</span><br /><br /><span style="font-size: medium;">改進了Visual Effect Graph在URP上的穩定性與兼容性,URP和2D Unlit Sprite著色器渲染受光粒子的功能也即將推出。</span><br /><br /><span style="font-size: medium;">Shader Graph在2021.2中新增如下修改:</span><br /><br /><span style="font-size: medium;">著色器關鍵字限制已被移除。我們添加了一個更高效的API來處理關鍵字,並明確區分了全局和本地著色器關鍵字。詳情請在</span><a href="https://forum.unity.com/threads/shader-keyword-system-improvements-in-2021-2-alpha.1104865/" style="font-size: large;">論壇</a><span style="font-size: medium;">瞭解。</span><br /><br /><span style="font-size: medium;">我們還更新了ShaderLab Package Dependency句法。此前,工具與資源的依賴無法在著色器與軟體包之間表達,它們也就無法兼容多條渲染管線。這給資源商店與開發者們造成了一定的困擾,開發者們通常會為每條管線提供一個單獨版本來繞過該問題。為了應對該問題,ShaderLab Package Dependency功能擴展了ShaderLab句法,讓開發者能夠在軟體包中清晰地表達出著色器的依賴。</span><br /><br /><span style="font-size: medium;">UI Toolkit現在可用於為遊戲和應用製作執行時UI。它提供了專門用於製作與調試UI的可視化工具,還能借助TextMesh Pro渲染出漂亮的可縮放文本,可生成清晰的無紋理渲染,還可與Unity UI(UGUI)組合使用。請在</span><a href="https://docs.unity3d.com/2021.2/Documentation/Manual/UIElements.html" style="font-size: large;">文件</a><span style="font-size: medium;">或</span><a href="https://forum.unity.com/forums/ui-toolkit.178/" style="font-size: large;">論壇</a><span style="font-size: medium;">中瞭解更多資訊。</span><br /><br /><br /><h1 style="text-align: left;"><span style="font-size: x-large;">2D</span></h1><span style="font-size: medium;">*注意:在本文攥寫時,Unity 2021.2 beta的2D包尚未發佈。具體發佈日期請以實際為準。</span><br /><br /><span style="font-size: medium;">部分URP/2D渲染器在此次更新中有了一定的改進。</span><br /><br /><span style="font-size: medium;">使用2D渲染器的2D開發者現在可借助URP新的SceneView Debug Mode查看Mask(遮罩)、Alpha channel(Alpha通道)、Overdraw(過度繪制)或Mipmap等視圖。調整過的Sprite Mask(精靈遮罩)功能已經能正常地在SRP中運作,功能可在Window>Analysis>Rendering Debugger>Material Override下找到。</span><br /><br /><span style="font-size: medium;">2D Renderer現在可使用</span><a href="https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@11.0/manual/urp-renderer-feature.html" style="font-size: large;">Renderer Features</a><span style="font-size: medium;">進行定制或添加自定義通道。</span><br /><br /><span style="font-size: medium;">2D Lights現在集成到了</span><a href="https://docs.unity3d.com/2021.2/Documentation/Manual/LightingExplorer.html" style="font-size: large;">Light Explorer</a><span style="font-size: medium;"> 窗口中,並且將不再帶有Experimental標籤。2D Shadow的優化工作正在進行中,部分改進已經落實,包括代碼重構、單通道陰影渲染及單光源陰影剔除。</span><br /><br /><span style="font-size: medium;">2D Lights生成的紋理現在可由Shader Graph的2D Light Texture節點存取,你可以用它製作發光精靈材質。</span><br /><br /><span style="font-size: medium;">VFX Graph現在支援2D Unlit著色器,Visual Effect渲染器尚不會受到2D Light的影響。歡迎各位前往</span><a href="https://forum.unity.com/forums/visual-effect-graph.428/" style="font-size: large;">論壇</a><span style="font-size: medium;">分享自己的使用體驗。</span><br /><br /><a href="https://blog-api.unity.com/sites/default/files/2021-06/image2.gif" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="260" data-original-width="500" src="https://blog-api.unity.com/sites/default/files/2021-06/image2.gif" /></a><br /><br /><span style="font-size: medium;">加入了全新的2D URP預設模板。模板包含所有經過驗證的2D工具,並且經過預先編譯。新項目不僅能更快地加載,還將帶有URP及配置好的2D Renderer,以及其它所有2D工具。該模板還包含最優的2D開發軟體包和預設設置。</span><br /><br /><span style="font-size: medium;">其他2D方面的改進包括Sprite Atlas v2:第二版的Sprite Atlas增添了文件夾功能與新的API,可在多張圖集中查找重復的精靈、可查詢MasterAtlas和IsInBuild。2D Pixel Perfect的檢視器UI現在更加直觀。2D PSD Importer有了更好的使用體驗、更好的Photoshop圖層控制與精靈名稱映射。新增合併圖層組的選項,導入器現在可以自動產生物理形狀,方便導入角色以外的場景元素。</span><br /><br /><span style="font-size: medium;">2D Animation更新了包括骨骼顏色設置(詳見visibility面板),方便區分不同顏色或結構的骨架。在開發者體驗方面,蒙皮編輯器工具的使用提示將包括快捷鍵,一個新工具可用於查看精靈對骨骼的影響。</span><br /><br /><span style="font-size: medium;">2D Tilemaps新增了覆蓋塊圖色板按鈕或添加新按鈕的功能,方便開發者製作自定義工具。API改動包括:新的TileChangeData結構, 該結構 可在特定位置擺放帶色彩的圖塊,並一次完成所有實例的變換,省去了多次繪制呼叫的必要。你還能使用新的API來根據動畫圖塊的數據來生成圖塊。使用API放置多個圖塊的效率更高,如SetTiles(Tile 組和TileChangeData)及SetTilesBlock。</span><br /><br /><span style="font-size: medium;">2D Physics現在支援用一種同類型形狀組功能來讀取和寫入原始物理形狀(圓形、膠囊形、多邊形和邊界線),所有形狀都可歸納到一個形狀組中,也可在任意Rigidbody2D的Collider2D組件中檢索。此外,新的CustomCollider2D可直接寫入形狀組,讓Collider2D內部數據的存取高效又直接。CustomCollider2D可以還原已有的Collider2D,也能用於製作簡單或程序化的Collider2D。在未來,物理形狀組將成為物理運算請求、精靈物理交互等新功能的基礎。</span><br /><br /><br /><h1 style="text-align: left;"><span style="font-size: x-large;">NVIDIA GeForce RTX™ 3090抽獎活動</span></h1><span style="font-size: medium;">為慶祝DLSS預覽版的發佈,NVIDIA為我們提供了兩張GeForce RTX™ 3090用於Beta測試抽獎活動,獲勝者將能享受到光線追蹤和DLSS帶來的畫面感染力與開發效率!</span><br /><br /><a href="https://blog-api.unity.com/sites/default/files/2021-06/image6_1.png?imwidth=2048&" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blog-api.unity.com/sites/default/files/2021-06/image6_1.png?imwidth=2048&" width="640" /></a><br /><br /><br /><span style="font-size: medium;">要想參加抽獎,請在活動期間找到並上報至少一個獨特的2021.2 Bug。抽獎活動將於2021年6月21日星期一9點(台北時間次日0點)開始,截止至2021年10月2日星期日17 點(台北時間次日8點)</span><br /><br /><span style="font-size: medium;">獨特Bug是指尚未被發現、未被Unity復現並承認的Bug,上報時請在報告中加入 <b><span style="color: #ffa400;">#Beta2021Win_NVIDIA</span></b>標籤。每一個獨特Bug都能提高你的獲勝幾率,但每位參與者只能贏得一次獎品。</span><br /><br /><span style="font-size: medium;">參與抽獎免費,違規視作無效。完整規則請在</span><a href="https://images.response.unity3d.com/Web/Unity/%7B8c0b9eb5-a606-4194-a37c-a623c54b1d86%7D_Unity_2021.2_Beta_Sweepstakes_Terms_and_Condition_06162021.pdf" style="font-size: large;">此處</a><span style="font-size: medium;">查看。我們將直接聯繫獲獎者。</span><br /><br /><span style="font-size: medium;">在</span><a href="https://developer.nvidia.com/industries/gamedev?ncid=partn-512631-vt10#cid=dl13_partn_en-us" style="font-size: large;">此處</a><span style="font-size: medium;">報名參加NVIDIA Developer Program,在NVIDIA技術平台上學習光線追蹤工具、參加相關培訓。</span><br /><br /><br /><h1 style="text-align: left;"><span style="font-size: x-large;">註冊加入Unity Pulse,參與塑造更好的Unity</span></h1><span style="font-size: medium;">如果你想直接向Unity團隊提供反饋,就來</span><a href="https://unity.com/unity-pulse" style="font-size: large;">註冊Unity Pulse</a><span style="font-size: medium;">吧。Unity Pulse社區的作用是收集開發者反饋、開展開發者調研,開發者的體驗與意見是Unity不可或缺的組成部分。你將有機會直接聯繫Unity產品團隊、接觸到概念產品、提供Beta測試反饋,幫助我們打造最為出色的產品和體驗。快來 </span><a href="https://unity.com/unity-pulse" style="font-size: large;">用Unity ID註冊登錄</a><span style="font-size: medium;">吧!</span><br /><br /><a href="https://blog-api.unity.com/sites/default/files/2021-06/image7_1.png?imwidth=2048&" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="260" data-original-width="800" src="https://blog-api.unity.com/sites/default/files/2021-06/image7_1.png?imwidth=2048&" /></a><br /><br /><br /><h1 style="text-align: left;"><span style="font-size: x-large;">遊戲作品徵集活動</span></h1><span style="font-size: medium;">Unity正在尋找一起展示新版Unity的合作夥伴,快來與我們一起,讓全球的開發者們見識Unity引擎吧。</span><div><span style="font-size: medium;"><br />感興趣的小夥伴請在</span><a href="https://docs.google.com/forms/d/e/1FAIpQLSfLFTtcx7HM1R_VMsauRS01WYo6wUXSQju01LVBdnfss1KbcQ/viewform" style="font-size: large;">此處</a><span style="font-size: medium;">上傳你的項目。</span><br /><br /><a href="https://blog-api.unity.com/sites/default/files/2021-06/image3.jpg?imwidth=2048&" imageanchor="1" style="font-size: large; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blog-api.unity.com/sites/default/files/2021-06/image3.jpg?imwidth=2048&" width="640" /></a><br /><span style="font-size: medium;"> 《Oddworld:Soulstorm》截圖展開</span><br /><br /><span style="font-size: medium;">以上內容僅供參考,不具備任何法律效力,不包含任何誘導性信息。Unity不承諾提供任何功能、特性或代碼。所有產品、功能和特性的開發、時間安排和發佈均由Unity自行決定,如有變動,恕不另行通知。</span><br /><br /></div>Unity Taiwanhttp://www.blogger.com/profile/05195645646153478011noreply@blogger.com0tag:blogger.com,1999:blog-6317841908377212626.post-92033575946532434592020-08-02T23:23:00.000-07:002020-08-02T23:23:00.823-07:00Unity 2020.1 更新亮點介紹<font size="5">原文:Kelvin / 達哥<br /><br /></font><div><font size="5">大家好!歡迎回到Unity官方頻道<br />2020新功能非常多,</font><span style="font-size: x-large;">我來聊聊2020將會有哪些新的改進。</span><font size="5"><br /><br /><br />以往Unity的版號是從.1 .2 .3 最終到.4 LTS<br /><br />我們在上一篇2019的文章已提過,從2020開始將會改變,版號規範將會縮短成.1 .2 然後.3 LTS,將不會再有.4這個版號,最終我們希望版號的時間表能更貼近年份<br /><br />接下來我們就來看看2020有哪些改進吧!<br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==Asset Import Pipeline 資源導入流V2==</font></h2><font size="5">我們在去年重建了整個資源導入的流程,從2020.1開始這個V2版將會是預設值。這個版本大大的改善了資源導入的時間,這代表平台切換的速度也會大幅提升,新結構對於資源之間的依賴關係描述更可靠,未來在打包時解決資源依賴的增減將會更容易。<br /><br /></font><img border="0" data-original-height="1152" data-original-width="2048" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsZ3_CcP0qRQ1speC1ehvNrBjpp_BjMBr86eye5hh_NNIjokyUIJON2ilicGrmXgWUv5ZFF6Cp1KxNvdI4ZCoWPMQhGRxDfJKK4K2akvhu6K15VC7uFvTJ1UMhO8wHx_4CGsEgukro420/w640-h360/1.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>Asset Import Pipeline V2</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==Burst編譯器 1.3==</font></h2><font size="5">這個Burst編譯器是UnityDOTS裡很重要的一環,他的主要功能就是針對專案的加速有直接的幫助。這個功能已經發佈有一年了,在1.3這個版本當然也改進了許多,效能的提升以及更多API接口等等,但我個人最期待的是,Burst 1.3編譯出來的能自帶除錯用程式,能通過Visual Studio或是XCode更容易來追蹤效能問題。<br /><br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipDS8gAcjJ1GgOPIuiSPDhFKdahEc6EOp_fN8eOjGAz5GQ2423kX47Klgao2nFW0b3gs4Zpw0v-YpRb9nptZpS0FXaxhapQp4IPtM0cd_mpIHsgLtJ1s85Kv4NTGKWXlXBDKnxNEuLmvE/s640/2.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>Burst編譯器 1.3 除錯</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==文檔編輯器整合==</font></h2><font size="5">Unity現在把像是Visual Studio, Rider這種程式IDE都整合在一起,並且放在Package Manager內。<br /><br />從2020.1開始也加入了Visual Studio 2019套件,隨著版本的演進,會有越來越多的IDE被收錄在這。當然自行安裝自己的工具也是可以的。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtQnpWs0OkFwAT8jmredBWYqzu0Yu-AFneYCgPfRpN6R4v_lnveZVRUUjUcjmDmrNpXnqG-MmHG7SPExhx4ipI7-tMxzfYRT4bMTAj_Y-TJTOu0F6A3DAoGqhGcm81z9GyMFNe-Q_xXls/s640/3.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>整合的文字編譯器視窗</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==Prefab編輯器改進==</font></h2><font size="5">Prefab編輯器是在2018.3時發佈的,它可以編輯一個Prefab預製物件,但也因為是另開窗口的關係,當你想要和場景其他物件對照的時候不太方便。從2020.1開始編輯Prefab物件會預設在場內編輯。場景內其他的物件會變成灰色,當然你也可以切換顯示或隱藏。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvUK_saAyciiMcOsviG4hLjgs0IIbWiO49UUE48fKzSkDlHgeZF055FoAlYffMDXqvn9QQbsKKgUmaDAeMkplmCUoZj1J8QPraDD0td618d8Fwl-wBLO7-bAIl3P16QXKGNmvlxr-2ttM/s640/4.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>Prefab編輯視窗</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==新除錯流程==</font></h2><font size="5">從2020.1開始,專案在Unity編輯器內還沒編譯打包之前,就會先以發佈考量的格式來安排執行程式碼。這樣不但能加速編譯時間,也帶來了一個好處,當你發現執行中的專案出現了一些問題,可以馬上切換到除錯模式,再也不需要重啟遊戲,對於重啟遊戲後再也無法重現問題的人來說,這是非常好用的一個功能。未來你可以在沒有開除錯模式的狀況下測試遊戲,當遇到問題時即時打開除錯模式除錯。這樣一來平時執行也就不用載入除錯模式所需的模組,報告更貼近真實測試,效能也會比較好。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuYRkKcp349XLzFXK4Nt7PANu-Onr4hgCzq-3nweMhbIEY41uYpp4MTaKh57Z-5E8poE9QlR-0sEbLO-14cf9mhcq8F9krj6YZSIdER4bDbbKwwknHgo2KHGDMB_scxJ9Q952fITjwe-A/s640/5.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>除錯模式切換更便利</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==序列化通用型態欄位==</font></h2><font size="5">以往如果你想序列化一個通用型態欄位,必須先定義一個非通用型態子類(non-generic subclass)。從2020.1開始就不用這麼麻煩,可以直接產生了。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjNUZN5ZO4a_9nQ991TChX7J8yqpR5kj-b1FSvMe1F0GOEKoQYjrtR2jNTA8p7a8uBNX2amIuwgebb4bEgx0xDrGbZroQAueZskRqyr_P66tjmuiiCGr-a-tObJjE9CWkKNFuf8Lf-tDw/s640/6.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>直接產生通用型欄位</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==Input System==</font></h2><font size="5">新的輸入系統在2020.1從預覽改為正式版<br />這個系統從2019週期導入到現在,為了解決各種不同現代平台操作方式像是觸碰、鍵盤和搖桿等等的輸入邏輯而重新打造的系統。實現了做一套操作,全平台通用。<br />不但如此,也開放了許多API接口方便開發者和UGUI這類系統直接互動。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvLNolDWcUCEzU3eX2ChACaAy1-Dh9k6WlAatK4uLLxlkGHMcp5vzmBYYAKb4wHFKfes1JABfalWnsy0rLJI7KESW3IUcJ4Sa6pNifjSrA1v_wx2S1FBCuBztPOMj0dRoutj73BLUUF_c/s640/7.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>New Input System</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==Build Report Inspector 打包報告檢視==</font></h2><font size="5">Unity從2018開始導入了BuildReport API,專門用來除錯打包過程所發生的問題,比如打包為什麼慢?有什麼優化空間?為什麼漏檔案等等?產生出來的報告就可以顯示在這個Build Report Inspector打包報告檢視窗口裡。目前這個功能才開始進入預覽,源碼會放在Github上。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbwe6KB6zCBYCmQYhgdDEtCEHSrBpuxebNd9X4eciUEJpdbyeUvN85Ya5Bq5zEY89CvBpTC7vYyk-Ugr0nIaqybl0Ue79yDywnb9XI_htXqKwrXYZtVgaSYy6hWo1imDkphS9oE_My3yE/s640/8.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>新的打包除錯介面</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==Standalone Profiler 獨立的效能分析窗口==</font></h2><font size="5">以往的除錯器Unity Profiler是整合在編輯器內的,這個除錯器可以觀看專案每一幀的消耗到底花在哪裡,方便評估優化方案,但因為產出的報告也包含了Unity編輯器的消耗,數值混在一起反而容易造成判斷錯誤。從2020.1開始這個Profiler可以單獨開啟,代表著整個除錯流程就會移到Unity之外作為單獨運行的程式,所產出的報告就會更貼近專案執行的真實消耗。<br /><br />要開啟這個程式可以從Window->Analysis->Profiler(Standalone Process)來開啟。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX5XblB0RYghSf6n1DVD56fdzv6ZQ8jBxHYiRZKKYg3Eo2RId21eq0JC76tw9y__V-wQFxiBmr_NvLBP0LaG2UygFHMD7xPlX5z7upV6WjxEcNB42TwGpPAeTt0Kqv8ZSiUouLOOL8EFo/s640/9.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>單獨開啟的 Unity Profiler</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==Profiler 自訂事件==</font></h2><font size="5">現在你也可以通過Profiler的自訂API來把事件送到Profiler,產生一個可視化的圖表,例如將Unity在Job系統多執行緒時的分配畫成圖表。顯示在主執行緒等待多緒工作時的點,以圖型的方式顯示兩者之間的關係。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicyYnYlRn695xPA3Kh7As2xQ8gJrMZTKM0hO9nDc0rxzQXKWnQtrBxWilrUKoObMg0TVfgU5CidQVCh-IXFGZJ0HzqByQlwso-WlnAMPg_kG5L8P8ZY35tVuBdKQzs6x_4DssRLoz3wrk/s640/10.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>Unity Profiler自訂事件</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==Profiler API支援C# 傳送Metadata==</font></h2><font size="5">在Unity內每個資源物件都會產生一個中繼資料檔Metadata, 現在可以通過Unity所提供的C# API來把裡面的變數放到Profiler上,方便觀察效能問題的可能性。這個功能也是預覽,整個2020週期都會持續改進。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjD7EEIdLJaBY6RUK_7IGRiWbcaOAGO9etqWkwX_PX9kIEJYMzspmx0Hj1cGERB5jEKhWNKiClzqXpBor7rL4lXKXozIvzgVQGjjnWWxniF63W9sgIHEce0ga8Z9XMA3D1TmsYYV0227c/s640/11.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>Metadata支援</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==紀錄GPU用除錯資訊==</font></h2><font size="5">以前只能通過Recorder API來獲取CPU效能分析資料,並自己用UI顯示出來。從2020.1開始,Recorder API開始支援從執行時獲取GPU資訊,方便分析渲染週期所造成的效能消耗。<br />題外話:會有這個功能是我們在開發SRP(Scriptable Render Pipeline就是新的渲染管線時的延伸產物)<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT4U9Ct1CJm6t8BoE-drFw3lcw9vdYHKu7Pjr0b-jlfeZVC2pvnEX1zhHgSLdtMRueLMENeueAjE03CRSAMVlIioYpoEHRxyLT4TbFidPunvpDrFyK-qqdmuiUgHMMOMmJ0LBhLncvuWA/s640/12.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>GPU資訊搜集</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==新 2D 模板==</font></h2><font size="5">Unity的2D工具在2020.1算是一個大躍進,許多原本都在預覽的功能在這一版本大多都轉正式了,而且還自帶了新的2D開發模板,如果是新專案開發,2020是一個非常好進入新2D專案研發的一個版本,那麼,整體來說有哪些功能呢?<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFxTQ40pQvK_fBdRa-wmezb56JqTqv9E_1r6fgQht77_xl2z1pY40KocWXOSvexlqmiADGzlUyAvEkJxuba4cscd0iBLC25afQuRcGjaZ4N7ZZ_nbupd-frO1kkRDm6EAydx5P9Sz-eTE/s640/13.PNG" style="text-align: center;" width="640" /><font size="5"><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==2D Sprite Shape 角落拉伸功能==</font></h2><font size="5">原本的2D Sprite Shape,就已經可以拉出不規則的形狀方便處理像是地形的工具,現在針對轉角又新加了一個拉伸(Stretched)的選項,可以把處理轉角的轉折。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwOxcwMhyphenhyphenuUerDDwK4EkgiDLRW3JL8KFPEsaZKPljb0uTRC6kIe1h540E8yHH6HtMtd02fnB9vPzxXrJkWl8gZcAxdl5W4C1KBT21xBIskrArwGy_x2zjv8hv7CPPIk32yL_q6STRVUMM/s640/14.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>Sprite Shape:Stretched選項</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==2D Sprite Atlas 打包 v2 體驗版==</font></h2><font size="5">新版的Sprite Atlas打包流程可以支援用腳本把貼圖或是圖片打包成圖集了,這代表著未來專案的圖集管理會方便很多,這功能目前是體驗版。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYmdnXikf1G3Ohei7gbBnb2QmeaG9T_qh1usHKPS7fEOM0OWRjNqcOrXLVo1ZwTegojZPBnhZFPZLWbJYNOWiPdlBkfVQ4AZ3uroKNpH-qZ7QCiOifWp-89dLMGGav0UqvByGZ_gO5G28/s640/15.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>Sprite Atlas V2</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==2D 物理改進==</font></h2><font size="5">2D的物理也做了許多改進,像是Rigidbody2D的X軸和Y軸的約束器,現在不管鎖定哪一軸,都已經優化到幾乎0效能消耗。2D的碰撞在Simulation模式可以設定不同情境,比如物理的計算和渲染幀率同步,這代表著物理計算穿模問題會大大降低。<br /><br />另外還有EdgeCollider2D現在也能控制起點和終點,方便處理和其他碰撞體之間的表面連續碰撞計算。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihK2sW3E-YktCZvVwTgdKj5oj_7huneaS7436EtzPgWLZKtNLqGrgUoPolFcoMnmWpeMeNaYvAAnGFzSAj2_jyLpY8zrdJ7T6EpZo8bxpzgJGO1Vb7qMTo-hUIMuaTWCN4TgJR3TGRlKM/s640/16.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>2D物理改進</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==2D 動畫效能提升==</font></h2><font size="5">2D骨骼動畫的效能也有很大的提升,搭配前面介紹的Burst Compiler和Collections套件,就能夠在執行動畫變形時獲得很大的效能提升。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrZ0eFypVhRQRm4bJXApvGi5u1bOhjzq2BNsulSiL_tvHaTN1goLdXqXuLvZ7wY38KMLSwKnAcjFPHGE8BW6uOEMMKyShqaZ-TLqt7UCpUHQ8a09SIRI4_WsIJJmYgyaFi9aTduNNtu6M/s640/17.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>2D骨骼動畫</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==2D Sprite Shape 網格烘焙==</font></h2><font size="5">現在2D Sprite Shpae也支援先把網格資料烘焙起來,這樣就能夠在執行時直接載入而不需要重新計算。當你有執行時從未修改過的靜態Sprite Shpae或者和Prefab一起使用的Sprite Shape時,就能省下許多CPU的執行時間。<br />需要注意的是,這樣的做法雖然省下運算時間,相對的就是用空間去交換,資料量一大場景大小也會變大。而且在執行期間是無法修改這些烘焙的Sprite Shape網格。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFTT4le_ce3tMutIVX2mRLGA5UvAdm4DfB0rA7IFH34gFbeE3Dn6Vul3t4z9ADphZGT4KlOZvVdq1wZNbCHkC6PyVqbiQebUxUwrk8eXPzM2MYuDM3_lP0WAKTOqAU9wt4HQ83G-v0ZDo/s640/18.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>烘焙Sprite Shape網格的選項</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==2D 鏡頭疊加==</font></h2><font size="5">跟UPR之前發佈的改進一樣,多鏡頭疊加是開發很重要的功能。<br />現在你可以在 SRP模式將多個鏡頭疊合成一個最終輸出效果,用以處理像是小地圖等等功能。<br /></font><img border="0" data-original-height="1792" data-original-width="1772" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4FZTAHTHNBqohsRTaJV7YVWOezuLvFQBGZhcDVMYS2v6viNcACKZtQMWjOGKD1bUh1jKonlFt1oh5Fm0Ct-QKQcPBbBGYikfFQox-fpcQYWmwPTuG_lYcZTYTfZkDLAyTiogcpNhqhE0/s640/19.png" style="text-align: center;" /><font size="5"><br /><i>2D鏡頭疊加</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==Package Manager改進==</font></h2><font size="5">Package Manager的更新,2020.1的套件安裝把預覽版的開關放到Unity設定內,這樣可以避免開發者在不知情的情況下安裝了預覽版的套件,說明和UI安排也都有改動。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC0LXvh8HsybLoEtUKgcyVcGLQ2Awh-Rhdd3wBsTWzKH6S3N209mxIo1YlwY0gxHlKqEZZaA0MIE0Bh7FhKqnE3XrW0uxYq512kL_q9wFqMzqgkqMKsM-iq-Oi49eNjFn6eI_s5THQO3I/s640/20.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>預覽版的開關改到設定內</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==背景工作進度窗口==</font></h2><font size="5">以往的Unity版本中,監控編輯器的背景執行是不容易的。<br /><br />新的背景工作窗口能追蹤這些後台進程,看看Unity正在發生什麼事情,也會提供相對應的API讓程式人員做非同步處理。我們還對所有的進度條管理做了一個改進,未來所有的執行任何需要停止操作編輯器的工作,會統一用一個顯示窗口來顯示目前正在執行的工作,並查看細節。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSZuIrlkGQPGUQMudfcmn1rkCLFNBYLQquciEaoya4zfl04sIL5R94vjD2J6AS0qbxIvH4iY4YpB5flJ20GjklAdw4vOks3yGkwRULBUVCxwkAcVX28Rmxad1Sxtj36YBcoe-JNVfH_NE/s640/21.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>背景正在執行的工作進度</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==屬性頁面鎖定物件 Focused Inspectors==</font></h2><font size="5">全新的焦點檢查窗口讓你可以針對所選取的物件打開一個專屬的屬性檢視窗口。<br />以前是只有一個窗口,選了別的物件屬性視窗就跑掉了。現在你可以同時開啟許多不同的窗口來查看不同的物件。而且這個窗口不單可以顯示物件,也能鎖定顯示物件內的組件信息,螢幕夠大會非常方便。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjVrDDTN5aDTcXzoKcVK1QfRU2rIIw6gSU4kPmEPH6w6tvQ0w6VDWz424qux8nPhfU5nriJiAWDpGlqjlXehr1L0t_J3_kTEdDziGYQGj0m0dK5Li1_w3r2s1r1QREk6QnY7TJ8ITB-Rw/s640/22.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>可以鎖定物件的屬性窗口</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==Presets改進==</font></h2><font size="5">2019有介紹過Presets功能,專門用來記錄當下物件屬性,在需要的時候可以把這個屬性套用到其他物件上,問題是每次都是紀錄全部屬性。從2020.1開始就可以只複製和應用特定屬性了。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXzVPsjHr2aq0jW6YhfGHj_msNNWWWk9jw1cS1tk3mIHVH6gF-gwHDFY4v_hSWVDmvnq6F_aXmtyexDgetxH8qDf6S8RoIPIJrDFS0rN842Wdp1O9YowvAiJByFGkbDopFhbJS6kA4HyM/s640/23.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>Presets套用特定屬性</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==FBX匯入改進==</font></h2><font size="5">FBX仍然是Unity支援最齊全的模型格式之一,從2020.1開始做了幾項修正:<br />1.支援來自Sketchup的網格導入自訂屬性<br />2.軸向轉換設定,一般來說Maya或3D Max 的軸向不是Y up,所以匯入Unity之前還要做轉向,有了這個設定之後會自動修正軸向,以後再也不會有模型轉進Unity跌倒的狀況發生了。<br />3.匯入PNG圖片時可以忽略咖碼校正的選項,這設定有助於不同平台之間貼圖的顏色一致性。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGWiuxaelCzlkH8pEzH7UDjmjkhRDnKe0WvVrynyUgkaIjS4StikM9_czXSiL0WuJpsDrZ0cS8FEmCaIv4eRBZUC6CTl-U0AdwjJ_UGU79wnwRVTzdTPGVOFV-A6Z3eQM846hvIk-MI2Q/s640/24.PNG" style="text-align: center;" width="640" /><font size="5"><br />FBX改進<br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==移除Asset Store窗口==</font></h2><font size="5">我們從Unity內移除了一個編輯器框架,主要是這個框架原本是用來在Unity內開啟Asset Store窗口用的,但這項技術不但過時了,還引起了一些效能問題。因此我們在2020.1移除了它<br /><br />移除這個框架之後的Asset Store窗口該怎麼辦?<br />Unity內將不再支援開啟Asset Store網頁的窗口,現在你會看到一個警告頁面。<br /><br />你必須直接從網頁上購買套件,然後從Unity的Package manager內的My Assets就可以找到套件並下載使用。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1j5u0nYCfUOCnXgB2TQu61tHRVLaebGvcjRyiQp2hJfGF5SEGrxMTBO7lgD8YdlMUf6P3Bw-gOCEv9I9WxcsVIUtA0WW3i8Sf4uzJBXWF2wNyvYj90zdIbnh6GUkQLDVTr8E_TeiY2Y4/s640/25.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>從Package Manager的My Assets安裝套件</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==Unity Remote 功能移除==</font></h2><font size="5">另外一個移除的功能是Unity Remote,Unity Remote是一個不用打包就可以把內容傳到手機上測試的一個工具,但同樣技術也過時了,未來我們會有更好的替代方案。<br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==Device Simulator 裝置模擬器==</font></h2><font size="5">剛提到Remote被Remove掉了,如果不是實機測試,可以試試這個Device Simulator裝置模擬方案,可以在編輯器內模擬手機設備。可以視為在開發環境用模擬器執行的概念。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjL7Tt-jusyDKX6ffCHj3Gz-E-JWhh_reFwqtKWCXWuYM7mEVSoGfFjspgDCWJbqUQZYdOwgT52XEu6GB3yOVle2VnW5DKuiQpiRaajT7Uj-8Lcw8PfW9tYVDdxfmAqgpzCGnLrOPdD8fs/s640/27.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>Unity內的裝置模擬</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==Cinemachine 2.5 轉正式,2.6 轉預覽==</font></h2><font size="5">這是一個處理運鏡的套件,各種遊戲或電影會用到的運鏡,包含一些像是鏡頭抖動、自動跟隨等等這個都能幫你搞定。我個人對這個系統的評價相當高。網上也有相當多教程,基本上就是搞定運鏡所有需要的功能。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7Jht8nFKhaewGFsMvRxfFLzPmtyBe8UviwUoI3UBw_lGz7t6BLxrQsVPV2aoGHaU-JAZTaaQW-I8spL7E7ZKY6JAvtr5yNAc1gI2KzDzLXxo7-Tv8b5aBmA0WUVJTOTLADhKW8lhyphenhyphen0ls/s640/28.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>Cinemachine 2.5正式版</i><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==Animation Rigging動作系統==</font></h2><font size="5">Unity 2019開始導入的功能,以往我們把動作導入Unity之後發現有問題,通常都會請美術人員回到其他的DCC軟件像是Maya, 3D Max去修改,有了這個功能之後,就能在Unity對動作用約束器來微調動作。<br />例如我有個手拿著武器的動作位置錯了,這時我就可以把手的位置約束到刀柄就可以了。<br /><br />你可以將骨骼動作烘焙起來並裝到約束器上,這樣可以對關鍵幀進行編輯,也可以將約束後產生的動作烘焙到骨架上,執行時效能就不會消耗太大。<br /><br />簡單來說,未來你可以在Unity內微調各種動作了。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsHeUq83iztZACvIk58-ZPjl9s_QtMtWd6kFTHnKqLdnkpWVjWkMqUd9KrkTbnFQHecIGwhHVQp6bNN1by3TQ203z4o6VIxD9TjVV0XHS4ET_Jziy0XBPOMF8g5jqfDzRMjhVtqOIxy_s/s640/29.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>Animation Rigging套件</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==Kinematica 動作系統預覽==</font></h2><font size="5">基於”動作匹配”概念的次世代人物動作系統,能在執行時產生高品質的人物動作。<br />不像傳統的做法,需要在Blend Tree或狀態機安排兩個動作之間的切換,只要給予一個骨骼姿勢和所需的軌跡運動,他就會去演算出慣性的動作位移。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnxbSlw97KkHCHPLGh086BOYRoDT6NENIqvLkvMHen7uOuyWiue04vo1DLTPvEn6O1O3Ngvm62Gmi5YBRHRZ-N1Fy0dWgthm-wEt3t1oYWmdIF_NFMi2pFphI588Q7PHTAuT-7psEXU0w/s640/30.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>新的Kinematica人物動作系統</i></font></div><div><font size="5"><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==UI Toolkit==</font></h2><font size="5">原本的UIElements更名為UI Toolkit,這樣比較直覺,一看就知道用來打造編輯器工具UI的,不管是編輯器UI或是執行時的UI他都可以做到。因為是設計給非程式人員的工具,他會有許多方便的功能是不用寫程式的。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEkWgl0OuwHUJcSbmdljGf7ruyqikdhR32tQ-BxO54VzdA12KhiyGzdPV87jogxvEBVI8GlgBrCNLjcuXlTlHTWlX66W-K1f8lH_OhRI9jW9fgoc51lSrsxED0gGrFYebapBWctVNsCKI/s640/31.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>UI Builder + UI Toolkit</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==XR設備的流程改進==</font></h2><font size="5">我們調整了啟用XR設備的選單內容,現在比較直覺好用了。<br /></font><img border="0" data-original-height="455" data-original-width="810" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_kqSRGSeJ-d4n75Hloi8b9od4Iicn-qOPkcY_aBu2-ttwL7-vRHylNn7VxGjt2z3fjIKr_NTzfwwpAtmXFGUTXTrZrNJusNiDT4kO6_V0ZDPg7RSLxc3dmfGmY92luCAs9VApmCYm8Wk/s640/32.jpg" style="text-align: center;" width="640" /><font size="5"><br /><i>新的XR開關選單</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==AR Foundation 3.1==</font></h2><font size="5">AR Foundation和製作AR內容的開發者比較有相關,他跟Unity一樣主打一次開發,全平台發佈的概念。意思就是通過AR Foundation可以開發一個AR內容,但全部Unity支持的AR設備都可以發布。<br /></font><img border="0" data-original-height="1240" data-original-width="1626" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik-QFXUldCSVIy1HZps1MP_uTPKLPawMuR0WWWABlksV9YeTnMspVM9m_gFxjjWc5ZckrEuXWr1EshRPIFW3Y_Aj_e47I6IH2tpRCJPvuc40VdBML8mwKPd75imJTIxg5vADNg4LCw3-Q/s640/33.png" style="text-align: center;" width="640" /><font size="5"><br /><i>AR Foundation 3.1支援表</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==URP: 鏡頭疊加==</font></h2><font size="5">URP的多鏡頭疊加之前有介紹,可以讓你的3D物件和2D UI連同特效一起疊合<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilY317E137k9X68Y1Lz01iD5YGfpASnOB8AW8iRYffJ3fTYFLTXhQ1Zj1R1wYio9faetKZRrANbO-rRVfzR04Vh2uSSDpwTY4L_zvp2wI_3GM3sv0cUSjMvJQKsuK6kYY-I8Z6jXtzB7I/s640/34.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>URP:多鏡頭疊加</i><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==Lighting Setting Assets 光照設定文件==</font></h2><font size="5">全新的光照設定檔,可以讓你把不同光照設定存下來,未來你可以調好各種不同環境光照,比如陰天、晴天、雨天、室內、室外、夜晚等等,並在需要的時候載入。<br /><br />以往的光照資訊是跟著場景的,從2020開始,照明設定會變成獨立的設定檔,存儲預先計算的全域光照資料相關所有資訊。<br /><br />這樣的好處是A場景的光照設定也能給B場景用,未來在場景氛圍的製作會更簡單。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXmvGbPUQIKfPoPOYPOI9U_qj2LTmCqG3-jHL8m8mdhZ-edIV4rjVtBB8biu9WjwqJsXJ1-ELOiBDdeCwMjhQKcN2NAWfUrEHXvg-jHevnoCfuruMRS_CtqNk1YaxwuoBD25SNErzeecA/s640/35.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>新光照設定檔</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==烘焙貼圖UV計算改進==</font></h2><font size="5">美術人員在拆UV 貼圖時很重要的一點,就是如何善用空間把貼圖塞的越密越好,這在光照烘焙也是一樣的道理。但是自動計算的光照圖以往可能會算出非預期的結果,比如太多空白。<br /><br />未來在Unity模型導入時,就是Model Importer會多一個Calculate的選項可以勾選,用意就是把這些模型先納入光照貼圖計算考量,拆平貼圖並計算邊距,求得最少空白的貼圖結果,也不會有UV重疊的問題。可以看到右圖是有打開選項的結果,比左邊的乾淨許多。<br /></font><img border="0" data-original-height="1534" data-original-width="1478" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9t521q8J2YumjG_aqte6OxGIV1EksuD-N4CG6Y1DZRQv_X42lE-LSoJ87xhCEQh8Ll6I76oUfZxmR0rKo-9mSJ03DoEk_1b8hD9n5EeEwU64pupbI43c_xIDp_mWN-CrNFM0p1Pf2XS4/s640/36.png" style="text-align: center;" /><font size="5"><br /><i>計算UV優化</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==全域光照烘焙的採樣改進==</font></h2><font size="5">光照貼圖的計算簡單來說就是模擬光的路徑追蹤,因為不同光線之間的路線關聯性複雜,以往的演算法偶而會因為這些特性產生不正確的結果或是躁點。<br />Unity 2020.1在光照路徑計算的方法做了許多改動,預設的情況已經啟用了這個設定。可以比較出和舊版有很大的差異,烘焙時間更短結果也比之前好很多,可以注意烘圖從滿是噪點到完成的時間變得更短。<br /><br />原本的採樣數量限制也從原本的10萬個提升到10億個。這代表著光線原本能模擬的環境更真實,一般遊戲10萬個採樣,市內設計專案10億個採樣能烘出真實的結果,當然採樣越多計算時間越久是不變的。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT4ZIU2X1o2EQH41L-GPMAoOa4JPnXf534TjgzFZ2Agx6aS5tw7SdQyTZp8hUdXbmRponJHCX8BwoKiyLrnk15U9Bow0iuLV750YV2hDUl8nGA0SaPLgamaw1ai6L_dlrWf3FUaAch1Ac/s640/37.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>支援10億個採樣</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==全域光照:支持俄羅斯輪盤烘焙模式==</font></h2><font size="5">新的“俄羅斯輪盤”烘焙選項可以加快烘焙速度,他會依照情況自動決定光線最佳路徑。<br />這個演算法會考慮場景中的全域光照路徑,當光線在深色表面反彈時,光線被吸收的程度越大,光線的投射就會結束的更早。這樣不但可以減少整體烘焙的時間,對於最終的烘焙品質影響也不大。<br /></font><img border="0" data-original-height="460" data-original-width="810" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjml4rubS6jxrglSwVF5IRGIL8wodyKz6yBzlsXZo0tFaimX6yo3dsos-MI1iS81vIbToi8uIAyA4RlITs80UjgYisPojFAOHJqTWg6UXTViUnnDcvfWyCuwaWrbMBsCsJgO2w46guIKPM/s640/38.JPG" style="text-align: center;" width="640" /><font size="5"><br /><i>新的俄羅斯輪盤演烘焙</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==光照貼圖支持Cookies==</font></h2><font size="5">Cookies在Unity內意思是一種光照時指定的貼圖圖形,很適合用來模擬光線通過物件所產生的陰影照明,增加真實感。<br />以前的Cookie不支持SRP。從Unity 2020.1開始,不管是CPU或是GPU的光照貼圖都支持Cookie,這意味著混合模式的Cookie計算將會一起考慮直接光源和間接光源。<br /></font><img border="0" data-original-height="455" data-original-width="810" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisneszAZCpW7A8iXr8akDZS9-4CPZS0YhRi4PvP6h66mCjjzS_ddcrpFAV2ax_WWyseeEgjqwFb804JJSCpWJRKpESicbar-BBPnqRdvyCBngpnyligFJ2QQ7wHxBPjz_mzG0ICpIcPVc/s640/39.JPG" style="text-align: center;" width="640" /><font size="5"><br /><i>Unity Cookie</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==HDRP 光追支持網格特效==</font></h2><font size="5">HDRP現在支援光追的進度已經到可以處理動態的網格光追處理,目前是預覽版。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiT31B6QZsPgjUKKjMIVdGXF5ZIAMtxTNpH59HkqCZV09y9YFbuOI8b6l50XApCLM5-ovfkP08Jtel8WzBtjufBq6CHs_H_0zEfpXqQ5IyF0HxwDWpXJeCcDuc_sCFSGTelSEAXEbhwg4/s640/40.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>光追 vs HDRP</i><br /><br /><br /></font><h2 style="text-align: left;"><font color="#ffa400" size="5">==GPU貼圖串流功能預覽版==</font></h2><font size="5">當你搭配HDRP使用Shader Graph時就能夠使用這個”串流虛擬貼圖”功能,當場景內有許多高解析度的貼圖時,可以用串流的方式來減輕GPU記憶體的壓力,以及加速貼圖載入的時間。<br />他的原理是通過將貼圖拆分為小圖塊,然後依照需求將這些小圖塊逐步上傳到GPU記憶體內工作。<br /><br />這個功能目前是預覽版。<br /></font><img border="0" data-original-height="1152" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbpu70sm2ktLFUx1j_uCAyuoyRU40firoSIgSbp4SDVuJl_lXr4dPaygsF1hctDNsha7JnPbolADdIXTcWIFPkF5iGkZkR5Kz4189PS6UTY3wuAeUmKRi9G8RF7-VpqF8wWiSdHIPD3p4/s640/41.PNG" style="text-align: center;" width="640" /><font size="5"><br /><i>串流GPU貼圖功能</i><br /><br /><br />以上就是2020.1整理的功能說明<br />希望對你的有幫助<br />保持關注我們!</font></div>Unity Taiwanhttp://www.blogger.com/profile/05195645646153478011noreply@blogger.com2tag:blogger.com,1999:blog-6317841908377212626.post-50041038846080584042020-06-22T21:16:00.001-07:002020-06-22T21:16:56.160-07:00Unity 2019.4 LTS功能介紹<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">Unity 2019.4 重點功能詳解</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">作者:Kelvin Lo</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;"><br /></span></div>
<br />
<span style="font-size: large;">大家好!</span><span style="font-size: large;">2019.4已經發佈了,趁這個機會,我想要跟各位聊聊這一版LTS的新功能以及具體的LTS版本建議用法。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">什麼是LTS呢?雖然官方有許多文件都有解釋過什麼是LTS(長期維護版本)了。但為了有些人還是不明白什麼是LTS版本,我還是稍微以我的角度說明一下。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">所謂的LTS就是當新年度版本開始時(現在是2020.1),把去年的版本號+.1做結尾並改名LTS的版本(這裡是2019.4 LTS)。這個2019.4 LTS版本特色是會持續維護長達兩年的時間,因此最適合使用這個版本的專案,就是在未來一年準備發佈的產品。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><img border="0" data-original-height="643" data-original-width="1600" height="257" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2dE9yDuPCLqv9vj8TJogw8B-UjrlmOrqrXpLHU3ZayhVKE4TcAiSzn5TP9a8waGOenI2ZFX4q8fFeuvWdLccccb8f6MxcxshWk873i5OoMhzlbpXPg-uiWd0zPsyxoEg4bmvgyDJiXco/s640/1-LTS.png" style="text-align: center;" width="640" /></span><br />
<span style="font-size: large;">圖1 - LTS圖表</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">長期維護的意思是如果在2019.2找到了一個Bug,Unity會修復的版本是2019.2本身和2019.4,也有可能只會在2019.4修復,其他版本不會修復。主要這麼做可以讓問題的修復集中在.4管理,提升LTS版本的穩定性,對開發</span><span style="font-size: large;">專案</span><span style="font-size: large;">也比較友善。</span><br />
<br />
<span style="font-size: large;">決定要用哪一年的LTS當然就跟</span><span style="font-size: large;">專案</span><span style="font-size: large;">時程估算很有關聯,如果你的</span><span style="font-size: large;">專案</span><span style="font-size: large;">預估在2021年1月完成,那發佈時的LTS版本就建議是2019 LTS,因為2020 LTS還沒出來。所以如果</span><span style="font-size: large;">專案</span><span style="font-size: large;">完成預計在2021年12月,當然目標就是2020 LTS</span><br />
<br />
<span style="font-size: large;">要注意的是,現在的LTS版本都會落在5, 6月左右發佈,主要原因是Unity每年更新週期有4版,也就是.1 .2 .3 .4LTS,我們預期在下個週期開始,將改為.1 .2 .3LTS週期,未來期望新年度版號在Q1就進版。</span><br />
<span style="font-size: large;"><br /></span>
<img border="0" data-original-height="825" data-original-width="1600" height="329" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1oP6fPe5KmDjx0GIZGDtU2uEgbJX0LUEhRwOPzXL_r9_zv9_krzb4mcI0U3hRi1OSzOAM6zztJH-YNQh4H5KlbA0SPw_KRo5EC0tyH0OHydfbZJYM4lorCKjtwYqFVPlGed5mcDK5JGA/s640/2-LTS+next+year.png" style="text-align: center;" width="640" /><br />
<span style="font-size: large;">圖2 - 新年度LTS計畫</span><br />
<span style="font-size: large;"><br /></span>
<br />
<span style="font-size: large;">接下來細聊到底2019.4有哪些強化,除了了解有哪些新功能之外,也可以用來評估要不要升級的參考。</span><br />
<span style="font-size: large;"><br /></span>
<img border="0" data-original-height="1000" data-original-width="1600" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYjm6CpYI5qqJO_oiOjP787aMdQw9ReRJm_MV6biI1WR6ZxZRSblf4liUznoYSD2BLPrJpmzR55-Dexm9yg4OhIWhMmYuq4VLLGyTF_E093xRWEfGIaD2VQ9a2MWd-5aMjzf5lsWihi-Y/s640/3-hero+features.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖3 - 2019.4 亮點功能</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">從這個表可以看出,2019.4 LTS改進的部分還是挺多的,我們一個一個來細看</span><br />
<span style="font-size: large;"><br /></span>
<br />
<span style="color: orange; font-size: large;">版本控制(Version Control)體驗改良</span><br />
<span style="font-size: large;">大型專案的版本控制至關重要,如果你是用Github,特別是Perforce做版本控制,2019LTS改進許多UIUX體驗,現在Perforce斷線時會自動連回了。</span><br />
<img border="0" data-original-height="249" data-original-width="411" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNyNVuz0vQIb0ivEfhcsU2u1LyH5jrydq2BZ3eB8i66RfSUO6JlN9cPd-ib53e694RolGN0k-jt7V8mqW8xFhWdvs3t9DfLyah4Qt-U2cHrmRB32dcP-zTLKpISj01CMkwGyb4Hhuali0/s1600/4-VersionControl.png" style="font-size: x-large; text-align: center;" /><br />
<span style="font-size: large;">圖4 - Version Control</span><br />
<span style="font-size: large;"><br /></span>
<br />
<span style="color: orange; font-size: large;">Asset Import Pipeline V2</span><br />
<span style="font-size: large;">資源導入流程以往需要耗費大量時間等待,隨著</span><span style="font-size: large;">專案</span><span style="font-size: large;">越大越複雜,等待的時間就越長。2019 LTS,導入流程已升級到第2版,它與新的Accelerator(新的本地緩存服務)一起用為更可靠,總之結合起來,這將顯著加快平台切換和導入時間。</span><br />
<img border="0" data-original-height="1132" data-original-width="1570" height="461" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYrVJ2qj3uxcLlXYbfQl7dNEDsbBl-gI6wj7c78Qe_pBag0CChOG4EZZop1myHtLeSlnzkpVG_BXcaGs2L6e5bR9uWPF11kw9MkhF0nrftxjlwJczdHPrPHtp4shtfZ2TxN-DD_pNdPgs/s640/5-AssetImportPipelineV2.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖5 - Asset Import pipeline V2</span><br />
<span style="font-size: large;"><br /></span>
<br />
<span style="color: orange; font-size: large;">Nvidia PhysX 升級到4.1</span><br />
<span style="font-size: large;">非DOTS的物理運算用PhysX能更精確、更快更可靠。尤其在布料模擬採用了新的NvCloth技術,能夠得到更好的效果。針對DOTS框架的物理也可以研究Havok或Unity的DOTS兼容物理系統。</span><br />
<img border="0" data-original-height="571" data-original-width="698" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDkVC6avZfd-mc0o5cDdmxRdjta0jc_LTsdhBGq8jN2N35g_4WyHKiLe9j7Dmpq7Hm4b1jzrIXOBQPw_gkSFbJ2_blMgG6sOrSsCO2dk0doBZie56VzyYeBlVH75KpSueVg6XwjSlZniU/s1600/6-+NvidiaPhysX4.1.png" style="font-size: x-large; text-align: center;" /><br />
<span style="font-size: large;">圖6 - Nvidia PhysX 4.1</span><br />
<span style="font-size: large;"><br /></span>
<br />
<span style="color: orange; font-size: large;">IDE支援</span><br />
<span style="font-size: large;">程式應該會對此感到開心,2019LTS版的預設整合開發環境更新為Visual Studio 2019了。而且我們將其他家的IDE開發環境,像是Visual Studio, VS Code, JetBrains Rider都移到Package manager方便安裝管理了。</span><br />
<img border="0" data-original-height="1204" data-original-width="1394" height="552" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidhL0VWWSGmF2Pj_j8SUpVlC9qlom6jinJIZoGE9DKN9T11z7LN9M2edpm6h3cWrl6_vyDlvU6oOUITc4RqDl1hSieag6ktEkbYuR35loY2AThHf599xyXgsjccUJN5K6blUMw_TgwjDo/s640/7-IDE.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖7 - IDE支援</span><br />
<span style="font-size: large;"><br /></span>
<br />
<span style="color: orange; font-size: large;">增量式GC(Incremental Garbage Collector)</span><br />
<span style="font-size: large;">新的增量式GC通過在多個框架上分配工作負載,這代表增量式GC的執行會更頻繁但更快的中斷,進而降低因為處理GC造成性能尖峰,當然就降低了卡頓的機率。</span><br />
<img border="0" data-original-height="878" data-original-width="1379" height="407" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWISroCO0e34XF1PISFom4Jxq6D9SH6j-N36ONwzjjoddub9R9uzhXAO8Zlg9VGdmaPymWqWxfHZgtIDZ52EJNKSTqIZ2bfjS5xINw2tFawGz5E2Mcn7tXehvfPJxLtm6oPkKK2Lp8sR8/s640/8-IGC.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖8 - Incremental GC</span><br />
<span style="font-size: large;"><br /></span>
<br />
<span style="color: orange; font-size: large;">Console窗口改良</span><br />
<span style="font-size: large;">Console視窗的資訊現在可以點擊,並轉到發生問題的程式碼位置,這會讓除錯更容易。</span><br />
<img border="0" data-original-height="975" data-original-width="1600" height="390" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBETDxi9GlmGWlDSAIWsSs5ap_6JpC4DVdyV-NY6aRQ4VeRYDG7_JKEdPGWDUunSmqW-eQ0g0orChjC7AyvoxyifdUyoPTxjCO7vTh1j-KSjQ_lD6yonP8mGSIA_jpF8sX7ibLfRnfJ78/s640/9-EditorConsole.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖9 - Editor console</span><br />
<span style="font-size: large;"><br /></span>
<br />
<span style="color: orange; font-size: large;">DOTS的準備</span><br />
<span style="font-size: large;">雖說2019LTS的DOTS(資料導向堆疊框架仍然是預覽版,但是它已經</span><span style="font-size: large;">支援</span><span style="font-size: large;">了DOTS的動畫、物理、網絡機制和實時除錯(Live Link)功能,如果你不能升2020但又希望研究DOTS,就從2019LTS開始研究吧。</span><br />
<span style="font-size: large;">值得一提的是,DOTS體系內的Burst編譯器倒是從預覽版轉為正式版了,對於Job System能直接給予非常明顯的性能優化效果。</span><br />
<img border="0" data-original-height="338" data-original-width="600" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7s1EtXej9dbImeFjmHIvIDSV0O4s9c_7hZnfNF7e1M-GLH97n4qcvH1pROeOrxUTWAN3Dv-L-wwvyDI4HO5lhr2ksM2QsSjnxHcU9n1-Al29J1qMjJaeSwl9k-km4RaUYYh0QIsZ5zE0/s1600/10-DOTS.png" style="font-size: x-large; text-align: center;" /><br />
<span style="font-size: large;">圖10 - DOTS</span><br />
<span style="font-size: large;"><br /></span>
<br />
<span style="color: orange; font-size: large;">編輯器程式碼的TypeCache API</span><br />
<span style="font-size: large;">以往我們點選Play的時候,其中一個很耗時的C#處理是查找Unity套件或是用戶自定義工具會使用到的C#屬性。 通過API暫存這些類別資訊,將使呼叫播放的速度變快。</span><br />
<img border="0" data-original-height="599" data-original-width="1409" height="272" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPdZ0TzOpb_DrGycWwRcB6IknsqDyPA1_R64GDU7WwL5uik4w_5V5qI_BvwGNGBqHDhtUNZ0nYN1WenGwp6WYIsxZCYthgmqp619pQaqYWG62zUHabFNS8_BG6gjSJfMT9DYrw11fIj1s/s640/11-TypeCache.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖 - 11 TypeCache</span><br />
<span style="font-size: large;"><br /></span>
<br />
<span style="color: orange; font-size: large;">Enter Play Mode option</span><br />
<span style="font-size: large;">除了用程式碼優化播放速度,本身Unity每次按Play也都是重新載入場景,如果每天你要按play一百次,相當於浪費了一半的時間在執行重複加載的行為。你可以從Project Settings > Editor 內找到Enter play Mode選項,設定不用每次play都重新加載場景而是使用快取,在大量小型修改的情況開發效率能提升2倍以上。</span><br />
<img border="0" data-original-height="737" data-original-width="1600" height="294" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkCfLjUCTNc0sjA6q0fM2PvT7c8HUVkiHoznl1tm6y3V3lu6asSkYXfgCk4RUwESJ0tEifbBXTecUvS8o178k26kie-5lqNbTajcFQRBE2Gy3lLoCU_VjNqjMheAVPcibthiKU_UgpMNA/s640/12-EnterPlayMode.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖 12 - Enter play mode</span><br />
<span style="font-size: large;"><br /></span>
<br />
<span style="font-size: large;">Scriptable Build Pipeline(腳本式打包管線)</span><br />
<span style="font-size: large;">可以自訂打包流程。SBP相當於把原本C++層的打包流改為C#,並自帶一個預先定義好的Asset Bundle打包流程,能降低打包的時間。對於每天有非常多打包工作的團隊來說,定義自己</span><span style="font-size: large;">專案</span><span style="font-size: large;">的打包流程甚至是Asset Bundles的增量打包管理都將會方便許多。</span><br />
<img border="0" data-original-height="482" data-original-width="709" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhDxDsdeEmbuOGtIjD5iSFP9xWbQD6ww7Kn6PY-O68BXa9j2asGfFF8i1KceXHu13uqDvVzzmmXTt6Wh0AQ9kgT_gKDnrY-7uMvicbTvZzC9udo0khWLemqP2xZHRDDwKf4242soedsDk/s1600/13-SBP.png" style="font-size: x-large; text-align: center;" /><br />
<span style="font-size: large;">圖 13 - Scriptable Build Pipeline</span><br />
<span style="font-size: large;"><br /></span>
<br />
<span style="color: orange; font-size: large;">Serialization 改良</span><br />
<span style="font-size: large;">新的SerializeReference屬性可以將C#類序列化為引用(references)類別而非值(values),這代表著您可以跟普通的舊C#物件相互引用,進而簡化了</span><span style="font-size: large;">程式碼</span><span style="font-size: large;">表示和管理複雜的數據結構。例如,List <IAnimal>的內容可以包含dogs(class Dog:IAnimal {})和cats(class Cat:IAnimal {}。標記為要序列化的欄位現在可以表示null值。在以前,序列化帶有null值的欄位會引發該類型的默認構造函數對其進行反序列化。更多信息請到https://docs.unity3d.com/ScriptReference/SerializeReference.html 查看。</span><br />
<img border="0" data-original-height="499" data-original-width="528" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi-CXtbmyeeyUYQkT7mks2reUfGGoN-SS_dU8ABuHE9Od7XI_EvvHz3Me6WLC9fRCvDEV8iBjnnUIQ8RiW4kCQKJp-csWdmKgIMNevLfHPSZLtWUYViqRtmEJQApk15-UEYa7zt0ZzIIk/s1600/14-SerializeReference.png" style="font-size: x-large; text-align: center;" /><br />
<span style="font-size: large;">圖 14 - SerializeReference</span><br />
<span style="font-size: large;"><br /></span>
<br />
<span style="color: orange; font-size: large;">.Net 4.x</span><br />
<span style="font-size: large;">.Net 3.5的運行核心已經從LTS移除,任何採用3.5的</span><span style="font-size: large;">專案</span><span style="font-size: large;">都會自動改為4.x。如果因為任何原因必須使用3.5,可以改用2018 LTS。</span><br />
<img border="0" data-original-height="170" data-original-width="810" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibC6VTC7EvFYmuhOVq2GqUAXd6Wiar8kZwtouDpbSxu8Dl6vJ7kzzt3Bk5xFmgXqZl_XosAQf2CfEwONYR4eYtaXAkL2TbhMTVED91aN49BrLC4KiXupZMK6cJORn4gpUKWEzp9IGUZJg/s1600/15-Net4.png" style="font-size: x-large; text-align: center;" /><br />
<span style="font-size: large;">圖 15 - .Net 4.x</span><br />
<br />
<span style="font-size: large;"><br /></span>
<span style="color: orange; font-size: large;">IL2CPP改良</span><br />
<span style="font-size: large;">整體性能提升20%,Script debugging選項開啟時,執行效能更好。</span><br />
<img border="0" data-original-height="200" data-original-width="1160" height="110" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqebUjvQqYR76wAS1tSi2wLkSf6oQZ2ISm9Z-7wnAzYowoh59AOKciMFxjndRGvgnxz7is7d6bPrRBZ6XILB2pYgzeR4XH4787ShfglsFgmshxfSZEnt7VVf1FQQupgf10VbZb6QqtW9Y/s640/16-IL2CPP.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖16 - IL2CPP</span><br />
<br />
<span style="font-size: large;"><br /></span>
<span style="color: orange; font-size: large;">Input System</span><br />
<span style="font-size: large;">遊戲操作設計系統整個被重新設計了,新的輸入設計觀念改為先設計主要遊戲操作玩法(比如上下左右移動),然後綁定邏輯到各種不同的平台控制器,比如 PC, XBOX, PS5,移動平台觸控和 VR設備也都考慮在內了,簡單來說就是手柄按鈕設計一次,發佈對應不同平台。</span><br />
<img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9pB0or_mZ3ey1H_p2EVEoVViR24H3VYtYd65iqqF-iR7KqE8PgMNv-KWMrj403yR8SudkKIrMzvaCU_iyo5yD2vXX_aH0DYd_-FZkjVw5MhrUZ9sTP6iqFTMXywpb3mCeqijDqWsfTlc/s640/17-InputSystem.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖 17 - Input System</span><br />
<span style="font-size: large;"><br /></span>
<br />
<span style="color: orange; font-size: large;">Profiler改良</span><br />
<span style="font-size: large;">除錯窗口現在能看到更多的</span><span style="font-size: large;">除錯</span><span style="font-size: large;">信息,現在可以在配置設置想要一次看到的</span><span style="font-size: large;">除錯</span><span style="font-size: large;">數300至2000幀。在打包視窗或BuildPlayer API中為所有Player啟用深度分析支援(Deep profiling),此外,用戶還可以為指定Player動態打開或關閉深度分析。禁用深度分析時,分析數據時就不會有Deep Profiler掛接到Player所引起的額外開銷。</span><br />
<img border="0" data-original-height="524" data-original-width="850" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9xXxkcp0qkh_aZ26crxSErhZ4q-aCUBs8vpjo9fWcAA0bGNmPqB1M_Cvlhlk5wHEbtgPcRIOc1iOyEX79Bcp4giICJ8reeYAQ4eyns_g14oCzxdymNExBmCOZQSlzqeyAoxCitlhhTC4/s1600/18-Profiler.png" style="font-size: x-large; text-align: center;" /><br />
<span style="font-size: large;">圖 18 - Profiler</span><br />
<span style="font-size: large;"><br /></span>
<br />
<span style="color: orange; font-size: large;">AR Foundation</span><br />
<span style="font-size: large;">AR Foundation解決了兩個主要問題:不同平台要重複設計</span><span style="font-size: large;">專案</span><span style="font-size: large;">。AR Foundation就好像Unity一樣針對AR</span><span style="font-size: large;">專案</span><span style="font-size: large;">提供一次開發,自由發佈的概念。如果某個功能在一個平台上可用,而在另一個平台上不可用,跨平台開發將會變得很麻煩。AR Foundation利用他中繼層的優勢,可以輕易的對每個平台功能做適配,不需要重建</span><span style="font-size: large;">專案</span><span style="font-size: large;">。</span><br />
<span style="background-color: white;"><img border="0" data-original-height="942" data-original-width="1180" height="510" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzTS4crID3D0uURsrUU-5TvkH7DK_iLL1KpJMLk6uBT2ktg-JeM7YBYtn6vAQcGfU-MeRNM93YKeGxfRKj08DOnegyndAcpHOnXcoYQpI3HVm-F0IvbKLdvpQXdxSMD4UFT7YYrhBeZLo/s640/19-ARFoundation.png" style="font-size: x-large; text-align: center;" width="640" /></span><br />
<span style="font-size: large;">圖 19 - AR Foundation</span><br />
<span style="font-size: large;"><br /></span>
<br />
<span style="color: orange; font-size: large;">URP/HDRP</span><span style="font-size: large;">支援</span><span style="color: orange; font-size: large;">VR</span><br />
<span style="font-size: large;">HDRP何時</span><span style="font-size: large;">支援</span><span style="font-size: large;">VR一直是最常被問的問題,2019 LTS的HDRP已經開始</span><span style="font-size: large;">支援</span><span style="font-size: large;">VR了</span><br />
<img border="0" data-original-height="720" data-original-width="1280" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_FqkvahNtS6li6Wghn1SW6J7okJPdFfiGpE2QaePi3uZ8UAiqGDKcSk6MUxKp-HqyeEhvPv1e5BxsaMyJWxTPUJYaYvDNiOb_kHTn-enMllWXacNvUZLJ9eu9HQGiE5mKtzjMzadPExo/s640/20-HDRPVR.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖 20 - HDRP VR</span><br />
<span style="font-size: large;"><br /></span>
<br />
<span style="color: orange; font-size: large;">XR Plug-in Framework</span><br />
<span style="font-size: large;">如果你是一個XR設備製造商,那這對你絕對是好消息。以往你必須自行撰寫For Unity的SDK,現在通過了XR Plug-in框架就能輕易整合到Unity裡,連同跨平台都一併解決了。此外,Unity編輯器內也多了XR套件管理(XR Plug-in Managerment”設置,未來啟用不同的XR設備會變得容易許多。</span><br />
<img border="0" data-original-height="716" data-original-width="970" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIrSugN3mErAzjPcKbjyH4tIifPjNYDGNsAvia8wceWsdsj9QMEfxdtyeqa57xY3IYOTQapqOZ4aUz-1Y6yLvkGNvujDS9NxlehgcJ55v0Z0Rtb0gcyCIRDQMdtjRG5uj-IIN2s7wF36Q/s1600/21-XRPlugin.png" style="font-size: x-large; text-align: center;" /><br />
<span style="font-size: large;">圖 21 - XR Plug-in</span><br />
<br />
<span style="font-size: large;"><br /></span>
<span style="color: orange; font-size: large;">Optimized Frame Pacing for Android</span><br />
<span style="font-size: large;">這是Unity與Google的Android遊戲和圖形團隊合作開發套件,可以使Android設備的幀分配的差異較小,從而提供一致的幀率和更流暢的遊戲體驗。</span><br />
<img border="0" data-original-height="365" data-original-width="810" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJGidTa540ep6nv5avHF3NKhXrUJvut99jVEh8iZMuUwfVK9CXuHCepYvSKp_vtUZarRLPdoRJl7syMo2BUKqCvh7b2tSD7EdDNR8WwpqSbAeakLk9ZD7PnKf90zaNGu5kD8w3smPb6rU/s1600/22-OptFramePacing.png" style="font-size: x-large; text-align: center;" /><br />
<span style="font-size: large;">圖 22 - Optimized Frame</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<span style="color: orange; font-size: large;">Scripts-Only Build Patching(Android)</span><br />
<span style="font-size: large;">針對Android平台製作自定義增量包的工具,大大降低迭代時間。此工具只支援Android。</span><br />
<img border="0" data-original-height="760" data-original-width="1276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjukOebJZEH8NYj-OMDT5wD82owZaQyJiZBvgxO8ErRck7ElX3pQGl0EocOP2bYjo4XhTK17YlBkMwFacpdFrCc5kX_igr943D9hoAoOAyIBOWQ51q6065zF66XCzqhNd3z2jJPWvS2Tu4/s1600/23-ScriptsOnly.png" style="font-size: x-large; text-align: center;" /><br />
<span style="font-size: large;">圖 23 - Scripts-Only</span><br />
<span style="font-size: large;"><br /></span>
<br />
<span style="color: orange; font-size: large;">Android Logcat 整合</span><br />
<span style="font-size: large;">整合從Android來的除錯資訊到Unity編輯器,可以直接在Unity內查找問題。</span><br />
<img border="0" data-original-height="1248" data-original-width="1600" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIJ06Xr_FAKdAgZXsP4vrn3O8KtTBxflK_FmqdRNwshNTxE6Swk-KFtxTN4WSJy_DwgnzyBWXsMYdXpXG_eu2LYceuWI2PeKozMDSETFro6wW37JGxZRu4r5SmBSQh7strRNjNPQoQICE/s1600/24-Logcat.png" style="font-size: x-large; text-align: center;" /><br />
<span style="font-size: large;">圖 24 - logical</span><br />
<span style="font-size: large;"><br /></span>
<br />
<span style="color: orange; font-size: large;">Android App Bundle的APK大小檢查</span><br />
<span style="font-size: large;">Android App Bundle是Android在Google Play發佈的工具,它提供了一種更有效的方式來構建並發佈應用。讓你更輕鬆包出較小的包,提高安裝成功率和減少卸載。APK大小檢查可在打包過程完成後立即查看,包含APK的組成和APK的大小。</span><br />
<img border="0" data-original-height="604" data-original-width="624" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga3yfkG7iVo-j-iO3TEKcCAWo13YFHRhAyOCE090Ipx1uUpkH_XXfkTmOR7KHXZHQyWBIKT5REY3PIti6tdym4R_VjA_VtRl42rMa5iZjDeay4f6P03ro1so9_AdzQ8C3X9FmSEr6qpCs/s1600/25-APKSize.png" style="font-size: x-large; text-align: center;" /><br />
<span style="font-size: large;">圖 25 - APK Size</span><br />
<span style="font-size: large;"><br /></span>
<br />
<span style="color: orange; font-size: large;">請求式渲染(On-demand rendering)</span><br />
<span style="font-size: large;">當你等待其他玩家加入遊戲時,螢幕上通常什麼也沒有發生。通過這個功能就能讓這種情況發生時放慢渲染速度節省幀速率,從而節省了用戶的電量與提升性能。</span><br />
<span style="font-size: large;"><br /></span>
<br />
<span style="color: orange; font-size: large;">Mobile notifications</span><br />
<span style="font-size: large;">手機推播通知是很多人詢問的一個功能,以往都是通過第三方套件來實現,現在Unity也可以做推播功能了喔。</span><br />
<img border="0" data-original-height="360" data-original-width="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQUEtbX-pzhbYMa79H87FpMKVudY36BbzGPqdv5RYcjwdAANc7gyLlHL_xNlGa4QEytvHkk7uNahzMHU-4ZTH52f5g6FUfl7U-TtT3KGZwj2elKQn_5gzlfUU2i1TWi3jQfIXjPCYPXQI/s1600/26-MobileNotiication.png" style="font-size: x-large; text-align: center;" /><br />
<span style="font-size: large;">圖 26 - Mobile notifications</span><br />
<br />
<span style="font-size: large;"><br /></span>
<span style="color: orange; font-size: large;">一系列的2D工具轉正式版</span><br />
<span style="font-size: large;">- 2D Sprite Shape, 2D Tilemap Editor方便建構2D世界 </span><br />
<img border="0" data-original-height="809" data-original-width="1600" height="323" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2A2UTTnjZcKbZFGkktVSf6bE73L1R5Xgs5Ms7prQ9noDTKEEpCeIUyneuYgjrJdu_eFNjRwObMP00LC4fA3o1SCdaSJigoLVua8xDCvdrJZs8UO-Hobe0RccFc_LC0sl-HGyKdCASLZE/s640/27-2DSpriteShape.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖27</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">- 2D Animation建構平順的2D骨架動畫 </span><br />
<img border="0" data-original-height="459" data-original-width="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLDJ9aco8GI2ZKjh2qf2AY6Ytn_SDq_8QdNnI1BRsfptjQLx6rx_A8EdOZ4Ju86piwleh9geQkDoVEz7pEqUDQBGa6qfrFWP2YaQz52H3r_A9OOhV0hgm4ECmfo_gXXvhebrptyL9dCBM/s1600/28-2DAnimation.png" style="font-size: x-large; text-align: center;" /><br />
<span style="font-size: large;">圖28</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">- 2D PSD Importer和2D Pixel Perfect提供穩定的像素品質 </span><br />
<img border="0" data-original-height="634" data-original-width="1174" height="345" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5FpdMQgZFIeRdhpnRAQ8kof6ReRUdM_lja2MPwzK1ax_BBi_PjKr0aFjhRPFkI1_RLmI8p4GnDvwaNzq6zmkj0qT27H6ZKSsG74rW0Oktc6_E3EDUDn-ad6ICurrH9QbOipaQhZtkS-A/s640/29-2DPixelPerfect.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖29</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">- Lost Crypt 2D展示工程兼容2019LTS </span><br />
<img border="0" data-original-height="630" data-original-width="1200" height="336" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAmpMLQCS_fdmy4-3QFmA-JdpK76-egkMs_qmjSq2LlUL3NU26RZjMSU7NST3SB_q3Hm_fZaQiONoiztfdXFv_p2oNbfRF_IL5X_WvvZDqYDJus-u6t2G14AzPMNUbNjsea7_DoZ21UmE/s640/30-2DLostCrypt.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖30</span><br />
<br />
<span style="font-size: large;"><br /></span>
<span style="color: orange; font-size: large;">Camera 多鏡頭堆疊</span><br />
<span style="font-size: large;">現在SRP支援多鏡頭合成一個畫面了。</span><br />
<img border="0" data-original-height="566" data-original-width="1004" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9HiO_l7MapF5CTn7XPnmJiM_FYrBjGxFJ_rvKA8_LD2BqvSpWQ3rHPgAtcER6233d2Zp_fZ2EGiXy_j_OLiCjPVvOpC8Jd-tjgiG5pvYeMNNeADr-PnKK_CcfcLA83cUgbVzmqx71_y4/s640/31-CameraStacking.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖31</span><br />
<span style="font-size: large;"><br /></span>
<br />
<span style="color: orange; font-size: large;">Custom Render Passes(自定義渲染通道)</span><br />
<span style="font-size: large;">2019 LTS現在可以製作自訂的渲染流器,發送渲染信息到自訂的渲染通道來實現風格化渲染器或是Forward+ / Tile / Clustered渲染。這樣可以基於Unity的渲染注入自定義的渲染,來個畫風突變。</span><br />
<img border="0" data-original-height="904" data-original-width="1600" height="361" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrIGPGmHtzVHueZ-3J8o0-GNM6MYLt8sf-x-1L4CZfFJepfKbSUEwu0LV-r63WqRtxztjwAUFczAz_KA7hlGt-nskNYdZRVjkJyCya91qPVyC7ARIsLSaq8tImR2F6-wJcL90z0WnnaYc/s640/32-CustomRenderPAsses.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖 32 - Custom Render Passes</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">HDRP亮點改進</span><br />
<span style="font-size: large;">- Arbitrary Output Variables(AOV) API,</span><span style="font-size: large;">支援</span><span style="font-size: large;">只導出場景內的材質屬性、光照資料、深度資料。</span><br />
<span style="font-size: large;">- 動態分辨率 在硬件的</span><span style="font-size: large;">支援</span><span style="font-size: large;">下,實現實時改變畫面分辨率並保有良好的遊戲體驗</span><br />
<span style="font-size: large;">- Madcat除錯監看模式 用簡單的環境紋理替換對象的材質和照明。此模式對導航和獲得場景感很有用,無需設置場景照明。</span><br />
<img border="0" data-original-height="1015" data-original-width="1600" height="405" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWi4YjI2lv5d7L57LkyE-CmCW23BZ5wZHTkto2S95WhqJLPzgyFN5WjMr-J8o3aigID62zxC1k7yFT7ozr-XzE_SpC8AoNYr2faY9n4QkAtEB9vtfxmNgFY2INApbg-lEFFxfWVgdSpn0/s640/33-HDRP+AOV.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖33 - HDRP亮點</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<span style="color: orange; font-size: large;">HDRP PostProcessing</span><br />
<span style="font-size: large;">現在後期特效已集成在HDRP中,加快工作流程和效能。可以使用一組標準物理設置(焦距,光圈等)來控制諸如景深或曝光等效果。對比度自適應銳化(CAS)放大效果。</span><br />
<img border="0" data-original-height="865" data-original-width="1600" height="346" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEuuxiOeKR4XqNEZdX2QZzluQkKT9j-jNTTpPezZGF3CnlW7ipjAPuHoEp6vmRdas13PRPp6QQVMRfjwI4VcF2irNUP7X4CFtG7PvKzOuYl2Q53ZqSl494U3VGnSiHbDyZIUzCuV0qGR8/s640/34-HDRPPostProcessing.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖34 - Post Processing</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<span style="color: orange; font-size: large;">Scriptable Render Pipeline Batcher(腳本化渲染管線批處理器)</span><br />
<span style="font-size: large;">SRP批處理器是一套為SRP所訂製的渲染循環,通過使用相同著色器變體的許多材質來加快場景中的CPU渲染速度。並將圖形繪製到屏幕的過程。</span><br />
<span style="font-size: large;">支援</span><span style="font-size: large;">平台目前有:Windows DirectX 11,Vulkan,OSX Metal,iOS Metal,OpenGL 4.2及更高版本,Open GL 4.2及更高版本,Windows DirectX12,PlaStation 4,Xbox One DirectX 12,Nintendo Switch</span><br />
<img border="0" data-original-height="360" data-original-width="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4KywRBrZqCk_Rp8HJBAnLWWFTAo-9QK7EwO6bGIAqxlzXPIly0cMI1bfmak3IuJ6kgT_iMh0LJQx7feBtZHBuSA3CatNX3FLhjHT2HEWEXli2yQ9adk06kGHgtDg3Hss2wsuGGqJ032I/s1600/35-SRP+Batcher.png" style="font-size: x-large; text-align: center;" /><br />
<span style="font-size: large;">圖 35 - SRP Batcher</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<span style="color: orange; font-size: large;">HDRP 針對 Shader Graph 的改良</span><br />
<span style="font-size: large;">- Render States現在改到Shader Graph裡的Material裡,意味著現在可以在一個材質球上直接指定為不透明(opaque)或透明(transparent)。</span><br />
<img border="0" data-original-height="663" data-original-width="1178" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7BzB5VZ8n06qOybSxaG2_eJgFBTMm2Yu4h1igTCyKq9EbMplp1Gtnmc-DOktJcwB5VSk66r9QCFs57QqSndSGfm5aHEv1E_kR55UEiJfwh910PKTPIy2to0mVkhLJIuVGjl7AgMEckQI/s640/36-HDRP+ShaderGraph.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖 36</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">- 加入了新的Hair Master Node,未來製作毛髮相關的Shader將會更得心應手。</span><br />
<img border="0" data-original-height="1500" data-original-width="1500" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI1YFlJenVR6pt9IpPHSy3d-lviRY-JtHa-MicPdIIEbtVGmwvvT1Mb1gJp7Z3RX1CGULyhHMdbmr7VaUkub_GmpVDEiznbUAuVbVgpBYf8QzQP7U9v8U91cPkP17IlTrrShhATx__23U/s640/37-HariMasterNode.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖37</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">Shadow Layers</span><br />
<span style="font-size: large;">現在Light Layers系統的Shadow Layers選項允許你將陰影與照明分離。在Shadow Map設置中啟用此功能後,遊戲物件即使在看不到光線的情況下也可以投射陰影,反之亦然。您還可以使用Shadow Tint更改陰影顏色。</span><br />
<img border="0" data-original-height="494" data-original-width="676" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpHF3LBC4jMqenKIEuCi8Oivzs36w8SURskqAOHR8gstKumkVFdp2-FbBWxhGTWlU2r18b9uFFJx_8N57aFITicXLBdvJ3r-iBd_1eEAbQ6sugBkDmTwE9caa4whA-uwotCQXisnyVsoc/s1600/38-ShadowLayers.png" style="font-size: x-large; text-align: center;" /><br />
<span style="font-size: large;">圖38 Shadow Layers</span><br />
<span style="font-size: large;"><br /></span>
<span style="color: orange; font-size: large;">VFG 和 Shader Graph</span><br />
<span style="font-size: large;">現在你可以在Visual Effect Graph裡面集成Shader Graph的著色結果,實現更直觀的效果。</span><br />
<img border="0" data-original-height="720" data-original-width="1280" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGkcOwXrx8XQcobd2IyjCVhqlhC-Ynt9lYYZE4qdnRNmXx96IYbUKmAf_tsY9zwFKvaYgTX-QfUZfmse_SeXoFR3fdfxI9bCxqAHwZGwBTv4Dw1e64AXJ1Acs5ardQ8O6EQzTVmJ4toTo/s640/39-VEG.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖39</span><br />
<span style="font-size: large;"><br /></span>
<span style="color: orange; font-size: large;">新的地形工具</span><br />
<span style="font-size: large;">- Unity重寫了新的地形工具,大量的新功能包含地形繪製工具、地形紋理繪製 </span><br />
<span style="font-size: large;">- 全新的地形製作工作流能在繪製地形時,也實時對光照、物理甚至導航直接產生運算。 </span><br />
<img border="0" data-original-height="936" data-original-width="1510" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-_ld-plQ0nsDJZ3-NtWTPMQFjascX2oP5weaL4tU6LtYYKSHBiI1jfQ6XZy2u0VOCwxfO65J3BGHMI_k2i93v3MKxv59IzqYbdlj1cL8RIzYRl13uQfCHy5kJElg809NcKM95AUh_eFs/s640/41-NewTerrainTool2.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖41</span><br />
<span style="font-size: large;"><br /></span>
<span style="color: orange; font-size: large;">GPU烘焙光照</span><br />
<span style="font-size: large;">烘焙品質更好、</span><span style="font-size: large;">支援</span><span style="font-size: large;">對環境照明的多重採樣、</span><span style="font-size: large;">支援</span><span style="font-size: large;">NVIDIA OptiX降噪、整體采樣性能提升。</span><br />
<img border="0" data-original-height="763" data-original-width="1600" height="304" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYVIyP_VjC7qs-x5uXp9Hu0fclVpt6MTbGCxc8b5PSC_4dgaGOuegWj5DREIjfuqyEJ3CxamiF6l97IqAfLvFJLOzoPj9pLgPFVCUFplSsmh4GkjTrOmZC6Q5EVYHt4nyXEmceYydNM5c/s640/42-GPULightmapper.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖42</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<span style="color: orange; font-size: large;">環境多重重點採樣(Multiple Importance Sampling)</span><br />
<span style="font-size: large;">一種在Cubemap/HDRI中針對重點區域採樣的新方法,採用這種技術可以避免將大量GI射線發射到全區域,而是將它們聚焦在例如亮點的重點區域(例如太陽)。</span><br />
<img border="0" data-original-height="905" data-original-width="1600" height="361" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8OJ_oJ3c-n9-Ms-PjUeC-eIE255W0uvnCQJXr5LkDFtofQH9ufxu7-mD-5J3X-O43xS8ZQug8gc7mHVwZHjl-ufDURRf03lamx_HfiGe0C7zi0xFb86uHYYrz2xsxZJ0UYBv63DUJ8MU/s640/43-MIS-1.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;"><br /></span>
<img border="0" data-original-height="900" data-original-width="1600" height="358" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAyd0Y_N7ccYExQkBX9ofZWuyihOiNaEVl_a-aZ3EBBWWkeEKBUR6aGkEpEdqJrc4AQNFVmNCyPbgklvf9vPH675NccefOeS-o7nssNk4IfXu83pqU8KHYMRMW78HEHR5gide3VWdlf-c/s640/43-MIS-2.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖43</span><br />
<span style="font-size: large;"><br /></span>
<span style="color: orange; font-size: large;">Light Probes與場景加載</span><br />
<span style="font-size: large;">以往加載場景時Light Probes是無法合併的,2019 LTS開始,加載的場景之間合併Light Probes已經實現。意味著將大型場景拆成許多小場景,動態加載並合併所有探針並重新網格化,就可以實現無縫地圖了。</span><br />
<img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJps_MET3tCF3pitJnIAGGZPQozWlxtji1SxK8NIrssuLkhtDlk87kMdmnQ9XCZkbKZCV2bYAv4zCePKOkU8tW3ssHxglVaPGmKfiKKWIa6cgJ2pqieGPpdSDdzdClJTBcmhrtCMDvOPg/s640/44-ProbesMerge.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖44</span><br />
<span style="font-size: large;"><br /></span>
<span style="color: orange; font-size: large;">快速查找(Quick Search)</span><br />
<span style="font-size: large;">現在可以在編輯器內快速查找所有關鍵字物件,這會關聯到物件、資源、設定、選單物件甚至腳本。</span><br />
<img border="0" data-original-height="797" data-original-width="1600" height="318" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh6e9mPODU0GNtmfpl9XC6jkt4NEj83LnCmEKqAkeaR8dqcp6_pPl0ajdP5lTdVHQCenDAw7iGnIY4Y6mh020732EhEzmRRhXtrbDgX2ml6rSXYdii4AapLtSQfCGJQ6-rEqivI-iLGno/s640/45-QuickSearch.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖 45 Quick Search</span><br />
<span style="font-size: large;"><br /></span>
<span style="color: orange; font-size: large;">Presets管理</span><br />
<span style="font-size: large;">Preset可以儲存當前物件設置,並在套用在其他物件上,遇到有大量物件設置複製轉移需求的狀況非常好用。</span><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglM8rKw_Xfl2r5dQHSF1cd7YZoQ6vBE-_VzePzfVKO2AIiZIbwzW86Z8XOt3Cyj0NaDixQUSvtOKkQAFxZW1Eg6JogV7Zk3v_DibGgQcloExN6s2TU5SGHPgfZDREdLVT5uPmfgMqtPck/s1600/46-Presets.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><span style="font-size: large;"><img border="0" data-original-height="776" data-original-width="372" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglM8rKw_Xfl2r5dQHSF1cd7YZoQ6vBE-_VzePzfVKO2AIiZIbwzW86Z8XOt3Cyj0NaDixQUSvtOKkQAFxZW1Eg6JogV7Zk3v_DibGgQcloExN6s2TU5SGHPgfZDREdLVT5uPmfgMqtPck/s640/46-Presets.png" width="306" /></span></a><br />
<span style="font-size: large;">圖 46</span><br />
<span style="font-size: large;"><br /></span>
<span style="color: orange; font-size: large;">快捷鍵管理(Shortcut Manager)</span><br />
<span style="font-size: large;">現在可以自定義Unity編輯器內的快捷鍵了。</span><br />
<img border="0" data-original-height="1600" data-original-width="1181" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiZtK2fNP6ED1r34f5W-HkiNk6ff0J3jJD10vdTHdR7mKQPKzmfmoQtltSmqJBc7csiA_lICgbS-q_ffXkL1R6YQMz6Fkms77lQk-EJmOi1qHJUxs9tXuCMFT73izGtaP1ohnAsWF2Q6s/s640/47-Shortcut.png" style="font-size: x-large; text-align: center;" width="472" /><br />
<span style="font-size: large;">圖47</span><br />
<span style="font-size: large;"><br /></span>
<span style="color: orange; font-size: large;">Prefab編輯</span><br />
<span style="font-size: large;">以前編修Prefab物件必須進入編修模式,現在可以直接在Inspector窗口直接編修Prefab物件了。</span><br />
<br />
<br />
<span style="color: orange; font-size: large;">UI Builder</span><br />
<span style="font-size: large;">UI Builder是一套能在Unity內不用寫</span><span style="font-size: large;">程式</span><span style="font-size: large;">,通過拖拉製作出UI的工具,他是針對Unity編輯器的工具,並不適用於遊戲UI。</span><br />
<img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkxrowSdh-ax7zPmFRr0hJg5-c6ZxrmyHLYPa-03xPnqBUNRPbmFLbmZ7limkyo6uFnTnLbbpoc_QqC_0OUyzm0TCSlBHkHdGtpMTAm3HcQ9pU7M44I-Ry24ChMH36YF0rP3kyl5FXuKw/s640/49-UIBuilder.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖49</span><br />
<br />
<span style="color: orange; font-size: large;">Package Manager一些改動</span><br />
<span style="font-size: large;">現在你可以在Package Manager內加入存在GIT上的套件,通過URL連結來直接安裝到Unity,很適合用來製作公司內部工具套件。 </span><br />
<img border="0" data-original-height="310" data-original-width="702" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgop6SJcjZidMz8GUJCpTPyO8TGnuOHgXAwDdCUOUGKJXCrBPJEDRCE0YUuYDFh6hPxovpOA0z72ITm4pCJ9rKwwESLQzYw4rZUL76BDRaZJQvTwtNKjQ9WBgeGIDV2xonlIyyGHzDHVlY/s1600/50-PackageManager1.png" style="font-size: x-large; text-align: center;" /><br />
<span style="font-size: large;">圖 50</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">現在也可以通過Package Manager來統一管理你的Asset Store購買的資源,整體體驗改善很多。</span><br />
<img border="0" data-original-height="800" data-original-width="1400" height="364" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_1MYHVKwE-ebBOgidBCLaDERqmDDOKL_SvYjrue8elC9iP3OMbxNnbGqc5OPgP416ZGjgJBG7aL9ab2arac9NE6IiLk_mlXpBc63vaCZTc8DnMkPMxUkUhRTF_ACjdE36mmEXXKTVLEI/s640/51-MyAssets.png" style="font-size: x-large; text-align: center;" width="640" /><span style="font-size: large;"> </span><br />
<span style="font-size: large;">圖51</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<span style="color: orange; font-size: large;">調適分析器(Profiler Analyzer)</span><br />
<span style="font-size: large;">Profile Analyzer可以匯總並可視化來自一組Unity Profiler的數據,多個不同幀的信息比對,以幫助你從更廣的角度找出性能問題。</span><br />
<img border="0" data-original-height="886" data-original-width="992" height="570" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6pBzI6Ei9mcSPGm7ttU4WVmvEaIctbXTH-eVfJIu3sG21ZntOBA7bAQmBeCa2WI2EwpVtOcB9ltnnwsGicnXVSljSWAGxckF_yUJjENa7Xj5uGe7PNLMCKvvOrvJYLRHIA3bweW3B9FU/s640/52-ProfilerAnalyzer.png" style="font-size: x-large; text-align: center;" width="640" /><br />
<span style="font-size: large;">圖52</span><br />
<span style="font-size: large;"><br /></span>
<br />
<span style="font-size: large;">以上就是Unity 2019 LTS 的亮點整理</span><br />
<span style="font-size: large;">這麼多的改動,只為了給開發者一個良好的開發工具,並協助你成功</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">感謝這些年支持Unity的開發者們,希望你們都能開發順利!</span>Unity Taiwanhttp://www.blogger.com/profile/05195645646153478011noreply@blogger.com0tag:blogger.com,1999:blog-6317841908377212626.post-21981607175099746582020-04-16T01:21:00.000-07:002020-04-16T01:21:00.687-07:00[Unity HDRP技術] Unity偶像,Project SU-A介紹<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">來源: Unity Korea</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">原文: <a href="http://blog.naver.com/unity_kr/221909853462" target="_blank">連結</a></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">潤稿: Kelvin/達哥</span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<img border="0" data-original-height="798" data-original-width="1600" height="316" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid4AorjpjCPDpJFmPv2itUS2X9XCdC0c5fothHenI4tUgl0020neCkBUjl0M_VN_GJF8TuMHdoI27Q5K9IEJn0ZknBti35xLcCsPnZAcQrE0j_zDnA7Kjpk1hy9xrY8Fyi1AGHTKQO_vs/s640/image+1.png" width="640" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br /><br /><span style="font-size: large;"><span style="color: orange;">Unity 虛擬偶像 - Project SU-A計畫</span><br /><br />隨著即時引擎在各領域中被廣泛的運用,筆者對數位角色的興趣日益增加,並研究如何從Unity引入各種虛擬偶像。 其中,我遇到了金賢日(김형일 音譯),他正在用Unity製作數位偶像,進而認識了這個計畫。本文將以計畫作者的角度來分享這個計畫的內容。<br /><br /><br /><div style="text-align: left;">
<span style="color: #999999;"><i>“我想做一個活人。 讓觀看者看一個虛擬空間中的角色,卻感覺像活著的人。</i></span></div>
<div style="text-align: left;">
<span style="color: #999999;"><i>by 김형일”</i></span></div>
<br /><br /><span style="color: orange;">計畫起源</span></span><div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both;">
<span style="font-size: large;">開始時想法是我想做一個即時運算的偶像角色,是可以讓觀眾感覺活著的人。也想挑戰自己可以做到什麼程度。 隨著專案的進展,一個一個實現目標讓我非常開心。</span></div>
<div class="separator" style="clear: both;">
<span style="font-size: large;"><br /></span></div>
<div class="separator" style="clear: both;">
<span style="font-size: large;">作為一個3D角色美術,我入行遊戲業經歷了10多年各種專案的角色製作歷練,但遺憾的是這些都無法表達真實角色的感情。當我看到今日的圖形技術演進,我認為現在已經到了可以實現的階段,於是我開始這個挑戰。</span></div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
<img border="0" data-original-height="768" data-original-width="1367" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJQ2NvEKAplKS83jmYUuKIaOYhsfuQzSpQzGHWEdkdewhV7p1aS-Ti2RYox9kZyUxkmnFcfR-yqBLbOelCJKDEeMw0Iu7yZksEPgVDyWakfVA-6rtoR3Tan9ScRMqA6NiQkwjATB6V02o/s1600/image2.png" style="text-align: center;" /></div>
<div class="separator" style="clear: both;">
<img border="0" data-original-height="852" data-original-width="644" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEFqUqpbDj9JM5oCZS3J61cYVQspajHkP4AL_RykyWA2VwS4EwrGmCe1xWuCqCdYwYMJQiwNS9IUGZznKTzl3vOBDxXI4E2iHdJ6z1UfVMbHE36kGyHnKWusjoI5ASj_so0EC6t4Qu3k0/s640/image2-1.png" style="text-align: center;" width="481" /><img border="0" data-original-height="853" data-original-width="646" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxcgujymSLFub9qtIlvop9-8YkQ84xi4951Q9gE7q9HLcR0aidDe3X_kjN7g04_WEIogkza9jwmAMfIJH2q69Sw6F3qS4i912iu_e3j-4NUSWhe9cPYR3JOo9q84uLkYOSLpGQAEZAM6E/s640/image2-2.png" style="text-align: center;" width="483" /></div>
<div class="separator" style="clear: both; text-align: left;">
Youtuber原型 - Touch Girls</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">我決定離開當時的公司,並開始第一個計畫,針對手機平台名為Project Touch Girls的遊戲。 這是一個互動約會模擬遊戲,你可以透過手機觸摸角色互動。</span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/BusC_zH3emM" width="560"></iframe>
<br />
<div class="separator" style="clear: both; text-align: left;">
2018年 Unity Korea直播介紹 Touch Girls</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">我是一名美術,嘗試自己做一個這樣的專案時,編程對我有很大的障礙。 還好當我進一步學習時,Unity的C#的難度對於我這樣的美術來說還能掌握。 我也針對品質的部分做了很多測試與調整,讓它實現我想要的外觀。</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">當我看到Unity新的異教徒Heretic Demo和其他HDRP Demo都展現了驚人的品質。 我認為這已經達到了能表達我作品的CG品質。</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: orange; font-size: large;"><b>Project SU-A</b></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">當我看到了HDRP的潛力時,我認為用即時運算的偶像而非CG偶像的時機已到,所以我離開了公司,開始認真研究。不單圖像式的呈現偶像的表演,而是能夠和真人互動的角色。</span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">Touch Girls之後,新的SU-A計畫已經運作了將近一年,我在2019年12月31日,我在Twitter上推了一個影片,一天有近20萬次瀏覽,反應超好。</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<img border="0" data-original-height="698" data-original-width="524" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7kAsxx-PuGBP9LCxMSwLIQX_oeBzS_E1qCDiWxDjhcast80BJoL6xfYFLJlahr2hngTan2jI_N3iwUDzvEYQwx9KFz6t44rmiuv3R2t7kGd6-4EGEGI1Zi5dz9VqxqEp8bJP8Q6gC_Ns/s640/image3.png" style="text-align: center;" width="480" /><img border="0" data-original-height="574" data-original-width="588" height="624" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMYx9AqsPDU3DT0PxH6fpnx-whLua-l7_XxXtQrRYqzHwI8vmE4s4xpvs00cflMkJmlt_5GSn1aKN72GHkfRZPeMJPqrrk1LbMEQmgNkm5o2A5yl5sHlhI-3yqOfcoOHmO-fKxUcMWWRo/s640/image3-1.png" style="text-align: center;" width="640" /></div>
<div class="separator" style="clear: both; text-align: left;">
<i>著名的科幻作家威廉·吉布森(William Gibson)也轉推了,即使到現在還是很多人轉發。</i></div>
<div class="separator" style="clear: both; text-align: center;">
<i><br /></i></div>
<div class="separator" style="clear: both; text-align: center;">
<i><br /></i></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">很多看過影片的人問說:“你是在Unity中渲染的嗎?“所以我又上傳了其他Unity編輯器的照片,很多人都說:“我不敢相信”和“真的很棒”之類的推文。著名的CG網站<a href="https://80.lv/articles/digital-human-based-on-unity-hdrp/" target="_blank">80lv也有一篇報導</a>。</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<img border="0" data-original-height="343" data-original-width="773" height="283" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZu_UHjwaQTjre3JbrD6NoIVmm3yjeX5YM9MYlmrOfyU1hGwHapkop4OqLQ1ufZVb71QlrTniV52cfW_ZWHJgoEmMHPx2ny_ZILjxAHOs7yWBZ4nAZpq99iFH3ih-mGJ31tnncHEivLRw/s640/image+80lv.png" style="text-align: center;" width="640" /></div>
<div style="text-align: center;">
<div style="text-align: left;">
80lv針對SU-A的報導</div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<img border="0" data-original-height="720" data-original-width="960" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWTGtM7OkoZhvlkBt-jCnIKUTip5dKyviKqAl0zEFb-NQU3578rJGJ3FW7ziL7TnjHb-f07Dz6IHYG7gDHoal4LbnZGN87O75SiKdR7H6xOSSnfaBdlE5gjd7JbvpPeEAPcKMWZFzB21M/s640/image4.jpg" style="text-align: center;" width="640" /><br />
<div class="separator" style="clear: both; text-align: left;">
開發畫面, 從原本的Unity 2018轉移到2019.3。HDRP版本是7.1.8</div>
<br />
<br />
<span style="color: orange; font-size: large;">為何不使用3D掃描而是自己建模?</span><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">首先,如果是人物掃描,那麼需要的設備比較麻煩,要找到符合你心目中的角色模特兒也不容易。而且我的專業就是做人物角色,我喜歡做角色,我在產業對製作自己想要的角色也很有信心,反而對於掃描人物技術有充滿疑問。</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">最終,從大家對我的作品反應她就像一個活人,這讓我很自豪。</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<img border="0" data-original-height="989" data-original-width="696" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqvwh4413HesyhQ3OAboPkxqeTnTsDyscVVvSRkPCh9tsY7oDtvteJstNWHNQ92jo_-vm_OXQ3fQmTyusgO3Gr82DW3xGX9QPteBxJEIYks67Q4x7lXp-_zVI8BuCaa1Dx4klez2FCDjg/s1600/image5.png" style="text-align: center;" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: left;">
<b><span style="color: orange; font-size: large;">專案進行中要展示的內容</span></b></div>
<br />
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">角色要感覺像活人,不只如此,人物的表情動作也要達到時下漂亮的標準。有別於西方文化與東方文化的不同,東方文化和K-POP興起,這樣的文化韓國最懂,我想要做出能證明這點的代表作。</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">目前,角色的臉部表情用了大約50個Blendshape節點,我也在研究表情和表情之間的轉換如何看起來更自然。</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<img border="0" data-original-height="1364" data-original-width="1600" height="545" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMGCgXHufN2ezCXu-u0q0M2ec1eIVtMHosVEesEx3bTsfi9WjHzd3i4CqXhwmvce9qAbPlZwsPHt41iiPlJW1xtl4mGjvyN1TG-lk54U3d-xYOfvhNF3PJ-cK4-zJVviIBIFw6oKbagQI/s640/image6.png" style="text-align: center;" width="640" /></div>
<div class="separator" style="clear: both; text-align: left;">
<i>輕咬下唇的感覺就像真人</i></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: orange; font-size: large;"><b>皮膚</b></span></div>
<br />
<div class="separator" style="clear: both; text-align: left;">
<img border="0" data-original-height="1246" data-original-width="1460" height="546" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLO6syifBZcSHkh_fyj6_395skPhqL679Qn0sWEwk-juC_2lhzClMBMNNetlPzJkyKFunWSgQkt7zS-gk0-Cyfh7zzNtn9hZfKyqoK3YEC-QPHaB3AuE0NSi7D9QG5BI5pbx79qfY2_CI/s640/image7.png" style="text-align: center;" width="640" /><img border="0" data-original-height="1101" data-original-width="893" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCL0zvq_nn7HMUn92jQPITrFvbDCyTdI1MRkpd4q25sgP_xBcy_SkbIA3XpKWenhxTLGvDNe4LDri0GeTqn59_s-9XPRfO6-uM6MUdKPD4nTg1sJzJzYHrd_TbRN1qcaas18U6iaqFb1E/s640/image7-1.png" style="text-align: center;" width="518" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">皮膚的呈現是製作女性角色時最重要的部分之一。 HDRP的StackLit無需修改即可使用,而8K Albedo貼圖作為額外的細節紋理,來表達皮膚的細節貼圖。</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<img border="0" data-original-height="923" data-original-width="1600" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGJXzZXNXUm735bKtJLFHoUGGiIkTO71-FPPseqwMf6XzHkyYQEQuYV4P3A9Eu2iFmwHFJhdHvSYYtIrtsrEFXtUaRPIr9bjl82dmp-T9I12he3VgOGSLpwqU1Cfe36OZeGdMldLey46A/s1600/image8.png" style="text-align: center;" /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<b><span style="color: orange; font-size: large;">頭髮</span></b><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">頭髮Shader基於Unity的Shader Graph的Hair Shader。目前我們正在研究各種方法來實現根據角色的運動來表達頭髮的自然飄動。</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<img border="0" data-original-height="450" data-original-width="697" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLAfMwE6rp3xFvmj0KGy-NzNanT52ydMkq9o5zKddlZBMctBUsIThefji1sxIMc0TP__w62_WjKaNAj1kSSh9CL6HTxUH-L8r_ZvhyphenhyphenohdlkYjdhyphenhyphen9MIbc9ZmjSqChh3oiHEe7xIcgVV4o/s1600/image9.png" style="text-align: center;" /></div>
<div class="separator" style="clear: both; text-align: left;">
Shader->HDRP->Hair Graph來建立HDRP的頭髮著色器</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">動態變形應用在衣服和頭髮的移動。目前正在進行各種測試找出讓飄動更自然的算法。</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<img border="0" data-original-height="943" data-original-width="1600" height="377" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkeLfkLE20EVGy4Snkrg6cIJM14TrhLnSFTrWP9ugRQW4A5Bsk8iMB2ILSIVYq2gnfyGgdDGfCdHuMXFGSkujqEZinROnqFJnxp-qMQKBZ6tjobCNgDPOVi9i_ApNZB4KOBonVKtPBvUU/s640/image10-1.png" style="text-align: center;" width="640" /><img border="0" data-original-height="1099" data-original-width="1600" height="438" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTjczNV0RLv40TFrzV-7yGj6pxZmcJvhXrdrwuqc-1dXP0MFCtsD3YiEZ71bRWiMqd9dAcdayNYi3OVhzBF7e6VDqHJ8iRvngL3nPXW53i1QnVU1cznDJpXgBVtXx2sfG1TIJQaOPuAPA/s640/image10-2.png" style="text-align: center;" width="640" /><img border="0" data-original-height="416" data-original-width="743" height="358" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8NsTj_irqn7VJ4lbccLR_gHIkwFb66HDDBqw6kPXBr-iF0i9ZXMRCG5wljafLhve12IXcwUdSTqH8Iuxk6DB-ixMfZiM8U-PWr910ersCh1_BNGtDAYMjXHBmnYnUAjpcJ-kYWvVRyTQ/s640/image10.png" style="text-align: center;" width="640" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">可以從這裡看<a href="https://twitter.com/rumiga0/status/1236706185979420672?s=20" target="_blank">影片展式</a></span></div>
<br />
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/pliUFrpciCQ" width="560"></iframe><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<span style="font-size: large;">影片中我使用iPhone X進行動作捕捉和眼球追踪。從移動整個身體到移動手指,成果都在計劃之中。目標是自然即時顯示整個身體的動作。</span><span style="font-size: large;">可以從Package Manager下載AR Face Tracking來實現這個功能。</span><br />
<span style="font-size: large;"><br /></span>
<img border="0" data-original-height="931" data-original-width="1600" height="372" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEGrd-gN2RKaQOvLdbSVfabYa4DUdMqN0HciQ2HkggO114gfpMY1B-7WMNtST8CjERfuFtFLme_o_PhRMEMRVZ8-UVhzVbei20OTD5Ya7_fkviXipgHVOGKdgm39PV_C1DypGsDvdEqOA/s640/image13.png" style="text-align: center;" width="640" /><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: orange; font-size: large;">自然的角色行為</span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both;">
<span style="font-size: large;">作者在Unite Seoul 2018上分享了主題為“如何用Unity通過手機建立美麗的角色”的演講。 他也分享了如何避免產生恐怖谷效應的重點。</span></div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
<br /></div>
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/ouBBQb22fKM" width="560"></iframe>
<br />
<div style="text-align: center;">
<div style="text-align: left;">
Unite Korea 2018的演講(韓文)</div>
</div>
<br />
<img border="0" data-original-height="474" data-original-width="960" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp_yASN45GddMeylhhlnC7cwdTVYo9P_ZG766jMg2mDTMVYf7xiR9ZM3qzq7RuYW_q1DveP2HRBOkE0zCSXTAdDSC1WkpxyliaJqxO9oXa19oRC4eqJKGl2O5PcoFPdik-zf34gv7hAAk/s1600/image13.jpg" style="text-align: center;" /><br />
<br />
<div class="separator" style="clear: both;">
<span style="font-size: large;">在Project SU-A中,我們更改了HDRI的來源,更改了T恤的顏色,調整到讓角色看起來更自然。首先,我將T恤的顏色更改為白色,並調整了後製處理的Bloom、Color Grading、White Balance等。調整Post Porcessing的一些設定,從正面向角色打了盞聚光燈,這麼做是模擬在真實工作室中拍攝模型的照明。</span></div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
<span style="font-size: large;">照明太強導致人臉曝光太多。因此我不得不修改和補強角色臉部表情(如妝容)的材質。這個過程讓我感覺好像是幫一個真實的人化妝補光,是一次非常有趣的經歷。</span></div>
<div class="separator" style="clear: both;">
<span style="font-size: large;"><br /></span></div>
<div class="separator" style="clear: both;">
<img border="0" data-original-height="1479" data-original-width="1369" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9xmiCBZHbeFguG3-_DFnUw_ot_tT41PnloD8DnICm9YLLNMsWy2LzeDfMiBjEcGRxcrTxS74F6KN8AmjHJCy5PR810uyEcKTZXQHZ8eHWwQcNVQcttb21LYvtap6XdpOllyEqFW6TB30/s640/image14.png" style="text-align: center;" width="592" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<span style="color: orange; font-size: large;"><b>Project SU-A目標</b></span><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<span style="font-size: large;">這個計畫仍然有許多東西正在準備,目前也還沒有談成任何投資計畫,不過我已經實現了角色服裝和細節製作流程,我們可以用比較高的標準來完成,並像活人一樣扮演虛擬偶像的角色,目標是做到這一點。</span><br />
<span style="font-size: large;"><br /></span>
<img border="0" data-original-height="900" data-original-width="1600" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZqQ5CoLsibkcu730TazkL4u98vMvjMVYBBIA_eY4I8ArtZfDvfkBmT6hPPYI9kzPO21dsIsjQukQLB1rJqgeCnWCZXLVfRyLnExzngzqaDpZAFYfcg7BlSHhuGifd7PizaOp9_iBs3d4/s1600/image15.jpg" style="text-align: center;" /><br />
<div class="separator" style="clear: both; text-align: left;">
作者的辦公桌,大部分時間都在這裡完成這個專案</div>
<br />
<img border="0" data-original-height="1007" data-original-width="1600" height="402" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBuViXcwcjSOg0fjhSErzdVlDGndhiT92NT7B2TbnzwRU0lxF2yLMv4VW2I2zZxULa_Ft57XRRmtqgAnh4b-Utdu1tP4j7CHG0gzFpjDPyUOEkpoDu3tZUWx2fVCkWUA-B6LYAPAb51ho/s640/image16.png" style="text-align: center;" width="640" /><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<span style="font-size: large;">如果你對這個專案有興趣,或已經產生戀愛的感覺,可以到<a href="https://twitter.com/rumiga0" target="_blank">作者的Twitter</a>去關注、支持他.... 的女主角</span><span style="font-size: large;">。</span><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
Unity Taiwanhttp://www.blogger.com/profile/05195645646153478011noreply@blogger.com0tag:blogger.com,1999:blog-6317841908377212626.post-32340928036430180142018-09-19T07:12:00.000-07:002018-09-19T07:21:28.672-07:00直播回顧 - 快樂的Minecraft 我的世界 ECS快速開發 <span style="font-size: large;">作者:Kelvin Lo<br /><br />片頭展示</span><br />
<span style="font-size: large;"><iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/w5F4i93IrM8" width="560"></iframe><br /><br />直播影片回播<br /><iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/f3iGTqwR-Cw" width="560"></iframe></span>
<span style="font-size: large;"><br />受到了上次Mike大叔的ECS教學啓發,我用一場GameJam活動的時間來製作了一個快速呈現ECS強大的簡單專案-Minecraft我的世界,當然沒辦法還原像是紅石系統這類高難度的功能,基本上就是挖礦和放石頭這兩個主要功能,重點在於如何利用ECS產生廣大的地形,以及體現ECS所提倡的要點-Performance by Default,在不考慮程式及任何優化的情況下,做出來的場景還能保有很好的效能。 <br /><br />Unity從2018開始導入ECS框架,紀錄這篇文章之時ECS仍然是體驗版,代表每一次的更新都會加入非常多的新功能,因此本篇文章僅算是我對當前ECS(Unity 2018.2.6, Entities 0.0.12)的體驗心得報告。 <br /><br />為什麼ECS的效能會超越GameObject+MonoBehaviour那麼多呢?我歸類為兩個要點,傳統方式的記憶體管理是分散式的,即物件和它身上的組件(Component)並非在同一個記憶體區段,每次存取都非常耗時。而ECS會確保所有的組件資料(Component Data)都緊密的連接再一起,這樣就能確保存取記憶體資料時以最快的速度存取。 <br /><br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3xc_wSvlkEwMoJ-WCJdFos7TfqedhV0EHGlPZSWmhXbgk6UDhdqUjFk18g3_ZzUfoM_hm2r2DyNC5jJZzWWHw-uCySDXPGZEvKI3rv-gIRvnt0cTUb0ZExVNhb96-9sh36lZx1AKg2cE/s640/1.png" style="text-align: center;" width="640" /><br /><br />這裡所提到的傳統組件Component和ECS的C,即Component Data雖然名字很像但卻是很不同的概念,舊的Component會乘載著不同的資料與邏輯功能,不同的Component代表著不同的功能。但在ECS裡,Component只會儲存單純的Data,不會有任何的邏輯運算,所有的邏輯運算必須拆離到S,即System裡面去實現。 <br /><br />也因為傳統的Component為了方便使用,整合了所有可能會用到的變數,不管你用得到或是用不到。好處就是一個Component可以解決很多事情,比如Transform,帶有Position, Rotation, Scale,透過這些參數很容易對物件處理位置或移動縮放處理。但這些你用不到的變數對於記憶體來說一點也不友善,尤其時物件非常大量時。 <br /><br />因此ECS把很重要一個概念就是管理只需要的Data即可,例如我的物件只需要處理渲染和移動,我當然就不需要紀錄Scale資料。 <br /><br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgofwE8vUoQjLqbY7FJ8mqJTBRED_Q0AAw-dW3JZQCmgTJKTGJhDkGdUpP0vs1TtjtkF8cMlg7clRw8ymNr0iP69VAjmB3NBNiFJ9-j8mqTMsoi6brHrcbZGSjrAcC0_ZfXtVhnhMcLns8/s640/2.png" style="text-align: center;" width="640" /><br /> <br /><br /><br />再來說說幾種方式產生Entity物件: <br /><br /><img border="0" data-original-height="1000" data-original-width="1600" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijw_WdwwYnuJ3T5oDeSsoJkWhtWlk4UBnKhoQOV5ADpTcIEfw2EEx4pKpnkBOFS8OhDhOBRlAwi2GWZ1QXw6nXXCWp0JnYeNedjQS1ZuMligUGMIdW9ru5GE6jUyPHgQi65zbZP-LbZUc/s640/3.png" style="text-align: center;" width="640" /><br /><br />可以看到這張圖中Hierarchy裡只有一個方塊物件,但畫面卻有3個方塊,原因是左邊兩個是透過ECS產生的Entity物件,會獨立顯示在Entity Debugger內。雖然目前是分開顯示的,但我們最終目的是重新打造一個讓開發者接受的一個統一編輯環境。 <br /><br />而左邊兩個Entity物件分別採用兩種不同的方式產生,整段程式如下: <br /><br /><img border="0" data-original-height="1600" data-original-width="1314" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKq1-Kb0Jc0u16nyVAshk4wn-tj6jZkfw9oz8fDMZ2WmJH6ICpDqoU_zGMdI-RQca517fXqL_ghXDY5LB4TgbXix0dh-oM85g8V-NabLi93sPTvxnUHc2KaEeMkKBWF5WHTB75B-WtciU/s1600/4.png" style="text-align: center;" /><br /><br />我先宣告了一個EntityManager管理器manager,然後在它底下生成了一個Archetype,這種EntityArchetype能確保存放在裡面的Component Data都緊密的相連,當你一次性產生大量的Entities並給予各種邏輯運算時,這種結構在記憶體與快取之間的移動效能直逼memcpy。 <br /><br />從41-49行程式就是基於Archetype結構在裡面生成一個Entity並給予座標資料與渲染資料,即指定渲染哪個Mesh和Material。最後這個方塊只帶有座標Position, 自訂的BlockTag和用來渲染的MeshInstanceRenderer三個Component Data遠遠比傳統的Game object資料少很多。這種產生方式沒有連結任何Unity編輯器上的功能,只是單純的產生Data和處理Data,可以稱為Pure ECS。 <br /><br />54-58行程式負責渲染最左邊的方塊,為了讓開發更直覺我希望產生Entity時引用一個Prefab,雖然Prefab是傳統Game Object,但在實例化成Entity時,Unity會自動把跟ECS無關的Component拆離,只留下Component Data產生Entity物件。這種跟Unity整合的流程,可以稱為Hybrid ECS,也是Unity在整合ECS的主要路線。 <br /><br />這個範例還用了一些新的功能例如新的NativeArray和定義像[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] <br />這樣的Attributes屬性來確保函數能夠運行在想要的順序上。 </span><br />
<h2>
<span style="color: #e69138; font-size: large;">如何產生世界地形 </span></h2>
<span style="font-size: large;"><br />為了要讓地形能更像Minecraft的產生方式,它必須符合幾個要點:無接縫,無限大,亂數地形等等,採用Perlin noise處理這種地形是在適合不過了,Perlin noise可以有規則的亂數產生一個波形資料,作為世界的高度資料參考非常適合,我可以先產生一個足夠大的高度圖然後只用一小部分即可,如果未來要延伸地形只需要繼續生成它就會不斷延伸下去不會破掉。 <br /><br /><br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIWOjWaIbkd6WIAfdB6C1YHXVlynU3hBX9ahy9j9XphSitY9T43BUyg_Y0bRjgUsnvCqL5ss9dNUNoz6Gg5MCdJXxqWYY-B2Vmwuza_WKfWFDogAmlUmpYf8WSlJT0Ksr_E-YhxAHN1Ls/s640/5.png" style="text-align: center;" width="640" /><br /><br /><br /> <br /><br />具體把這個高度資料用方塊選染出來大概會長這樣 <br /><br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCgfv4l9DyA2KWlmImFOT70GXsSthIHS9K3WxL_BzzgQfdg1KSL5iSP8Lwd6Zp5ifgIUl99nHHYuNAq6tdac6YJUfFT73kPo3bt6pcA6KPghSjKvb5bFP8aS9BqrSLQsMTctccOf94Dl0/s640/6.png" style="text-align: center;" width="640" /><br /><br />只留下高度0-6號的方塊,感覺世界形狀就出現了 <br /><br /><img border="0" data-original-height="848" data-original-width="1600" height="338" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsbCH4mnGEU0NY9LorBIyN9um7ojGnpllDtj3GEJRLuq2tGJf2n7gYcsiZguJJHzeVS6cUaME6ZKFJqv-CLEdqDBfbq5OK5cN11vie5wPEjCm5IAXwY7ApAGqjFpVHU2hiuwdqKM9RbYk/s640/7.png" style="text-align: center;" width="640" /><br /><br />從程式針對不同高度的Entity給予不同的Material資料,就可以產生我的世界,針對高度0的地表,也可以隨機產生花草或樹木。 <br /><br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUvFQjC29kAGrMjg2KSGVH6Oir49ljpMXxAAXHWGSkYRNvM7Q5E0v1US-9VB-WmN1NpazEBWdhHb6hcSLd2gSmX5ZdFbSe2ZGSerkfqajnNeXm-CFMgaH-hc-j3BtRr0aiRbBlBvK9UlY/s640/8.png" style="text-align: center;" width="640" /><br /><br />嘗試產生了一個沒有任何優化處理,17萬個方塊的我的世界還能保持在40FPS以上,心裡有些激動。 <br /><br /><img border="0" data-original-height="1033" data-original-width="1600" height="413" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKVpMe_jjKASXxTtbUoasB1l8Ae2M8VP_-u1Xw9VP4CfxTiNYrpFMteYqlujFWwV_aXcI-ebKDV5gXu6XGWTuZJa292xaeiPPWdVjyiHKLm9L29_XLatkPQNSDfiNMP91mo4eLXmXyqCc/s640/9.png" style="text-align: center;" width="640" /></span><br />
<h2>
<span style="color: #e69138; font-size: large;">產生物理地表 </span></h2>
<span style="font-size: large;"><br />由於Unity ECS尚未支援物理系統,因此目前要實現物理要自己寫碰撞邏輯,或是沿用舊的Collider來檢測碰撞,作為一個Gamejam專案,自己寫是不太實際的而且我預期很快的Unity ECS會支援物理系統,因此我決定採用最簡單的方法,每個Entity方塊都加上一個Collider,一方面可以作為地板一方面也可以檢測挖掘和放置方塊。 <br /><br />這是一個全部方塊的座標同時都加放一個Collider物件的地形,除了第一幀稍微耗時之外,運行時並沒有帶來太多的消耗。 <br /><br /><img border="0" data-original-height="953" data-original-width="1600" height="380" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBAUf_A_XVlzH_9amXaZb8v39t0NHeWrBQXbWOFIi12jonGqohHMMoZaXXicsq1UfGXsUFWa8ctLIwLAbSe_GAlDffRUen97rPfsD0ulMJd_p2f4I5hOkBWESHB0HovAt-2WKgacGkeqo/s640/10.png" style="text-align: center;" width="640" /><br /><br />有了地形就可以放上大家熟悉的FPS Character第一人稱角色,繼續處理方塊的挖掘和放置。 <br /><br />製作放置方塊比挖掘方塊來得簡單,我們從鏡頭發射一個Raycast,打到任何Collider就依照當下normal的方向產生一個Collider與一個Entity物件,並依照選擇的貼圖指定給該Entity帶有的MeshInstanceRenderer內的Material即可。程式如下: <br /><br /><img border="0" data-original-height="880" data-original-width="1600" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVqlG_A_q5nt3vsuIaH7De8LhM6Bo9-zbB76tVgvfSlnbptufjMZ72A9lj-rnN7iZ-6ITWYN0Fli1wzAq_BaSPI92z9cvpK_4WToM8WpJ9cLhR2vGFY03oxNne-2HrGuN7uF-1koVYPcI/s1600/11.png" style="text-align: center;" /><br /><br />但是挖掘方塊就沒那麼容易了,主要是因為當前的Entities版本尚未支援物理系統,因此定位場景內眾多物件中某一個entity是有困難的,相信未來這不會是個問題,但現在我必須寫很多程式來實現支援ECS的Raycast,因此我採用另外的思維來實現。 <br /><br /><img border="0" data-original-height="634" data-original-width="1402" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoD5otiMD-wPg3OGtS0M0iymkLFgsLQKrbRnate_sR5Frq1uF1ibO0n36o49iVI_jLwbxUSMWHx1T83CBjMaOkLzg6ti7w3on5hxg_cRXmy_XL0BdWHyUbZXH1X4J-4fl_zqgnbmKvypc/s1600/12.png" style="text-align: center;" /><br /><br />首先我在Raycast打到的Collider同樣的座標產生一個只帶有一個DestroyTag的Entity物件,它除了座標之外沒有任何渲染資料,我就可以用System來檢測移除同座標的方塊。同時我也先移除了這個Collider。 <br /><br />我們上面聊了很多關於ECS裡面的E(Entity)和C(Component Data)但一直沒有提到S(System),現在我們要寫一個System來處理刪除方塊的系統。但在之前我想討論這個S和傳統的有什麼不同。傳統的腳本你必須要放到場景內才會隨著物件的Update, FixUpdate或OnCollisionEnter各種方法來運行,但ECS的System是不分場景的,項目內所有的場景只要帶有Entity物件System都會有反應,因此不需要特別把System腳本放入場景物件內。 <br /><br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3d6sEJw5uFCe28Ty3D-xmr1wxoWWzty83DXpm7nx8HjBoxtSOn_L_oL-_-6pGY5GuSSiRJQvQI939raZT-C6jmwyoLLXT5vWjxamcSgOk-5sgEzqOYJZ56RLfmrK-mARcb9pZXP45Jc4/s640/13.png" style="text-align: center;" width="640" /><br /><br />當然這樣做的好處就是所有的相關系統你可以一隻腳本解決,而不是每個物件有各自的Update方法處理,造成物件數量一大就會影響效能。System不在乎你是一顆子彈或是一隻怪物或是一個角色,只要符合System過濾條件,它都會執行System內的邏輯。 <br /><br />我寫了一個Destroy System用來檢測那些Entity必須要刪除, <br /><br /><img border="0" data-original-height="1309" data-original-width="1600" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpfwm0osJtQ4FrwgSLDI51Oy4SpTMoBpc1dXtlmJep2anYZ7su03vDsz1vWZJz9YO-j-H9kSUlk7rZPRDo6TWSv8Zi5YToSDRdKk9TwZt6aBuz923y2wmWtslUke0R5tvYHg4n3EVAd_A/s1600/14.png" style="text-align: center;" /><br />System有兩個主要的結構,一個是13-38行代碼的Query,我分別查詢哪些Entity帶有BlockTag和Position,哪些帶有DestroyTag和哪些是地表的花草,然後在OnUpdate內比對哪些事需要刪除的Entity方塊,並檢查上方是否帶有花草需要一並移除。因此這裡總共需要移除的物件有四個:該位置的Entity方塊、作為檢測的Entity物件、地上的花草和BoxCollider物件。 <br /><br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3ugISVvYGJg9HOZNC1Ff1MYXE4vOuje_-Fvu7JCa1e9rKkQYuEpIRM7OzmutzRD2BnXTdCZ6n3vt5oSdtzeptJxwiZhXSOmNAt6BGaX3U-33m4FzDHtBEgKQNkQT6HtUXeKJ67jY751Y/s640/15.png" style="text-align: center;" width="640" /><br /><br />System的OnUpdate也是每幀執行的,你可以從Entity Debugger內看到每個系統的耗時,雖說System是全專案執行的,但你也可以透過API在不同的場景開關這些System。 <br /><br /><img border="0" data-original-height="418" data-original-width="1600" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwB0otY0JDwS-ir2tQd-0jg-EMcHfdFgw9WP9lt8ZyTtlkopFkwH5wWVzijVWTmaF1Q70DF6SrLjlbNjZg-IpjxOIZmWlA9xZXDAGFJz4L_FVSibbSrhwMUPEF7lwPp2S2Y7fU7B2WidI/s1600/16.png" style="text-align: center;" /><br /><br />以上是本次直播快樂的Minecraft ECS製作分享重點內容,後續我們還會有更多的報導。 感謝各位 !</span> Unity Taiwanhttp://www.blogger.com/profile/05195645646153478011noreply@blogger.com4tag:blogger.com,1999:blog-6317841908377212626.post-52937284041189026802018-08-06T20:47:00.003-07:002018-08-06T20:50:25.192-07:00死者之書:(四)Quixel、風、場景地形和優化技巧<span style="font-size: large;">作者:Julien Heijmans <a href="https://blogs.unity3d.com/2018/06/29/book-of-the-dead-quixel-wind-scene-building-and-content-optimization-tricks/" target="_blank">原文</a></span><br />
<span style="font-size: large;">潤稿:<a href="https://weigame6.wixsite.com/weij" target="_blank">Wei J</a></span><span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span><br />
<span style="font-size: large;">系列作品:</span><br />
<span style="font-size: large;"><a href="https://unitytaiwan.blogspot.com/2018/08/blog-post_6.html" target="_blank">死者之書:(一)概念美術</a><br /><a href="https://unitytaiwan.blogspot.com/2018/08/blog-post.html" target="_blank">死者之書:(二)角色資源製作</a><br /><a href="https://unitytaiwan.blogspot.com/2018/08/blog-post_4.html" target="_blank">死者之書:(三)環境資源與特效製作</a><br />死者之書:(四)Quixel、風、場景地形和優化技巧</span><br />
<span style="font-size: large;"><br /></span><span style="color: #e69138; font-size: large;"><b>揭秘《死者之書》之Quixel、風、場景製作及優化技巧</b></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">嗨!我是Julien Heijmans,在Unity Demo團隊中擔任環境藝術家,我去年才加入Unity不過我已在遊戲產業待了約七年。這篇文章將會從我以</span><span style="font-size: large;">《死者之書》的觀點來介紹內容創造者及環境藝術的部分。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">攝影製圖對我來說是新的領域,但我清晰地記得多年前</span><span style="font-size: large;">Quixel發佈他們用Megascans製作的成果,從那之後我就一直試圖取得使用他們的資源來工作的機會,而加入Unity Demo團隊一起製作</span><span style="font-size: large;">《死者之書》</span><span style="font-size: large;">使這一切成真了。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">如果你想試驗文章裡提到的諸多工具,可以前往<a href="https://assetstore.unity.com/packages/essentials/tutorial-projects/book-of-the-dead-environment-121175" target="_blank">AssetStore</a>下載『《死者之書》: 環境』</span><span style="font-size: large;">專案。</span><br />
<span style="font-size: large;"><br /></span>
<span style="color: #e69138; font-size: large;"><b>Unity與Quixel的合作</b></span><br />
<br />
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image23.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image23.png" width="640" /></a></span>
<span style="font-size: large;"><br /></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">當我參與進專案後才理解到我們不只是使用Quixel的Megascans資料庫,而是與Quixel公司緊密的合作來進行創作。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">在製作過程中,Unity Demo團隊創建了一個所需資源的列表,如果現有的掃描庫中缺少合適的對應資源,Quixel則會為之採集新資源。這其中的不少資源都是植物類型,例如:草地、植栽和灌木叢,這些資源需要合適的設備和佈置來進行掃描。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">Quixel不僅為我們提供了資源的紋理集,還創建了相應的幾何體(geometry),帶有LOD(level of detail)和頂點色設置(vertex color),以支持我們的風著色器。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image14.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image14.png" width="640" /></a></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">在開發過程中,我們收到了超過50個高質量資源,這些資源較為複雜,我們不得不依靠著團隊中為數不多的藝術家努力在有限的時間中處理完畢。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">在製作期間,我們快速的將資源載入到Unity中,得到不錯的外觀效果。我們經常會調整紋理(大多是反光材質(albedo)</span><span style="font-size: large;">、亮度/等級/曲線以及</span><span style="font-size: large;">修改色彩使它們與場景效果更為統一),</span><span style="font-size: large;">重新調整LOD到所希望的等級,並且將紋理指定給一個新的HDRP光照材質。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">幸運的是,Quixel發佈了一個工具Megascans Bridge,它能完成之前大量我們需要手工完成的輸入工作。Megascans Bridge為HDRP重打包紋理貼圖節省了大量時間。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image20.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="509" data-original-width="800" height="407" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image20.png" width="640" /></a></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">如果你對Megascans中資源感興趣,想要獲取更多這類資源, 可以訪問<a href="https://assetstore.unity.com/publishers/26035" target="_blank">Asset Store</a>獲取。所有這些資源都能夠直接輸入到專案配置中,無論專案使用的是HDRP還是LWRP。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<span style="color: #e69138; font-size: large;"><b>風</b></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image6-1.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="294" data-original-width="800" height="235" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image6-1.gif" width="640" /></a></span>
<span style="font-size: large;"><br /></span><br />
<span style="font-size: large;">為植被資源及整個管線建立風系統永遠是一個非常棘手的過程。 在場景中,許多不同種類的植被資源需要以不同的方式進行動畫處理,例如:二種不同的樹或許需要完全不同的設置和不同的著色器複雜度。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">因此我們決定為了對植被資源產生風效果,</span><span style="font-size: large;">做一個基於自訂頂點著色器的程序化動畫</span><span style="font-size: large;">。它經過量身打造,適合我們的專案中的樹木或灌木叢。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">技術主管Torbjorn Laedre開發了一個著色器,能夠支持多種植被,這個著色器使用了三個不同的技術:</span><br />
<br />
<ul>
<li><span style="font-size: large;">階層軸心(Hierarchy Pivot):應用於樹木和一些擁有非常明確結構/階層的植物。</span></li>
<li><span style="font-size: large;">單一軸心(Single Pivot):應用於草地、小型植物和帶有不確定結構/階層的大型灌木。</span></li>
<li><span style="font-size: large;">程序動畫(Procedural Animation):應用於無法確定軸心點的植被資源。</span></li>
</ul>
<br />
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image25.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="259" data-original-width="800" height="206" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image25.gif" width="640" /></a></span><br />
<br />
<span style="font-size: large;">樹木是準備起來更為複雜的資源,它們使用的是階層軸心類動畫,並且依賴三個不同的層級的階層(levels of hierarchy):</span><br />
<span style="font-size: large;"><br /></span>
<br />
<ul>
<li><span style="font-size: large;">樹幹(Trunk):根植於地面的部分。</span></li>
<li><span style="font-size: large;">A級樹枝(Branches Level A):與樹幹相連。</span></li>
<li><span style="font-size: large;">B級樹枝(Branches Level B):與A級樹枝相連。</span></li>
</ul>
<br />
<span style="font-size: large;">著色器需要知道樹木在階層中的層級和樹木每個頂點的軸心點。首先,我們要編輯樹木本身的幾何圖形,然後使用綠色頂點顏色通道為樹木的每個多邊形指定階層的層級。</span><br />
<br />
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image10-1.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="685" data-original-width="465" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image10-1.png" /></a></span><br />
<br />
<br />
<ul>
<li><span style="font-size: large;">頂點顏色的綠色通道數值為0時,表示這個部分是樹幹。</span></li>
<li><span style="font-size: large;">數值在0和1之間則是A級樹枝。</span></li>
<li><span style="font-size: large;">數值為1則是B級樹枝。</span></li>
</ul>
<br />
<span style="font-size: large;">我使用了Maya完成這部分任務,通過使用一些小腳本,可以在10-15分鐘內設定好一個資源的所有LOD。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">除此之外,我們還使用了飄動遮罩(Flutter Mask)。飄動遮罩是紋理遮罩,能夠幫助判斷樹枝的軸心</span><span style="font-size: large;">在幾何體上的</span><span style="font-size: large;">位置。下圖是這個遮罩的圖示。</span><br />
<br />
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image22.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="800" data-original-width="800" height="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image22.gif" width="640" /></a></span>
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">準備好所有資訊後,就可以使用C#腳本來輸入樹木的Prefab,並產生一個新的Prefab,這個Prefab中包含每個頂點的軸心資訊。將WindControl物件加入到場景後,便可以將樹木輸入到場景中,並開始處理材質屬性。</span><br />
<span style="font-size: large;"><br /></span>
<iframe allowfullscreen="" frameborder="0" height="480" src="https://www.youtube.com/embed/GDhcmaS2A8g" width="640"></iframe><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">我們可以看到,每個階層層級都具有一個範圍屬性(基本上是樹幹或樹枝長度)和彈性屬性。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">還有一些屬性用來設置風抖動(wind flutter )動畫。它們給頂點位置添加了一些程序化的雜訊,用來模仿當風吹到樹幹時的振動效果。</span><br />
<span style="font-size: large;"><br /></span><span style="font-size: large;">然後我們還需要使風的音效對動畫產生影響。音效的音量會驅使動畫的風力。這是個簡單的想法但加入成果非常驚人,你可以打開專案,然後在場景中四處走動,當聽到大風吹過身邊時,你會發現樹木和周圍的草地都在震動。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<span style="color: #e69138; font-size: large;"><b>佈局</b></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">在處理《死者之書》這類專案的細節和密度時,思考如何</span><span style="font-size: large;">建</span><span style="font-size: large;">構層級十分重要,如此能避免在製作中出現的效能問題。其中一個需要顧慮的是關於限制場景中的遠景距離。我們可以通過在場景佈局中放置「過道」(</span><span style="font-size: large;">corridor)</span><span style="font-size: large;">和「障礙」(</span><span style="font-size: large;">bottleneck)</span><span style="font-size: large;">來實現這個想法。</span><br />
<span style="font-size: large;"><br /></span>
<a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image16-1.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="549" data-original-width="800" height="439" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image16-1.png" width="640" /></a><br />
<br />
<span style="font-size: large;">這些佈局結合正確設置「Occluder static」和「Occludee static」flag的資源後,會使Unity的遮罩剔除(occlusion culling )更為高效。</span><br />
<span style="font-size: large;"><br /></span>
<iframe allowfullscreen="" frameborder="0" height="480" src="https://www.youtube.com/embed/eqv9bs9OBlQ" width="640"></iframe>
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">上面的影片展示了遮罩剔除的視覺化功能,我們可以看出攝影機是從頂部視圖進行觀察的。在影片結尾,啓用/禁用了遮罩剔除,然後查看哪些物件被遮罩剔除功能所剔除。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">我們也能看到一些沒被剔除的物件,這些物件大多是非常高大的樹木,有些超過25米高,這些樹有很大的邊框,因此很難在峭壁後剔除。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span><span style="font-size: large;"><span style="color: #e69138; font-size: medium;"><b>使用Unity傳統地形系統(L</b></span><span style="color: #e69138; font-size: medium;"><b>egacy</b></span><b style="color: #e69138;"> Terrain)</b></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">在《死者之書》預告片發佈後,我們看到有些評論說:這個專案中絕對不可能使用了傳統地形系統。但實際上我們使用的就是傳統地形系統,並且我們修改了HD渲染管線的Layered Lit著色器來支援它。HDRP Layered Lit著色器允許使用高度圖紋理來混合layer,所以得到的結果會比傳統地形著色器的線性混合功能更好。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image26.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image26.gif" width="640" /></a></span><br />
<span style="font-size: large;">在此動畫中,僅修改了不同layer的高度偏移(height offset)</span><span style="font-size: large;">值</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">當然,這是一種臨時的解決方案,不能在UI中恰當地集成。為了修改地形,我們需要編輯材質用來適用於它,而不是使用在地形物件中Paint Texture tab下的「Edit Texture」按鈕來處理。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image17.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="390" data-original-width="538" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image17.png" /></a></span><br />
<span style="font-size: large;">這些layer主要是為了幫助繪製地形上的不同layer。它們不是用來渲染地形的,除非是使用平鋪(tiling)設定。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image12-1.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="546" data-original-width="800" height="436" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image12-1.png" width="640" /></a></span><br />
<span style="font-size: large;">與此相反,尋找適用於地形的材質,我們會發現所有紋理和材質屬性都會影響地形。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">如果要創建新地形並在其上應用不同紋理,則需要複製TerrainLayeredLit材質,並將其指定到新地形上。還需要在Paint Texture tab中創建4個紋理集合。指定的紋理不會用來渲染地形,但它們會讓我們在地形上繪制不同的layer,還可以修改不同layer的平鋪設定。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">此外,為了能夠充分使用LODGroup功能,所有在地形上放置的資源都會設置為樹木而不是具體的資源。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image7-1.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="443" data-original-width="800" height="354" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image7-1.gif" width="640" /></a></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">但實際上,這個專案中有大量零散的資源散布在地面上:草、灌木叢、植物、小樹枝、岩石等。即使有那麼多零散資源,地形仍可以是簡單的,在下一部分我們可以瞭解到,在這個畫面中地形只是一個簡單的平鋪材質。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<span style="color: #e69138; font-size: large;"><b>零散的細節資源</b></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">當在關卡中移動時,我們會注意到在地上散落了大量的小樹枝和松果。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image4-5.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="406" data-original-width="800" height="324" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image4-5.png" width="640" /></a></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">如果只是在關卡中隨意移動時,這些並不顯眼,但我們開始注視地面時,這些小樹枝和松果給場景帶來了細節。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">有時候地面會有數百根細小的樹枝,分散在岩石和枯萎樹幹之間,這感覺就像它們自然從樹上脫落在這些位置。手工放置它們是不可能的,所以Torbjorn Laedre製作了一個工具幫助我們將這些小型物件分散這些關卡中。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">小樹枝是帶有Alpha材質的簡單挖剪(cutout)平面。我們給這些小樹枝添加了膠囊碰撞體(capsule collider)。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image19.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="568" data-original-width="800" height="454" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image19.png" width="640" /></a></span><br />
<span style="font-size: large;"><br /></span><span style="font-size: large;">腳本首先會在指定位置周圍產生需求數量的零散物件,然後進行落到地面的</span><span style="font-size: large;">物理模擬</span><span style="font-size: large;">,它們落下後會與地形、其它資源岩石、枯萎樹幹等相互碰撞。然後按下按鈕「Bake」,小樹枝的碰撞體會被移除,合併成單一物件,然後指定給一個帶有特定剔除距離的LODGroup。</span><br />
<span style="font-size: large;"><br /></span>
<iframe allowfullscreen="" frameborder="0" height="480" src="https://www.youtube.com/embed/7YONhGZXYLI" width="640"></iframe>
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span><br />
<span style="font-size: large;">此腳本在場景中被用在名為「UberTreeSpawner」的物件上</span><span style="font-size: large;">,你可以根據需求隨意使用。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">關於此工具的附註:為了使其它零散對象適當地落在地面和其他資源上,在場景中的所有資源皆需要有較高密度的網格碰撞體(mesh collider)。並且在遊戲執行時,這些笨重的碰撞體不能被使用。 出於這個原因,場景中的多數資源帶有兩組不同的碰撞體:一個是輕量的,會被PlayerController用在運行模式的實時環境中,指定在預設的layer。另一個則用於小樹枝的物理效果模擬上,指定於GroundScatter layer。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<span style="color: #e69138; font-size: large;"><b>光照</b></span><br />
<span style="font-size: large;"><br /></span><span style="font-size: large;">『</span><span style="font-size: large;">《死者之書》:環境』專案使用烘焙的間接全域光照(</span><span style="font-size: large;">baked indirect global illumination)</span><span style="font-size: large;">,並</span><span style="font-size: large;">帶有即時運算的方向光(real-time direct lighting)</span><span style="font-size: large;">。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">來自太陽的間接光照和來自天空的直接加間接光照都被烘焙到光照貼圖(lightmaps)和光照探針(probe)中。反射探針、遮蔽探針和其它遮蔽來源也會被烘焙。另一方面,直接太陽光直射也是即時光照。在使用即時直接光照時,在HD渲染管線中的著色效果最好,它也能讓我們執行時能自由調整光的</span><span style="font-size: large;">方向</span><span style="font-size: large;">、強度和色溫。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image9.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="313" data-original-width="800" height="250" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image9.gif" width="640" /></a></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">由於間接光照已被烘焙,我們不能對方向光的強度和顏色進行太多調整,否則它會無法與烘焙光照相符合。儘管樹林能夠掩蓋不</span><span style="font-size: large;">符合</span><span style="font-size: large;">的間接光照,是個容忍度較大的環境,但我們還是不能在這個設置中脫離完整的晝夜循環。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">已烘焙光照貼圖大多用於地形和少數其他資源,但我們更喜歡為專案中的石塊和峭壁使用光照探針和遮蔽探針,因為它們有尖銳的角度和捲曲的法線貼圖,能得到更好的結果。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<span style="color: #e69138; font-size: large;"><b>遮蔽探針(</b></span><span style="color: #e69138; font-size: large;"><b>Occlusion Probes)</b></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">在即時環境中,</span><span style="font-size: large;">難以對</span><span style="font-size: large;">茂密的森林進行照明。 樹木的樹葉和樹枝都有巨大的表面積和複雜的幾何形狀,因此給它覆蓋上光照貼圖很不切實際。為每棵樹使用單個光照探針可以從下至上給它一致的光照效果。光照探針代理體積(Light Probe Proxy Volume)能實現更接近我們想要的效果,但通過提高網格解析度來採集精良細節的做法並不實際。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">因為這些因素,我們的高級圖形程式設計師Robert Cupisz開發了遮蔽探針。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">從美術的角度來看,這是個非常不錯而簡易的功能:只需將物件加入到場景中,它就會顯示一個體積輔助圖示(gizmo)用來縮放,從而覆蓋想要的區域,接著以X、Y、Z來設定它的解析度參數即可。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image1-9.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="403" data-original-width="800" height="322" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image1-9.png" width="640" /></a></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">如果希望場景中某些區域擁有更高密度的探針,它還能允許創建「細節」遮蔽探針。設置完成後,需要烘焙整個場景的光照。遮蔽探針會在這個過程中被烘焙。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">通過在上半球發射射線(ray),3D網格中的每個探針會對天空可見度進行採樣,並將其存儲為從完全遮蔽的0到完全可見的1的8位元值。這使得有更高濃度的樹葉和樹枝的地方顯得更黑暗,即使那裡只有幾棵樹聚集在一起也會如此。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">落到樹幹或石塊中的探針會完全是黑的。為了避免黑色洩露出來,它們會被標記為無效,並被周圍的有效探針覆寫。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">由於探針會對天空的可見部分進行採樣,它們應該要減弱直接來自天空的光照計算部分(direct sky contribution)。所以,光照貼圖會設定成從常規光照探針中排除直接光照(direct light contribution)的計算,然後探針光照由光照探針加上直接天空探針組成,並且都被遮蔽探針所遮擋。</span><br />
<br />
<span style="font-size: large;">這樣一來我們就獲得了大量低成本的遮蔽探針,會對葉子遮擋天空的細節進行採樣,為圖像帶來深度,我們也得到了少量效能消耗較大的光照探針,用來採集緩慢變化的間接光照。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image2-3.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="448" data-original-width="800" height="358" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image2-3.gif" width="640" /></a></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">如果想要更清楚地瞭解它們如何影響場景,可以使用SkyOcclusion Debug視圖進行查看。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image8-2.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="448" data-original-width="800" height="358" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image8-2.png" width="640" /></a></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">這個遮蔽探針API已經加入到Unity 2018.1中,它可以用於烘焙遮蔽探針並從光照探針中排除天空的直接光照計算,專案中的提供了所有腳本和著色器。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<span style="color: #e69138; font-size: large;"><b>大氣散射(</b></span><span style="color: #e69138; font-size: large;"><b>Atmospheric Scattering)</b></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">我們移植並重新使用了為<a href="https://blogs.unity3d.com/2015/05/28/atmospheric-scattering-in-the-blacksmith/" target="_blank">《Blacksmith》</a>展示Demo所開發的大氣散射(Atmospheric Scattering)解決方案。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">我們的高級程式設計師 Lasse Jon Fuglsang Pedersen 對其進行了擴展,讓它可以利用暫時超級採樣(temporal supersampling)功能,使外觀更為平滑。 </span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image18-1.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="448" data-original-width="800" height="358" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image18-1.gif" width="640" /></a></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<span style="color: #e69138; font-size: large;"><b>HD渲染管線穿透</b></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">HD渲染管線的預設發光著色器支援多種漫反射效果。它能讓你得到帶有表面下(sub-surface)散射效果的材質,或就如本專案中為植物所使用的效果,一個更為簡單的</span><span style="font-size: large;">只帶有透光性的</span><span style="font-size: large;">半透明材質。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image11-1.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image11-1.gif" width="640" /></a></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">此效果設定在兩個不同位置:</span><br />
<span style="font-size: large;"><br /></span>
<br />
<ul>
<li><span style="font-size: large;">我們需要選擇「Translucent」材質類型的材質上,輸入一個厚度(Thickness)貼圖,然後選擇漫反射配置,這個配置文件在第二個位置。</span></li>
<li><span style="font-size: large;">第二個位置是漫反射配置文件設定,我們可以編輯透光效果的其它參數。</span></li>
</ul>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image13.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="800" data-original-width="485" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image13.png" /></a></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">注意:我們增加了額外的slider來分別控制直接和間接透光,讓最終結果有更好的可控性。但這個改動並不遵循PBR原則,所以</span><span style="font-size: large;">它</span><span style="font-size: large;">不會被加入HD渲染管線。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<span style="color: #e69138; font-size: large;"><b>Area Volumes</b></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">Area Volumes被構築</span><span style="font-size: large;">在由SRP提供的核心v</span><span style="font-size: large;">olume</span><span style="font-size: large;">系統上,與Post Process Volumes非常相似。它們的功能根據主攝影機物件的位置修改對象屬性。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">包括定向光源、大氣散射、自動聚焦和WindControl在內的多個對象都能受Area Volumes控制屬性,因此,如果想要修改當前的光照設置,則需要在對應Area Volumes中進行操作。那些Area Volume物件在主場景中,位於_SceneSettings > _AREASETTINGS目錄下,帶有「_AV」的後綴字尾。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<span style="color: #e69138; font-size: large;"><b>除錯器視窗</b></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">針對不常使用HD渲染管線的使用者,現在有一個特定的SRP除錯視窗,你可以通過選單Window > General > Render Pipeline Debug打開它。</span><br />
<span style="font-size: large;"><br /></span>
<a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image5-2.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="323" data-original-width="751" height="275" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image5-2.png" width="640" /></a><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image24-1.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="323" data-original-width="751" height="274" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image24-1.png" width="640" /></a></span>
<span style="font-size: large;"><br /></span><br />
<span style="font-size: large;">通過這種方式,你可以看到獨立的GBuffer layer、光照組件或是材質中的特定紋理貼圖,甚至是覆寫反光率(albedo)/平滑度(smoothness)/法線(normal)。當一些物件沒正確渲染或是有其它視覺bug時,這是個非常有用的工具。它會幫助你更快找出問題的源頭。</span><br />
<span style="font-size: large;"><br /></span><span style="font-size: large;">最棒的是這些除錯視圖是從著色器自動生成的,編碼器能夠非常輕鬆地創建新的除錯視圖。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image21-1.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="289" data-original-width="800" height="230" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image21-1.png" width="640" /></a></span><br />
<span style="font-size: large;">有一些除錯視圖能夠從渲染管線除錯視窗中打開</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">我們使用這些除錯視圖來創建在場景背景中使用的樹狀billboard。過程很簡單,僅需把資源放到空白場景中,然後進行截圖,</span><span style="font-size: large;">截圖時畫面上帶有</span><span style="font-size: large;">可見的反光率、粗糙度和法線Gbuffer layer等屬性,然後將它們用來創造自訂的紋理貼圖。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<span style="color: #e69138; font-size: large;"><b>優化</b></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">雖然優化的大部分內容屬於程式碼部分,但如果你想要擁有合適的幀率,合理設置好資源和場景也很重要。</span><span style="font-size: large;">下面是一些為項目優化內容的方法:</span><br />
<span style="font-size: large;"><br /></span>
<br />
<ul>
<li><span style="font-size: large;">所有的材質都使用了GPU Instancing。</span></li>
<li><span style="font-size: large;">場景中的多數資源都使用了LOD。</span></li>
<li><span style="font-size: large;">LOD交叉淡入淡出(The LOD Crossfade)功能很棒,它能夠給不同細節等級的物件帶來好看又平滑的混合效果。但這個功能極度消耗效能,大量提升專案的draw call。因為這個原因,我們大部分的資源都盡可能的禁用。</span></li>
<li><span style="font-size: large;">為了避免LOD之間的過渡區域太過明顯,我們在大型石塊和峭壁資源上使用物件空間(Object Space)法線貼圖。</span></li>
</ul>
<br />
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image3-1.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="278" data-original-width="800" height="222" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image3-1.gif" width="640" /></a></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image15.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="254" data-original-width="800" height="203" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image15.gif" width="640" /></a></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">注意:這裡使用的是物件空間法線貼圖,而不是切線空間(Tangent Space)法線貼圖,這樣做會降低法線貼圖的精確度。實際上,這在我們那些粗糙雜亂的資源上並不明顯,但你或許不會想要把它用在有菱角表面的資源上。</span><br />
<span style="font-size: large;"><br /></span>
<br />
<ul>
<li><span style="font-size: large;">儘管通過建構場景及遮蔽剔除來限制視野距離很重要,同樣值得一提的是,這其中的不少用於渲染場景的draw call消耗實際上來自渲染每個陰影圖的串聯(each cascade of shadow maps),在此專案中特別是來自定向光源(directional light )。</span></li>
<li><span style="font-size: large;"><span style="font-size: large;">我們有大量draw call來自散落在地形的小型植被資源,有些位置會有上百個draw call。通過將草和植物資源打包,我們減少了大量draw call,現在只剩下15-20。</span>請注意:這會對視覺效果有影響,如此龐大的資源,很難避免草與岩石及其它地上的資源不互相裁切。</span></li>
<li><span style="font-size: large;"><span style="font-size: large;">我們使用了layer剔除功能,這是Unity中已有的功能,但卻沒有任何UI。此功能允許你根據對象與攝像機之間的距離,剔除被指定為特定layer的對象。</span>Torbjorn擴展了這項功能,使之能夠剔除這些物件在不同距離的陰影投射。例如:我們的大部分小型植被資源會在15米左右停止投射陰影,由於有地面上的草叢和其它植物,這個效果並不明顯,在25米左右的物件會被完全剔除,無它們的LODGroup如何設定。</span></li>
</ul>
<br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<span style="color: #e69138; font-size: large;"><b>小結</b></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">我們將繼續分享《死者之書》的創作過程,在下篇文章中我們將探索《死者之書》中創建著色、光照和後期處理等內容,盡情關注。</span>Anonymoushttp://www.blogger.com/profile/01294153002424090924noreply@blogger.com1tag:blogger.com,1999:blog-6317841908377212626.post-19814131755325238372018-08-06T20:47:00.002-07:002018-08-06T22:40:37.674-07:00死者之書:(三)環境資源與特效製作<span style="font-size: large;">作者:Zdravko Pavlov </span><span style="font-size: large;"><a href="https://blogs.unity3d.com/2018/06/15/book-of-the-dead-photogrammetry-assets-trees-vfx/" target="_blank">原文</a></span><br />
<div>
<span style="font-size: large;">潤稿:<a href="https://weigame6.wixsite.com/weij" target="_blank">Wei J</a></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">系列作品:</span><br />
<span style="font-size: large;"><a href="https://unitytaiwan.blogspot.com/2018/08/blog-post_6.html" target="_blank">死者之書:(一)概念美術</a><br /><a href="https://unitytaiwan.blogspot.com/2018/08/blog-post.html" target="_blank">死者之書:(二)角色資源製作</a><br />死者之書:(三)環境資源與特效製作<br /><a href="https://unitytaiwan.blogspot.com/2018/08/quixel.html" target="_blank">死者之書:(四)Quixel、風、場景地形和優化技巧</a></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /><b><span style="color: #e69138;">揭秘《死者之書》之環境資源及特效創作 </span></b><br /><br />今天將由Unity的Demo團隊的CG和VFX藝術家Zdravko Pavlov帶領大家瞭解攝影製圖資源、樹木以及VFX的創作過程,</span><span style="font-size: large;">Zdravko</span><span style="font-size: large;">曾在《Viking Village》、《The Blacksmith》和《ADAM》專案中參與過粒子效果、剛體動力學和布料模擬的創作。</span><br />
<span style="font-size: large;"><br />然而《死者之書》則有些不同,這個專案中我需要使用攝影製圖法創建多個環境資源,這是一個全新的領域。戶外攝影是我的興趣, 所以我很樂意接下這份任務,創造一棵樹?我的意思是.......能有多困難是吧?在接下來的內容我會試著描述在前期製作跟開發階段我所學習到的事物。<br /><br /><br /><b><span style="color: #e69138;">攝影製圖法(Photogrammetry)工作流程</span></b><br /><br />幸運的是,網絡上有很多關於使用攝影製圖法的有價值的資訊,多數文章會說,你需要任何一台數位單眼及50mm定焦鏡頭。</span><span style="font-size: large;">我</span><span style="font-size: large;">當時沒有這樣的設備,所以我決定使用自己的2400萬像素 Sony a7II無反相機來做初步測試,這個相機有16mm-35mm變焦鏡頭。但這一切讓我告訴你,是可行的!</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">越</span><span style="font-size: large;">寬的鏡頭越會帶來更多的失真,但這些問題總是可以在軟體內修正的,例如使用</span><span style="font-size: large;">Lightroom來修,但事實上用不著因為攝影製圖軟體優雅地處理掉了。</span><span style="font-size: large;">理論上定焦鏡頭會較為僵硬,並帶來較清晰的圖像</span><span style="font-size: large;">。如果你在一個受控的工作室環境中進行掃描,定焦鏡頭的效果很棒。然而在戶外的時候,使用高質量變焦鏡頭妥善地拍攝物體將有助於之後的製作。 </span><br />
<span style="font-size: large;"><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image47.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="800" data-original-width="788" height="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image47.jpg" width="630" /></a><br /><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image27.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="612" data-original-width="800" height="488" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image27.png" width="640" /></a><br /><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image5-1.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="398" data-original-width="800" height="318" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image5-1.png" width="640" /></a><br /><br /><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image4-2.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="612" data-original-width="800" height="488" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image4-2.png" width="640" /></a></span><br />
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image11-1.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="354" data-original-width="800" height="282" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image11-1.jpg" width="640" /></a></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image17.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="332" data-original-width="540" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image17.gif" /></a></span><br />
<span style="font-size: large;">攝影製圖法的一些早期探索。 </span><br />
<span style="font-size: large;"><br />我嘗試了多數熱門的攝影製圖軟體,其中一些效果不錯。我選擇的是RealityCapture,因為它具有明顯較優秀的效能,能夠處理大量圖片又不會使記憶體不足。驚人的是還能從圖片中重構大量細節。我由此得到了多個模型,有的模型多達1.85億個三角面,都成功地以PLY格式輸出。 <br /><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image16.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="678" data-original-width="800" height="542" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image16.png" width="640" /></a><br /> <br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image3-2.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="800" data-original-width="686" height="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image3-2.png" width="548" /></a><br /><br />這個數目已經超出了預期,甚至有點極端。多數重構後大約有5000萬~9000萬個三角面。我一開始使用的是GeForce 980Ti顯示卡,後來換成GeForce 1080顯</span><span style="font-size: large;">示卡,</span><span style="font-size: large;">為我帶來一些性能的提升。 </span><br />
<span style="font-size: large;"><br />我還將相機換成了</span><span style="font-size: large;">4200萬像素的</span><span style="font-size: large;">Sony aRII 及PlanarT*FE 50mmF1.4ZA鏡頭。然而兩倍的解析度並使用高級</span><span style="font-size: large;">清晰</span><span style="font-size: large;">的定焦鏡頭並沒有帶來所期待的驚艷效果。 </span><br />
<span style="font-size: large;"><br />一方面,更長也更狹窄的定焦鏡頭意謂著需要退後幾步,才能拍攝重疊的能夠用來重建的畫面。在森林中並不總是能夠往後踏幾步拍攝,因為樹林中還有其它樹木、灌木等障礙。這還代表我們必須管理、存儲和處理原有2倍的GB等級的圖片檔案。儘管如此,還不一定能得到更精確的掃描結果。</span><span style="font-size: large;">精確的掃描來自於更多的圖片</span><span style="font-size: large;">,使用2400萬像素將更容易管理。也許這聽起來很理所當然,但我也是親手嘗試後才真正理解這個狀況。</span><br />
<span style="font-size: large;"><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image41.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="483" data-original-width="600" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image41.gif" /></a><br />花時間盡可能地獲得更多數據將是值得的<br /><br />如先前所提到我</span><span style="font-size: large;">輸出的是</span><span style="font-size: large;">PLY格式的高密度幾何體。我傾向使用PLY而不是FBX,即使RealityCapture的PLY輸出沒有縮放功能和坐標軸方向控制功能,所以不像FBX,PLY格式文件總會過大、旋轉方向不對。但</span><span style="font-size: large;">我選擇自己解決PLY的問題,因為</span><span style="font-size: large;">我使用FBX做貼圖烘培時遇到了許多錯誤。 </span><br />
<span style="font-size: large;"><br />多數軟體不能處理幾千萬這個數量的多邊形,所以我僅僅存儲文件,使用RealityCapture的抽取功能製作出相同模型的低模版本。得到的模型大概有100萬個三角面。這樣的模型能在Zbrush、MeshLab或其它建模軟體中打開進行重拓撲(retopologized )及展開(unwrapped)。根據不同模型,需要使用了不同的重拓撲方法。經常使用的是Zbrush的ZRemesher,有時候則手動處理。 <br /><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image32-1.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="437" data-original-width="800" height="349" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image32-1.png" width="640" /></a><br /> <br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image23.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="329" data-original-width="600" height="350" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image23.gif" width="640" /></a><br /> <br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image45.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="655" data-original-width="588" height="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image45.png" width="574" /></a><br /><br />我使用xNormal來烘焙紋理貼圖。xNormal不會受到數以百萬的三角面影響,可以輕鬆處理它們。我使用頂點顏色(vertex color)資訊來烘焙漫反射紋理。高模的頂點密度完全足夠用來製作乾淨清晰的紋理,不需要任何兩頂點間的插值。 我從未用到RealityCapture的合併展開(integrated unwrapping )及材質功能。<br /><br />話雖如此,如果因為某些原因你的密度雲不夠密集,或是有區域丟失,如下圖所示,從照片投射紋理可以給這些區域帶來更多細節。 <br /><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image31-1.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="604" data-original-width="800" height="483" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image31-1.jpg" width="640" /></a><br />有時候,總會有些區域是人到不了的<br /><br />多數攝影製圖教學會告訴我們在掃描一個物體時,最好能避免直接刺眼的光照和陰影。如果你要捕獲的是塊小石頭,你可以將它帶到陰涼處或甚至是工作室里,使用柔光箱和轉盤來方便掃描。對於樹木來說則無法這樣做,所以我會查看天氣預報,希望能遇到多雲的天氣。然而即使在陰天,仍會有陰影和環境遮蔽。 <br /><br />這個問題可以通過Unity的<a href="https://github.com/Unity-Technologies/DeLightingTool" target="_blank">DeLighting工具</a>解決。只需要一個法線貼圖、彎曲的法線貼圖和烘焙AO即可。它可以在消除陰影的同時保持漫反射值不變。 <br /><br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image50.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="431" data-original-width="600" height="458" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image50.gif" width="640" /></a><br />Unity的DeLighting工具實際使用效果 <br /><br />處理後的資源接著輸入Unity中,測試動態光照和著色器。 <br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image46.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="484" data-original-width="800" height="386" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image46.jpg" width="640" /></a><br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image10-1.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="489" data-original-width="800" height="390" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image10-1.jpg" width="640" /></a><br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image40.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="399" data-original-width="800" height="318" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image40.jpg" width="640" /></a><br /><br /><br />有時候我們不一定能採集到模型的所有部分,也不一定能得到所有角度的畫面。也許會遇到時間不夠或是電量即將耗盡這樣的情況,或是忽略了一些東西,直到回到家開始處理檔案時才發現。我在這個過程中犯了很多這樣的錯誤,但我通過使用Substance Painter來克隆印章工具( clone stamp)試圖修復丟失的數據,挽救了一些作品。 <br /><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image35.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="248" data-original-width="300" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image35.gif" /></a><br /> <br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image42.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="349" data-original-width="351" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image42.gif" /></a><br /> <br /><br /><b><span style="color: #e69138;">實際遊戲資源</span></b> <br /><br />《死者之書》製作的大部分期間是沒有環境美術員工的,部分工作承包給了環境藝術家Tihomir Nyagolov,他對環境進行了初期探索及測試。但主要工作是由創意藝術總監Veselin Efremov和我負責,</span><span style="font-size: large;">我們在附近的森林中採集攝影製圖數據,這些工作自然地轉為最終遊戲資源上來。我沒有環境藝術的背景,對處理遊戲優化、LOD等都毫無經驗。Tihomir Nyagolov使用GrowFx預先創建了一些暫代替換用的樹木,所以我從這裡開始接手工作並從中學習。 </span><br />
<span style="font-size: large;"><br />GrowFX做</span><span style="font-size: large;">為創建多種植被</span><span style="font-size: large;">的工具</span><span style="font-size: large;">是十分強大而功能全面的</span><span style="font-size: large;">。它能夠與場景中的其它物件進行互動,所以能夠實現各種獨特而自然的效果。建構時這些物件並不是以資源的形式產生,但也已足夠可控並且足以勝任此項任務。 GrowFX是一個3DS MAX的插件,我做為3DS MAX使用者已經二十多年了,使用起來感到非常的自在。不幸的是,GrowFX依賴MAX中</span><span style="font-size: large;">某些</span><span style="font-size: large;">過時的組件(component),像是曲線編輯視窗(</span><span style="font-size: large;"> curves editing dialogs)這類並不是十分方便的功能,但目前來說它對於此項任務來說仍然是個好工具,只能接受這些問題。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image34.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="550" data-original-width="600" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image34.gif" /></a></span>
<span style="font-size: large;"><br />《死者之書》中的樹林主要是由針葉樹組成,我家附近正好有些美麗的樹林跟公園,於是我尋找並掃描了一些樹木,然後將GrowFX創作縫合到掃描模型上。最後的樹幹由掃描的模型和獨特的紋理組成,較低部分縫合到了程序化生成樹幹,一直到頂部的剩餘部分則使用可平鋪的(tileable)紋理貼圖。 <br /><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image14-1-552x720.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="720" data-original-width="552" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image14-1-552x720.jpg" /></a><br />底部的一小部分被克隆到紋理頂部,使之變成可平鋪紋理 <br /><br />對石塊和樹幹進行攝影製圖是一回事,但掃描松樹的針葉完全又是另一回事了。在這裡便由Quixel介入,Quixel提供了精美的掃描圖集。Quixel的工作人員與我們合作,為《死者之書》製作了大量小型資源,例如:草地、灌木和破瓦殘礫等等。 <br /><br /><br />如我在開頭提到的我擁有CG製作的背景,我曾製作過大型的森林,使用的是Multiscatter或Forest Pack Pro</span><span style="font-size: large;">(同樣是MAX的插件)以及用V-ray做渲染。在那些案例中</span><span style="font-size: large;">我們可以使用Quixel 的Megascans圖集,但對於《死者之書》這樣的即時運算專案來說,我們需要多做一些優化。需要優化的內容包括構建大型元素,例如:樹枝、樹頂等等,將這些元素整理成新的紋理,為法線貼圖(normal)、位移(displacement)、透射(transmission)等等轉換初始掃描數據。 </span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image25.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="384" data-original-width="800" height="307" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image25.png" width="640" /></a></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image30.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="545" data-original-width="800" height="434" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image30.png" width="640" /></a></span><br />
<span style="font-size: large;"><br />對已有的Megascans法線資料略有修改,偽造出具有體積感的外觀。 <br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image36.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="615" data-original-width="800" height="492" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image36.png" width="640" /></a><br /><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image8-1.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="800" data-original-width="601" height="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image8-1.png" width="481" /></a><br /><br />我使用不同的法線編輯技術,例如:Normal Thief 和其它自訂3DSMax腳本,用來將樹枝與樹幹混合起來。 <br /><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image2-2.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="600" data-original-width="346" height="200" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image2-2.gif" width="115" /></a><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image6.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="403" data-original-width="368" height="200" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image6.gif" width="182" /></a><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image52.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="600" data-original-width="466" height="200" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image52.gif" width="155" /></a><br /><br />修改頂點法線,使之能夠與樹幹混合 <br /><br />通過使用這個方法可以製作不同類型的針葉樹。 <br /><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image53.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="330" data-original-width="800" height="264" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image53.png" width="640" /></a><br /><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image26.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="669" data-original-width="800" height="534" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image26.png" width="640" /></a><br /><br /><b><span style="color: #e69138;">風 </span></b><br /><br />我們想要森林富有生氣,而風是一個關鍵元素。我們的環境藝術家Julien Heijmans設計了以頂點著色器為基礎的風動畫方案,樹林是基於這個方案去設置。 <br /><br />創建一個向量場(vector field )有很多不同的方法。在熟悉了Chaosgroup流體處理器和PhoenixFD之後,我決定看看能從中得到哪些可以用的資訊並輸入Unity。我輸出了場景幾何體,以FBX格式放進3DS MAX中執行一些流體效果,流體在植被周圍打轉然後產生了亂流。較大樹木會擋住小型植被,所以效果在這裡不會那麼突出。 <br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image37.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="249" data-original-width="400" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image37.gif" /></a><br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image54.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="258" data-original-width="400" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image54.gif" /></a><br />PhoenixFD流速通道的一些片段 <br /><br />我使用集成的PhoenixFD回放控制,讓模擬的序列進行</span><span style="font-size: large;">循環</span><span style="font-size: large;">。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">向量資訊通過PhoenixFD Texmap讀取,標準化處理後作為漫反射紋理插入程序化產生的等值曲面(isosurface)。<br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image12.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="376" data-original-width="800" height="300" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image12.png" width="640" /></a><br />向量資訊經由PhoenixFD Texmap讀取,標準化處理後作為漫反射紋理插入<br /> <br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image20.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="317" data-original-width="400" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image20.gif" /></a><br />一個</span><span style="font-size: large;">水平片段</span><span style="font-size: large;">的</span><span style="font-size: large;">模擬效果範例 </span><br />
<span style="font-size: large;"><br />渲染圖像序列將組合成最後的紋理圖集後輸入到Unity中。我過去使用After Effects完成這個工作,但現在Unity擁有一個十分方便的Image Sequencer工具,它能自動完成這個工作。這是由Unity在巴黎的GFX團隊開發的全新VFX工具。 <br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image15-2.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="446" data-original-width="800" height="356" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image15-2.jpg" width="640" /></a><br />Image Sequencer的實際使用效果 <br /><br />創造出的紋理圖集會放到場景中,我製作了一個小方框用來定義模擬效果的邊界,並用來作為位置的參照(reference)。 <br /><br />這個實驗推動了預告片中一些鏡頭的視覺效果。如果你正使用Unity製作影視作品,我推薦使用這個方法。它會插入主程序的頂點著色器基礎的風動畫方案之中,這個方案是由我們技術主管Torbjorn Laedre開發,它用在預告片中的多個場景中,也有在GDC上展示的主機版本中使用。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">後續文章中,Julien和Torbjorn將分享更多關於處理風和最後採用的解決方案。 <br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image29.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="203" data-original-width="400" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image29.gif" /></a><br />Unity中的向量場 <br /><br /><br /><b><span style="color: #e69138;">蜂巢 </span></b><br /><br />專案早期我開始對蜂巢的概念進行定調。 <br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image1-4.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="499" data-original-width="800" height="398" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image1-4.png" width="640" /></a><br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image33.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="465" data-original-width="800" height="370" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image33.png" width="640" /></a><br />使用MultiScatter製作並用V-Ray渲染的概念驗證 <br /><br />在完成最初的設計後,開始建造大量可以在遊戲用的元素使 Unity資源。 <br /><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image49.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="338" data-original-width="600" height="360" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image49.gif" width="640" /></a><br /> <br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image51.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="338" data-original-width="600" height="360" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image51.gif" width="640" /></a><br />使用pflow為蜂巢創建了一些群集 <br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image38.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="413" data-original-width="800" height="330" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image38.png" width="640" /></a><br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image28.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="220" data-original-width="400" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image28.gif" /></a><br />在Unity中組成的早期蜂巢原型 <br /><br /><b><span style="color: #e69138;">扭奇者(</span></b></span><span style="color: #e69138; font-size: large;"><b>Screwie)</b></span><br />
<span style="font-size: large;"><br />對於扭奇者群體,我對軀體的變化進行了一些探索。我使用了Chaosgroup的PhoenixFD 進行了流體煙霧模擬。然後切開扭奇者形狀,並基於流體溫度創造了一個等值曲面。 <br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image7-1.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="800" data-original-width="480" height="400" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image7-1.jpg" width="240" /></a><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image13-1.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="800" data-original-width="480" height="400" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image13-1.jpg" width="240" /></a><br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image21.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="800" data-original-width="480" height="400" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image21.jpg" width="240" /></a><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image22-1.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="800" data-original-width="480" height="400" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image22-1.jpg" width="240" /></a><br /><br />使用PhoenixFD製作的一些形狀探索 <br /><br />這個方法可以快速預覽不同的形狀,做為常規的參考。 扭奇者最後版本的模型是由Plamen (Paco) Tamnev製作,想了解其中驚人的細節可以去看<a href="https://blogs.unity3d.com/2018/06/08/book-of-the-dead-character-and-hero-assets/" target="_blank">這篇文章</a>。<br /><br /><b><span style="color: #e69138;">樹液</span></b><b><span style="color: #e69138;">流淌的效果</span></b> <br /><br />為了讓扭奇者面部的樹液能夠流動,我再度使用了PhoenixFD。我製作了一個小概念驗證,證明能通過粘稠液體所能實現的效果。<br /> <br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image39.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="343" data-original-width="249" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image39.gif" /></a><br />驗證PhoenixFD的翻動處理器能適用於製作液體流動效果 <br /><br />我對整體結果和流體動畫感到滿意,所以繼續對實際模型進行設定。我的目標是防止模擬效果形成太多分離部分。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image18.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="300" data-original-width="400" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image18.gif" /></a></span><br />
<span style="font-size: large;">不同版本的一些樹液流動模擬</span><br />
<br />
<span style="font-size: large;">我可以得到產生的幾何序列其中一幀,然後對它進行重拓撲,製作UV並使用WRAP3來將其投射到序列中剩下的形狀。最後我得到了一系列使用相同拓撲的blend shapes。 <br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image48.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="310" data-original-width="558" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image48.gif" /></a><br />Unity中的Blendshapes<br /><br />我也嘗試在一些樹幹上運行樹液模擬效果。 <br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image43.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="385" data-original-width="254" height="320" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image43.gif" width="211" /></a></span><br />
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image44.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="452" data-original-width="800" height="361" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image44.jpg" width="640" /></a></span><br />
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image9-1.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="567" data-original-width="800" height="452" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image9-1.jpg" width="640" /></a><br />我們沒有在最終專案中使用這些效果。然而這是個不錯的方法,可以用來為掃描模型添加一些細節。 <br /><br /><br /><b><span style="color: #e69138;">小結</span></b> <br /><br />《死者之書》中攝影製圖資源、樹木以及VFX的創作過程就分享到這裡,後續我們將深入瞭解《死者之書》中的環境藝術創作過程,盡請關注!</span></div>
Anonymoushttp://www.blogger.com/profile/01294153002424090924noreply@blogger.com0tag:blogger.com,1999:blog-6317841908377212626.post-50718445520264009702018-08-06T20:47:00.001-07:002018-08-06T20:49:53.988-07:00死者之書:(二)角色資源製作<span style="font-size: large;">作者:Plamen Tamnev </span><a href="https://blogs.unity3d.com/2018/06/08/book-of-the-dead-character-and-hero-assets/" target="_blank"><span style="font-size: large;">原文</span></a><br />
<div>
<span style="font-size: large;">潤稿:<a href="https://weigame6.wixsite.com/weij" target="_blank">Wei J</a><br /></span><br />
<span style="font-size: large;">系列作品:</span><br />
<span style="font-size: large;"><a href="https://unitytaiwan.blogspot.com/2018/08/blog-post_6.html" target="_blank">死者之書:(一)概念美術</a><br />死者之書:(二)角色資源製作<br /><a href="https://unitytaiwan.blogspot.com/2018/08/blog-post_4.html" target="_blank">死者之書:(三)環境資源與特效製作</a><br /><a href="https://unitytaiwan.blogspot.com/2018/08/quixel.html" target="_blank">死者之書:(四)Quixel、風、場景地形和優化技巧</a></span><br />
<span style="font-size: large;"><br /><b><span style="color: #e69138;">揭秘《死者之書》之角色資源創作</span></b> <br /><br />上篇由Unity Demo團隊的Georgi Simeonov分享了<a href="https://www.youtube.com/watch?v=DDsRfbfnC_A" target="_blank">《死者之書》</a>中<a href="https://blogs.unity3d.com/2018/06/01/book-of-the-dead-concept-art/" target="_blank">概念美術創作</a>工作。</span><span style="font-size: large;">今天將由Unity Demo團隊中,</span><span style="font-size: large;">曾經參與製作</span><span style="font-size: large;">Adam, The Blacksmith, Viking Village </span><span style="font-size: large;">的環境藝術</span><span style="font-size: large;">家Plamen 'Paco' Tamnev,來揭秘《死者之書》中角色資源(asset)創作的製作流程。 </span><br />
<span style="font-size: large;"><br /><br /><b><span style="color: #e69138;">創造主要的扭奇者(Screwie)</span></b><br /><br />在概念藝術家Georgi Simeonov在2D環境中探索各種構想創意後,我們決定嘗試選取那些初稿中感興趣的不同元素並將它們混合起來。為此我開始在ZBrush中製作一些粗略的雕塑來充實思路。由於團隊在早期階段就開始平行工作,所以並不指望這些雕塑能夠成為最終的藝術設計,我們更想尋求機會嘗試一些新事物。 我想</span><span style="font-size: large;">進行</span><span style="font-size: large;">多種表面處理的嘗試以及對材質進行探索。在這個過程中,造型草案中的</span><span style="font-size: large;">一些造</span><span style="font-size: large;">設計元素在整個創作過程中都沒發生太大變化,但它們的比例大小發生了不少調整,因為這是敘事中很重要的一個部分,扭奇者角色必須有一定的真實性,而不是像早期那樣風格化設計。</span><br />
<span style="font-size: large;"><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image6-1.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="800" data-original-width="575" height="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image6-1.jpg" width="460" /></a><br />基於Georgi的概念設計做的第一批探索雕塑之一,在設計迭代過程中表面的液體流動和空心部位設計沒發生太大變化<br /><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image18.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="800" data-original-width="592" height="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image18.jpg" width="472" /></a><br />扭奇者</span><span style="font-size: large;">的</span><span style="font-size: large;">材質研究探索 </span><br />
<span style="font-size: large;"><br />我掌握了機會盡早地進行了材質的探索,希望能幫助做出更好的</span><span style="font-size: large;">造型草案</span><span style="font-size: large;">。這些材質測試成功探索出樹液流淌的效果,這部分做進了最終的設計。 </span><br />
<span style="font-size: large;"><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image30.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="380" data-original-width="800" height="302" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image30.jpg" width="640" /></a></span><br />
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image29.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="669" data-original-width="800" height="534" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image29.jpg" width="640" /></a></span><br />
<span style="font-size: large;">探索階段期間在3ds Max中的快速草圖 </span><br />
<span style="font-size: large;"><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image40.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="800" data-original-width="576" height="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image40.png" width="460" /></a><br />扭奇者的下一版本,仍然過於風格化 <br /><br /><br />對於最終的角色設計,我從線上模型庫找到男性掃描檔案開始製作。從掃描檔案開始處理有一個好處,那就是能讓我得到基本的比例和常規的特徵。在ZBrush中完成網格的</span><span style="font-size: large;">清理後</span><span style="font-size: large;">,扭奇者的最終雕塑設計是比較有挑戰性的,因為它必須在第一眼見到時容易辨識成人類,尤其是從背後看去。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">預告片中有個從扭奇者背後緩慢靠近的鏡頭,因為這時如果直接看到所有腐蝕的部分會破壞想要塑造出的感覺。我從繪制角色身體前後的大型坑洞開始,盡量保持與原始輪廓和肌肉形狀的一致。</span><span style="font-size: large;">然後我在某些位置添加了一些樹皮來些微破壞輪廓,但仍非常小心地避免破壞身體的線條。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">多數中低級細節都是手動雕刻的,然後使用一些掃描Alpha值來增加分離效果。在用Zbrush處理雕刻細節方面,也要注意處理細節間的平衡,避免過度增加細節,因為我後續還會在Substance Painter中增加大量細節。 </span><br />
<span style="font-size: large;"><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image28.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="283" data-original-width="800" height="226" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image28.jpg" width="640" /></a><br />早期版本面部的嘴巴部分嘗試了各式的想法 <br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image16.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="387" data-original-width="800" height="308" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image16.jpg" width="640" /></a><br />為了保持較少紋理數量,使用單一個紋理集 <br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image9.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="251" data-original-width="800" height="200" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image9.jpg" width="640" /></a><br />在Substance中為遊戲用網格使用基本材質製作的第一個烘焙模型 <br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image8.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="461" data-original-width="800" height="368" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image8.jpg" width="640" /></a><br />當角色外貌大致到位後,繼續打磨美化紋理<br /><br /><br /><b><span style="color: #e69138;">Unity中的材質探索</span></b> <br /><br />扭奇者的背景故事需要讓他們的外貌同時有乾涸</span><span style="font-size: large;">固體樹脂與流動的液態樹脂相互混合。這樣複雜的材質是一個挑戰。</span><br />
<span style="font-size: large;"><br />我們非常有才華的技術美術總監江毅冰為琥珀的著色器</span><span style="font-size: large;">進行了研究和測試</span><span style="font-size: large;">。她提出了使用雙階layer幾何體(</span><span style="font-size: large;">two layers of geometry)</span><span style="font-size: large;">的方法。琥珀的基本layer當作核心,在外部layer使用一個稍微偏移(offset)版本的同一個幾何體。 </span><br />
<span style="font-size: large;"><br />外部layer有一個抖動Alpha和一組不同的細節貼圖,用來為核心幾何體帶來分離和其他多樣效果。這樣材質在結合了表面下層散射(SSS, Subsurface scattering)數據文件並調整核心layer後,得到了一個漂亮的材質並帶有一些深度效果。 <br /><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image39.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="800" data-original-width="709" height="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image39.jpg" width="566" /></a><br />兩個琥珀幾何layer的測試範例</span><br />
<span style="font-size: large;">樹液動態從頭部低落的效果是由Zdravko Pavlov製作,將會在未來發佈的文章中再深入介紹。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image1-1.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="415" data-original-width="800" height="332" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image1-1.jpg" width="640" /></a></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image33.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="400" data-original-width="800" height="320" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image33.jpg" width="640" /></a></span><br />
<span style="font-size: large;">《死者之書》中看到的最終角色,模型應用了液體流動模擬效果 </span><br />
<span style="font-size: large;"><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image31.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="800" data-original-width="565" height="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image31.jpg" width="452" /></a></span><br />
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image20.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="533" data-original-width="800" height="426" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image20.jpg" width="640" /></a></span><br />
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image37.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="533" data-original-width="800" height="426" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image37.jpg" width="640" /></a><br />最終組合資源的預覽渲染,帶有所有紋理和細節 </span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image17.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="800" data-original-width="565" height="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image17.jpg" width="452" /></a><br />在Substance Painter中製作的一些自定義脫落樹皮材質 <br /><br /><br /><b><span style="color: #e69138;">創作扭奇者群體</span></b><br /><br />我們希望不用去製作全新的角色集合,就能</span><span style="font-size: large;">快速製作外觀有部分區別的角色群體</span><span style="font-size: large;">。角色群體將只會可見於中到遠的距離,所以不用花費太多時間製作細節,只要做到剛好足夠就行。 </span><br />
<span style="font-size: large;"><br />我從使用Substance Painter中的克隆(clone)筆刷開始,創作了一些完全被樹皮覆蓋的版本。我重複同樣的過程製作了在樹皮下的琥珀layer。 </span><br />
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image22.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="303" data-original-width="800" height="242" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image22.jpg" width="640" /></a></span><br />
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image38.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="434" data-original-width="800" height="346" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image38.jpg" width="640" /></a><br />Substance Painter—</span><span style="font-size: large;">樹皮覆蓋的扭奇者</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image41.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="411" data-original-width="800" height="328" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image41.jpg" width="640" /></a><br />Substance Painter—</span><span style="font-size: large;">琥珀layer部分</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image34.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="293" data-original-width="800" height="234" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image34.jpg" width="640" /></a><br />Substance Painter—</span><span style="font-size: large;">一個轉換的遮罩範例,以及作為驗證的Unity中的粗略草圖 </span><br />
<span style="font-size: large;"><br />至此我們還沒有放置任何高度圖(height map)</span><span style="font-size: large;">。通過給樹皮部分加入視差和分離效果,高度圖能給最終材質帶來更為有機的感覺。在這些內容設置好並完成後,就能通過編輯遮罩來輕易地改變群體各個角色的腐蝕效果。 </span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image35.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="362" data-original-width="800" height="288" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image35.jpg" width="640" /></a><br />扭奇者群體效果測試<br /><br />上圖是雙layer方法的首批測試效果之一,帶有一些隨機遮罩用於測試分離和腐蝕效果。根據著色器特點,我們創作了一個帶有細分曲面(tessellation)的高度圖,帶有偏移和總體的材質定義。 <br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image32.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="420" data-original-width="800" height="334" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image32.png" width="640" /></a><br />扭奇者群體的最終效果 <br /><br />對於最終效果,我們通過使用不透明效果和高度圖添加了破碎的空洞部分。這個工作流程讓我們有機會輕鬆添加一些變化,例如殘缺的肢體。 </span><br />
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image4.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="414" data-original-width="800" height="330" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image4.jpg" width="640" /></a><br />應用了所有效果得到的最終群體畫面 <br /><br /><br /><b><span style="color: #e69138;">創作玩家角色Karen </span></b><br /><br />Karen的手和手鐲在預告片中只短暫地出現,但卻在整個體驗中十分重要。所以,儘管在畫面中出現的時間不多,我們也要給予足夠的重視和處理。 </span><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<span style="font-size: large;"><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image21.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="800" data-original-width="795" height="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image21.png" width="634" /></a><br />手鐲概念藝術,由Georgi Simeonov繪製</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image11.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="624" data-original-width="800" height="498" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image11.jpg" width="640" /></a></span><br />
<span style="font-size: large;">Substance Painter—</span><span style="font-size: large;">手鐲的最終樣貌</span><br />
<br />
<span style="font-size: large;">對於玩家角色的手部,我使用線上資料庫<a href="http://ten24.info/" target="_blank">Ten24</a>中的掃描檔案並進行整理及重新拓撲。接著分離指甲,將手放入Substance Painter中處理紋理貼圖通道。同時需要加入一些基本的風化效果,但不能覆蓋在泥土中或是在畫面上太過引人注目。 </span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image27.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="303" data-original-width="800" height="242" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image27.jpg" width="640" /></a><br />Unity編輯器中玩家角色手部和手鐲的截圖 <br /><br /><br /><b><span style="color: #e69138;">創作主教角色 </span></b><br /><br />主教角色的創作在Unity做了不少的草案設計。我們有機會能嘗試一些有趣的想法,例如調整大小、姿勢以及角色如何受到他們想要傳達的信息的影響。當角色的最終設計完成並得到整個團隊認可後,我們就開始製作實際的成品。 <br /><br />我們與獨立3D藝術家Alex Ponomarev合作,在ZBrush中創建了高面數雕塑。當雕塑完成後,我開始製作用於遊戲中的版本,並使用</span><span style="font-size: large;">ZBrush的骨架</span><span style="font-size: large;">工具來製作最終姿勢。這些工具可以很好地快速得到固定姿勢並調整模型,不必做一堆複雜的骨骼綁定,從而</span><span style="font-size: large;">帶來更大的探索</span><span style="font-size: large;">空間。接著將它放入Substance Painter,對材質和侵蝕效果做了一些快速地嘗試。考慮到主教的大小,我們必須使用多個磁磚細節貼圖(tiled detail map)來處理解析度和規模感。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image10.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image10.jpg" width="640" /></a><br />《死者之書》最終版預告片所看到的主教畫面 </span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image7.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="406" data-original-width="800" height="324" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image7.jpg" width="640" /></a><br />高面數模型的最終版主教</span><span style="font-size: large;">,由Alex Ponomarev製作 </span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image14.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="800" data-original-width="589" height="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image14.jpg" width="470" /></a><br />帶有Z球(ZSphere)綁定的主教高面數模型<br /><br />在獲得Alex的高面數雕塑後,我所做的第一件事是構建快速力球綁定,並處理角色姿勢。我們不需要他有太多動作,只要能稍微旋轉軀幹即可,所以不必給他複雜的骨架。如此這般,在ZBrush中處理的姿勢就能夠使用了。 </span><br />
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image13.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="477" data-original-width="800" height="380" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image13.jpg" width="640" /></a><br />Substance Painter中最終成果的截圖 <br /><br />就材質而言,我們決定採用更為傳統的外觀,所以你會感覺看到的是一個巨大的紀念碑。我創建了一些自定義材質,對於最終的主教樣貌,使用細節貼圖來補充其規模感。 <br /><br />在決定主教的最終設計前,我嘗試了一些Georgi的早期設計,並將它們導入Unity中。重要的是要去嘗試,看看從遊戲角色的視角接近這些不同</span><span style="font-size: large;">設計</span><span style="font-size: large;">的主教會得到怎樣的感覺。</span><br />
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image25.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="800" data-original-width="436" height="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image25.jpg" width="348" /></a><br />第一個設計是這些測試設計中最大的一個,從軀乾底部到最頂部部分,向玩家緩慢地顯現出主教的臉部 </span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image23.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="514" data-original-width="800" height="410" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image23.jpg" width="640" /></a><br />根據Georgi草圖的一些測試,畫面從Unity編輯器中截圖<br /><br /><br /><b><span style="color: #e69138;">創作軀殼和額外道具</span></b> <br /><br />在製作模型和諸如軀殼、汽車和蜂巢的紋理時,我們找到了環境與角色藝術家 Tinko Wiezorrek,他基於Georgi的概念設計和筆記,製作了多個不同的</span><span style="font-size: large;">軀殼</span><span style="font-size: large;">雕塑。他的方法是使用雕塑作為基礎,在這上面添加我們已有的掃描樹皮的不同紋理集,並將它們與雕刻細節結合起來。</span><br />
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image12.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="387" data-original-width="800" height="308" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image12.jpg" width="640" /></a><br />使用了四個材質ID來將不同樹皮類型應用到模型上</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/materialID_Revised.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="425" data-original-width="800" height="340" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/materialID_Revised.png" width="640" /></a><br />最終軀殼效果,加入了磁磚紋理和一些輪廓分離的分支 </span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image36.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="371" data-original-width="800" height="296" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image36.jpg" width="640" /></a><br />Unity中軀殼的截圖畫面<br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image3.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="425" data-original-width="800" height="340" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image3.jpg" width="640" /></a></span><br />
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image24.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="466" data-original-width="800" height="372" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image24.jpg" width="640" /></a></span><br />
<span style="font-size: large;">Unity中汽車的截圖畫面</span><br />
<span style="font-size: large;"><br />在預告片中,你會遇到汽車等現世中存在的物品。由於它們必須看起來是手工製作的,所以我們使用了帶有不透明和到處充滿樹液的自定義烘焙幾何體。 </span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image2-1.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="800" data-original-width="659" height="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image2-1.jpg" width="526" /></a><br />Unity編輯器中正在製作的蜂巢入口截圖畫面<br /><br />當製作蜂巢入口時,使用了和汽車同樣的方法。為了添加視覺樂趣和規模,蜂巢使用了更多的效果和自定義物件。 <br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/06/image15-1.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blogs.unity3d.com/wp-content/uploads/2018/06/image15-1.jpg" width="640" /></a><br />軀殼、汽車和蜂巢的最終視覺效果<br /><br /><br /><b><span style="color: #e69138;">小結</span></b> <br /><br />我們還製作了更多的資源和作品,但針對這篇文章,我們選用了其中最有趣的資源介紹它們的創作過程。後續我們會揭秘《死者之書》中的主題和資源創作過程以及如何使用工具和技巧讓環境更為真實。</span></div>
Anonymoushttp://www.blogger.com/profile/01294153002424090924noreply@blogger.com1tag:blogger.com,1999:blog-6317841908377212626.post-67405642339275741262018-08-06T20:47:00.000-07:002018-08-06T20:50:32.837-07:00死者之書:(一)概念美術<span style="font-size: large;">作者:Georgi Simeonov <a href="https://blogs.unity3d.com/2018/06/01/book-of-the-dead-concept-art/" target="_blank">原文</a></span><br />
<span style="font-size: large;">潤稿:<a href="https://weigame6.wixsite.com/weij" target="_blank">Wei J</a></span><br />
<span style="font-size: large;"><br /></span>
<br />
<div>
<span style="font-size: large;">系列作品:</span><br />
<span style="font-size: large;">死者之書:(一)概念美術<br /><a href="https://unitytaiwan.blogspot.com/2018/08/blog-post.html" target="_blank">死者之書:(二)角色資源製作</a><br /><a href="https://unitytaiwan.blogspot.com/2018/08/blog-post_4.html" target="_blank">死者之書:(三)環境資源與特效製作</a><br /><a href="https://unitytaiwan.blogspot.com/2018/08/quixel.html" target="_blank">死者之書:(四)Quixel、風、場景地形和優化技巧</a></span><span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /><b><span style="color: #e69138;">揭秘《死者之書》之概念美術 </span></b><br /><br />1月的時候,我們發佈了由<a href="https://www.youtube.com/watch?v=DDsRfbfnC_A" target="_blank">Unity 2018製作的實時渲染電影短片《死者之書》</a>,影片展示了Unity 2018為遊戲、影視等創作所帶來的高端視覺效果。 <br /><br />在上周介紹了<a href="https://blogs.unity3d.com/2018/05/25/unitys-demo-team-the-creators-behind-unitys-most-stunning-visuals/" target="_blank">Unity Demo Team</a>之後,今天將由的Georgi Simeonov分享他在《死者之書》中所負責的概念美術創作工作。《死者之書》是一個正在進行中的專案,它有一段更長的故事尚未講述,所以我們會盡量避免劇透太多內容… <br /><br /><br /><b><span style="color: #e69138;"> 「樹人」-扭奇者</span></b><br /><br />我們把這些「樹人」 角色稱為「扭奇者」(Screwies),他們被困在生死兩個</span><span style="font-size: large;">世界之間。 </span><br />
<span style="font-size: large;"><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/05/image18.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="800" data-original-width="529" height="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/05/image18.png" width="422" /></a><br />扭奇者 – 最初的原畫探索 <br /><br /><br /><b><span style="color: #e69138;">發散探索、來源和構思</span></b> <br /><br />這些角色要能被識別為人類,同時還有明顯解體的跡象。這項設計的挑戰在於實現上述效果的同時,要避免給人恐怖和腐朽的感覺,還要避免讓它們看起來過於飄渺得像是鬼魂或是魔法生物。 </span><br />
<span style="font-size: large;"><br /></span>
<br />
<ul>
<li><span style="font-size: large;">將死亡特徵附加到生命表象上</span></li>
</ul>
<br />
<span style="font-size: large;">在早期設計中使用了條狀</span><span style="font-size: large;">樹皮來製作,它是種相當方便的材質,可以用來增強人體形態的感覺,同時讓輪廓轉換成其它東西。這類設計的成品最後看起來就像動物一樣,但也太過接近奇幻或恐怖的野獸。</span><br />
<span style="font-size: large;"><br /></span>
<br />
<ul>
<li><span style="font-size: large;">泥土、樹枝和石頭</span></li>
</ul>
<br />
<span style="font-size: large;">我繼續處理扭奇者與樹林的聯繫,嘗試使用</span><span style="font-size: large;">扭奇者</span><span style="font-size: large;">周遭的物品重塑,這些物品包括樹枝、條狀樹皮、泥土和樹脂。然後我簡要構思了一下,使他們的樣子與多個記憶形態相似,或許會與衰退的記憶有著聯繫。通過添加各類元素或其它方式增強了基本的人類形態,這些設計很快演變成帶有部落風格的東西,讓人想起虛構的原始文化。</span><br />
<span style="font-size: large;"><br /></span>
<br />
<ul>
<li><span style="font-size: large;">消減/破碎 – 代表他們的曾經的蒼白遺骸</span></li>
</ul>
<br />
<span style="font-size: large;">扭奇者必須是殘缺的,代表曾經是人類或靈魂的一個象徵,是僅能勉強站立的空殼。我嘗試了用多種方法來減少或是腐蝕他們的輪廓。</span><br />
<span style="font-size: large;"><br /></span>
<br />
<ul>
<li><span style="font-size: large;">迷失的外殼</span></li>
</ul>
<br />
<span style="font-size: large;">天然,半抽象和雕刻效果,不可再生的琥珀核心。<br /><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/05/image10-1.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="690" data-original-width="800" height="551" src="https://blogs.unity3d.com/wp-content/uploads/2018/05/image10-1.png" width="640" /></a><br />扭奇者 – 色彩/材質的研究 <br /><br /><br />下圖是首個扭奇者變體的色彩研究,這個設計符合我設計目標中的一些關鍵點,我們嘗試使用了白灰、焦木、各類蠟質以及更為乾淨的樹脂作為材質。 <br /><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/05/image13.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="388" data-original-width="800" height="310" src="https://blogs.unity3d.com/wp-content/uploads/2018/05/image13.png" width="640" /></a><br />扭奇者 – 廢棄的設計方向 <br /><br />上圖是扭奇者曾經的三個很不錯的變體,但是由於它們的風格和故事主題不符,所以最後被棄用了: </span><br />
<ul>
<li><span style="font-size: large;">A :這個變體很快地變為某種類似惡魔的暗黑爪牙,於是被棄用了。</span></li>
<li><span style="font-size: large;">B :這個扭奇者變體由堆積的石頭和交織的草組成,太容易想起類似巨魔和精靈這類的童話生物。</span></li>
<li><span style="font-size: large;">C :從很多方面上看,我們的最終設計是從這個蠟燭人變體演變而來的。</span></li>
</ul>
<span style="font-size: large;"><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/05/image8-1.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="310" data-original-width="800" height="248" src="https://blogs.unity3d.com/wp-content/uploads/2018/05/image8-1.png" width="640" /></a><br />扭奇者 – 尋找最終設計<br /><br /><br /><span style="color: #e69138;"><b>探索收斂</b></span><br /><br />在這項設計中,困擾我們的是如何將外部的軀殼和內部的空虛相互結合。</span><span style="font-size: large;">多數輪廓的變化是通過深色樹皮材質,與</span><span style="font-size: large;">填補空虛的軀殼的</span><span style="font-size: large;">新鮮金色樹脂來呈現對比</span><span style="font-size: large;">。 </span><br />
<span style="font-size: large;"><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/05/image12.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="420" data-original-width="800" height="334" src="https://blogs.unity3d.com/wp-content/uploads/2018/05/image12.png" width="640" /></a><br />扭奇者 – 表面紋理、細節和腐蝕效果的參考圖片 <br /><br />由於在通過輪廓表現設計的過程中受到限制,我只好依靠紋理和有趣的腐蝕圖案。我們找來了燒焦的樹皮作為基礎,與充滿樹脂的軀殼結合起來,這讓人想起了手指在黏土上留下凹槽的樣子。 <br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/05/image1-7.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="554" data-original-width="800" height="442" src="https://blogs.unity3d.com/wp-content/uploads/2018/05/image1-7.png" width="640" /></a><br />扭奇者 – 各類變體 <br /><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/05/image9-1.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="594" data-original-width="800" height="474" src="https://blogs.unity3d.com/wp-content/uploads/2018/05/image9-1.png" width="640" /></a><br />扭奇者 – 首次相遇形象的最終設計<br /><br />觀眾或玩家首次遇到扭奇者時的最終設計圖,其中結合了一些最為成功的腐蝕圖案設計。 <br /><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/05/image7-1.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="154" data-original-width="800" height="122" src="https://blogs.unity3d.com/wp-content/uploads/2018/05/image7-1.png" width="640" /></a><br /> 遇到扭奇者的地點縮略圖<br /><br />早期的縮略圖構思,用來展現主角(和玩家)首次看到扭奇者的地點。 <br /><br /><br /><span style="color: #e69138;"><b>主角-KAREN</b></span> <br /><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/05/image5-3.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="800" data-original-width="795" height="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/05/image5-3.png" width="634" /></a><br />主角Karen – 醫療/裝飾性手鐲</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">手鐲是Karen這個角色在預告片中唯一能看到</span><span style="font-size: large;">的</span><span style="font-size: large;">小部分視覺設計。影片中的對話以手鐲作為輔助藉以瞭解主角的性格和背景故事。這個手鐲基於醫療手鐲的一些常見要素而設計,但進行了重新詮釋,並使這些內容隱藏在純粹的裝飾性設計當中。</span><br />
<span style="font-size: large;"><br /><br /><b><span style="color: #e69138;">巨型雕像-主教</span></b> <br /><br />預告片的開始只稍稍瞥到了主教一眼,但在這個世界中他卻是個重要的角色,在不斷發展的故事中扮演重要的地位。 <br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/05/image11.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="235" data-original-width="800" height="186" src="https://blogs.unity3d.com/wp-content/uploads/2018/05/image11.png" width="640" /></a><br />主教 – 最初的設計探索 <br /><br />在主教的設計上,我們經過較短的探索週期完成了他,成功實現了一些驚人的效果。石棺或渡船的設計受到了希臘神話中的凱倫(Charon)和古埃及石棺的啓發。凱倫作為幫助靈魂渡過冥河以及古埃及石棺,帶來能喚起回憶的</span><span style="font-size: large;">半神與旅船</span><span style="font-size: large;">元素。</span><span style="font-size: large;">我們嘗試設計了多個相遇時他的姿勢和角度,有時漂浮著像是一個大型浮空飛行器,有時則作為地形中的特殊部分出現。 </span><br />
<span style="font-size: large;"><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/05/image15.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="479" data-original-width="800" height="382" src="https://blogs.unity3d.com/wp-content/uploads/2018/05/image15.png" width="640" /></a><br />主教 – 縮略圖、草圖和地點/位置構思 <br /><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/05/image4-2.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="800" data-original-width="566" height="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/05/image4-2.png" width="452" /></a><br />主教 – 最終設計/肖像</span><br />
<span style="font-size: large;"><br />主教胸部和臉部的圖案由鑰匙孔狀的首飾和鎖頭上的細節組成,他的耳環則形狀類似鑰匙。 船體的內部設計受到舊式打字機以及打字機中緊密堆疊的字錘的啓發,在這裡我們用作支撐主教身體和做為小型檔案銘牌。 <br /><br /><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/05/image14.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="413" data-original-width="800" height="330" src="https://blogs.unity3d.com/wp-content/uploads/2018/05/image14.png" width="640" /></a></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><b><span style="color: #e69138;">蜂巢</span></b> <br /><br /><b><span style="color: #e69138;">蜂巢,位置與物品</span></b></span><br />
<span style="font-size: large;"><br />蜂巢是按照織布鳥的鳥巢或</span><span style="font-size: large;">蜂巢</span><span style="font-size: large;">的</span><span style="font-size: large;">分層結構設計出來,用條狀樹皮、泥土和樹脂粗略粘合建構出更大的規模</span><span style="font-size: large;">。多數小型結構,例如汽車和街燈的設計靈感來自<a href="https://en.wikipedia.org/wiki/Cargo_cult" target="_blank">貨物崇拜(</a></span><span style="font-size: large;"><a href="https://en.wikipedia.org/wiki/Cargo_cult">Cargo cult)</a></span><span style="font-size: large;">,扭奇者藉此模仿出勉強記得或理解的現實碎片。 </span><br />
<span style="font-size: large;"><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/05/image2-5.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="622" data-original-width="800" height="496" src="https://blogs.unity3d.com/wp-content/uploads/2018/05/image2-5.png" width="640" /></a><br />世界環境的早期佈局<br /> <br />此圖是一個</span><span style="font-size: large;">我們在</span><span style="font-size: large;">早期嘗試中,試圖將故事進展和故事序列放入地圖上的地點。藍青色的線顯示了環境中的分支道路。</span><br />
<span style="font-size: large;"><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/05/image3-4.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="800" data-original-width="670" height="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/05/image3-4.png" width="534" /></a><br />蜂巢 – 模塊、物品和建築結構設計<br /><br />這些物品體現了扭奇者記憶中的物質表現,包括來自過去生活的物品,它們通過森林中的物品材質-樹皮、泥土和樹枝-</span><span style="font-size: large;">重構出來</span><span style="font-size: large;">。 </span><br />
<span style="font-size: large;"><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/05/image16.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="417" data-original-width="800" height="332" src="https://blogs.unity3d.com/wp-content/uploads/2018/05/image16.png" width="640" /></a><br />用森林材質製作的汽車</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/05/image17.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="618" data-original-width="800" height="494" src="https://blogs.unity3d.com/wp-content/uploads/2018/05/image17.png" width="640" /></a><br />用泥土和樹枝粗略雕刻出來的鳥類,懸掛在樹枝上 <br /><br /> <a href="https://blogs.unity3d.com/wp-content/uploads/2018/05/image19.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="398" data-original-width="800" height="318" src="https://blogs.unity3d.com/wp-content/uploads/2018/05/image19.png" width="640" /></a><br />蜂巢 – 道路(早期的一個變體)</span><br />
<span style="font-size: large;"><br />展示山坡上一個倒塌大樹形成的前往蜂巢的道路。 <br /><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/05/image6-3.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="415" data-original-width="800" height="332" src="https://blogs.unity3d.com/wp-content/uploads/2018/05/image6-3.png" width="640" /></a><br />蜂巢 – 外部大門<br /><br />蜂巢入口的早期探索式畫作。在設計蜂巢時的一個主要挑戰是避免使它看起像傳統的人造堡壘,或是奇幻的城堡。我們希望能只稍微透出意圖和留下目的提示,讓它的設計處在偶然與刻意的界線之間。 <br /><br /><br />小結 <br /><br />《死者之書》的概念美術今天就分享到這裡,我們後續會接續揭秘《死者之書》的角色設計以及探索故事主題和資源創作過程等。請保持關注 !</span></div>
Anonymoushttp://www.blogger.com/profile/01294153002424090924noreply@blogger.com1tag:blogger.com,1999:blog-6317841908377212626.post-43956938997534674832018-07-26T03:07:00.003-07:002018-07-26T17:59:43.354-07:00Unity 2018.2新功能介紹<span style="font-size: large;">作者:Thomas Krogh-Jacobsen <a href="https://blogs.unity3d.com/2018/07/10/2018-2-is-now-available/" target="_blank">原文</a></span><br />
<span style="font-family: inherit; font-size: large;">潤稿:Wei J</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">Unity 2018.1標榜全新發佈週期的開始,最核心的兩個創新功能:可編程渲染管線Scriptable Render Pipeline (SRP) 和 著色器編輯器Shader Graph。它們為美術和開發者帶來了更多強大的功能;C# Job System、Burst Compiler和ECS,讓使用者合理利用多核心處理器成為可能。Unity 2018.2以此為基礎,增加一些新功能。本文我們將詳細為大家介紹Unity 2018.2中的重要功能與更新。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">你可以從Unity Hub或<a href="https://unity3d.com/get-unity/update" target="_blank">這裡</a>下載Unity 2018.2</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>Unity 2018.2版本新功能簡介</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">Unity 2018.2的主要目標之一是發佈可編程渲染管線SRP,強化下一代渲染技術。另一個目標則是把新功能和改進內容帶給開發者能在手機領域開發取得成功。現在先簡要介紹我們在這兩方面所做的工作。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">Unity 2018.2優化了輕量級渲染管線LWRP的效能,增強了高清晰渲染管線HDRP的效果,幫助開發者實現高級視覺效果,著色器視圖Shader Graph也有多項改進,使它能夠支援上述兩個管線。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">我們增加了對iOS、Android、Windows、MacOS、UWP和PS4的IL2CPP支援,並且開始為輕量級渲染管線LWRP增加了針對手遊設備的優化。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">對於Android專案,我們正式發佈了對64位(ARM64)支援,現在我們允許開發者直接添加Java程式到Unity Plugins目錄下,而不需先建立Java庫。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">最後,新版本中還加入了一些新的2D功能,它們將作為體驗版Package發佈,包括支援Vector Graphics(向量圖形)和Pixel Perfect(完美像素)。向量圖形匯入器能讓輕鬆處理SVG圖形格式,Pixel Perfect使你可以更輕鬆地在各種設備上實現不同解析度的完美點陣圖。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">我們將在下文為大家詳細介紹改進的細節功能及內容。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span><span style="font-family: inherit; font-size: medium;"><b><span style="color: #e69138; font-size: x-large;">圖像</span></b></span><br />
<span style="font-family: inherit; font-size: medium;"><span style="color: #e69138; font-size: x-large;"><b><br /></b></span></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>可編程渲染管線SRP</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">在Unity 2018.1中,我們加入了可編程渲染管線SRP,它讓美術和程式能夠自主控制強大的新渲染管線。而Unity 2018.2包含以下SRP更新:</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>SRP批次處理器,加速CPU渲染</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">SPR批處理器(SRP batcher)是一種Unity引擎的新型內循環程式,它可在不影響GPU效能的情況下加速CPU渲染速度,它替代了傳統的SRP渲染程式。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">使用PBR的遊戲常常會有很多物件和網格,物件上不同的材質共享著相同的Shader和Shader keyword。SRP批次處理器幫使用PBR的遊戲提供了很大的CPU速度提升。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">SRP批次處理器能夠與高品質渲染管線HDRP和輕量級渲染管線LWRP結合使用,目前支援PC DirectX11、Metal和PlayStation 4。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>可編程著色器變體拆離(Scriptable shader variants stripping)</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">由於專案中的著色器變體數量增多,安裝包打包時間和資料大小會隨著專案複雜度而提升。這個功能在Unity 2018.2加入,你可以用它管理產生的著色器變體數量,大幅減少安裝包打包時間和資料大小。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">這個功能還允許你移除所有帶有無效程式通道或無用功能的著色器變體,建立著色器</span><span style="font-size: large;">建</span><span style="font-family: inherit; font-size: large;">構配置,例如:標記為「debug」和「release」的設定,而不會影響迭代時間和維護複雜度。我們預期這個功能將大幅提高開發效率。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">想更瞭解著色器變體拆離可以閱讀<a href="https://blogs.unity3d.com/2018/05/14/stripping-scriptable-shader-variants/" target="_blank">這篇文章</a></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image3.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="300" data-original-width="504" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image3.png" /></a></div>
<span style="font-family: inherit; font-size: medium;">在GraphicsSettings中的著色器變體拆離選項</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>輕量級渲染管線LWRP</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">SRP是一個能自訂渲染的功能,但所有的工作都得開發者自己做,為此Unity貼心的製作了兩個模板HDRP和LWRP。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">輕量級渲染管線LWRP提供了高效能且相容低階硬體、支援XR和手遊設備等效能要求較低的應用和平台。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">LWRP通過利用優化磁磚功能(Optimized Tile)來提升了效能和優化效果。LWRP會調整磁磚的載入和存儲數量,進而優化手機GPU的記憶體。它可分批對光照著色,減少重復繪制和Draw Calls的次數。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">LWRP的基本功能支援所有VR平台,然而在Unity 2018.3之前,它還不會支援MSAA技術。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">請注意:LWRP目前還不支援手機AR開發工具,包含:ARCore、ARKit、HoloLens以及Magic Leap設備。這部分有新消息將在未來的計劃中發佈。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/SRP2_LW_SRP_Unity_Product_1.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/SRP2_LW_SRP_Unity_Product_1.jpg" width="640" /></a></div>
<span style="font-family: inherit; font-size: medium;">LWRP為低階硬體和XR等效能要求較高的應用提供了較高的效能</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>高品質渲染管線HDRP</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">高品質渲染管線HDRP在Unity 2018.1首次作為體驗版發佈,它針對PC和主機等高階平台處理高品質視覺效果。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">在Unity 2018.2中,我們進一步幫助開發者呈現更高品質視覺效果。SRP目前仍處於測試階段,所以我們還不推薦將它們用於正式專案製作之中。這次更新的改進內容包括體積測定(volumetrics)、光滑平面反射(glossy planar reflection)、幾何鏡面反射AA(Geometric specular AA)、代理螢幕空間反射及折射(Proxy Screen Space Reflection & Refraction)、網格貼花(Mesh decals)和陰影遮罩(Shadow Mask)。 接下來會一一介紹:</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<br />
<ul>
<li><span style="font-family: inherit; font-size: large;"><span style="color: #e69138; font-family: inherit;">體積測定</span><span style="font-family: inherit;">:體積霧會從除了區域光外所有支援的光照類型獲取光照。你也可以用密度體積來控制霧的密度。</span></span></li>
<li><span style="font-family: inherit; font-size: large;"><span style="color: #e69138; font-family: inherit;">光滑平面反射</span><span style="font-family: inherit;">:平面反射功能現在已支援光滑的反射效果,代表它會考慮材質的光滑度。</span></span></li>
<li><span style="font-family: inherit; font-size: large;"><span style="color: #e69138; font-family: inherit;">幾何鏡面反射AA</span><span style="font-family: inherit;">:三角形數量較為密集的網格會造成鏡面鋸齒現象。為了解決這個問題,我們新增了一個選項來降低並限制鋸齒數量。</span></span></li>
<li><span style="font-family: inherit; font-size: large;"><span style="color: #e69138; font-family: inherit;">代理螢幕空間反射和折射</span><span style="font-family: inherit;">:此功能允許你使用代理體積即接近場景邊界的體積,來執行螢幕空間的反射和折射。儘管它和使用深度緩衝(depth buffer)得到的效果相比並沒有那麼準確,但它在運行時的效能消耗較低。</span></span></li>
<li><span style="font-family: inherit; font-size: large;"><span style="color: #e69138; font-family: inherit;">網格貼花</span><span style="font-family: inherit;">:這個功能可以在投影器貼花之外,還可以讓你用網格來貼花。</span></span></li>
<li><span style="font-family: inherit; font-size: large;"><span style="color: #e69138; font-family: inherit;">陰影遮罩</span><span style="font-family: inherit;">:以前HDRP中的這個功能使用距離陰影遮罩(Distance Shadowmask)模式,這個模式會使動態陰影漸變為最大陰影距離位置的陰影遮罩。在Unity 2018.2中,如果動態陰影只渲染一個不受光照貼圖影響的物件(對應內建渲染管線的陰影遮罩模式),你可以選取每個光照。所以,和內建渲染管線不同,HDRP還能同時啓用陰影遮罩模式,這樣便可為內建陰影遮罩模式控制每個光照。</span></span></li>
</ul>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">除此之外,我們還加了"一些"HDRP對Shader Graph的支援,可通過可視化的方式建立著色器,我們也提升了穩定性和效能。"一些"是指只有HDRP功能中的一個子集可以在Shader Graph中使用。目前Shader Graph針對HDRP的支援還不包括高階材質功能像是SSS或clear coat等,也無法進行曲面細分(tessellation)。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">請注意:HDRP目前不支援任何AR或VR平台。對這些平台的支援預計在2019年,新的計劃將在之後通知。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image9.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="453" data-original-width="800" height="362" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image9.png" width="640" /></a></span><br />
<span style="font-family: inherit; font-size: medium;">在楓丹白露攝影製圖演示中,帶有來自陽光的體積光射線</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<iframe allowfullscreen="" frameborder="0" height="480" src="https://www.youtube.com/embed/85THdW8OJNk" width="640"></iframe><br />
<span style="font-family: inherit; font-size: medium;">採用Unity HDRP製作的一段汽車廣告</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>漸進式光照系統</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">漸進式光照系統(Progressive Lightmapper)在Unity 2018.1版本結束測試成為正式版本,這次更新加了不少改進。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>可配置烘焙光照衰減</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">漸進式光照系統中的可配置光照衰減功能可以讓你在烘焙光照時得到近似物理特性的衰減曲線。在之前的光照系統裡,投射燈(spot-light)和點光源(point-light)光的強度會大幅受到光的範圍值影響,這樣的效果是不符合物理規則的,因為現實中光的衰減距離或衰減量是由光的強度決定。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image22.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image22.png" width="640" /></a></span>
<span style="font-family: inherit; font-size: large;"><br /></span><span style="font-family: inherit; font-size: large;"><br /></span><br />
<span style="font-family: inherit; font-size: large;">此功能允許漸進式光照系統透過與世界空間(world-space)距離相關聯的距離衰減,來讓光的距離與強度之間脫鉤。雖然Unity仍支持原先的衰減功能,但現在也新增了對線性衰減和距離平方衰減的支持,以及在範圍限制位置衰減為0的距離平方衰減。HDRP為了搭配即時光照,在預設狀況下使用平方反比衰減,並且為光的強度啓用物理單位(physical units)。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>用於預計算光照的實例化反光材質(albedo)和發光材質(emissive) </b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">在之前的光照系統中會將反光材質跟發光材質分配給一個獨立的光照空間。然而,由於實例(instance)經常會共享反光/發光的特性,現在將會開始支援每個貼圖獨有的實例之產生。這樣會減少漸進式光照系統所使用的記憶體總量,進而能夠烘焙更大的場景。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>附加場景光照警告</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">出於性能原因,最好將大型場景分割為較小的子場景,這些子場景能夠在執行時根據可視性來加載和卸載。我們稱之為「附加性加載」或「多場景」設置。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image20.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="505" data-original-width="800" height="403" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image20.gif" width="640" /></a></span><br />
<span style="font-family: inherit; font-size: medium;">帶有全域光照的附加載入場景</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">當為多個場景配置產生GI光照時,Unity所提供的工作流程會讓使用者載入所有需要的子場景,然後為全部的場景階層(hierarchy)產生照明。這將會輸出一個LightingData.asset檔案,它會保存光照貼圖、預計算即時GI和探針(probe)數據。這些與第一個載入的場景有關,該場景又被稱作「主」("Master")場景。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">在執行期間,加載/卸載的場景會從與主場景相關聯的LightingData.asset中導出它們的照明數據。在這種情況下,子場景的照明設置無關緊要。然而,根據目的將會以不同的順序單獨烘焙場景或加載場景。這可能導致場景帶有不相容的照明設置和不符合的照明數據。例如:天空盒(skybox)可能會不太相同,光照貼圖解析度可能會變化,混合光照模式可能也會改變。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">此前,Unity從未警告使用者這個問題,而得到的結果與預期不一致讓使用者感到困惑。現在Unity會產生一個警告,提醒使用者有不相容的問題,接著顯示關於不相容的明確信息以便除錯和驗證。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>其它改進內容</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">我們還讓剔除光照貼圖陰影投射器函數(僅在腳本API中)顯示出「per light」選項,讓它能夠被HDRP使用。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>著色器視圖Shader Graph(預覽版)</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">在Unity 2018.1中,我們引入了Shader Graph,使開發者能夠透過視覺建構著色器。這個過程無需編寫程式碼,便可在圖形網絡中直接創建並連接節點。視圖中的每個節點都會依照改動提供即時回饋,其易用性使得新使用者也可以參與著色器創建。在Unity 2018.2中,我們進行了一些改進,其中包括:</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>支援高品質渲染管線</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">著色器視圖Shader Graph現在支援HDRP擁有PBR和Unlit的Master節點。用著色器視圖</span><span style="font-size: large;">建</span><span style="font-family: inherit; font-size: large;">構的著色器在LWRP與HDRP中都可以使用。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image11.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="421" data-original-width="800" height="336" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image11.png" width="640" /></a></span><span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>頂點位置</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">現在可以通過PBR和Unlit Master節點上的Position屬性槽(slot)來修改頂點位置。預設情況下,對此節點輸入的是物件空間位置(object space position)。對這個槽的自定義輸入應該指定特定頂點的絕對本地位置。在頂點著色器上,有一些特定節點,例如——程序化形狀節點不會顯示出來。因為這類節點不相容於這個屬性槽。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image14.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="529" data-original-width="800" height="422" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image14.png" width="640" /></a></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>Master節點設定</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">現在可以透過一個小視窗進入Master節點的設定,你可以為你的著色器切換開關來修改著色器上的多個渲染設定。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image6.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="288" data-original-width="700" height="262" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image6.png" width="640" /></a></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>屬性參照名字和開放的狀態</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">現在你可以編輯屬性的參照名字,使它更輕易地從腳本引用你的著色器屬性。為此,首先選擇所需屬性,然後在參照旁邊輸入一個新名字。如果你想要重置回預設的名字,在參照上按右鍵,然後選擇重設參照即可。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">現在可以在擴充的屬性視窗中對開放的選項做切換。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image17.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="493" data-original-width="525" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image17.gif" /></a></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>視圖的可編輯路徑</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">現在你可以修改Unity的著色器視圖和子視圖的路徑。當你修改著色器視圖的路徑時,將修改其在著色器選項列表中的位置。當你修改子視圖的路徑時,它會在節點創建選單(node-creation menu)中得到一個不同的位置。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/image19.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="345" data-original-width="284" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/image19.gif" /></a></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/image12.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="494" data-original-width="579" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/image12.gif" /></a></span><br />
<br />
<br />
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>Is Front Face節點</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image5_fix.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="210" data-original-width="800" height="167" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image5_fix.png" width="640" /></a></span><br />
<br />
<span style="font-family: inherit; font-size: large;">使用此節點,你可以根據給予片段(fragment)的面標識(face sign)來改變視圖的輸出內容。如果當前片段是正面的一部分,節點會返回True。如果是背面,節點會返回False。請注意:這個功能會要求你在主節點上使用雙面(two sided)屬性。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span><span style="color: #e69138; font-family: inherit; font-size: large;"><b>梯度(Gradient)節點</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/image23.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="441" data-original-width="800" height="353" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/image23.png" width="640" /></a></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span><br />
<span style="font-family: inherit; font-size: large;">此功能會通過兩個新節點添加漸變功能。Sample Gradient節點會通過已有的Time參數取樣漸變。你可以在控制視圖的Gradient槽定義這個漸變。Gradient Asset節點會定義一個漸變,這個漸變可以使用不同的Time參數來被多個Sample Gradient節點採樣。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>Texture3D和Texture2D陣列</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image13.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="463" data-original-width="800" height="370" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image13.png" width="640" /></a></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span><br />
<span style="font-family: inherit; font-size: large;">這個改動使Unity能夠對</span><span style="font-size: large;">紋理</span><span style="font-family: inherit; font-size: large;">類型支援兩個新的屬性類型和四個新節點。這些新增內容允許你對著色器視圖中的Texture 3D和Texture 2D Array類型資源進行</span><span style="font-size: large;">定義和取樣</span><span style="font-family: inherit; font-size: large;">。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>Texture 2D LOD節點</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">這會為Texture 2D Sample 上的LOD功能添加新節點。Sample Texture 2D LOD使用的輸入和輸出槽和Sample Texture 2D相同,但多包含了一個通過Vector1槽調整細節等級的輸入。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>顯示產生的程式碼</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image28.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="443" data-original-width="800" height="353" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image28.gif" width="640" /></a></span>
<span style="font-family: inherit; font-size: large;"><br /></span><span style="font-family: inherit; font-size: large;"><br /></span><br />
<span style="font-family: inherit; font-size: large;">現在可以查看任意節點產生</span><span style="font-size: large;">的</span><span style="font-family: inherit; font-size: large;">程式碼。右鍵點擊節點,點擊Show Generated Code即可,該程式碼片段會在連接Unity的編輯器中打開。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span><span style="color: #e69138; font-family: inherit; font-size: large;"><b>Vulkan for editor 於Windows及Linux平台(試驗版)</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">Unity 2018.2支援在Windows和Linux端編輯器運行Vulkan。Vulkan是新一代圖形和計算API。它可以對PC、主機、移動端和嵌入式平台的各類設備上的GPU提供高效的跨平台存取功能。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>紋理Mipmap串流</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">在Unity 2018.2中開始支援向記憶體添加紋理Mipmap串流。(可以在需要的時候才開啟)</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>這有什麼好處?</b></span><br />
<span style="color: #e69138; font-family: inherit; font-size: large;"><b><br /></b></span>
<span style="font-family: inherit; font-size: large;">啟用此功能可以減少Unity應用程式的紋理記憶體需求。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>如何運作</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">啟用此系統後,Unity將僅在網格(mesh)靠近啟動中的攝影機時加載更高解析度的紋理Mipmap。高解析度Mipmap數據保存在記憶體中,整體的紋理記憶體會限制在使用者定義的預算範圍內。</span><span style="font-family: inherit; font-size: large;">如果在加載新的紋理Miplevel後,紋理記憶體超出預算,那麼與攝影機距離最遠的網格上,較高解析度的Mipmap會從記憶體中釋放出來。</span><br />
<br />
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>加速初次載入時間</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">由於首次加載的紋理數據減少,即僅加載較低解析度的mipmap,初始場景的載入速度也會加速。初始加載速度的提升效果將根據平台有所不同。</span><br />
<br />
<br />
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>更多的可控性</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">你可以完全控制紋理Mipmap串流系統,決定哪些Mipmap會加載到記憶體中。通常Unity會加載所有存儲在硬碟上的Mipmap,但使用此系統,你可以直接控制要加載哪些Mipmap等級。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span><span style="font-family: inherit; font-size: large;">此系統還會佔用一小部分的CPU時間,從而節省大量的GPU記憶體儲存。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><b><span style="color: #e69138;">輕易地啟動和管理</span></b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">通過品質設置(Quality Setting)可以輕鬆啟用該功能,你可以定義每個紋理是否應進行串流式處理。你也可以查詢指標,以識別紋理記憶體的使用情況,同時見到記憶體的節省。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span><span style="font-family: inherit; font-size: large;">控制系統的各種設置,讓記憶體的節省和CPU消耗之間取得</span><span style="font-size: large;">平衡</span><span style="font-family: inherit; font-size: large;">,並允許優先處理一些紋理,例如將角色紋理優先於環境紋理。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_Mipmapstreaming.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="530" data-original-width="484" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_Mipmapstreaming.png" /></a></span>
<span style="font-family: inherit; font-size: large;"><br /></span><span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>C#動畫工作 </b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">AnimationPlayable現在允許使用者編寫自定義的C# Playables來直接與動畫數據進行互動。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span><span style="font-family: inherit; font-size: large;">使用者也可以編寫多線程C#程式碼來控制PlayableGraph所使用的AnimationStream數據,它也允許將使用者編寫的IK解決方案、程序化動畫或甚至是自定義混音器集成到當前動畫系統中。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>粒子系統的改進</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">下面為Unity 2018.2中的粒子系統的改進:</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<br />
<ul>
<li><span style="font-family: inherit; font-size: large;"><b style="font-family: inherit;"><span style="color: #e69138;">支持多達8個UV</span></b><span style="font-family: inherit;">:可以使用比以往更多的自定義數據。</span></span></li>
<li><span style="font-family: inherit; font-size: large;"><b style="font-family: inherit;"><span style="color: #e69138;">MinMaxCurve和MinMaxGradient</span></b><span style="font-family: inherit;">:現在能夠在粒子系統之外使用這兩個類型的自定義腳本,以便於搭配粒子系統UI所使用的風格。</span></span></li>
<li><span style="font-family: inherit; font-size: large;"><b style="font-family: inherit;"><span style="color: #e69138;">線性顏色空間</span></b><span style="font-family: inherit;">:上傳粒子數據到GPU前,粒子系統能適時將顏色轉換為線性空間。</span></span></li>
<li><span style="font-family: inherit; font-size: large;"><b style="font-family: inherit;"><span style="color: #e69138;">從Sprite發射</span></b><span style="font-family: inherit;">:我們給形狀(Shape)模組加入了兩個新模式,讓它能夠從Sprite或SpriteRenderer組件發射,並將粒子發射效果與Sprite視覺效果完美搭配。</span></span></li>
<li><span style="font-family: inherit; font-size: large;"><span style="font-family: inherit; font-size: large;"><b><span style="color: #e69138;">BakeMesh</span></b>:我們新增了兩個API來將粒子系統的幾何體(geometry)烘焙到網格中,</span><span style="font-family: inherit;">BakeMesh會烘焙粒子幾何體</span><span style="font-family: inherit;">,而BakeTrailsMesh會將軌跡模組(Trails module)烘焙到網格中。</span></span></li>
<li><span style="font-family: inherit; font-size: large;"><b style="font-family: inherit;"><span style="color: #e69138;">僅顯示選取的對象(即Solo Mode)</span></b><span style="font-family: inherit;">:這是使用者一直想要的功能,我們使得這個功能更具探索性和易用性,並在場景視圖的Overlay層加入了其它預覽控制功能,例如:播放、重放和暫停等按鍵。</span></span></li>
<li><span style="font-family: inherit; font-size: large;"><b style="font-family: inherit;"><span style="color: #e69138;">ETC紋理支援</span></b><span style="font-family: inherit;">:當你在紋理集動畫(Texture Sheet Animation)模組中使用Sprite時,帶有獨立Alpha紋理的著色器現在可以在粒子上使用了。</span></span></li>
</ul>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>完美像素攝影機 Pixel Perfect Camera(</b><b>預覽版Package</b><b>)</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span><span style="font-family: inherit; font-size: large;">嘗試使用完美像素(Pixel Perfect)預覽版Package,使畫面遵循你的像素藝術風格。無論螢幕大小如何,完美像素攝影機(Pixel Perfect Camera)組件將會自動完成所有計算來幫助你獲得完美清晰的像素畫面。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image21.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image21.gif" width="640" /></a></span><br />
<span style="font-family: inherit; font-size: medium;">Toge Productions製作的Infectonator 3: Apocalypse畫面</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">在sprites進行運動或旋轉時,此功能有助於它們保持清晰的像素效果,而且不用添加補幀畫面來使邊界變得平滑,效果如下圖所示。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image30.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="336" data-original-width="800" height="268" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image30.png" width="640" /></a></span><br />
<br />
<br />
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>2D Sprite 渲染器「通過軸心點排序」</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">在過去,Sprite渲染器和坐標軸之間的距離用來決定哪個Sprite最後渲染,從而出現在所有圖像的最前面。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">在此版本中,你可以使用軸心點而不是Sprite中心作為各種排序方法的參照點,像是根據軸心點到螢幕上方的距離來做排序。例如:在俯看視角RPG遊戲中,你需要底部Sprite來決定Sprite的渲染順序。新的軸心點設定會更適合你遊戲開發。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/image15.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="324" data-original-width="800" height="258" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/image15.png" width="640" /></a></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span><span style="font-family: inherit; font-size: large;"><br /></span><br />
<span style="color: #e69138; font-family: inherit; font-size: large;"><b style="font-family: inherit;">2D六邊形</b><b>Tilemap</b><b style="font-family: inherit;">地圖</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">Unity 2018.2能夠</span><span style="font-size: large;">建</span><span style="font-family: inherit; font-size: large;">構六邊形Tilemap地圖。這包括支持創建平坦的和點狀凸起的六邊形Tilemap,這類Tilemap在製作策略遊戲或是電子桌游時十分實用。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image16.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="292" data-original-width="541" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image16.png" /></a></span><br />
<span style="font-family: inherit; font-size: medium;"><br /><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/TileMapHex_Editor_EduGIF.gif" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="448" data-original-width="800" height="358" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/TileMapHex_Editor_EduGIF.gif" width="640" /></a></span><br />
<span style="font-family: inherit; font-size: medium;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image29.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="449" data-original-width="800" height="358" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image29.png" width="640" /></a></span><br />
<span style="font-family: inherit; font-size: medium;">David Baumgart</span> <span style="font-size: medium;">的創作</span><span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b style="font-family: inherit;">SVG</b><b>輸入</b><b style="font-family: inherit;">器(預覽版Package)</b></span><br />
<br />
<span style="font-family: inherit; font-size: large;">此功能讓可拓展向量圖形(Scalable Vector Graphics,即SVG)能夠直接輸入到自己的專案中。SVG輸入器能以很小的檔案大小來創建Sprite資源,並且在任意解析度下保持它們原有的畫面質量。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">SVG輸入器支持SVG 1.1規範中的常見功能,例如:漸變、填充、裁切路徑、虛線和圓角等。Unity的2D工具支持以這種方式輸入向量圖形Sprite。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">當一個SVG檔案被輸入後,向量數據會被曲面細分為三角形,然後產生Sprite。這個Sprite能夠在之後用在2D系統中。SVG輸入器的原始碼可以在Package的Editor資料夾中找到。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">你可以從Package管理器中獲取SVG輸入器,它是向量圖形(Vector Graphics)預覽版資源的一部分。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<iframe allowfullscreen="" frameborder="0" height="480" src="https://www.youtube.com/embed/TSWdj3JBHCE" width="640"></iframe>
<span style="font-family: inherit; font-size: large;"><br /></span><span style="font-family: inherit; font-size: large;">向量圖形API可以直接在程式碼中創建和操作向量結構。向量圖形API的原始碼可以在Runtime資料夾下的向量圖形命名空間中找到。</span><br />
<br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>全新2D API</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">你可以在程式碼中使用Vector Graphics API來創建或操作向量數據。全新的2D Atlas API能讓你編寫自定義工具來創建或更新圖集。例如:你可以使用玩家的個人資料圖片創建個性化角色紋理,也可以基於安裝包的設置來優化圖集。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: x-large;"><b>編輯器</b></span><br />
<span style="color: #e69138; font-family: inherit; font-size: x-large;"><b><br /></b></span>
<span style="color: #e69138; font-size: large;"><b>支援.java和.cpp檔案作為Unity專案中的插件</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">現在你可以添加.java(以及.cpp和.a)檔案到Unity專案的插件資料夾中。這些檔案將被識別為Unity插件,不需要使用者在Android Studio中單獨</span><span style="font-size: large;">建</span><span style="font-family: inherit; font-size: large;">構函式庫就可以被編譯到APK檔案中。插件程式碼會作為Unity專案的一部分,不需要額外創建單獨的Android Studio專案。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><span style="color: #e69138; font-family: inherit; font-size: large;"><b>標準資源(</b></span><span style="color: #e69138; font-size: large;"><b>Standard Assets)</b></span><b style="color: #e69138; font-family: inherit;">置換</b></span>
<span style="font-family: inherit; font-size: large;"><br /></span><br />
<span style="font-family: inherit; font-size: large;">在Unity 2018.2中,我們從安裝器移除了Unity 5.0版本的標準資源,並為之前的每個原型Package製作了替代的Package。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">第一個Package(即Standard Assets: Characters)將在Unity 2018.2發佈後不久作為預覽版Package推出。它將包含一個與Cinemachine集成的第一人稱和第三人稱控制器,以及通過Probuilder</span><span style="font-size: large;">建</span><span style="font-family: inherit; font-size: large;">構的原型環境。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">更多細節後續我們會進行介紹。如果你需要之前的Unity 5.0版Package,可以從Asset Store獲取。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>Unity Hub</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">Unity Hub (v1.0)將在最近正式推出,作為一個</span><span style="font-size: large;">簡化所有使用者的入門和設定過程的</span><span style="font-family: inherit; font-size: large;">全新工具,它提供了一個用以管理Unity專案的</span><span style="font-size: large;">集中</span><span style="font-size: large;">位置</span><span style="font-family: inherit; font-size: large;">,簡化了搜索</span><span style="font-size: large;">、</span><span style="font-family: inherit; font-size: large;">下載</span><span style="font-size: large;">、</span><span style="font-family: inherit; font-size: large;">管理Unity編輯器認證(</span><span style="font-size: large;">licenses)</span><span style="font-family: inherit; font-size: large;">和附加組件。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">下面是隨著Hub v1.0推出的一些功能:</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<br />
<ul>
<li><span style="font-size: large;">專案模板功能</span></li>
<li><span style="font-size: large;">自定義安裝位置</span></li>
<li><span style="font-size: large;">為新的專案增加Asset Store Packages</span></li>
<li><span style="font-size: large;">修改專案建構的位置</span></li>
<li><span style="font-size: large;">編輯器:新增組件的後期安裝</span></li>
</ul>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">更多Unity Hub的介紹,請閱讀簡化你的工作流程-<a href="https://blogs.unity3d.com/2018/01/24/streamline-your-workflow-introducing-unity-hub-beta/" target="_blank">Unity Hub (Beta)</a>。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: x-large;"><b>影視方面</b></span><br />
<span style="color: #e69138; font-family: inherit; font-size: x-large;"><b><br /></b></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>攝影機的物理屬性</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">Unity 2018.2版本包括一些新功能,使得藝術家和電影攝影師在使用Unity創作時更有自信,也得到更多的控制權,這些新功能包括:</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<br />
<ul>
<li><span style="font-family: inherit; font-size: large;">新增了一個用於顯示物理攝影機(Physical Camera)設置的按鈕,上面有藝術家和攝影師十分熟悉的屬性。例如:標準的焦距、感光元件尺寸和鏡頭偏移等屬性。</span></li>
<li><span style="font-family: inherit; font-size: large;">模型輸入器現在能夠保留從Autodesk® Maya®和其它相容DCC中導出的物理攝像機屬性。</span></li>
<li><span style="font-family: inherit; font-size: large;">Unity中的攝影機現在能與其它DCC中的攝像機完美搭配,不用添加額外的組件或是手動地FOV計算。</span></li>
<li><span style="font-family: inherit; font-size: large;">攝影機組件現在會提供一個感光元件尺寸的下拉列表,用來設定現實中的常見攝ㄧ機配置。</span></li>
</ul>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image2.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="351" data-original-width="800" height="280" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image2.jpg" width="640" /></a></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image27.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="732" data-original-width="800" height="584" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image27.jpg" width="640" /></a></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>Unity Recorder 1.0</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/image11.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="415" data-original-width="800" height="331" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/image11.png" width="640" /></a></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">Unity Recorder 1.0將在不久後正式推出,它讓使用者以十分簡單的方式在編輯器中管理和錄製動畫剪輯(clip)、影片和圖像序列:</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<br />
<ul>
<li><span style="font-family: inherit; font-size: large;">全新UI:新的UI帶有簡潔的視圖,能夠輕鬆管理錄製結果。</span></li>
<li><span style="font-family: inherit; font-size: large;">預設(Presets):你可以保存已有設定,不用每次都從頭修改設定內容。</span></li>
<li><span style="font-family: inherit; font-size: large;">API:你可以通過腳本中的API來觸發錄像。</span></li>
<li><span style="font-family: inherit; font-size: large;">多重錄像:你可以立即開始多個錄像,並將它們保存在一個列表中,以便之後在需要時使用相同的設定。</span></li>
<li><span style="font-family: inherit; font-size: large;">以多種格式錄製帶音頻的視頻剪輯。</span></li>
<li><span style="font-family: inherit; font-size: large;">以多種格式錄製圖像序列。</span></li>
<li><span style="font-family: inherit; font-size: large;">錄制並導出動畫:通過FBX導出動畫剪輯到你喜歡的DCC應用程式上。</span></li>
</ul>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">Recorder v1.0請到<a href="https://assetstore.unity.com/packages/essentials/beta-projects/recorder-94079" target="_blank">Asset Store下載</a></span><br />
<div style="font-size: x-large;">
<span style="font-size: large;"><br /></span></div>
<div style="font-size: x-large;">
<span style="font-size: large;"><br /></span></div>
<span style="color: #e69138; font-size: x-large;"><b>引擎核心</b></span><br />
<div>
<span style="color: #e69138; font-size: x-large;"><b><br /></b></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>移除舊版基於RakNet的網絡功能</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span><span style="font-family: inherit; font-size: large;">RakNet是我們之前的網絡功能,在Unity 5.1中就被逐漸棄用,在Unity 2018.2中被徹底移除。這意謂著任何使用RakNet的專案都不適用於此版本。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>可尋址資源系統</b></span><span style="color: #e69138; font-size: large;"><b>(Addressable Asset System)</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">可尋址資源系統能夠輕鬆管理構成遊戲的所有內容,例如:Prefab、紋理、材質、音頻剪輯和動畫等。隨著專案數量的增長,資源的數量也會增加。使用者必須聰明地引用這些資源,否則遊戲中的所有內容包括本地記憶體和內容分配都將變得難以管理。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">因為資源參照通常在</span><span style="font-size: large;">建</span><span style="font-family: inherit; font-size: large;">構時才解決,你將更難去決定內容分配的策略,而使用者為了進行修改經常要面臨的是大量重構。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">全新的可尋址資源系統將可以在遊戲規模擴大時讓你的團隊更容易地進行擴充。這個系統分離了運行時資源管理中的三個主要問題:參照、打包和分配。不管是在本地機器上還是透過CDN的在線分配,可尋址資源系統都簡化了參照內容的過程,因為內容會自動地載入和卸載從而更好地管理記憶體。我們還提供了性能分析工具來進一步優化記憶體使用。最終,此功能將為你帶來更短的迭代時間。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<iframe allowfullscreen="" frameborder="0" height="480" src="https://www.youtube.com/embed/iauWgEXjkEY" width="640"></iframe>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">全新的可尋址資源系統將獨立發佈。它目前仍處於預覽階段,可以通過Package管理器作為附加內容取得。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>高DPI顯示器支持</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">如果你擁有4K顯示器,現在你可以在編輯器中享受Linux和Windows上的高DPI縮放支持,此功能還支持在Windows上按照不同的顯示比例進行縮放。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<span style="color: #e69138; font-size: large;"><b>棄用UWP所使用的.NET腳本後端支援</b></span><br />
<br />
<span style="font-size: large;">自從Unity 2018.1起,我們就在通用Windows平台 (UWP)上支援了兩個腳本後端:.NET和IL2CPP。在Unity 2018.2中我們棄用了對.NET腳本後端的支援。這次棄用的原因有兩個方面。</span><br />
<br />
<span style="color: #e69138; font-size: large;"><b>更容易將遊戲移植到UWP</b></span><br />
<br />
<span style="font-size: large;">首先是為了讓開發者更輕鬆的移植遊戲到UWP。過去很多開發者在將遊戲移植為UWP時所遇到的問題,主要是因為底層API的不同,以及.NET Native、Mono、和IL2CPP這些其它平台運行時之間的差異造成的。這一大變化將讓大多數開發者更輕鬆地將遊戲移植到UWP平台上。</span><br />
<span style="font-size: large;"><br /></span>
<span style="color: #e69138; font-size: large;"><b>幫助我們提供更好的支援</b></span><br />
<span style="font-size: large;"><br /></span><span style="font-size: large;">第二個原因是為了讓我們更有效地解決問題,來更好地為使用者提供支持。由於.NET腳本後端完全與其它Unity平台的運行時不同,對我們而言,相較於Unity的其它部分,維護穩定的質量等級是一個大難題。這次棄用將使我們花費更少的時間來維護.NET腳本後端,並擁有更多的時間來處理對使用者而言更為重要的功能和問題。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">IL2CPP擁有和其它Unity平台相同的.NET底層API,而且<a href="https://docs.unity3d.com/Manual/IL2CPP-WindowsRuntimeSupport.html" target="_blank">IL2CPP已經支持WinRT類型和相應API的存取</a>。因此,通過在Unity 2018.2中添加的IL2CPP管理除錯工具,IL2CPP的開發者體驗現在達到了與.NET腳本後端同樣亦或更優秀的水準。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">從Unity 2017.2開始,編輯器就預設使用IL2CPP,所以我們認為多數使用者使用時不會遇到任何問題。如果你還沒有嘗試使用IL2CPP,而且遇到過一些問題,請務必提交問題,讓我們瞭解。我們計劃在Unity 2019.1結束對.NET腳本後端的支援。</span><br />
<span style="font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>C# Job System、實體組件系統和Burst Compiler</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">隨著我們在Unity 2018.1中推出新的高性能</span><span style="font-size: large;">多執行緒</span><span style="font-size: large;"><span style="font-family: inherit;">系統,我們正在重構Unity的核心基礎。新的系統將使你的遊戲完全利用當下的</span>多執行緒<span style="font-family: inherit;">處理器,不用再為編程而煩惱。</span></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">這得益於全新的C# Job System,它為使用者提供了一個安全簡易的沙盒環境,能夠在裡面編寫並行程式碼。我們還引入了新的模型,預設使用實體組件系統(</span><span style="font-size: large;">ECS)</span><span style="font-family: inherit; font-size: large;">編寫高性能程式碼,並使用Burst Compiler產生高度優化的原生(native)程式碼。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">有了預設提供的高性能,不僅可以在更多的硬體上運行自己的遊戲,還能使用更多的單位和更複雜的模擬效果來創建更豐富的遊戲世界。<a href="https://unity3d.com/unity/features/job-system-ECS" target="_blank">在這裡可以了解更多。</a></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>實體組件系統(ECS)</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">在Unity 2018.2中,我們加入了多個改進內容,包括反應系統(Reactive system)範例。反應系統將使你在組件狀態發生變化時做出響應,並模擬由事件驅動(event-driven )的行為。可以觀看這部 Joachim Ante在Unite Berlin上<a href="https://www.youtube.com/watch?v=swCpyJy4FEs" target="_blank">關於反應系統的影片</a>來進一步了解。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">我們還將提供有關如何使用ECS實作反應系統的大量範例和文檔。今年的下半年,我們還將提供由Unity使用者製作的小型Unity遊戲範例,我們會將這些範例轉換為ECS。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><b><span style="color: #e69138;">Burst Compiler</span></b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">在Unity 2018.2版本中,Burst Compiler for ECS可以在所有編輯器支持的平台Windows、Mac和Linux上使用,你將能夠為獨立安裝包</span><span style="font-size: large;">建</span><span style="font-family: inherit; font-size: large;">構AOT,這些安裝包包括桌面端、PS4、Xbox、iOS和Android。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">在向Unity 2018.3邁進的過程中,我們還會繼續專注改進ECS的性能,發佈確定性系統的一個預覽版,並支持更多.NET C#語言結構,例如:DllImport、常量數組和foreach等。我們的目標是在Unity 2018.3期間使Burst Compiler脫離預覽階段。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>IL2CPP管理除錯工具</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">現在可以使用IL2CPP管理除錯工具,它幫助開發者使用偏好除錯工具來找到並修補錯誤,即使在使用IL2CPP時也能進行。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">所有調試功能將支持Visual Studio(使用Visual Studio Tools for Unity)和JetBrains Rider,而PlayStation 4、移動端平台和Xbox One等獨立安裝包將會在未來提供。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image8.jpg" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="461" data-original-width="800" height="368" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image8.jpg" width="640" /></a></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>Unity 2018.2中的</b></span><span style="color: #e69138; font-size: large;"><b>Scripting runtime改進</b></span><b style="color: #e69138; font-family: inherit; font-size: x-large;"></b><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">我們從.NET 4.x開始收到的各種使用者反饋,Unity 2018.2推出了與腳本runtime相關的大量錯誤修復。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>Android ARM64位支持</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">在Unity 2018.2中,基於IL2CPP的Android ARM64位元支援正式脫離預覽階段。這將會提供性能優勢,因為64位元的Android應用程式和遊戲將有</span><span style="font-size: large;">4GB以上的記憶體</span><span style="font-family: inherit; font-size: large;">能夠利用。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>根據架構分離APK</b></span><span style="color: #e69138; font-size: large;"><b>檔案</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">現在新增一個選項用來根據目標架構,如x86、ARM 32和ARM 64分離出多個APK檔案,而不是產生一個較大的APK檔案。並且對於支持此選項的商店,例如Google Play,你只需要下載相應架構的APK檔案即可。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image10.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="356" data-original-width="529" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image10.png" /></a></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>Google Play Instant Games插件</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span><span style="font-family: inherit; font-size: large;">獲得新玩家的一大阻礙往往是因為繁瑣的安裝過程。下載並打開應用程序需要花費時間,這會導致不少玩家還沒體驗遊戲之前就放棄。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span><span style="font-family: inherit; font-size: large;">有了<a href="https://developer.android.com/topic/google-play-instant/" target="_blank">Google Play Instant</a>,使用者不需要預先安裝就可以嘗試體驗遊戲的10MB版本。此插件通過Google Play Instant來進行配置,</span><span style="font-size: large;">簡化了Unity-based Android應用轉換為即時應用的過程</span><span style="font-family: inherit; font-size: large;">。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<iframe allowfullscreen="" frameborder="0" height="480" src="https://www.youtube.com/embed/u_STBSPQxYA" width="640"></iframe>
<span style="font-family: inherit; font-size: large;"><br /></span><span style="font-family: inherit; font-size: large;">該插件在<a href="https://github.com/google/play-instant-unity-plugin" target="_blank">GitHub</a>上作為一個專案提供,並且能在Unity 2017.x及更高版本上使用。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span><span style="font-family: inherit; font-size: large;">該插件的功能包括:</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<br />
<ul>
<li><span style="font-family: inherit; font-size: large;">可在已安裝(Installed)和即時建構(Instant-build)模式之間切換的選項。</span></li>
<li><span style="font-family: inherit; font-size: large;"><span style="font-family: inherit; font-size: large;">帶有Unity建</span><span style="font-size: large;">構</span><span style="font-family: inherit; font-size: large;">設置上的集中式視圖和Android安裝包設置,這些設置經過修改後能夠支持Google Play Instant。</span></span></li>
<li><span style="font-family: inherit; font-size: large;"><span style="font-family: inherit; font-size: large;">能夠在連接ADB的Android設備上建</span><span style="font-size: large;">構</span><span style="font-family: inherit; font-size: large;">並運行即時應用。</span></span></li>
</ul>
<span style="font-family: inherit; font-size: large;"><br /></span>
<b><span style="color: #e69138;"><span style="font-family: inherit; font-size: large;"></span>
<span style="font-family: inherit; font-size: large;">C#平台認證同步功能</span></span></b><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">Unity現在完全支持.NET 4.x和UnityWebRequest API等所有平台上的現代加密協議TLS1.2。這包括針對特定平台的認證商店的自動驗證功能。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">在不提供系統驗證存取功能的Xbox One和PS Vita平台上,我們使用嵌入式CA庫來進行驗證。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>結束對UnityScript的支持</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">Unity 2018.2中我們結束了對UnityScript的支持。瞭解詳情,請閱讀<a href="https://blogs.unity3d.com/2017/08/11/unityscripts-long-ride-off-into-the-sunset/" target="_blank">這篇文章</a>,Unity將僅支援C#腳本編程。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">我們作出這個決定的原因是,隨著我們繼續更新Scripting Runtime和支持的C#版本,C#將能實現更多可能性:</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<br />
<ul>
<li><span style="font-family: inherit; font-size: large;">通過Scripting Runtime更新,開發者可以使用.NET 4.6及更高版本的C# 7。</span></li>
<li><span style="font-family: inherit; font-size: large;">JobSystem讓開發者能夠輕鬆編寫多執行緒程式碼,從而避免出現競爭危害(race conditions)和死結(deadlock)。</span></li>
<li><span style="font-family: inherit; font-size: large;">NativeArray類型允許開發者創建和使用由本機程式碼控制和存儲的大型陣列,這樣可以更好地控制分配行為並消除GC(garbage-collection)問題。</span></li>
<li><span style="font-family: inherit; font-size: large;">開發者可以控制腳本編譯管線,自定義腳本和程序集的組合方式。</span></li>
</ul>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">另外,Asset Store已經停止接受包含UnityScript程式碼的新Package,並且移除了原來帶有UnityScript的Package。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">最後,我們提供了一個將UnityScript轉為C#程式碼的自動轉換工具,雖然已經出現有一些這樣的工具,但這些工具所用的方法我們認為並不合適。所以我們決定應用這些知識</span><span style="font-size: large;">建</span><span style="font-family: inherit; font-size: large;">構自己的解決方案。可以在<a href="https://github.com/Unity-Technologies/unityscript2csharp" target="_blank">這裡</a>下載到</span><span style="font-family: inherit; font-size: large;">UnityScript轉為C#程式碼的自動轉換工具。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>Visual Studio Code除錯工具擴充</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">對於使用Visual Studio Code作為IDE的使用者,我們開發並維護<a href="https://marketplace.visualstudio.com/items?itemName=Unity.unity-debug" target="_blank">Visual Studio Code Debugger for Unity</a>擴充,它目前作為預覽版推出。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><a href="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image24.png" imageanchor="1" style="clear: left; font-size: medium; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="491" data-original-width="600" src="https://blogs.unity3d.com/wp-content/uploads/2018/07/2018_2_image24.png" /></a></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">請注意:我們還在進行更新,使之支持在Unity的Mono運行時中調試C#並解決報告的錯誤。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<br />
<span style="color: #e69138; font-family: inherit; font-size: x-large;"><b>XR</b></span><br />
<br />
<span style="font-family: inherit; font-size: large;"><br /></span><span style="color: #e69138; font-family: inherit; font-size: large;"><b>HoloLens Holographic Remoting</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">HoloLens Holographic Remoting允許應用程式利用本地桌上型電腦的強大能力,從而在運行時卸載渲染和處理過程(processing)。我們認為我們的汽車和AEC客戶會發現這個功能非常有用。可以在<a href="https://blogs.unity3d.com/2018/05/30/create-enhanced-3d-visuals-with-holographic-emulation-in-uwp/" target="_blank">這裡</a>詳細了解如何開始使用。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="color: #e69138; font-family: inherit; font-size: large;"><b>發行說明</b></span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">Unity 2018.2還包括183項改進內容和1426個錯誤修復。請查看<a href="https://unity3d.com/unity/whats-new/unity-2018.2.0" target="_blank">發佈說明</a>來瞭解所有新功能、改進和修復的信息。</span><br />
<span style="font-family: inherit; font-size: large;"><br /></span></div>
Anonymoushttp://www.blogger.com/profile/01294153002424090924noreply@blogger.com2tag:blogger.com,1999:blog-6317841908377212626.post-51142459045457172252018-07-20T00:43:00.002-07:002018-07-20T01:20:29.417-07:00Pre-Bake 360 如何利用360轉錄技術製作無模型場景<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">本文作者 Kelvin Lo</span></div>
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">-文長-<br />想要讓手機能和PC擁有同樣的畫質水平,一直以來都是開發者追求的,但現實是礙於現下的軟硬體技術力,團隊必須要跨過相當大的技術門檻,對於一般開發者來說它就像是一座天秤,畫質與效能各自在天秤的兩頭,你必須有所取捨。<br /><br />在以前,遊戲開發不像現在有那麼多的資源能運用,往往一個畫面要透過許多技巧或各種假畫面來欺騙玩家眼睛來達到在當時技術門檻難以達到的畫面。本文主要分享的內容是如何利用Unity 2018新的拍攝API來實現高質量畫面低Draw Call的場景技巧。<br /><br />本專案採用Unity官方釋出的一個Demo叫Space Shooter,這是一個2D橫向捲軸射擊遊戲,用非常簡單太空圖片作為背景,在本文章裡,我們把背景換成了影片後,保持了原來的效能消耗,但畫面比起原來的版本要好許多。<br /><br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1AaAu8TeH8MY53HRhOGRNhAX81Q3jaeC-lxZzdgBGeSFUlq4RnfXEZlBdcA1uHsEavjNdWpknSdGrAND7ZTqQYWpsTyAS2vhDwYXsVeE0yNFSxDys0jTe1wjOu4nbDXtIIxFh6Uc6zpM/s640/Unite-Beijing-2018-Kelvin-English.002.jpeg" style="font-size: medium; text-align: center;" width="640" /><br />改變前</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim9qeaelVsUCLtri7vjIJiZ7Scr7sU_32EMqQfmnxNhwON21tEH5aAbJi34gVpNUxYwwLmMMCV35NR-SznSjqqKWRwwwec38106roYjLUibHKBWfkxexm2hwzXTsCYFQ-qFxZZKsk7wc8/s640/Unite-Beijing-2018-Kelvin-English.003.jpeg" style="font-size: medium; text-align: center;" width="640" /><br />改變後</span><br />
<span style="font-size: large;"><br />
<iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/M_HyFFwCuac" width="560"></iframe><br />影片展示<br /><br />雖然畫面變好看了,但對於玩家而言還是太過單調,所以我們做了第二次的調整,把運鏡的感覺與攝像頭有限度的轉動導入了本次的改變,效果就好很多,而且Draw Call並沒有增長太多,結果如下:<br /><br /><iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/NNEFW2FRv0A" width="560"></iframe><br />第二次改變影片展示<br /><br />之所以可以讓場景保持低消耗還能有這樣的畫面表現與互動,是因為這次採用的是360影片<br /><br /><br /><br /><iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/cec1Xp6ier0" width="560"></iframe><br />用360影片作為場景<br /><br /><br />雖然這樣的呈現非常棒,但是有很多限制的,由於是影片格式,所以佔用的硬碟空間相對的就比原來的貼圖大很多,目前Untiy的Video Player尚未支援串流,因此必須把影片先放進專案中,或是透過URL模式下載,但仍然會佔用較大的專案空間。這種用360的產品互動設計也相對困難,最重要的是這種專案鏡頭只能轉動,不能位移。<br /><br />雖然有上述的限制,但是好處就是可以讓手機產品做到接近PC的品質,而且再也不用擔心不同手機晶片會有無法執行的問題。這樣的作法當然也因為限制的關係只適合特定的遊戲類型。<br /><br />簡單來說就是鏡頭不能移動(腳不用動)的類型:<br /><br />飛機射擊遊戲遊戲<br />雲霄飛車遊戲<br />跑酷遊戲<br />上帝模式密室脫逃<br />博弈類機台</span><br />
<h2>
<span style="color: #e69138; font-size: large;">Unity 2018新的API</span></h2>
<br />
<span style="font-size: large;"><br />要把場景回拍成360可以採用Unity 2018兩個新的API:<br /><br />Camera.RenderToCubemap()可以從相機的位置對環境拍攝一張Cubemap<br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPEFSfMnuJ2K_ShZYmcxJwe1zpjTE8vwVIbtq4Ps0u7o8tF0IRYjROZ2qxIcET7f1YSeQtfUK-rqHbra3CQ9skLbQXortKO3RHHk0tZuSvMkZ10BcOEeEcp5RQ8B0Jd7XMTlYas3cLyZU/s640/Unite-Beijing-2018-Kelvin-English.011.jpeg" style="font-size: medium; text-align: center;" width="640" /><br /><br /><br />這樣的圖可以做為Cubemap貼回Skybox。<br /><br />或是用RenderTexture.ConvertToEquirect()把這張Cubemap在縫合成為一張全景圖(Panoramic images)<br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2JQTXn5IQkvvpIHJ1WdFnjcvHyrCjS8UgWxZZ64beO1EmVv0ddkvYJfT_7StODtxnXXRXJszlOSc0U3hs-u-EOj9YGyq7B7EALfkMYzYV7kanYuMivYl2UItzXcynfoG0uI4tWVCtGSw/s640/Unite-Beijing-2018-Kelvin-English.012.jpeg" style="font-size: medium; text-align: center;" width="640" /><br /><br /><br />最後會算成一張這樣的圖,把這張圖包在一顆球上從裡面看就可以還原當時的場景。<br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjevw9lDjKs8Y6LApfY6kJwKqrtn6sviPRiMKzXJnqxSRz8EoalbZW6OJ1-LJN_KwKnx4QtLxPCfQbP8i2suTlpUZJPzm9E7AhPIT6Je8CtTkhUEuBsuosYp2Y9HPfdpYfHopRpiJLU4Ag/s640/Unite-Beijing-2018-Kelvin-English.013.jpeg" style="font-size: medium; text-align: center;" width="640" /></span><br />
<span style="font-size: large;">最終結果</span><br />
<h2>
<span style="color: #e69138; font-size: large;">錄影套件:Recorder</span></h2>
<span style="font-size: large;"><span style="font-size: large;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLkCymP5wa_7TkbmllR_mXJnFVOM4TUn0Gs7Yo9i5NGtfinn_ccqHse-isGRm2tNkQ9GXhwe1_3GMNc9nIy3Lk8gBml7JVGJODES8KY_REdhIqq4QawuxRjmz6ijcVFgAoUeckw5wjOFg/s640/Unite-Beijing-2018-Kelvin-English.014.jpeg" style="font-size: medium; text-align: center;" width="640" /></span><br />
實際上這個測試專案採用了Unity官方釋出的套件Recorder,這個套件完美的採用上述兩個API並且可以和Timeline整合在一起(必須是Unity 2018或以上版本),搭配Cinemachine的Dolly track軌道安排的路徑,能依照我規劃的路線拍出我要的鏡頭。<br /><br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4ouhIOU83W6EpP_kWdNAbOTZpRLIPTj4lmn8n3qUa0GPf0lBfLVgl9E0F4A6O0iL7U0SR-wg0x7-E4wmKMPU6Xwt8LGdtJrLKFaYLbX85qc1_0krR4p6A8QM1QrDrkCBSvC2fAXv1oLk/s640/Unite-Beijing-2018-Kelvin-English.015.jpeg" style="font-size: medium; text-align: center;" width="640" /><br />Unity2018以上版本就可以看到有能錄製360的選項</span><br />
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiflHyeB_Jf1taXptpKkLEMd8gbC0Ul9JPOf8JnM6fxFB6p5FeHBjUjAAZXBb5yewHUNFxhWBDgcgjRdQLg7ac2iuTzBXEN7AOyCdIzM-aSacRkbmf_Jqlo9twyKnwIsttcVN3SeFQMyX4/s640/Unite-Beijing-2018-Kelvin-English.016.jpeg" style="font-size: medium; text-align: center;" width="640" /><br />透過Dolly Track來安排我的鏡頭動線,依照路徑錄製場景移動</span><br />
<h2>
<span style="color: #e69138; font-size: large;">Post Processing後製特效</span></h2>
<span style="font-size: large;">一般來說,在手機平台的特效都會建議能少開就少開,遮擋剔除(Occlusion Culling)或是場景LoD能多用就多用,但在這種預烘焙案例裡,反而是建議是把所有能開的特效全開,遮擋剔除和LoD能不開就不開,為的就是預烘焙的品質可以得到最好。<br /><br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKiFa0SJF1ltePJy2PPfMTUqAh2X-u7bXJtd22BG7OU-RKghoAxdZ5v5hp7Gc4GNut8L_DGmSMKF9nEFCtWKa1wFRtArmGBnYxQhZaMpDn0pBj8Oiwd9ZeNXqIor3a-ENMHJfmnEfBjC0/s640/Unite-Beijing-2018-Kelvin-English.018.jpeg" style="font-size: medium; text-align: center;" width="640" /><br />PPS OFF<br /><br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-pa_3ZRSjwPUBiD77UfZ4A_TDPCuV1CLEVp-tE9bdYmX5Z29udKogtFijDDa83SqH3DhrLNwbNmLAGtn3hK03b5M3vDlpb6Ar5iDdohFRokmc6ItcdozL3QvC7NBHCWA0v-f9MoMQ8bE/s640/Unite-Beijing-2018-Kelvin-English.019.jpeg" style="font-size: medium; text-align: center;" width="640" /><br />PPS ON<br /><br />由於PPS的特效有些是基於螢幕空間計算,因此要注意的是某些特效不適合用在這種流程,否則就會烘出下面這種有問題的圖<br /><br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBs2qhwWov0RkIfdQHCbuWDmM9CbMkjsoma3UM7Q7R705WqKK-wMWKHR_4oMKUxHcxvpxxd9KZukNMZdTo4sAJvdDpso8y_QYRxbMUL9rGE1Ay5TILErF6atanOxyCrRO6LTTzUYheDAE/s640/Unite-Beijing-2018-Kelvin-English.020.jpeg" style="font-size: medium; text-align: center;" width="640" /><br />並非所有後製特效都適合烘焙360</span><br />
<h2>
<span style="color: #e69138; font-size: large;">Masking遮擋技巧</span></h2>
<span style="font-size: large;">如果我們想讓飛機飛過一座橋底下,但一般來說這種預烘焙360圖層已經扁平化,沒辦法做到在物件底下的效果,這時我們可以另外烘焙一層遮罩來達成我們想要的效果。<br /><br /><img border="0" data-original-height="292" data-original-width="537" height="348" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7PYXyHmUD_Gla9FwhvHSxKUhYNUjG9op2QceBApBAho1SzjbbUGupcfqV7LcpHu-5gDpmCiS50lZ6eRQZ4Z-ZjSZUyttB5jce364n-nsza9U2AvVFiUSdNcNrzu6iIb5hzH3XI6g8PNk/s640/masking-v2.gif" style="font-size: medium; text-align: center;" width="640" /><br />用兩層360來製造飛機飛過橋下的效果<br /><br />Unity原生支援兩種帶有Alpha頻道的影片格式,分別是Apple的ProRes 4444和Google的Webm VP8,但在本次測試我們並沒有採用這兩種格式,主要是因為製作不易之外,多一個Alpha頻道也讓空間佔用更大。<br /><br />我們採用業內比較常見的Chorma Key,也就是把顏色去掉的綠幕作法。值得一提的是我們把石橋和橋上面的物件單獨設定為一個Layer,然後在相機裡面設定Clear Flags為Solid Color,綠色。Culling Mask設定只顯示石橋那一個Layer,結果就會只渲染石橋與上面的元件,其他部分都會只渲染成綠色。這樣的好處是完全不需要去切換物件的位置或是狀態,很簡單就能在不同圖層切換。<br /><br />最後再包回圓球並用Shader把綠色都挖掉,就會呈現出如下圖的樣子,只要渲染在飛機之上就能呈現出經過橋下的效果,由於它也是一個影片,因此可以完美無瑕的和背景影片結合再一起。<br /><br /><br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5d_V7gg-aneQE8GnxY5vhuFtUtyfs91udo8D9mLsgJDj0rM3kDP8xLF5YH8GzIESQAXk7dCcc_GWa4YGo7VaGwd4uPnuI8WvBZ6x7e09Sj3Du5achyVW-I_2F2AtvRBcQAvUHgUrzRuk/s640/Unite-Beijing-2018-Kelvin-English.024.jpeg" style="font-size: medium; text-align: center;" width="640" /><br />綠幕作法</span><br />
<h2>
<span style="color: #e69138; font-size: large;">靜態圖片的360場景</span></h2>
<span style="font-size: large;">介紹完用360影片製作的場景之後,我們來說說如何用靜態的360圖片來製作場景,利用圖片的好處是硬碟空間佔用比起影片小非常多。我們採用一個密室脫逃的遊戲類型來當作Demo展示,主角在一個有六個房間和一個走廊的建築結構裡行走,每個房間都帶有一個鏡頭,主角可以自由行走在這些房間,鏡頭會主動判斷切換。<br /><br /><iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/L0p51URY7QI" width="560"></iframe><br />Demo場景來自於ArchViz Pro No.3</span><br />
<span style="font-size: large;">你看到的畫面實際上並不存在真實的3D建築模型,而是在七個不同的360圖片之間作切換,並共用同一組碰撞結構,進而能達成這樣的效果,重點是Draw Calls還是維持非常低的20以內,很神奇對嗎?</span><br />
<h2>
<span style="color: #e69138; font-size: large;">360場景原理</span></h2>
<span style="font-size: large;"><span style="font-size: large;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtfWZGVCW-HUtJrm_8B1qB6p0osa6q4mWFS4haFiC3jPYNess2pnrHhbOwoUG675I5WFmxj9p-hHN9TQiVVjsY-ZL4VH1dKHeW_mfhitadO44NVnJqS_faCvdLce7kS57TU_Quyy2mKjo/s640/Unite-Beijing-2018-Kelvin-English.027.jpeg" style="font-size: medium; text-align: center;" width="640" /></span><br />
這場景是如何製作的呢?首先我們還是必須要有建模流程,我們從Asset Store買了一套著名的Archvizpro interior No.3室內設計模型作為本次Demo的模型,在還沒烘焙成360之前,正常播放大約Draw Calls平均是2500-3000左右。我們在場景的每一個房間安置了Cinemachine的虛擬鏡頭(下圖紅點處),然後各自用Recorder錄製了一張全景圖。<br /><br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguNudS28P4ZdkBbjWfi2CfPXT5sz__YglHMIHQpuaqqxQuDBDaOsld6pq2UkDntSEO3eLNqd-3w4ORB9S09v62iYh6No-ykuN73SlyLqGVXMSix95O59_-PoQWccNueVFVj6HjeNs6NTA/s640/Unite-Beijing-2018-Kelvin-English.028.jpeg" style="font-size: medium; text-align: center;" width="640" /><br />建模流程<br /><br />場景拍完後,我把所有的Mesh renderer元件都移除,這會讓場景只剩下Collider碰撞結構,每個房間的鏡頭位置都加上一個Sphere圓球,並把剛剛拍好的全景圖各自貼回去對應的房間,材質Shader指定為Skybox-Panoramic。由於碰撞結構沿用場景原本的Colliders,鏡頭的位置也都精準的放在對的位置,因此你會發現這時候的鏡頭看出去和碰撞結構的位置會完美的疊合一起。<br /><br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr3glNG1g1RMO3zwoRsnxK0i4vLA3pWrDdusey0jv5aBwtRVqsm56ZwPJObFaiOCifzn9QImlNP2S0dQXYydl9TcbeMNVZzfG0NNluet8LX-d08rD-h4JI5fWsitYrEG6Myx7OY8aMA5A/s640/Unite-Beijing-2018-Kelvin-English.029.jpeg" style="font-size: medium; text-align: center;" width="640" /><br />將模型材質都清除只留下碰撞結構</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsgTNekJkbWdhrDY7z51nukO8GyW3ixMki_N-o7OMbWcqORC6iA0L1VeHzXl4DT7vdB6rMVpMD-ZOrj189D5k452ixmQ0pRcy77l8YICA2ZzRFwGrJMtGUxMNdbKz7CF8zT-TQu0vkv3Q/s640/Unite-Beijing-2018-Kelvin-English.030.jpeg" style="font-size: medium; text-align: center;" width="640" /></span><br />
<span style="font-size: large;">修正簡化碰撞結構後,場景各自被圓球包覆眼睛看出去和碰撞結構可以完美疊合</span><br />
<h2>
<span style="color: #e69138; font-size: large;">Shader選擇與自訂</span></h2>
<span style="font-size: large;">Unity內建的Standard Shader並不適合用在全景圖上,Skybox-Cubemap才適合,但Cubemap不適合用在影片格式的全景圖,因此展示時我們是採用也是內建的Skybox-Panoramic的Shader,但目前這兩個內建的Shader並沒有綠幕Key的功能,為了要一個Shader有兩個功能,我從官網下載Skybox-Panoramic Shader的原始碼,然後自行加上Chroma Key或Alpha Key的功能,通常是公司的TA技術美術來負責這個工作。<br /><br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj66YtNrzmuBtgSLWG8XlXGlmyFoRw8mrePyxL9I_Ox84HIN5e5artMqs61xBLdRKshlr6MbKhylgRenws7wyIbTvt0ETOUU7cLPGVjAASv_xRhR9_GP_jjgASZJL5GVUuoS16fOiLhVsI/s640/Unite-Beijing-2018-Kelvin-English.031.jpeg" style="font-size: medium; text-align: center;" width="640" /><br />Panoramic Shader放360圖片線條才不會歪掉,為了讓一個Shader有兩個功能,稍微加工了一下Shader<br /><br /><br />有了這個Shader之後,運用和前面影片的遮罩製作方式,一樣把要留住的物件標記為獨立的Layer,然後從Camera去過濾留下要作為前景的物件拍出一張帶有Alpha的圖片或如下圖的綠底照片(依據你的Shader類型而定):</span><br />
<span style="font-size: large;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifUSZU6Plfzib8TPmqMvRnutNkdGK-WaPUIOaqSowII92JsklUlPNoVzYDqC5vO4QYGZJ1SSD6-PvWyb3MLYlyiO848QzknuljMjLgHYM_WW_bWXAgRdIIkWUiP4ggy_3_ZwKk2iUJkCY/s640/Unite-Beijing-2018-Kelvin-English.035.jpeg" style="font-size: medium; text-align: center;" width="640" /><br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTQY1YfVhTbovOeHYw0dhBPWoeCuRR4_BTsu8YQylQSpoHaiKDbqfmUlWHOVpBl8FMAkQLi8Xvqf-BZPg2Gzelu0vhaMS78oI_CXUnFH9cuROzorGSyrU3rL6vmrGdvNca36DB4DRwjk4/s640/Unite-Beijing-2018-Kelvin-English.034.jpeg" style="font-size: medium; text-align: center;" width="640" /><br />把箭頭的物件都設為一個Layer,利用鏡頭過濾掉其他的物件就不用移動物件或關閉物件來達到拍攝需求。<br /><br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4tRAs4mftXdxj8oRKxQjL2lxmDRuhps___TAI41emVLvws-Tbqq4G557AoBcXFnyoim4UQLVOtuFJoeaEAlvTSAuqRE1ZR2X3wbNZwq7zofYNhBQ6ilTPleUAd1slTyJvgDK6UcjUBkI/s640/Unite-Beijing-2018-Kelvin-English.037.jpeg" style="font-size: medium; text-align: center;" width="640" /><br />拍好的綠底Key圖片<br /><br />靜態圖片和動態影片不同的是,你可以用帶有Alpha的圖片,甚至用其他的軟體來處理圖片,Unity設好後可以很容易就把不要的地方挖掉。<br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8SzER0CF45qosMhj8S0XFVKhavZMlWR_5GUB9384JkN1eScOlGr65zeIYvQkORB1m5BihbHsUU3MAhp-2GEJb5bXCsdQCcEFHKhuucjV6EkWO4I5NK4ojkuOvZJJRGOhcUqWuXC6FXoM/s640/Unite-Beijing-2018-Kelvin-English.036.jpeg" style="font-size: medium; text-align: center;" width="640" /><br />採用Alpha的圖片設定<br /><br /><br />由於人的眼睛在固定的定點時,只有一隻眼睛所看到的畫面並無深度資訊,好比場景被渲染到畫面之後就已經扁平化了,因此不管疊了多少層,人眼都無法感知深度的變化,我們可以利用這點來疊上無限層數的前景,你可以隨心所欲的設計各種不同的遮擋區域來達到幾乎跟真實3D場景一樣的前後效果。</span><br />
<span style="font-size: large;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCrfg8L_fYOTDQUB97O3_Fim6-7ZQibifcdTMPqY-rMWW1RCyK6QPPILrtPmXQNaE0L8slvMQzjoDYAwqWXgow8ysQQ9jmrfLfKZqknomRDDsvVMwRGC0f7O5tncATN4UU7TmnoRjDCZA/s640/Unite-Beijing-2018-Kelvin-English.039.jpeg" style="font-size: medium; text-align: center;" width="640" /></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">但是要注意的是這種作法鏡頭不能移動,但可以360度的轉動</span><br />
<img border="0" data-original-height="338" data-original-width="600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOJjGhhviybd6_JqkRp5iRVyH3VLtmzxdbIucPNAHmzVKv5msFi2XpCfeUNSs1jsbXYNBJiUlYPdoUVbSrmfdCafKFR2aJh3xzxnPq2KSJ-OaC6pGARknpeDXcfOv3suRIjpTpdiZ8-dQ/s640/360+dont+move.gif" style="text-align: center;" width="640" /><br />
<span style="font-size: large;">影片鏡頭只能轉不能移動</span><br />
<br />
<br />
<span style="font-size: large;"><br /></span>
<br />
<h2>
<span style="color: #e69138; font-size: large;">渲染前後順序</span></h2>
<span style="font-size: large;">在一開始的場景你或許會覺得很奇怪,為什麼球體都那麼小?</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">由於為了要確保主角一定要在背景前面與前景後面,這個Demo在程式腳本做了一些判斷來動態的調整前景和背景的Render Queue,確保主角進入房間之後,該房間的背景和前景都會對應正確的數字,讓主角渲染在背景之前,前景之後。</span><br />
<span style="font-size: large;">這樣不管球體多小,他一定會在人物之前渲染。<br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKb6UuEJl73avJTfe7l25DCT3TR8esoVwHBV4edPe1KibiXVaPVZaLvRT8MhDOwxUhJrK6mlIO5-fGqhQtFUV8CcjxQxpH7cSrYPo8QJeE5AED_2N1vYiol4eDaozh90T5qdSW0D0zX1A/s640/Unite-Beijing-2018-Kelvin-English.040.jpeg" style="font-size: medium; text-align: center;" width="640" /><br />利用Render Queue來排序前後關係</span><br />
<h2>
<span style="color: #e69138; font-size: large;">陰影處理</span></h2>
<span style="font-size: large;">360原理是被一個圓球包覆,實際上沒有真的地板來投放陰影,因此許多AR或是這種360場景都沒有做陰影處理,實際上你可以放一片Mesh在腳上跟著主角,陰影會產生在這片臨時地板上,再透過Shader把陰影以外的部分去除掉,調低光源的強度讓陰影帶有一點半透明,就會產生不錯的影子效果。<br /><br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyLckWz301yZoNNWXFRBFVl9iFWvFUWHSuoCtlDqX3LuP3ma4TFm0RerL3tT993Ebv9KZyDR6Vqsbift6i04l949-EUXXTCJsB7qsRml9MlH9WuvlnIeEOmdGRXXXbgwBv-xKOeRMey30/s640/Unite-Beijing-2018-Kelvin-English.041.jpeg" style="font-size: medium; text-align: center;" width="640" /><br />陰影效果</span><br />
<h2>
<span style="color: #e69138; font-size: large;">窗戶投射的光源</span></h2>
<span style="font-size: large;">為了要讓主角更加融入場景,我們希望主角走過窗戶時要有光投射到身上的效果,我們可以很簡單的把這個房間的背景圖複製一份之後,用Photoshop處理剩下光照的部分並把圖片設定作為Cookie<br /><br />最重要的設定是alpha source要設定為From Gary Scale才能以圖片灰階為Alpha。<br /><br />在鏡頭的位置擺設一顆Point Light之後,指定這張Cookie並只對主角有作用,就可以達到在對的位置投射窗戶的效果到主角身上,完全不需要任何模型作為基礎。是不是出乎意料的簡單?<br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifW0hZZQSmQZpRphLWYfjiuJVhrda8d1z1Jw6gtwxGwDp91J9dFyxqrXVijTZW7_VXH8uztsJQTEqXU1Gd_Gcgle5aODnFwdo9S-huVFp1bbqzes6h0EA-rMFY1w3kMcJPj0KC6sRL_W0/s640/Unite-Beijing-2018-Kelvin-English.042.jpeg" style="font-size: medium; text-align: center;" width="640" /><br />採用Point cookie製作窗戶光影</span><br />
<h2>
<span style="color: #e69138; font-size: large;">製作鏡子反射</span></h2>
<br />
<div>
<span style="font-size: large;">還原鏡子的反射在這裡我們用了第二隻鏡頭放在鏡子位置的後面,並且只設定對Player物件有反應,因此主角走過去之後會被鏡頭捕捉到,並做成一張Render Texture貼到原本鏡子該有的位置,從畫面上看來就可以造成幾可亂真的鏡子疊合假象。</span><br />
<span style="font-size: large;"><br /></span>
<br />
<div>
<span style="font-size: large;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUdnj3p-zDzeUMSYYgEcTgs769NfDAUOJFHVjzUmSaxd75mT5bckk_k8fBaF0JzxwBbXpiP-8PhJ0JyGfxpM-nHH7etlvRL5iUBBq5imlAEkhfuHdbG0syxtH25mKXfxTb1ir8lXF7lP4/s640/Pre-Baked360-CHT.020.jpeg" style="font-size: medium; text-align: center;" width="640" /></span></div>
<div>
<span style="font-size: large;">鏡子反射</span><br />
<h2>
<span style="color: #e69138; font-size: large;">自動切換鏡頭</span></h2>
<span style="font-size: large;">這個Demo的鏡頭切換採用Cinemachine裡的Clear shot鏡頭功能,他可以指定一個鏡頭群,並智能的判斷該切換到哪一個房間鏡頭,完全符合這個專案需求。<br /><br /><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVQqn3XXERFYNDm9dUsTYdnigEbdJof_hMzJN7ytTIbcIc94N1hs8ternVkK7N0FFmHanc9xO9du4OKGdnP21Vz3D-u3Zvro97o9tK4n23E2W1uuyflMFMMUGh78HMthw1Llv0td58yZ0/s640/Unite-Beijing-2018-Kelvin-English.044.jpeg" style="font-size: medium; text-align: center;" width="640" /><br />利用Cinemachine裡的Clear shot製作自動切換鏡頭</span><br />
<h2>
<span style="color: #e69138; font-size: large;"><br /></span></h2>
<h2>
<span style="color: #e69138; font-size: large;">互動製作</span></h2>
</div>
<div>
<span style="font-size: large;">從鏡子的製作你可以發現到,如果你有一些想要互動的物件,你仍然可以把他們留在場景裡不要刪除,這些物件在鏡頭觀看的時候還是會完美的和360疊合一起毫無維和,然後用一般的開發流程來幫他們加上互動要素。</span></div>
<div>
<span style="font-size: large;"><img border="0" data-original-height="338" data-original-width="600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhy59WVP4xr1LPci7ZkWoi5_wuJ23Xka6p3zKxLV7Jn-zhFSbrKHWXPWXvbX7zI7ylqA1Ios9BQauP-1gzePnR_KQ2WRtZaYiacfG5iPY_gzBczIEbIi-_ycp9UhUNcRSKDlf5gWiL0J1A/s640/slot360.gif" style="font-size: medium; text-align: center;" width="640" /></span></div>
<div>
<span style="font-size: large;">360場景留下一台可以互動的拉霸機模型物件</span></div>
<div>
<span style="font-size: large;"><br /></span>
<br />
<h2>
<span style="color: #e69138; font-size: large;">總結</span></h2>
</div>
<div>
<span style="font-size: large;">這樣的專案有幾個問題點:</span></div>
<div>
<br />
<ul>
<li><span style="font-size: large;">對於影片格式的360佔用空間要注意</span></li>
<li><span style="font-size: large;">互動製作會因為場景扁平化之後變得比較不容易</span></li>
<li><span style="font-size: large;">鏡頭必須動的專案類型不適合</span></li>
</ul>
</div>
<div>
<span style="font-size: large;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYmLKcd0mQrPucapYJhR7EjI5t3B9TgGRtC_drVrAb6cUB_5S70SRT9U-N4tjhc2xlrZIoTH4Gqmq36uiOToVXw0x6MhqMGS8JyYuONX1wiA_ueOSDyCbkNE6fPhmMgzogvDYknNdEtpo/s640/Unite-Beijing-2018-Kelvin-English.007.jpeg" style="font-size: medium; text-align: center;" width="640" /><br /><br />這種專案的好處有:</span></div>
<div>
<br />
<ul>
<li><span style="font-size: large;">不管模型多複雜,效能都很好</span></li>
<li><span style="font-size: large;">不管什麼奇怪的設備,能播影片的都能跑</span></li>
<li><span style="font-size: large;">專案分為兩個一個用來錄製360, 一個作為產品專案會很小</span></li>
</ul>
</div>
<div>
<span style="font-size: large;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzLVjWRXgbWx2N1MzsGLipSxSVpx1eeeYY9GZD6HYVzWDJAhxCteRYuTvteONTSU6Y130SiAh-E0lj4nOiY3dAE1LBFqW85k7o3Yv8P-NquwNCMAeaLEIy4m1gFo0Kf4__xueFer-ti-s/s640/Unite-Beijing-2018-Kelvin-English.008.jpeg" style="font-size: medium; text-align: center;" width="640" /><br /><br />其他注意事項:</span></div>
<div>
<br />
<ul>
<li><span style="font-size: large;">錄製360的Unity必須要2018以上,產品專案則不需要。</span></li>
<li><span style="font-size: large;">LoD, OC不要開</span></li>
<li><span style="font-size: large;">PPS 能開就開</span></li>
<li><span style="font-size: large;">帶有文字的場景烘完後從內部看字會相反,這時可以從影片來源先水平翻轉一次。</span></li>
<li><span style="font-size: large;">強烈建議4K品質效果會比較好</span></li>
</ul>
</div>
<div>
<span style="font-size: large;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1vqF8SncieSUCzJs1nmcdP6R6a7BkdMqVn0JMO3NK7_I7ka3sEytOvClhRThXWbiidtvCHRLiBmhYfTpWpAye2nZ5M0eb-H7EgjIig5QzrZXOZfKOcpgo0jnTMmcZtvyn1rWzthz5IOU/s640/Unite-Beijing-2018-Kelvin-English.045.jpeg" style="font-size: medium; text-align: center;" width="640" /><br /><br /><br /><span style="color: #e69138;">用攝影機拍攝的360是否也能這樣處理?</span><br />或許你有一個疑問,如果是用360鏡頭拍攝的是否也能夠做同樣的處理?答案是可行的,但它的處理方式又會有很多地方需要注意。以下是一段演講錄影,對於本次內容有問題的也可以參考這段影片。希望這些說明能給你帶來一些啟示。</span></div>
</div>
</div>
<div>
<span style="font-size: large;"><br /><iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/egqqyUxkM5M" width="560"></iframe></span></div>
<div>
<span style="font-size: large;"><br /></span></div>
Unity Taiwanhttp://www.blogger.com/profile/05195645646153478011noreply@blogger.com0tag:blogger.com,1999:blog-6317841908377212626.post-83655458473144032322018-07-19T07:56:00.001-07:002018-07-19T07:56:36.655-07:00Unity 新發佈方式TECH和LTS版本介紹<span style="font-size: large;">在今年GDC我們宣佈了Unity全新的版本發佈計劃。包含:Unity TECH版和Unity LTS版。 Unity TECH版每年將會有三次主要更新,主要的新功能都會在這三個版出現,Unity LTS版將會從每年的TECH版最後一版開始,持續支援二年的長期維護。</span><span style="font-size: large;">例如:Unity 2017 LTS 意思就是2017最後一版的長期維護版本。</span><br />
<div>
<span style="font-size: large;"><br /></span>
<div>
<span style="font-size: large;">Unity TECH版和Unity LTS版將代表目前Unity版本發佈方式的重大轉變,我們可以用幾個方面來討論: </span></div>
<div>
<span style="font-size: large;"><br />每年的Unity TECH第一版將在春季開始,後續版本會在夏季和秋季推出。今年會從Unity 2018.1開始。 <br /> <br />Bug修復的頻率:</span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
<span style="font-size: large;">Unity TECH版依舊每周都會進行bug修復與更新到小版本,而Unity LTS版本的Bug修復將會每二週一次進行整理與發佈。<br /> <br />從補丁到更新:在每周補丁中,去掉了.p#後綴,我們認為新的更新測試會比較適合所有人使用。<br /> </span><br />
<h2>
<span style="color: #e69138; font-size: large;">全新版本的發佈方式</span></h2>
<span style="font-size: large;"><br />首個Unity LTS版本將是Unity 2017.4,也就是Unity 2017.3最新更新版本。版本號的改變標誌著新的LTS週期的開始。所以xxxx.1、xxxx.2和xxxx.3都是TECH版本,而xxxx.4則是LTS版。 <br /><br />TECH和LTS版本的定期更新會有連續的版本號。例如:Unity 2017.3.0之後會是Unity 2017.3.1、Unity 2017.3.2、Unity 2017.3.3,以此類推。 <br /><br />下方的圖表顯示了最新的流程的發佈方式,藍色方塊代表Unity TECH版本,淡綠色方塊代表Unity LTS版本的開始。 </span><img border="0" data-original-height="321" data-original-width="800" src="https://blogs.unity3d.com/wp-content/uploads/2018/04/tech_lts-flowchart-horizontal.png" style="text-align: center;" /><span style="font-size: large;"><br /> </span><br />
<h2>
<span style="color: #e69138; font-size: large;">常見問題解答 </span></h2>
<span style="font-size: large;"><br /><span style="color: #e69138;">Unity TECH和LTS版本的區別是什麼?</span> <br />Unity TECH版本主要發佈最新的功能,而Unity LTS版本則不會有任何新功能、API變更或改進。LTS版本主要會用來處理穩定度,測試和修復來自開發者反饋的問題,以及針對主機的SDK/XDK,或者任何會對大多數人發佈遊戲產生阻礙的重大改變。<br /><br /><span style="color: #e69138;">Unity TECH和LTS版本的使用者區別?</span> <br />Unity TECH版本適合想要瞭解或者使用最新版Unity新功能的開發者。Unity LTS版本適合希望用在接近或已發佈遊戲想保持穩定度的開發者。<br /><br /><span style="color: #e69138;">為什麼Unity要改變當前的版本發佈方式?</span> <br />將更新發佈分為Unity TECH和Unity LTS 二個不同版本,我們才能根據客戶的需要提供最有效的服務。<br />如果開發團隊處在製作早期或中期想要嘗試新功能,那麼可以選擇Unity TECH版本。 對於不需要新功能,並到了製作後期或是在運營已上線遊戲的開發者,Unity LTS版本能提供比較良好的穩定度。 <br /><br /><span style="color: #e69138;">這些改變背後的主要想法是什麼?</span> <br />在改變發佈計劃後,我們只需要支援二個更新流程。其中Unity LTS版本將受到嚴格控制,它只會加入錯誤修復,這樣一來各位的開發效率也會變好。 <br /><br /><span style="color: #e69138;">Unity TECH和LTS版本之間的要聯繫?</span> <br />當一個新的Unity TECH版本上線時,例如:Unity 2019.1,前一個版本Unity 2018.3將成為LTS版本,並改為新的版本號,即Unity 2018.4。 <br /><br /><span style="color: #e69138;">Unity TECH版本多長時間會更新一次?</span> <br />Unity TECH版本將會每周進行更新。大部分開發工作將注重盡快穩定和改進此版本。 <br /><br /><span style="color: #e69138;">Unity LTS版本將會支援多久?</span> <br />從發佈起,每個LTS版將會支援二年時間。 <br /><br /><span style="color: #e69138;">會有針對Unity TECH和LTS版本的更新?</span> <br />我們將每周為Unity TECH版本提供更新。然而對於當前TECH版本的更新會在下個TECH版本發佈時停止。例如:當Unity 2018.2發佈後,Unity 2018.1的每周更新將會停止,而當Unity 2018.3上線後,對Unity 2018.2的支持將會停止。 <br /><br />Unity LTS版本的更新頻率較低,每二周更新一次。更新會持續二年,版本號會變為:年份.4.1、年份.4.2…以此類推。 <br /><br /><span style="color: #e69138;">Unity TECH和LTS版本的更新會有版本號變更嗎?</span> <br />Unity TECH和Unity LTS版本的所有更新都將帶有.f,因為它們不是補丁程序,而是經過全面測試的更新。 </span></div>
</div>
Unity Taiwanhttp://www.blogger.com/profile/05195645646153478011noreply@blogger.com0tag:blogger.com,1999:blog-6317841908377212626.post-58343485938803348142018-03-05T03:27:00.001-08:002018-03-05T03:27:31.607-08:00強力設計工具ProBuilder加入Unity大家庭<span style="font-size: large;">作者:JC Cimetiere <a href="https://blogs.unity3d.com/2018/02/15/probuilder-joins-unity-offering-integrated-in-editor-advanced-level-design/" target="_blank">原文</a></span><br />
<div>
<span style="font-size: large;">潤稿:Kelvin Lo</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<span style="font-size: large;"><br /><br /><b>我們很高興宣布Unity的編輯器增加了一個強大的新功能:ProBuilder,它和它的開發者Gabriel Williams和Karl Henkel一起加入了Unity大家庭!</b><br /><br />Gabriel和Karl長久以來一直致力於創作方便的開發工具,以便他們能在Unity編輯器中直接實現簡單的關卡設計。他們的作品包含ProBuilder、ProGrids、Polybrush等等。</span><br />
<div>
<span style="font-size: large;"><br />在Unity 2017中,我們增加了Timeline,Cinemachine,新的FBX Exporter等強大的工具,我們會繼續努力幫助美術或企劃和開發人員更有效率的創造與協作。<br /><br />今天開始,ProBuilder和Polybrush正是成為Unity的一份子。代表所有Unity版本(Personal,Plus,Pro和Enterprise)都可以免費使用。</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<h2>
<span style="color: #e69138; font-size: large;">ProBuilder和Polybrush概述</span></h2>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">ProBuilder是一個3D建模和關卡設計的工具,針對構建簡單的幾何模型有很多優化,也能夠根據需要對模型進行詳細的編輯和展開UV貼圖。<br /><br />ProBuilder可幫你快速建立結構、複雜地形特徵、車輛和武器的原型,或製作自訂的碰撞體或觸發區域或導航網格。<br /><br />這裡有幾個主要特點:</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">拉伸和插入</span></div>
<div>
<img border="0" data-original-height="360" data-original-width="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/02/Extrude-and-Inset-GIF.gif" style="text-align: center;" /></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">可程式化的形狀</span></div>
<div>
<img border="0" data-original-height="360" data-original-width="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/02/Stair-Shape-GIF.gif" style="text-align: center;" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">場景UV控制</span></div>
<div class="separator" style="clear: both; text-align: left;">
<img border="0" data-original-height="360" data-original-width="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/02/In-Scene-UV-Controls-GIF.gif" style="text-align: center;" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">無限制編輯形狀</span></div>
<div class="separator" style="clear: both; text-align: left;">
<img border="0" data-original-height="360" data-original-width="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/02/Polyshape-GIF.gif" style="text-align: center;" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
<span style="font-size: large;">ProBuilder從2012年發表以來就廣受開發者的好評,可以看看這段影片有包含Tunic, Tinertia, Superhot, Re-publique, Strafe等等都有用到ProBuilder。</span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<span style="font-size: large;"><br />
<iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/L3ML0EZqh6s" width="560"></iframe></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">我們可以從這段影片了解ProBuilder的基礎功能。</span><br />
<span style="font-size: large;"><br /><iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/HUeQeSB45PI" width="560"></iframe></span>
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span><span style="font-size: large;">想要了解更多相關資料也可以查看ProBuilder的<a href="http://procore3d.github.io/probuilder2/upgrading/overview/" target="_blank">安裝手冊</a>(英文)</span>
<span style="font-size: large;"><br /></span><br />
<span style="font-size: large;">與更多的教學系列(英文)</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"></span><br />
<ul style="box-sizing: border-box; cursor: pointer; margin: 0px; outline: none; padding: 0px; word-break: break-word;">
<li style="color: #05a7bd; font-family: Roboto, sans-serif; font-size: 1.25em;"><a href="https://youtu.be/CBa_opm3_GM" style="box-sizing: border-box; color: #05a7bd; cursor: pointer; font-size: 1.25em; margin: 0px; outline: none; padding: 0px; word-break: break-word;">Building Structures with Interior and Exterior</a></li>
<li style="color: #05a7bd; font-family: Roboto, sans-serif; font-size: 1.25em;"><a href="https://youtu.be/dYBOBgfcTgY" style="box-sizing: border-box; color: #00bcd4; cursor: pointer; font-size: 1.25em; margin: 0px; outline: none; padding: 0px; text-decoration-line: none; word-break: break-word;">Greyboxing an Interior FPS Level</a></li>
<li style="color: #05a7bd; font-family: Roboto, sans-serif; font-size: 1.25em;"><a href="https://youtu.be/bigj13SU1rs" style="box-sizing: border-box; color: #00bcd4; cursor: pointer; font-size: 1.25em; margin: 0px; outline: none; padding: 0px; text-decoration-line: none; word-break: break-word;">Simple Texturing with AutoUVs</a></li>
</ul>
<a href="https://youtu.be/d3_2h4cN4cY" style="box-sizing: border-box; color: #00bcd4; cursor: pointer; font-family: Roboto, sans-serif; font-size: 1.25em; margin: 0px; outline: none; padding: 0px; text-decoration-line: none; word-break: break-word;">Advanced Texturing with Manual UV</a><br /><br /><br /><br /><br /><h2>
<span style="color: #e69138; font-size: large;">Polybrush</span></h2>
<span style="font-size: large;"><br />Polybrush可以幫你混合貼圖和顏色,直接在Unity編輯器上加工網格。雖然Polybrush現在仍在測試階段,但它現在的版本已經允許使用自訂畫筆來分配世界中的物體。<br /><br />混合貼圖</span></div>
<div>
<img border="0" data-original-height="360" data-original-width="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/02/Polybrush-GIF-Texture.gif" style="text-align: center;" /><span style="font-size: large;"><br /><br />繪製頂點顏色</span></div>
<div>
<img border="0" data-original-height="360" data-original-width="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/02/Polybrush-GIF-Color.gif" style="text-align: center;" /><span style="font-size: large;"><br /><br />分配細節</span></div>
<div>
<span style="font-size: large;"><br /></span><img border="0" data-original-height="360" data-original-width="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/02/Polybrush-GIF-Scatter.gif" style="text-align: center;" /><span style="font-size: large;"><br /><br /><br />雕刻模型</span></div>
<div>
<span style="font-size: large;"><br /></span><img border="0" data-original-height="360" data-original-width="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/02/Polybrush-GIF-Sculpt.gif" style="text-align: center;" /><span style="font-size: large;"><br /><br />想了解更多關於Polybrush可以閱讀<a href="https://www.youtube.com/watch?v=JQyntL-Z5bM&feature=youtu.be" target="_blank">安裝文件</a>(英文)<br /><br /></span><h2>
<span style="color: #e69138; font-size: large;">ProGrids</span></h2>
</div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">ProGrids提供可視化和功能性的網格,它在三個軸向均可進行吸附操作。ProGrids可以提高關卡製作的速度和品質,關卡設計將會變得非常快速與精準。尤其針對模組化的關卡設計更是方便。<a href="https://youtu.be/1G-0f5m1_lw" target="_blank">參考文件</a>(英文)<br /><br />混用ProBuilder, Polybrush和ProGrid就是一個完整的關卡編輯方案,可以更快更精確地製作模型。你仍然可以透過其他的建模工具(Maya)來建模,在Unity裡面進行簡單的編修。</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<h2>
<span style="color: #e69138; font-size: large;">如何獲得</span></h2>
<span style="font-size: large;">如同前面所提,現在這個工具針對所有Unity開發者都是免費。它將會被整合到Unity 2018裡面,未來你可以透過新的包裝管理器來安裝它。<br /><br /><br />1.進入Unity<br />2.功能表選Window->Package Manager<br />3.點All, 然後選ProBuilder, install安裝</span></div>
<div>
<img border="0" data-original-height="487" data-original-width="800" height="389" src="https://blogs.unity3d.com/wp-content/uploads/2018/02/PackageManagerProbuilder.png" style="text-align: center;" width="640" /><br /><div class="separator" style="clear: both; text-align: center;">
<br /></div>
</div>
<div>
<span style="font-size: large;">如果您是Unity 2017或5.6的開發者,可以透過Asset Store下載Probuilder,要注意的是Asset Store上的ProBuilder將不會再更新新功能,未來將會以整合到Unity 2018的版本為主。</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">Polybrush仍在測試階段,新的版本仍然可以從Asset Store上下載,等到功能成熟之後,我們會計畫把Polybrush和ProGrid直接整合到Unity裡。</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">如果您已經購買這些套件,應該會收到通知。原有的套件仍然能存取,但未來將不在更新。</span></div>
<div>
<span style="font-size: large;">任何問題也可以到我們的<a href="https://forum.unity.com/threads/probuilder-integration.517727/#post-3392969" target="_blank">論壇串</a>討論</span></div>
<div>
<br /></div>
Unity Taiwanhttp://www.blogger.com/profile/05195645646153478011noreply@blogger.com0tag:blogger.com,1999:blog-6317841908377212626.post-65984459689332999832018-02-22T00:38:00.000-08:002018-02-22T00:48:01.659-08:00ADAM裡的渲染與著色:第三章<span style="font-size: large;">作者:John Parsaie, 江毅冰 <a href="https://blogs.unity3d.com/2018/01/24/rendering-and-shading-in-adam-episode-3/" target="_blank">原文</a></span><br />
<div>
<span style="font-size: large;">潤稿:Kelvin<br /><br /><br />你看過了ADAM: The Mirror 和 ADAM: Episode 3 影片了嗎?這兩部短片獲得了超過百萬的點閱率,很多人都想知道由著名電影"第九區"導演Neill Blomkamp和他的團隊Oats Studios 如何使用Unity 來製作出這樣酷炫的效果。你可以閱讀我們一系列的文章。</span><span style="font-size: large;"><br /><a href="https://blogs.unity3d.com/2017/12/07/lighting-tips-tricks-in-the-adam-films/" target="_blank">光照</a></span></div>
<div>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/2017/12/04/adam-the-evolution-of-alembic-support-in-unity/" target="_blank">Alembic支援</a></span></div>
<div>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/2017/12/05/they-are-what-they-wear-clothing-simulation-in-adam/" target="_blank">衣服模擬</a></span></div>
<div>
<span style="font-size: large;"><a href="https://blogs.unity3d.com/2017/12/06/adam-timeline/" target="_blank">Timeline</a></span></div>
<div>
<span style="font-size: large;"> <br /><br />本文作者由Made with Unity團隊的軟體工程師John Parsaie與Unity技術美術總監江毅冰共同完成。John Parsaie在ADAM電影中負責像是表面散射、透明後期處理、Alembic圖形整合等等。</span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
<span style="font-size: large;">江毅冰,在加入Unity之前就職於頑皮狗、皮斯克等知名公司裡的AAA產品團隊,參與製作的作品包括Uncharted 4(頑皮狗)、怪獸電力公司和汽車總動員2等(Pixar)和無敵破壞王(Disney)等作品製作。<br /><br /> </span><br />
<h2>
<span style="color: #e69138; font-size: large;">佈景:按幀分解</span></h2>
<span style="font-size: large;"><br />在即時ADAM系列電影中所呈現的令人震撼的效果,是在Unity中用大量元件組裝而成的。在這篇文章中,我們會著重說明Oats Studios是怎麼實現這些效果的。所以如果你想瞭解在某一幀這些美術如何使用它們的自訂Shader,請繼續閱讀下去。<br /><br /> </span><img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blogs.unity3d.com/wp-content/uploads/2018/01/blogimage1.png" style="text-align: center;" width="640" /><br />
本文所分析的ADAM 3中的一幀畫面<br />
<br />
<br />
<br />
<span style="font-size: large;">本文中我們將用RenderDoc打開ADAM 3的一幀畫面,為你剖析視覺效果背後的一些內幕。</span><br />
<br />
<br />
<span style="font-size: large;"><a href="https://renderdoc.org/" target="_blank">RenderDoc</a>是個十分實用的幀分析和圖形除錯工具。RenderDoc已經與Unity的編輯器整合。想瞭解更多關於RenderDoc與Unity的資訊請到<a href="https://docs.unity3d.com/Manual/RenderDocIntegration.html" target="_blank">這裡</a>。</span><br />
<br />
<br />
<br />
<h2>
<span style="color: #e69138; font-size: large;">渲染G-Buffer</span></h2>
<br />
<span style="font-size: large;">ADAM 2與ADAM 3都是使用Unity 2017.1的Deferred渲染路徑來渲染的。這代表所有不透明的物件都會被渲染到一組緩衝區中,而這些緩衝區就被稱為G-Buffer或Geometry Buffer。G-Buffer包含了渲染管線下實現光照計算所需的所有資料。</span><br />
<br />
<img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blogs.unity3d.com/wp-content/uploads/2018/01/blogimage2.png" style="text-align: center;" width="640" /><br />
左下方的G-Buffer和 alpha通道<br />
<br />
<br />
<br />
<span style="font-size: large;">透過設定多個渲染目標(MRT),對顯示的每個不透明物件,都可以在相同的draw call中將以下資料寫入到G-Buffer的所有四個組成部分中。</span><br />
<br />
<span style="font-size: large;">1.Diffuse Color RGB/Occlusion A(ARGB32)</span><br />
<span style="font-size: large;">幾何體的“固有顏色”和烘焙環境遮蔽。</span><br />
<br />
<span style="font-size: large;">2. Specular Color RGB/Smoothness A(ARGB32)</span><br />
<span style="font-size: large;">Unity支援鏡面和金屬PBR工作流程。但在內部,這二個工作流程的輸入內容最後寫入緩衝區的資訊是相同的。這是為了統一相同著色模型下的PBR輸入,後面將會用到這個模型。</span><br />
<br />
<br />
<span style="font-size: large;">3. World Normal RGB/Unused A (ARGB2101010)</span><br />
<span style="font-size: large;">更高精度的緩衝區會用來存儲每個圖元所處的世界空間法線或表面的朝向。這個資訊對於計算光源照度至關重要。</span><br />
<br />
<br />
<span style="font-size: large;">4. Emission, Ambient RGB / Unused A(ARGBHalf)</span><br />
<span style="font-size: large;">自發光和環境GI被渲染到這個緩衝區中。之後,這個緩衝區也在管線後期中被用來收集反射和累積光照。根據使用者設定,此緩衝區設定為LDR或HDR格式。ADAM就是用HDR光照渲染的。</span><br />
<br />
<br />
<b><span style="font-size: large;">注意:在管線中,使用自訂著色模型的透明和不透明物品的處理方式不同。</span></b><br />
<br />
<br />
<h2>
<span style="color: #e69138; font-size: large;">深度-模板緩衝區(The depth-stencil buffer)</span></h2>
<br />
<span style="font-size: large;">在渲染G-Buffer時,場景的深度也被渲染到相應的特殊緩衝區中。對於即時圖形來說,深度資訊的存儲十分重要,它對我們在將場景投影到二維空間的過程中或之後保持物件的三維感至關重要。重建圖元的世界位置也很必要,這稍後在延遲著色中會用到。更重要的是,這是我們耳熟能詳且深受喜愛的即時高級後期處理特效的關鍵組成部分。</span><br />
<br />
<img border="0" data-original-height="225" data-original-width="800" height="180" src="https://blogs.unity3d.com/wp-content/uploads/2018/01/DepthStencil.png" style="text-align: center;" width="640" /><br />
深度緩衝區(左)和 模板緩衝區(右)<br />
<br />
<br />
<span style="font-size: large;">模板緩衝區與深度緩衝區共用著相同的資源。在根據圖元受到渲染的內容分類圖元時,模板緩衝區尤其有用。我們在之後還可以使用這些資訊來區分圖元,並選擇要怎樣處理它們。在Unity中模板緩衝區被用作光剔除遮罩。在ADAM中,它也被用來標記呈現出次表面散射(SSS)的對象。</span><br />
<br />
<br />
<br />
<h2>
<span style="color: #e69138; font-size: large;">次表面配置緩衝區(Subsurface profile buffer)</span></h2>
<br />
<span style="font-size: large;">對於次表面散射,渲染器也會在G-Buffer產生期間將索引寫入額外的緩衝區,該緩衝區之後會用於查找來自次表面配置資訊的重要資料。這個緩衝區還存儲一個表示散射發生次數的標量。</span><br />
<br />
<img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blogs.unity3d.com/wp-content/uploads/2018/01/blogimage4.png" style="text-align: center;" width="640" /><br />
次表面配置緩衝區:(R)配置索引 (G)散射半徑<br />
<br />
<br />
<br />
<span style="font-size: large;">如上所述,這些重要資料來自使用者在編輯器建立的次表面漫反射配置資訊。這些使用者自訂的配置資訊決定了漫射光在高度半透明介質中的散射方式。</span><br />
<br />
<img border="0" data-original-height="528" data-original-width="360" src="https://blogs.unity3d.com/wp-content/uploads/2018/01/SSS-Profile.png" style="text-align: center;" /><br />
<span style="font-size: large;">次表面漫反射配置資訊</span><br />
<br />
<br />
<span style="font-size: large;">我們也可以通過這些設定資訊來控制正向散射和透射率。例如:光線在穿透耳朵和鼻孔時的效果。所有這些資訊都會發送到GPU並在之後讀取。</span><br />
<br />
<br />
<br />
<h2>
<span style="color: #e69138; font-size: large;">下一步</span></h2>
<br />
<span style="font-size: large;">G-Buffer完成渲染後,複雜的場景幾何計算就會被移到少數幾個緩衝區上,在之後進行計算。這樣做能使以後所有計算的效能消耗較為固定和可預測,這是因為光照計算在這時對於場景幾何複雜性來說,完全是未知的。然而,在主要光照計算之前,還有一些關鍵的預備性步驟,這些步驟將在下面進行探討。</span><br />
<br />
<br />
<h2>
<span style="color: #e69138; font-size: large;">環境反射光效果</span></h2>
<br />
<span style="font-size: large;">透過使用G-Buffer中創建的資料,我們會對天空盒立方體貼圖運行計算以獲取環境反射資訊。這個計算將粗糙度、法線、視角方向、鏡面反射顏色等資訊考慮在內,並且通過一系列的方程來從環境中產生符合物理規律的鏡面反射效果。這些反射效果會被添加到自發光HDR緩衝區中。</span><br />
<br />
<br />
<img border="0" data-original-height="263" data-original-width="800" height="210" src="https://blogs.unity3d.com/wp-content/uploads/2018/01/EnvironmentReflections.png" style="text-align: center;" width="640" /><br />
環境反射光<br />
<br />
<br />
<br />
<br />
<br />
<h2>
<span style="color: #e69138; font-size: large;">陰影</span></h2>
<br />
<span style="font-size: large;">到了這一步,幾乎所有渲染器所需的初步工作都已經完成。於是,渲染器進入到延遲光照處理階段,由陰影效果處理開始。</span><br />
<br />
<span style="font-size: large;">Unity在其定向光處理上使用了一種眾所周知的技術,名為級聯陰影貼圖(CSM)。這個技術的原理很簡單:距離越遠,我們眼睛能看到的細節就越少,既然如此,為什麼要把大量精力放在對電腦圖形學中的遠處細節的計算上呢? CSM便是基於這個事實,根據物體與攝像機的距離分佈或級聯陰影圖的解析度。</span><br />
<br />
<img border="0" data-original-height="378" data-original-width="800" height="302" src="https://blogs.unity3d.com/wp-content/uploads/2018/01/CascadedSpotlightShadowMap.png" style="text-align: center;" width="640" /><br />
級聯陰影貼圖(左)和聚光陰影貼圖(右)<br />
<br />
<br />
<br />
<span style="font-size: large;">在這個鏡頭中,定向光CSM實際上只用在環境幾何體上,而畫面中二名角色的光照則由一組聚光燈處理!有一些鏡頭是這樣處理的,因為它給了Oats Studios的燈光師更多的靈活性,從而能突出鏡頭中的關鍵視覺效果。</span><br />
<br />
<br />
<img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blogs.unity3d.com/wp-content/uploads/2018/01/blogimage7.png" style="text-align: center;" width="640" /><br />
螢幕空間陰影<br />
<br />
<br />
<br />
<span style="font-size: large;">我們還使用了一個名為“螢幕空間陰影(screen-space shadows)”的技術,有時也稱為“接觸陰影”,它通過深度緩衝區中的光線步進來提供細節豐富的陰影。這種技術尤其重要,因為它能夠捕捉攝影測量法構建的環境中顆粒狀陰影的細節,這些細節有時甚至是CSM都無法捕捉到的。螢幕空間陰影和Unity的陰影貼圖技術被一同用來“填補”漏光。</span><br />
<br />
<br />
<br />
<h2>
<span style="color: #e69138; font-size: large;">延遲著色</span></h2>
<br />
<span style="font-size: large;">在以上步驟完成後,我們就有了足夠的資訊來對光照場景進行逐圖元重構。</span><br />
<br />
<br />
<img border="0" data-original-height="299" data-original-width="800" height="238" src="https://blogs.unity3d.com/wp-content/uploads/2018/01/DeferredShadingLighting.png" style="text-align: center;" width="640" /><br />
一次延遲光照處理中讀取的所有資訊<br />
<br />
<br />
<span style="font-size: large;">延遲光照處理過程將針對視圖中的所有光照進行處理,每次都會將光照累積到HDR緩衝區。G-Buffer的內容是根據當前光照的資訊(包括陰影貼圖)來計算的。</span><br />
<br />
<br />
<span style="font-size: large;">首先,從深度緩衝區重建圖元的世界空間位置,該位置後續被用於計算從表面點到眼睛的方向。這對確定依賴視角的鏡面反射效果來說十分重要。陰影和其它光照資訊(例如剪影等)也會被彙集成一個標量,用以計算衰減後的最終效果。接下來,所有表面資料都從G-Buffer中取出。最後,所有資訊都被送到我們的著色模型,這是一個基於物理的<a href="https://en.wikipedia.org/wiki/Bidirectional_reflectance_distribution_function" target="_blank">微縮焦雙向反射分佈函數</a>(BRDF),進行最後的著色處理。</span><br />
<br />
<br />
<img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blogs.unity3d.com/wp-content/uploads/2018/01/blogimage9.png" style="text-align: center;" width="640" /><br />
所有最終光照都會累積到不透明物體上,次表面物件除外<br />
<br />
<br />
<br />
<span style="font-size: large;">在這時,我們已經有了一個近乎完全著色的場景,但是那些白色的輪廓怎麼辦?如果你還記得的話,那些是我們在範本緩衝器中標記的用於次表面散射的圖元,它們的著色處理尚未完成。</span><br />
<br />
<br />
<br />
<h2>
<span style="color: #e69138; font-size: large;">次表面散射</span></h2>
<br />
<span style="font-size: large;">前面有簡單地提到,次表面散射是漫反射光的散射和再現,多見於半透明介質中最典型的例子之一是皮膚。而且在所有非金屬中都會有不同程度的次表面散射,只不過多數時候我們並不會注意到。</span><br />
<br />
<span style="font-size: large;">但是在即時電腦圖形下,次表面散射究竟代表著什麼呢?</span><br />
<br />
<img border="0" data-original-height="206" data-original-width="800" height="164" src="https://blogs.unity3d.com/wp-content/uploads/2018/01/ScatteringDistances.png" style="text-align: center;" width="640" /><br />
散射距離比圖元小(左) 散射距離比圖元大(右)<br />
<br />
<br />
<span style="font-size: large;">這個問題的答案其實引出了一個更大的問題。上面的二個圖都包含一個代表圖元的綠色圓圈,以及位於其中心的入射光。藍色箭頭表示漫反射光線,橙色箭頭表示鏡面反射光線。左圖顯示所有漫射光線會在材質中散射,並在相同圖元的邊界內重新出現。由於幾乎所有要渲染的材質都會出現這種情況,我們可以假設漫射光是從入射點發出的。</span><br />
<br />
<span style="font-size: large;">當渲染的材質對漫反射光線散射過多時,會出現問題,光線會重新出現在圖元的邊界之外,如右圖所示。之前的假設在這樣的情況下毫無説明,我們需要探索更先進的技術來解決這個問題。</span><br />
<br />
<br />
<img border="0" data-original-height="224" data-original-width="800" height="178" src="https://blogs.unity3d.com/wp-content/uploads/2018/01/Diffuse-Specular.png" style="text-align: center;" width="640" /><br />
漫反射光(左) 鏡面反射光(右)<br />
<br />
<br />
<br />
<span style="font-size: large;">遵循當前最先進的即時次表面散射技術,我們對光照應用了特殊的螢幕空間模糊。但是在此之前,我們必須確保將漫反射和鏡面反射光照分離到各自的緩衝區中。為什麼要這樣做呢?回顧一下這些圖表,你會發現鏡面反射光會從表面立即反射,不參與任何次表面現象。所以我們至少應該在執行次表面光照估算之前,將它與漫反射光照分離。</span><br />
<br />
<br />
<span style="font-size: large;">在下圖中,你可以更清楚地看到二種光照的不同效果。請注意,所有的鏡面反射光都已與漫反射光完全分離,從而可以在完成左側的輻射/漫反射緩衝區所需的工作的同時,不用擔心損壞鏡面反射的高頻細節的完整性。</span><br />
<br />
<br />
<img border="0" data-original-height="356" data-original-width="800" height="284" src="https://blogs.unity3d.com/wp-content/uploads/2018/01/DiffuseSpecularBuffers.png" style="text-align: center;" width="640" /><br />
漫反射緩衝區(左)鏡面反射緩衝區(右)<br />
<br />
<br />
<br />
<span style="font-size: large;">基於由自訂次表面配置資訊創建並發送而來的擴射內核,螢幕空間模糊效果近似於這種次表面散射現象。</span><br />
<br />
<br />
<img border="0" data-original-height="745" data-original-width="800" height="596" src="https://blogs.unity3d.com/wp-content/uploads/2018/01/blogimage10.png" style="text-align: center;" width="640" /><br />
多個次表面配置資訊可被用在不同的材質上<br />
<br />
<br />
<br />
<span style="font-size: large;">通過在計算結束時將漫反射光和鏡面反射光相結合,我們便把之前的問題給解決了!像這樣的技術在估算圖元到達範圍外的散射時是非常有效的。此時場景中的所有不透明物件現在都被著色了。</span><br />
<br />
<br />
<img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blogs.unity3d.com/wp-content/uploads/2018/01/blogimage12.png" style="text-align: center;" width="640" /><br />
場景中的所有不透明物件都已被完全著色<br />
<br />
<br />
<br />
<span style="font-size: large;">接下來是渲染螢幕空間反射(SSR)、天空盒(Skybox)、螢幕空間環境遮蔽(SSAO)和透明度。下面你可以逐步觀察這些過程的變化。</span><br />
<br />
<br />
<img border="0" data-original-height="453" data-original-width="800" height="362" src="https://blogs.unity3d.com/wp-content/uploads/2018/01/blogimage11.gif" style="text-align: center;" width="640" /><br />
對SSR、天空盒、SSAO和透明度進行的渲染<br />
<br />
<br />
<br />
<h2>
<span style="color: #e69138; font-size: large;">運動模糊(motion blur)的重要性</span></h2>
<br />
<span style="font-size: large;">運動模糊在影片中的確起到了關鍵的作用。雖然它提供了可以控制影片品質的另一個微妙維度,但對某些鏡頭來說它是一把兩面刃。</span><br />
<br />
<img border="0" data-original-height="225" data-original-width="800" height="180" src="https://blogs.unity3d.com/wp-content/uploads/2018/01/MotionVectorTextureBlur.png" style="text-align: center;" width="640" /><br />
運動向量紋理(左)用運動向量計算的運動模糊(右)<br />
<br />
<br />
<br />
<span style="font-size: large;">當然,渲染運動模糊需要渲染器瞭解運動本身。這些資訊通過首先渲染初步的運動向量貼圖而來。這個緩衝區是通過計算螢幕空間中當前頂點位置和先前頂點位置之間的差值,產生用於計算運動模糊的速度。</span><br />
<br />
<br />
<span style="font-size: large;">我們還做了一些額外的工作,以正確地從Alembic流獲得運動向量。有關詳細資訊,請閱讀<a href="https://blogs.unity3d.com/2017/12/04/adam-the-evolution-of-alembic-support-in-unity/" target="_blank">文章</a></span><span style="font-size: large;">。</span><br />
<br />
<br />
<br />
<h2>
<span style="color: #e69138; font-size: large;">後製特效</span></h2>
<img border="0" data-original-height="448" data-original-width="800" height="358" src="https://blogs.unity3d.com/wp-content/uploads/2018/01/blogimage13.gif" style="text-align: center;" width="640" /><br />
應用後期處理特效之前和之後的效果<br />
<br />
<br />
<span style="font-size: large;">我們終於來到了最後的後期處理過程。在這一步中,最終色彩分級、ACES色調映射、暈影、泛光和景深合成到一起,生成一個接近完成的圖像。但是,Marian的防護面罩去哪了?</span><br />
<br />
<br />
<br />
<h2>
<span style="color: #e69138; font-size: large;">Marian的防護面罩</span></h2>
<br />
<span style="font-size: large;">在使用到該技術的行業中,處理即時圖形的透明效果是一個老生常談的問題。諸如景深、螢幕空間反射、運動模糊和環境遮蔽等效果的主幹部分都需要從場景深度進行一些空間感知/重建,但是對於被透明物體覆蓋的圖元,要怎麼處理呢?你將需要二個或更多的深度值!</span><br />
<br />
<span style="font-size: large;">首先將所有不透明的物件渲染到場景中,然後是一個針對透明物件清單所特有的自後向前的特殊正向的繪製向處理過程,將每一遍個繪製處理階段混合到幀緩衝,但而不寫入深度緩衝。這樣做可以盡可能地規避這個問題,對於大多數物件,比如角色的眉毛或霧,這樣的處理效果還不錯。</span><br />
<br />
<img border="0" data-original-height="226" data-original-width="800" height="180" src="https://blogs.unity3d.com/wp-content/uploads/2018/01/MariansVisor.png" style="text-align: center;" width="640" /><br />
Marian的防護面罩帶有一些不現實的反射效果,無AO,DoF不正確,無運動模糊<br />
<br />
<br />
<span style="font-size: large;">然而從上面的例子可以看出,我們不能在Marian的透明防護面罩上規避這個問題,因為這個防護面罩在影片超過一半時間中都有出現。針對這種情況,我們需要某種替代方案。</span><br />
<br />
<span style="font-size: large;">最終產品製作階段的解決方案是將透明物件延遲到二個完全著色幀之間的合成階段中進行渲染。正如前文所說,第一幀包含了除了防護面罩外的所有物件。在第一幀渲染完成後,G-Buffer和深度被放置到第二幀的第二個渲染階段中,其中防護面罩被渲染為不透明物件。</span><br />
<br />
<br />
<img border="0" data-original-height="800" data-original-width="800" height="640" src="https://blogs.unity3d.com/wp-content/uploads/2018/01/blogimage14.png" style="text-align: center;" width="640" /><br />
<br />
<br />
防護面罩的透明處理被延遲到二個完全著色幀之間的合成階段<br />
<br />
<br />
<br />
<span style="font-size: large;">在第二幀的第二個後製處理過程中,通過使用原始幀的G-Buffer和深度的內容,我們可以成功地獲得防護面罩的正確的SSR、SSAO、運動模糊和景深效果。要使面具回到原始幀,只需根據防護面罩的alpha進行合成,這個alpha將會因為運動模糊或景深效果而被模糊。</span><br />
<br />
<br />
<img border="0" data-original-height="325" data-original-width="800" height="258" src="https://blogs.unity3d.com/wp-content/uploads/2018/01/ComparisonOfWithWithoutTechnique.png" style="text-align: center;" width="640" /><br />
應用和沒有應用這個技術的畫面。請注意右邊預期的遮蔽效果<br />
<br />
<br />
<br />
<span style="font-size: large;">透過對Marian的防護面罩進行這樣的處理,我們將它很好地整合到了畫面中,如上面所示。你會注意到右圖中有正常的SSR和AO。雖然這並不是透明問題的全方位解決方案,但是這種技術解決了原來的極端情況,並為透明物件提供了完整的後期處理支援。</span><br />
<br />
<br />
<br />
<h2>
<span style="color: #e69138; font-size: large;">畫龍點睛:火焰</span></h2>
<br />
<span style="font-size: large;">Oats Studios將室內的火焰系統運用得很好,完全提升了影片的畫面品質。通過在時間軸中進行動畫和排序,這些鏡頭光暈被添加到圖像幀畫中,產生最終的圖像。</span><br />
<br />
<br />
<img border="0" data-original-height="225" data-original-width="800" height="178" src="https://blogs.unity3d.com/wp-content/uploads/2018/01/BeforeAfterFlares.png" style="text-align: center;" width="640" /><br />
最後的著色幀以及準備添加在上面的鏡頭光暈 <br />
<br />
<br />
<br />
<h2>
<span style="color: #e69138; font-size: large;">成品效果</span></h2>
<span style="font-size: large;">至此,你已瞭解我們所提到的所有東西是如何在運行時進行渲染的。</span><br />
<br />
<img border="0" data-original-height="635" data-original-width="1134" height="358" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO-yIKgcEwxnZN5mBc-ERWQXrrTygg2RDEf91m8AUVA3QtxHebXV_4K3EiAFg7D1JelDygsK60gWAvQ4zE6XHv3_-9pjnbUTaAfRWq1PfEMaMlqSYdN2nQ5oaHlmawnO2eUOAJSTOxazU/s640/blogimage15.gif" style="text-align: center;" width="640" /><br />
Marian拿著石頭靠近她的人質哥哥<br />
<br />
<br />
<span style="font-size: large;">總的來說,把框架細分是團隊為適應製作需求做出的一些選擇,而逐幀分解不僅是理解這些選擇的好方法,也是一個可以從中獲取有用資訊並應用到你自己專案的好方案。</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">想了解更多圖形框架相關資訊可以搜尋Adrian Courrèges’學習系列。</span><br />
<br />
<br />
<h2>
<span style="color: #e69138; font-size: large;">未來展望</span></h2>
<br />
<span style="font-size: large;">Unity計畫在2018年為每個使用者呈上更強的圖形功能,例如影片中使用的次表面散射。我們稱之為可程式設計腳本渲染管線(SRP),它是Unity 2018 beta版提供的一套新API,開發者可以用它自訂渲染器。我們還將發佈SRP的範本,稱為高清渲染管道(HDRP),這是個包含次表面散射等新功能的現代渲染器。《ADAM》中使用的次表面散射是從HDRP直接移植到Unity 2017.1的現存渲染器中的。</span><br />
<br />
<span style="font-size: large;">如果你想要瞭解更多SRP的資訊,以及今年Unity將推出的新圖形功能,請閱讀<a href="https://blogs.unity3d.com/2018/01/18/2018-and-graphics/" target="_blank">Unity 2018中的圖形渲染</a>。</span><br />
<br />
<br />
<br />
<span style="font-size: large;">我們已經揭秘了一系列Unity 2017的功能,例如:Timeline、Cinemachine、Post-Processing Stack以及30 FPS即時渲染是如何幫助Oats Studios這樣的團隊改變電影製作的未來的。希望未來有更多Unity製作影視作品的佳作產生。</span></div>
Unity Taiwanhttp://www.blogger.com/profile/05195645646153478011noreply@blogger.com0tag:blogger.com,1999:blog-6317841908377212626.post-72961279994450788932018-01-15T06:03:00.003-08:002018-01-15T06:03:53.764-08:00Unity 2018.1 測試版發佈<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: large;"><br /></span></div>
<span style="font-size: large;">作者:Carlos Rincon <a href="https://blogs.unity3d.com/2018/01/10/get-early-access-to-unity-2018-1-the-beta-is-out/" target="_blank">原文</a><br />潤稿:Kelvin Lo<br /><br /><br />Unity 2018.1的測試版已發佈,開發者可以下載並開始熟悉新功能。Unity 2018.1測試版中有大改進並加入了大量新功能。 例如:針對Metal的Tessellation、針對GI的GPU Instancing支援、針對編輯器匯入設定和元件的Presets功能、 支援PS4的動態解析度、全景360圖像和影片錄製(測試版)、測試版的圖片動畫API、FBX匯入改進、新的粒子系統改進等等。 <br /><br />你可以從<a href="https://unity3d.com/unity/beta" target="_blank">這裡</a>下載,記得看一下<a href="https://unity3d.com/unity/beta#notes" target="_blank">發佈紀錄</a>。</span><h2>
<span style="color: #e69138; font-size: large;">新渲染架構:Scriptable Render Pipeline </span></h2>
<span style="font-size: large;"><br />作為Unity 2018.1版本的一部分,我們引入新的即時渲染架構設定Scriptable Render Pipeline ,簡稱SRP。我們將在未來的版本中不斷改進它並加入新功能。SRP可以讓開發者和技術美術充分展現新一代硬體和GPU的效能,不在需要研究數百萬行的C++引擎代碼。SRP是一個可擴展的管線,通過C#程式和材質著色器輕鬆訂製渲染管線。 <br /><br />我們會提供一些範例,這些範例可以利用SRP從輕度和高畫質的管線開始介紹,針對不同場景做優化。輕度的目標場景是跨平台專案,而高畫質則是針對更高標準的場景,例如PC或遊戲機這樣的高效能的平台。 <br /><br />SRP目前還在測試階段,你當然可以繼續使用<a href="https://docs.unity3d.com/2018.1/Documentation/Manual/ScriptableRenderPipeline.html#Appendix" target="_blank">內建的渲染管線</a>和原有的設定。 <br /><br /> </span><h2>
<span style="color: #e69138; font-size: large;">Shader視覺化設計工具 - Shader Graph </span></h2>
<span style="font-size: large;"><br />為配合SRP而設計的Shader視覺化設計工具Shader Graph,能幫助開發者、美術進行視覺化的著色器構建。不必寫程式,只要在一個編輯器中建立並連接節點,就可以設計和除錯Shader,每一步都可以預覽。 <br /><br /> <img border="0" data-original-height="322" data-original-width="800" height="258" src="https://blogs.unity3d.com/wp-content/uploads/2018/01/image1-1.png" style="text-align: center;" width="640" /><br /><br />在Unity 2018.1 的下一個測試版本中,我們會把這個功能整合到Unity裡面,會用一個讓使用者體驗比較好的的工作流程。如果你已迫不及待地想試試看這個功能,我們製作了一個SRP的簡單範例,它是基於輕量管線來構建的,你可以下載<a href="https://oc.unity3d.com/index.php/s/mWv6mGlHtCHfz7S" target="_blank">範例專案</a>,並使用<a href="https://unity3d.com/unity/beta" target="_blank">Unity 2018. 1 測試版</a>打開它! 任何問題回報可以回報在<a href="https://forum.unity.com/threads/feedback-wanted-shader-graph.511960/" target="_blank">此論壇討論</a><br /><br /> <br /></span><h2>
<span style="color: #e69138; font-size: large;">即將來臨:C# Job System </span></h2>
<span style="font-size: large;"><br />在Unity 2018.1 測試版週期裡,我們還會整合C# Job System和一個新的測試系統Entity Component System,簡稱ECS。未來這將使編寫安全的多執行緒程式和提高效能變得更加容易。 <br /><br /></span><h2>
<span style="color: #e69138; font-size: large;">系統需求更改 </span></h2>
<span style="font-size: large;"><br /></span><ul>
<li><span style="font-size: large;">Unity 2018.1 測試版中移除編輯器中針對Substance Designer材質導入的內建支援,我們建議改用由Allegorithmic提供的外部匯入套件,方能保持最新的版本來匯入和使用Substance Designer材質。 想了解關於這個決定的緣由,可以看<a href="https://forum.unity.com/threads/an-update-on-substance-format-support-in-unity.509408/" target="_blank">這裡</a></span></li>
<li><span style="font-size: large;">移除了對Wii U的支援。 </span></li>
<li><span style="font-size: large;">移除了在standalone打包流程裡對Windows XP的支援。Windows Vista現在是Windows standalone流程裡所支援最舊的作業系統。 </span></li>
<li><span style="font-size: large;">我們還放棄了對<a href="http://unitytaiwan.blogspot.tw/2018/01/unity-20181monodevelop-unity.html" target="_blank">MonoDevelop-Unity</a>的支援,這代表現在Visual Studio是MacOS和Windows系統上的推薦和支援的C#編輯器。 </span></li>
<li><span style="font-size: large;">因為Visual Studio for Mac需要MacOS 10.11,所以Unity編輯器對MacOS系統的需求也已變為MacOS 10.11。 </span></li>
</ul>
<span style="font-size: large;"><br /></span><h2>
<span style="color: #e69138; font-size: large;">逐步移除舊粒子特效系統</span></h2>
<span style="font-size: large;"><br />從Unity 2018.1開始,我們將逐步移除舊粒子特效系統(Legacy Particle System)。我們的目標是在Unity 2018.2中完全移除舊粒子特效系統。在Unity 3.5中它被一個新的系統Shuriken所替換,並從Unity 5.4開始被完全棄用。我們的分析顯示,它的使用量已幾乎為零,所以我們決定移除舊粒子系統。 <br /><br />如果這對你的專案有影響,建議:</span><div>
<ul>
<li><span style="font-size: large;">將你的舊粒子系統轉到Shuriken</span></li>
<li><span style="font-size: large;">使用我們的<a href="https://forum.unity.com/threads/release-legacy-particle-system-updater.510879/" target="_blank">自動升級腳本</a>來自動轉換</span></li>
<li><span style="font-size: large;">尋求我們的<a href="https://forum.unity.com/threads/legacy-particle-system-deprecation.420351/" target="_blank">協助</a></span></li>
</ul>
</div>
<div>
<span style="font-size: large;"><br />你可以從Unity 2017.3 版本粒子系統的改進一文中找到一些關於Unity 2017.3中最新粒子系統改進的<a href="https://blogs.unity3d.com/2017/10/21/the-future-of-unity-is-just-a-few-clicks-away/" target="_blank">範例</a>。 <br /><br /> <br /></span><h2>
<span style="color: #e69138; font-size: large;">未來展望 </span></h2>
<span style="font-size: large;"><br />正如任何測試版專案一樣,你將能提前體驗仍在開發中的功能。但那也代表著體驗到的Unity版本會比較不穩。要使用測試版很簡單。只要到我們的beta測試區,閱讀指南並下載安裝程式即可。 <br /><br />我們也建議你<a href="https://blogs.unity3d.com/2018/01/10/get-early-access-to-unity-2018-1-the-beta-is-out/" target="_blank">註冊</a>成為Beta版測試開發者(文章最下面)。註冊後你將能收到新版本的可用通知,以及如何成為有效測試開發者的提示。Unity 2018.1 測試版本對所有Unity開發者免費。在<a href="https://unity3d.com/unity/beta" target="_blank">release notes</a>裡,你能看到當下發佈版本中所有的新功能、改進以及bug修復的資料清單。 </span><br /> </div>
Unity Taiwanhttp://www.blogger.com/profile/05195645646153478011noreply@blogger.com0tag:blogger.com,1999:blog-6317841908377212626.post-5973650264649228402018-01-11T05:53:00.001-08:002018-01-11T05:53:49.410-08:00Unity 2018.1開始停止支援MonoDevelop-Unity<span style="font-size: large;">作者:Lukasz Paczkowski <a href="https://blogs.unity3d.com/2018/01/05/discontinuing-support-for-monodevelop-unity-starting-in-unity-2018-1/" target="_blank">原文</a><br />潤稿:Kelvin Lo<br /><br /><br />從Unity 2018.1開始,Unity將不在綁定與MonoDevelop-Unity一起發行,並且在Unity 2018.1後的版本也不再支援使用MonoDevelop-Unity開發。<br /><br />隨著Unity中.NET 4.6腳本執行庫(測試版)的升級,Unity開始支援C# 6.0及後面版本提供的全新C#功能。為這些新的C#功能提供一個適合的IDE體驗,對於我們來說也十分重要。<br /><br />目前的MonoDevelop-Unity 5.9.6並不支援最新的C#功能,也無法在Unity裡除錯這些.NET 4.6的程式。因此我們將做出二項改變。<br /><br /><ol>
<li>從Unity 2018.1開始將不再支援MonoDevelop-Unity 5.9.6。MacOS和Windows的安裝程式也會將它移除。</li>
<li>從Unity 2018.1開始,<a href="https://www.visualstudio.com/vs/visual-studio-mac/" target="_blank">Visual Studio for Mac</a>將作為MacOS上的唯一C# IDE。在Windows上會繼續保留<a href="https://www.visualstudio.com/downloads/" target="_blank">Visual Studio 2017 Community</a>,並不再將MonoDevelop-Unity作為選項。</li>
</ol>
<br /><a href="https://blogs.msdn.microsoft.com/visualstudio/2017/05/10/unity-game-development-with-visual-studio-for-mac/" target="_blank">自Unity 5.6.1開始,Visual Studio for Mac已整合 Unity的連接套件</a>,即支援最新的C#功能也支援在.NET 4.6程式執行時上除錯C#程式。MacOS上的MonoDevelop-Unity開發者可以<a href="https://www.visualstudio.com/vs/visual-studio-mac/" target="_blank">下載並安裝</a>Visual Studio for Mac並開始使用。<br /><br /> <br /></span><h2>
<span style="color: #e69138; font-size: large;">C# IDE選項</span></h2>
<span style="font-size: large;"><br />除了Visual Studio for Mac和Visual Studio 2017 Community之外,現在還有一些其它的C# IDE可用。<br /><br /><a href="https://code.visualstudio.com/" target="_blank">Visual Studio Code</a> (Windows, macOS, Linux)<br /><br />在Preferences裡將Visual Studio Code設定為外部編輯器時,Unity就可以在Visual Studio Code裡打開程式。要支援C#代碼編輯與Unity C#除錯,還需要安裝下列內容。<br /><br /><ul>
<li><a href="http://www.mono-project.com/download/" target="_blank">Mono</a> (只在MacOS上必需)</li>
<li><a href="https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp" target="_blank">C# Extension</a></li>
<li><a href="https://marketplace.visualstudio.com/items?itemName=Unity.unity-debug" target="_blank">Unity Debugger Extension</a> (目前不支援.NET 4.6除錯)</li>
</ul>
<br /><br /><a href="https://www.jetbrains.com/rider/" target="_blank">JetBrains Rider</a> (Windows, macOS, Linux)<br /><br />當在Preferences裡將JetBrains Rider設定為外部編輯器時,Unity就可以在JetBrains Rider裡打開程式腳本。<br /><br />JetBrains Rider是一款基於IntelliJ和ReSharper的.NET IDE,並包含ReSharper大部分功能。Rider還支援所有最新的C# 6.0功能,以及在Unity中進行.NET 4.6腳本運行庫上的C#除錯。查看<a href="https://www.jetbrains.com/dotnet/promo/unity/" target="_blank">更多相關內容</a><br /></span><br /> Unity Taiwanhttp://www.blogger.com/profile/05195645646153478011noreply@blogger.com0tag:blogger.com,1999:blog-6317841908377212626.post-29465453098977098052017-12-24T04:32:00.000-08:002017-12-24T04:32:03.955-08:00[攻略]Unity - 3D小球機器學習專案架設<div>
<span style="font-size: large;">整理潤稿:Wei J,Kelvin Lo</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">本文將分享如何安裝Unity機器學習代理工具(Unity Machine Learning Agents),並透過官方範例3D小球,了解整個環境的安裝方法。</span></div>
<div>
<br /></div>
<div>
<span style="font-size: large;">在本文中使用的案例是3D平衡小球(3D Balance Ball)的運行環境。該環境包含多個平板和小球。這些平板可以自己做縱向及橫向旋轉,來保持小球不掉離平板。每個平板都是一個代理,通過保持小球在平板上的時間得到獎勵;掉出平板,則會扣除獎勵。這個訓練過程的目的在於讓平板學習永遠不讓球落下。 </span></div>
<div>
<span style="font-size: large;"><br /><iframe allow="encrypted-media" allowfullscreen="" frameborder="0" gesture="media" height="315" src="https://www.youtube.com/embed/fq0JBaiCYNA" width="560"></iframe></span></div>
<div>
<span style="font-size: large;">3D小球實際成果展示</span></div>
<div>
<br /></div>
<div>
<span style="font-size: large;">-------------------------------------</span></div>
<div>
<span style="font-size: large;">整篇文章為參考以下文件列表所整合的一個攻略流程:<br /><a href="https://unity3d.college/2017/10/25/machine-learning-in-unity3d-setting-up-the-environment-tensorflow-for-agentml-on-windows-10/" target="_blank">Windows 10安裝攻略 by Jason Weimann</a> <br /><a href="http://forum.china.unity3d.com/thread-29036-1-1.html" target="_blank">Mac安裝攻略 by </a></span><span style="font-size: large;"><a href="http://forum.china.unity3d.com/thread-29036-1-1.html" target="_blank">鲍健运</a></span><span style="font-size: large;"><br /><a href="https://github.com/Unity-Technologies/ml-agents" target="_blank">專案Github</a><br /><a href="https://github.com/Unity-Technologies/ml-agents/blob/master/docs/Getting-Started-with-Balance-Ball.md" target="_blank">整合Unity教學</a><br /><a href="https://github.com/Unity-Technologies/ml-agents/blob/master/docs/installation.md" target="_blank">Ptyhon與其他軟體安裝</a><br />--------------------------------------------------</span><br />
<h2>
<span style="font-size: large;"><span style="color: #e69138;">開始:</span></span></h2>
<div>
<br /></div>
<div>
<span style="font-size: large;">如果你要架在Windows 10平台上:</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">本教學需要安裝的軟體清單如下:</span></div>
<div>
<span style="font-size: large;">Nvidia CUDA toolkit - </span><span style="font-size: large;">CUDA 8.0.61</span></div>
<div>
<span style="font-size: large;">CUDNN檔案 - </span><span style="font-size: large;">CUDA 8.0使用的v6.0版</span></div>
<div>
<span style="font-size: large;">安裝Anaconda會安裝以下套件:</span></div>
<div>
<span style="font-size: large;">- Python</span></div>
<div>
<span style="font-size: large;">- Jupyter</span></div>
<div>
<span style="font-size: large;">- TensorFlow</span></div>
<div>
<span style="font-size: large;">- Matplotlib</span></div>
<div>
<span style="font-size: large;">- numpy</span></div>
<div>
<span style="font-size: large;">- pillow</span></div>
<div>
<span style="font-size: large;">- docopt</span></div>
<div>
<span style="font-size: large;">Unity範例專案</span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<div>
<span style="font-size: large;">設定Unity機器學習代理工具和TensorFlow環境(Windows 10) <br />本章節轉載由Jason Weimann所寫的<a href="https://unity3d.college/2017/10/25/machine-learning-in-unity3d-setting-up-the-environment-tensorflow-for-agentml-on-windows-10/" target="_blank">文章</a>,說明在Windows 10上如何設定Unity機器學習和TensorFlow環境。本章節完成後會繼續說明如何設定Unity官方的機器學習展示專案 - 3D Ball。 <br /><br />說明 </span><br />
<ul><span style="font-size: large;">
<li>本章節針對Windows 10平台,Mac環境設定請跳過本章節。 </li>
<li>請注意軟體所對應的版本,如果版本不同可能會導致安裝不成功。 </li>
<li>下載和安裝軟體前請關閉Unity和Visual Studio,並確認你的Windows 10電腦採用NVIDIA顯卡,因為本文所使用的GPU加速工具包是NVIDIA的CUDA。 </li>
</span></ul>
<span style="font-size: large;">
</span><br />
<h2>
<span style="color: #e69138; font-size: large;">安裝CUDA工具</span></h2>
<span style="font-size: large;"><br />首先需要下載CUDA 8.0.61。請到GUDA<a href="https://developer.nvidia.com/cuda-toolkit-archive" target="_blank">下載頁面</a>,選擇下載<a href="https://developer.nvidia.com/cuda-80-ga2-download-archive" target="_blank">CUDA Toolkit 8.0 GA2</a>。 (會有很多新版本,但本案要下載這個版本)<br /><br /> </span><img border="0" data-original-height="1024" data-original-width="656" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqSJ-TUYWfw8Cjk9LNPKcYD-u3mXEyP7M4xvsb4xfL0REeedv_W5umLSwe5XCw94FBcUiNAoNojm9KPMAoZb_ATiQqTmJnzvmCcFVBqyz0o77mEIeo9KvN8wiJqwea5WZQh8sOeoZIvQg/s1600/CUDA-Download.jpg" style="text-align: center;" /><span style="font-size: large;"><br /><br /><br />下載完成後執行安裝,當出現下圖所示的選擇安裝介面。請選擇“Express”,一直下一步到完成CUDA工具的安裝。 <br /><br /> </span><img border="0" data-original-height="438" data-original-width="593" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV2bYzDV5gYzw0f0FlUKhNEApz_GHzf0INKEN_VqoNINUF8smZ63WkH9yIyKPiUkhnnMdN2jVd4u_SGK8MNtUZtfG3OoSrM3WtgOZKyIlMvX9AIEviWJIpvAwbvPZCuhukLVPSDH8RUPA/s1600/Express-Option.png" style="text-align: center;" /><span style="font-size: large;"><br /></span><br />
<h2>
<span style="color: #e69138; font-size: large;">安裝CUDA深度神經網路資料庫CUDNN </span></h2>
<span style="font-size: large;"><br />接下來需要下載CUDA深度神經網路庫(CUDA Deep Neural Network),簡稱CUDNN。它是專門針對深度神經網路框架設計的一套GPU計算加速方案。全世界的深度學習研究者和框架開發者都使用CUDNN來增強GPU計算效能。這讓他們能專注於訓練神經網路、開發軟體應用,不用在低級別的GPU性能調整上耗費時間。CUDNN支持當下流行的各種深度學習框架,包括Caffe2、MATLAB、Microsoft Cognitive Toolkit、TensorFlow和PyTorch等。 <br /><br />CUDNN<a href="https://developer.nvidia.com/rdp/cudnn-download#a-collapse6-8" target="_blank">下載頁面</a>,選擇CUDA 8.0使用的v6.0版本下載。當下載CUDNN時,Nvidia 會要求你登入,可以註冊一個免費帳號登入。<br /><br /> </span><img border="0" data-original-height="378" data-original-width="810" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuaSRqrFWQ8aVzTHe7SE6SKj06rIWkOCoVaAEKz5E92NWZay-_snq9eaVWkhoxj78xnWVOGMbtdrZChaL0VqohVQOJXYMc8__tmInhnPAqXSC36u8mGXB6tLd1n3iH5SO3gTKH08-cqlQ/s1600/CUDNN-Download-1.png" style="text-align: center;" /><span style="font-size: large;"><br /><br /><br /> </span><img border="0" data-original-height="653" data-original-width="694" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNzhbpgMRLz4E36dlb2EG5sMntrZfsVK75KRhV2iWYmvMK9l9RYfldOEP0iScxDg6O95UOA5mNKWIMWDDN0GDf-6MOiku4PT8BbC5XN1hxfjwxncC1ajOS-0Ixywk0WO9lHOf7WPVZi1E/s1600/CUDNN-Version.jpg" style="text-align: center;" /><span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">下載完成後解壓縮會有三個目錄(</span><span style="font-size: large;">bin、include和lib資料夾)</span><span style="font-size: large;">,確定CUDA工具安裝完成後,把這三個目錄複製到</span><span style="font-size: large;">CUDA 8.0工具資料夾。 </span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<img border="0" data-original-height="465" data-original-width="573" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNiZeFyI1pgAHouEf16lfIGJ9l0GNs9CxIBp1Wv6FerMooYZbznU3elK4S-aIJsJCXmQpZkkBQXyyfgUvkHfZuuD0AJgTciWhh1NqCeLYAOl8d-h9qDG-0N9dqpPvYpuMWAiOB1yKhYhw/s1600/CUDNN-Folders-to-Copy.jpg" style="text-align: center;" /></div>
<div>
<span style="font-size: large;">一般來說安裝CUDA時的預設路徑是: <br />C:\Program Files\NVIDIA GPU Computing Toolkit\cuda\v8</span><br />
<span style="font-size: large;"><br /></span><img border="0" data-original-height="418" data-original-width="702" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_UURWi0aobQbO8e5PNeXBnEKkoCH1QOx0t-mb1CSX5F5zKCkB0vjgJ1q0kfZIAqVtd1tBvyZrWbR-aYTO3UIxyiEHyLbNN23w5X8CGb9pACw3tXSEVyuypldAhhD65MQ3TCG816q_ono/s1600/CUDNN-Foldiers-Copied.jpg" style="text-align: center;" /><span style="font-size: large;"><br /><br />複製bin、include和lib資料夾到\</span><span style="font-size: large;">NVIDIA GPU Computing Toolkit\cuda\v8</span><span style="font-size: large;">目錄底下<br /></span><br />
<h2>
<span style="color: #e69138; font-size: large;">設定環境變數和路徑 </span></h2>
<span style="font-size: large;"><br />接下來需要幫Windows系統增加環境變數和路徑設定。</span><br />
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;"><br /></span></div>
<span style="font-size: large;">
1.開啟檔案總管,在本機上按右鍵選內容</span></div>
<div>
<span style="font-size: large;">2.進入系統控制台後選進階系統設定</span></div>
<div>
<span style="font-size: large;">3.</span><span style="font-size: large;">點選進階頁面底下的環境變數</span></div>
<div>
<br /></div>
<div>
<span style="font-size: large;"><br /> </span><img border="0" data-original-height="653" data-original-width="1455" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3fLRkjRnCMcdHKwIS-FaGvEMo0HT_kHuZUtRde71UQ0r_ge9ktgYZGwzm0i0lg3PKLCYZCsu9T3eLqRvh8sPjqR3mpR9xXSNrNPgkKtKZnK-FOgoojVzo4aHwDQR6zhsYYHi7WucnZn0/s1600/win_sys1.PNG" style="font-size: x-large; text-align: center;" /><span style="font-size: large;"><br /><br />4.點"新增"按鈕。 </span></div>
<div>
<span style="font-size: large;">加一個CUDA_HOME,數值設為: </span><br />
<span style="font-size: large;">C:\Program Files\NVIDIA GPU Computing Toolkit\cuda\v8.0(路徑是你的CUDA安裝路徑)</span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
<span style="font-size: large;">選擇"確定"。</span><span style="font-size: large;"><br /><br /> </span><img border="0" data-original-height="585" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3xJ0aEAS60qJAbhlejEOZnxlVu_J2E6HIeGRDq6Y4y4pTHezZBfHPsFUKuHRF7mYI0FfEGkrCJNJ_tkxebP6M4XH17T2lqa4AH7qqpVtc7N5EweBJC5b3U4OfvviSUPTRqqEicyNQJ90/s1600/Adding-CUDA_HOME.jpg" style="text-align: center;" /><span style="font-size: large;"><br /><br /> <br />編輯路徑Path <br /><br />先找到Path,反白後點"編輯",會開出系統路徑快捷表。</span></div>
<div>
<span style="font-size: large;"><br /> </span><img border="0" data-original-height="189" data-original-width="420" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK9S2srUWxIJJS9e5WsZTUkAMMc9xAPwNIvrJM0t2FyvANYZ27kmv9Ne3q7ZJSdr0j2b9XfbXBjQzZJte3Vos4k5uVLML23eJeIf3GVG3rGRjbxUmHBK9VWnB4Rs3gWHl6nAdLOkAvhV4/s1600/sys_path.PNG" style="text-align: center;" /><span style="font-size: large;"><br /><br />新增兩個系統路徑。 <br />C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64 <br />和<br />C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\extras\CUPTI\libx64 <br /><br /> </span><img border="0" data-original-height="497" data-original-width="754" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVY04b2yTE5cXI3JoKL_wHiwld0s3FG81mWGn2fktIXhn-RmEM_dKiv7TBw8GlZSDV0ONSJsgkuhjP1D9U39ASiXRitgCdJiEau-B9vA0Tk-xpQ4gS4agDEGaQkub64PYpkoFoEaPROdc/s1600/Path-Variables.jpg" style="text-align: center;" /><span style="font-size: large;"><br />最上面兩個是安裝CUDA時產生的不要去動它<br /> 新加的路徑會在最下面,注意不要打錯字了<br /><br /> </span><br />
<h2>
<span style="color: #e69138; font-size: large;">安裝Anaconda </span></h2>
<span style="font-size: large;"><br />為了要安裝Python和Jpyther套件,為了避免繁瑣的安裝流程,建議採用Anaconda來安裝會比較容易。</span></div>
<div>
<span style="font-size: large;">到Anaconda的下載頁面,下載Python 3.6,選擇64位版本。下載完成後安裝Anaconda,按照系統下一步到完成安裝</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<img border="0" data-original-height="255" data-original-width="418" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrHPPFZXoKr9pCn7g5aarSi-5cCujyCtv9a81BkVqifuf3oGgTmH0f8l4bhebgVop8KQVz-oghqMt-ubQd6XINtULGh1I42iymnpRpSuJGyssSuLej3dF0cXxmTZyibQ7RsV_1McajW4I/s1600/Anaconda-Download.jpg" style="text-align: center;" /></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">安裝完成後你應該可以在快速選單找到Anaconda Prompt。開啟它。 </span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<img border="0" data-original-height="681" data-original-width="392" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY0caTK2E4D6JkLTQLAD7N-WXbMWsUPj6kQ-lAm2qa4Dc-X5NKxCoQS9a_BBJFk-T_l5P_mIcwaHTzzPEPAMSMB-WX_tcc1VzUmZL0MFLMpbZ31xMYebMYUAmtjxjJdw-hP7MPi4o2PVo/s1600/Anaconda-Prompt.jpg" style="text-align: center;" /><span style="font-size: large;"><br /><br />接下來所有的Command line指令都是在</span><span style="font-size: large;">Anaconda Prompt執行。</span><span style="font-size: large;"><br /><br />下一步,我們要創建使用Python 3.5.2的執行環境。在Anaconda Prompt中輸入指令來建立環境:</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">conda create -n tensorflow-gpu python=3.5.2 <br /><br /><br />然後輸入指令啟動剛剛創建的環境:</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">activate tensorflow-gpu <br /><br /><br />最後用這個指令安裝TensorFlow:</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">pip install tensorflow-gpu <br /><br /><br />當安裝完成後,你就可以輸入指令啟動Python來測試剛剛的流程是否成功。指令為:</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">python <br /><br /><br />然後輸入指令測試:import tensorflow as tf <br /><br /> </span><br />
<h2>
<span style="font-size: large;"><span style="color: #e69138;">下載Unity的範例專案</span> </span></h2>
<span style="font-size: large;"><br />接下來要下載本次的3D小球專案,你需要從GitHub頁面<a href="https://github.com/Unity-Technologies/ml-agents" target="_blank">下載專案</a>,可以直接下載並解壓縮到任意位置。或是透過Github Desktop直接克隆一份道你電腦上。為了讓工作輕鬆建議不要太深的目錄,例如D:\ml\就好。<br /><br />接下來從選單找到Anaconda Prompt。用右鍵點擊Anaconda Prompt,選擇更多->"以系統管理員身份執行"(Run as administrator)。 <br /><br /> </span><img border="0" data-original-height="373" data-original-width="386" height="309" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKbK_nfz1nl8llJeysoIrpNWeHo1TiY-rBTu_pd9jtWYizircG87AhB8EkHAKN3obw8lqVhMxyp99LKKGkZVPZkSElrInJPEdVSQCaT1chqiOuD8tvgKJQfuGGXlhfQwO9_XGD3zc6xt4/s320/Anaconda-as-Administrator.jpg" style="text-align: center;" width="320" /><span style="font-size: large;"><br /><br /> <br />剛剛解壓縮後的Unity - 3D小球專案目錄下有一個python目錄。從這個Anaconda prompt視窗把目錄切換到剛下載好的ml-agents專案裡的python目錄位置。 </span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">例如:我專案放在D:\ml\ml-agents\,那麼我們要把目錄切換到</span><span style="font-size: large;">D:\ml\ml-agents\python。執行:</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">cd d:\ml\ml-agents\python</span></div>
<div>
<span style="font-size: large;"><br /><br />然後要安裝Html5lib庫,輸入指令:</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">conda install --force html5lib <br /><br /><br />然後輸入:</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">pip install .<br /><br /><br />注意:"pip install ." 最後有個點.<br /><br /><br />如果以上步驟一切正常,你就可以到下一章節</span></div>
<div>
<span style="font-size: large;">用TensorFlow和機器學習設定你的Unity專案了。 </span><br />
<div>
<span style="font-size: large;">----------------------------</span></div>
<div>
<span style="font-size: large;">如果你要架在Mac OSX平台上:</span><span style="font-size: large;"><br /></span><br />
<ul><span style="font-size: large;">
<li>macOS版本要求:OS X El Capitan(10.11)及以上。 </li>
<li>建議下文中所使用的軟體版本都使用最新的版本。 </li>
</span></ul>
<span style="font-size: large;">
</span><br />
<h2>
<span style="color: #e69138; font-size: large;">安裝Homebrew </span></h2>
<span style="font-size: large;"><br />對於許多使用macOS作為作業系統的開發者來說,一般習慣於使用命令列安裝所需應用,當然這樣也能顯得很geek。而Homebrew也是很常用的套裝軟體管理工具,能在Mac中方便的安裝軟體或者卸載軟體。 <br /><br />打開Terminal應用,輸入以下命令下載安裝最新的Homebrew。 <br /><br /><br /> /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" <br /><br />安裝完Homebrew後,建議重啟Terminal。 <br /><br /> </span><br />
<h2>
<span style="color: #e69138; font-size: large;">透過Homebrew 安裝 Python 3 </span></h2>
<span style="font-size: large;"><br />Python是機器學習常用的語言,TensorFlow就使用它作為主要開發語言。作為解釋語言,它不需要進行編譯,對於機器學習所需要的大量原型化和反覆運算處理有相當高的效率。而且Python開發生態成熟,有許多庫可供使用。通過pip(Python Package Index)工具,你可以安裝各種基於Python的庫。 <br /><br />輸入 </span><span style="font-size: large;">brew install python 3 安裝 Python 3。在安裝完Python 3之後,建議重啟Terminal。 </span></div>
<div>
<span style="font-size: large;"><br /> </span><br />
<h2>
<span style="color: #e69138; font-size: large;">安裝專案所需Python庫和工具 </span></h2>
<span style="font-size: large;">以下說明兩種安裝路線:可以二選一</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">路線一:<br /><b>安裝Jupyter Notebook </b><br /><br />Jupyter Notebook是一個開源的Web應用程式,可以讓你建立和共用包含即時程式碼,方程式,視覺化和說明文本的文檔。 用途包括:資料清理與轉換,數值類比,統計建模,機器學習等等。 <br /><br />輸入 pip3 install jupyter 安裝Jupyter Notebook。 <br /><br /><br /><b>安裝NumPy </b><br /><br />NumPy是Python語言的開源數學擴展庫。支援高級大量的維度數組與矩陣運算,此外也針對陣列運算提供大量的數學函式程式庫。由於NumPy剛剛宣佈不再支援Python 2,所以建議直接使用Python 3。 <br /><br />輸入 pip3 install numpy 安裝 NumPy。 <br /><br /> <br /><b>安裝Pillow </b><br /><br />Pillow是PIL(Python Imaging Library,Python圖像庫)的一個分支,提供了對於開發者許多比較友好和直觀的功能。 <br /><br />輸入 pip3 install pillow 安裝 Pillow。 <br /><br /> <br /><b>安裝docopt </b><br /><br />docopt是Python的命令列參數解析器,其基於多年來用於描述程式介面的説明資訊而設計的,因此可以給開發者清晰的輸出體驗。 <br /><br />輸入 pip3 install docopt 安裝 docopt 。 <br /><br /><br /><b>安裝TensorFlow </b><br /><br />TensorFlow是現今非常流行的使用資料流程圖進行數值計算的開源軟體庫。圖中的節點代表數學運算, 而圖中的邊則代表在這些節點之間傳遞的多維陣列。這種靈活的架構可讓你使用一個 API 將計算工作部署到設備、伺服器或者移動設備中的一個或多個CPU或 GPU。TensorFlow 最初是由Google 機器智慧研究部門的 Google Brain 團隊中的研究人員和工程師開發的,用於進行機器學習和深度神經網路研究, 但它是一個非常基礎的系統,因此也可以應用於眾多其他領域。 <br /><br />輸入 pip3 install tensorflow 安裝 TensorFlow。 <br /><br /> </span></div>
<div>
<span style="font-size: large;">路線二:<br /><b>Python庫快捷安裝 </b><br /><br />一步步通過pip3安裝這些庫可能有些麻煩,如果你已經安裝了Python 3,並且克隆了Github上完整的ml-agents專案。 <br /><br /><br />你可以打開Terminal,把目錄改到ml-agents專案下python的目錄(目錄每個人都不同):</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">cd /Users/(你的名字)/UnityMachineLearningAgents/python 。 <br /><br />輸入“pip3 install .”,安裝以上所有的Python庫和工具(install後面有個.號不要漏掉)。 <br /><br /> <br /><b>完成安裝</b><br /><br />如果你按照以上2種方法順利操作的話Mac環境下Unity Machine Learning Agents所需功能基本安裝完畢。你就可以開始用TensorFlow和機器學習配置你的Unity專案了。 </span><br />
<span style="font-size: large;">-----------------------------</span></div>
<div>
<br />
<span style="font-size: large;">上面的環境安排好了之後,接下來我們就可以到Unity裡面設定要學習的內容</span><br />
<br />
<span style="font-size: large;">確保你已經</span><span style="font-size: large;">下載Unity在</span><a href="https://github.com/Unity-Technologies/ml-agents" style="font-size: x-large;">GitHub</a><span style="font-size: large;">上的ml-agents專案。</span><br />
<span style="font-size: large;">確保使用Unity 2017.1 或以上版本 </span><br />
<br />
<br />
<h2>
<span style="font-size: large;"><span style="color: #e69138;">設定Unity環境</span></span></h2>
<br />
<span style="font-size: large;">啟動Unity,開啟剛剛下載資料裡的unity-environment目錄(本展示專案)。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">在啟動視窗中,選擇Open,並在彈出的檔流覽視窗中,選擇unity-environment,點擊Open。</span><br />
<br />
<img border="0" data-original-height="218" data-original-width="325" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIwoVlfKKdqfs8FHcU8Pj_pB9jpdoL-_Cw0LyiLp5IyRxHqXbhhJrcqoWJYAKlssLAfrCRIPP4wUwr8N7xHuqtQbss97eG-68-SrYLc8YufyqsxtYm1DeKB1xqNNT4W6Sb1AaJ-YmUYzI/s1600/openunityprj.PNG" style="text-align: center;" /><br />
<br />
<span style="font-size: large;">注意:如彈出警告”Opening Project in Non-Matching Editor Installation”,請直接忽略。</span><br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">打開專案後,在Project視窗,到資料夾Assets/ML-Agents/Examples/3DBall/,按兩下Scene檔的圖示開啟場景。</span></div>
<br />
<img border="0" data-original-height="429" data-original-width="412" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsz8ESeawr4d9xj-i2NKZ6skV0BQLsHXE8F0QUNAyXEyDu-Qr0AnRUInPG_u_YBnYO1b8DP2G0tj9z6teUhvAbWeDLaK9ytQL1yexQuYZCeebVdq-W1PJf1fIWy7NeJBSRHJLcWgf_6Ac/s1600/openscene.PNG" style="text-align: center;" /><br />
<br />
<br />
<span style="font-size: large;">點擊功能列Edit -> Project Settings -> Player,選中Resolution and Presentation裡的Run in Background屬性。</span><br />
<br />
<span style="font-size: large;">將Resolution and Presentation中的Display Resolution Dialog屬性,選擇Disabled。</span><br />
<br />
<img border="0" data-original-height="342" data-original-width="404" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl2Lknm57C3NFCoPPqQtHsC4_VxjY6wSSEGVgLsNgBtcJZ9UDnP3Xy0GmHEXd4U9nSsNkCF1uTRvG29TAHfjKEBLknhc1nLAnP_0_ak42qL7EjMnyLkAhpXqJ_-JAfP22Rb9Kb_eY2RqM/s1600/opensettings.PNG" style="text-align: center;" /><br />
<br />
<br />
<span style="font-size: large;">在左邊的場景hierarchy 視窗中,展開Ball3DAcademy遊戲物件,並選中它的子物件Brain3DBrain,在右邊的Inspector中查看屬性。</span><br />
<br />
<span style="font-size: large;">將物件的Type of Brain設定為External。</span><br />
<span style="font-size: large;">(註:設為External是為了在外部做訓練,未來把訓練資料放回專案後,設回</span><span style="font-size: large;">Internal</span><span style="font-size: large;">就可以在Unity裡面看到訓練後的行為)</span><br />
<br />
<img border="0" data-original-height="365" data-original-width="509" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZSCqFRmUeD967jfvm-XkymsuDNg31K5om84G4cqZG1sjsfawJRQZtOrPopTpNVemfRJ5DQsRNEOz1Ict1_QCKFhEF_W9QqtSF4UaFkhyphenhyphenemCI4Vxa8PzzBVfh7R18_dQKEIRm374xqmfs/s1600/opengo.PNG" style="text-align: center;" /><br />
<br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">點擊File -> Build Settings</span><br />
<span style="font-size: large;">選擇目標平台。(選項)勾選Development Build來記錄除錯資訊。</span><span style="font-size: large;">點Build開始打包。</span><br />
<span style="color: red; font-size: large;">重要:存檔路徑請直接指定ml-agents底下的python目錄,給予的檔名也請記住,待會設定要填入一樣的檔名。</span><br />
<br />
<img border="0" data-original-height="612" data-original-width="632" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPe0IkvvDOKcSdQeaXuFtO1k9AqtM7MqZ-6PTI7Eh266H0K1vApTtdMFyP-TW14VIBDSNFPCkkTqXJ6cAjISL1LHYEeFjl_ayhBOHK_qRBESVOuFqoNkg5xkK7Flf511Wd08xDnirxTBg/s1600/openbuild.PNG" style="text-align: center;" /><br />
<img border="0" data-original-height="583" data-original-width="802" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgls0YBL6O8PfAXG-SHXeDdakPKvIcb6n1fcnlgLEREfuUjIMlkxQ6EOwZrzHwriY6KseGfOw997lLSi1F_-BVs6H5rOjw1fCEc370puqHkbwBYUs-SfjNRQUoim5cUmAnTAWFPGH1wdHM/s1600/opensave.PNG" style="text-align: center;" /><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<h2>
<span style="color: #e69138; font-size: large;">用強化學習訓練大腦</span></h2>
<span style="font-size: large;">測試Python API</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">---Windows---</span><br />
<span style="font-size: large;">如果上面已經跑過Jupyter安裝流程,你可以:</span><br />
<span style="font-size: large;">開啟</span><span style="font-size: large;">Anaconda Prompt</span><br />
<span style="font-size: large;">切換目錄到專案的python目錄</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">cd d:\ml\ml-agents\python</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">執行jupyter notebook</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">開啟瀏覽器localhost:8888就會看到jupyter notebook在python的位置被打開(目錄資料結構確保和下圖相同)</span><br />
<span style="font-size: large;"><br /></span>
<img border="0" data-original-height="724" data-original-width="792" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwbhANk0ggoeeqXhe8Lb0jmn5l4dAsPjRvsKQKM4LOc3q28JYe1Enh20A7r3ud4mW5xXmzJDAdG4v0ZnFRfuIV_hgMNO225aNp19dpq42h3JOoGh1LpsAIh_Xt58dfi20CRNUM8bjM4rs/s1600/jupyternotebook.PNG" style="font-size: x-large; text-align: center;" /><span style="font-size: large;"><br /></span><span style="font-size: large;"></span><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h2>
<span style="font-size: large;"><span style="color: #e69138;">用PPO訓練模型</span></span></h2>
<br />
<span style="font-size: large;">下一步我們訓練代理,讓它在平台上平衡小球的位置,我們會使用一個叫做近端策略優化(Proximal Policy Optimization),簡稱PPO的強化學習演算法。這個演算法經過實驗,證明是十分安全、高效且比其他強化學習演算法實用性更強的,所以我們選擇這個演算法來作為Unity機器學習代理的範例演算法。</span><br />
<br />
<br />
<span style="font-size: large;">如果想要瞭解更多關於近端策略優化演算法的資訊,請參閱OpenAI發佈的<a href="https://blog.openai.com/openai-baselines-ppo/" target="_blank">文章</a>:</span><br />
<br />
<br />
<span style="font-size: large;">現在請按照下面步驟操作:</span><br />
<br />
<br />
<ul>
<li><span style="font-size: large;">在Jupyter中打開PPO.ipynb</span></li>
<li><span style="font-size: large;">修改env_name的值 = 剛剛打包的專案檔名稱</span></li>
<li><span style="font-size: large;">run_path目前設定為ppo,依需求可以改到別的目錄也可以不改</span></li>
<li><span style="font-size: large;">按途中的前進按鈕,執行PPO.ipynb的程式,注意不要執行"Export the trained Tensorflow graph."這行文字後的程式。</span></li>
</ul>
<br />
<img border="0" data-original-height="710" data-original-width="725" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfN8YDq3tRM45ytgqlTWcblvhyJX8xTQWPqKrHCEIzo1C72IkToSCQZtcelDe4Jq8ihy2lK7dNdJEWqoeRW6GC8EWlrwltZOuxTy8U1_msXX4qOo2Z7pejzTNsBbMOCHPp9B1ONPVTE_s/s1600/PPOsetting.PNG" style="text-align: center;" /><br />
<br />
<span style="font-size: large;">(選項)針對本專案如果你想要快點訓練完成,可以多調整以下設定:</span><br />
<span style="font-size: large;">max_steps = 5000</span><br />
<span style="font-size: large;">buffer_size = 5000</span><br />
<span style="font-size: large;">batch_size = 512</span><br />
<span style="font-size: large;"><br /></span>
<h2>
<span style="color: #e69138; font-size: large;">觀察訓練過程</span></h2>
<br />
<span style="font-size: large;">如果順利的話,你的機器人應該已經開始訓練了。要更仔細地觀察訓練過程,你可以使用Tensorboard。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">在Anaconda Prompt視窗</span><span style="font-size: large;">切換目錄到專案的python目錄</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"></span><br />
<span style="font-size: large;">cd d:\ml\ml-agents\python</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">輸入:</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">tensorboard --logdir=summaries</span><br />
<br />
<br />
<br />
<span style="font-size: large;">然後在瀏覽器中打開localhost:6006</span><br />
<br />
<img border="0" data-original-height="538" data-original-width="1036" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIdCAAr4AaCaT3mnWhQdHjDib7typN_QLSjN9gjIdNgYfGxT2bzveDvMewyI_h9ZSSG_sKWw5dyfemoLtWmGofVNznw5XAKcoydv9RHugePOiWfNjD1CuzNYqvzI5NgT0Fh8gtOPXOfY4/s1600/Photo+24-12-2017%252C+19+41+01.jpg" style="font-size: x-large; text-align: center;" /><br />
<br />
<br />
<br />
<span style="font-size: large;"> 從Tensorboard上,你會看到以下多個統計圖:</span><br />
<br />
<br />
<ul>
<li><span style="font-size: large;">累計獎勵(Cumulative Reward):所有代理各自的平均累計獎勵。在成功的訓練過程中,這個變數應該會增大。</span></li>
<li><span style="font-size: large;">數值損失(Value Loss) :數值函式更新時的平均損失。這關係到模型是否能預測每個狀態下的數值。在成功的訓練過程中,這個變數會減小。</span></li>
<li><span style="font-size: large;">策略損失(Policy Loss) :策略函式更新時的平均損失。這關係到策略(決定行為的過程)的變化大小。在成功的訓練過程中,這個變數的大小會減小。</span></li>
<li><span style="font-size: large;">事件長度(Episode Length) :設定環境下,所有代理中每個事件的平均長度。</span></li>
<li><span style="font-size: large;">數值估計(Value Estimates) :代理所存取的所有狀態下的平均數值估計。在成功的訓練過程中,這個變數數值會增大。</span></li>
<li><span style="font-size: large;">策略信息量(Policy Entropy):這個變數告訴你模型的決定隨機度有多大。在成功的訓練過程中,這個變數會緩慢減小。如果它減小得太快,beta hyperparameter應該會增大。</span></li>
</ul>
<br />
<span style="font-size: large;"><br /></span>
<br />
<h2>
<span style="color: #e69138; font-size: large;">將訓練好的模型載入Unity環境</span></h2>
<br />
<span style="font-size: large;">經過一段時間訓練後,當訓練過程顯示的平均獎勵大於等於75時,你可以回到PPO檔案繼續往下執行</span><span style="font-size: large;">Export the trained Tensorflow graph這一區,匯出</span><span style="font-size: large;">保存資料。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">資料會存在python/models/ppo(檔案裡面run_path所指的目錄)</span><br />
<span style="font-size: large;">會看到一個同名.bytes</span><br />
<span style="font-size: large;"><br /></span>
<img border="0" data-original-height="298" data-original-width="586" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQXMERmTNJ66UD3wfbKa15sVsIU5aho_xTieeFUBrvvQL1ZNGmleHmVhWa8CtU6b1FpotFNVG1zkL-GMx8xexUX8x0M24cp9_eLSbpH5AY_TxToANHazOlJ3uhU1kyOe14sSjCTS7Cuak/s1600/ppofile.PNG" style="text-align: center;" /><br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">停止執行PPO就能停止訓練。現在你就已經有訓練好的TensorFlow模型。你必須將保存的模型轉換為Unity可使用的格式,透過以下步驟載入到Unity專案中。</span><br />
<br />
<span style="font-size: large;">把訓練好的bytes檔案複製到:</span><br />
<span style="font-size: large;">Assets/ML-Agents\Examples\3Dball\TFModels</span><br />
<img border="0" data-original-height="269" data-original-width="556" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivPquxN3r_5Gjk4U5TB9emOyOfKHjU4hVW6LvZYEhAowdhn3vory5eB_yGXJROlvDqZZwkzDz7EWA9gbDCefBmA9EI5dgvWG22s-7udxEX3_1tHqJz0bu_6YVHWgzqilWBsOxM1vtyupc/s1600/tfmodels.PNG" style="text-align: center;" /><br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />
<br />
<h2>
<span style="color: #e69138; font-size: large;">設定對TensorFlowSharp的支援</span></h2>
<br />
<span style="font-size: large;">因為對TensorFlowSharp的支持目前還處於實驗階段,預設情況下它是被禁用的。要打開它,你必須按照下列步驟。</span><br />
<span style="font-size: large;">請注意Internal Brain模式只在完成以下步驟後才能使用。</span><br />
<br />
<br />
<ul>
<li><span style="font-size: large;">確保使用的是Unity 2017.1以上版本。</span></li>
<li><span style="font-size: large;">從這裡<a href="https://s3.amazonaws.com/unity-agents/TFSharpPlugin.unitypackage" target="_blank">下載TensorFlowSharp套件</a>,並匯入Unity中。</span></li>
<li><span style="font-size: large;">功能表選擇Edit -> Project Settings -> Player。找到Other Settings,在Scripting Runtime Version屬性中選擇Experimental (.NET 4.6 Equivalent),在Scripting Defined Symbols屬性中,加入ENABLE_TENSORFLOW。(請注意:多個平台代表每個平台都要設定)</span></li>
<li><span style="font-size: large;">重開Unity</span></li>
</ul>
<div>
<img border="0" data-original-height="684" data-original-width="404" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFGy_gD1YEW_Nb9FeYzDKKUWvj_SXiLWYJC9rfQAZ40lFCLjopT8OrQkrs0_-bZkNvdgkVjR3bHThcCGkMTrh7hVCGQaxWsVCc50xR8-DHVoAPAYcyXt23zlOY0-Ml0B9C1ihT4ZJCGfA/s1600/othersettings1.PNG" style="text-align: center;" /></div>
<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<span style="color: red; font-size: large;">務必重開之後回來確認Symbols還在</span><br />
<br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><ul>
<li>重新開啟3DBall場景</li>
<li>從場景的hierarchy視窗選擇Ball3DBrain物件</li>
<li>如下圖將Type of Brain改為Internal</li>
<li>如下圖將Graph Model指定剛剛匯入的.bytes檔</li>
</ul>
</span><div class="separator" style="clear: both; text-align: left;">
<img border="0" data-original-height="606" data-original-width="429" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbAopgwETe5OWx75PFA4vkYmgxpFacDyUPhqwJb8GZ9Eol_4u9G96LmBN1H4qxHw5wavKEm2IVy20LYLMneeSFedKaWunq8Rdrjx05IJndyQEP7MFIe20_q4ZC-O06u_wnNbA75Av4KWI/s1600/brainsetting.PNG" style="text-align: center;" /></div>
<br />
<br />
<br />
<ul>
<li><span style="font-size: large;">將Graph Placeholder的size值設為1</span></li>
<li><span style="font-size: large;">增加名為epsilon的placeholder,設定類型為floating point,範圍從0到0。</span></li>
</ul>
<br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><span style="color: yellow; font-size: large;">注意:上面這兩個設定應該在專案裡已經設好了。</span></span><br />
<span style="font-size: large;"><span style="font-size: large;">設定這兩個步驟是有必要的,因為3DBall</span>是個持續的控制環境,而TensorFlow模型會用噪音參數來決定行動。但那樣的情況下控制過程是離散的,所以不需要epsilon變數)</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">最後按Play按鈕,查看訓練後的結果在Unity Editor裡呈現。</span><br />
<br />
<br />
<span style="font-size: large;">流程非常繁瑣但現在你應該可以看到被訓練好的模型已經能自行控制平衡小球的行為。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">Jason Weimann的兩段教學影片對本專案非常有幫助,建議遇到問題的開發者可以參考這兩段影片</span><br />
<br />
<span style="font-size: large;"><a href="https://youtu.be/qxicgknzUG8" target="_blank">Unity3D Machine Learning Setup for ML-Agents on Windows 10 with Tensorflow</a><br /></span></div>
<div>
<span style="font-size: large;"><a href="https://youtu.be/-YWts_GlHCY" target="_blank">Unity3D Machine Learning - Building and Training the First Example (3DBall)</a></span><br /></div>
</div>
</div>
Unity Taiwanhttp://www.blogger.com/profile/05195645646153478011noreply@blogger.com5tag:blogger.com,1999:blog-6317841908377212626.post-3815567042232166242017-12-22T04:38:00.001-08:002017-12-22T05:00:29.691-08:00在遊戲中運用機器學習Machine Learning<span style="font-size: large;">作者:Alessia Nigretti <a href="https://blogs.unity3d.com/2017/12/11/using-machine-learning-agents-in-a-real-game-a-beginners-guide/" target="_blank">原文</a></span><br />
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;">潤稿:Wei J</span></div>
<div>
<span style="font-size: large;"><br /><br />Unity機器學習團隊已經發佈過一系列的介紹機器學習文章以及三個範例專案。Unity發佈機器學習代理工具ML-Agents的消息引起了Unity社群中眾多開發人員的興趣。這些開發人員有的是人工智慧領域的技術專家,有的則是對機器學習改變遊戲製作和玩遊戲的方式感興趣。<br /><br />Unity的技術經理Alessia Nigretti和Ciro Continisio都不是機器學習的專家,但他們一起開發了第一個基於Unity新機器學習代理系統製作的遊戲範例專案。並在DevGAMM Minsk 2017遊戲開發者大會上作了展示。今天的文章基於他們在大會上演講的內容,向大家介紹在創作機器學習範例專案過程中所思所想,幫助開發者進一步熟悉和瞭解Unity機器學習代理工具。</span><br />
<h2>
<span style="color: #e69138; font-size: large;">介紹</span></h2>
<span style="font-size: large;"><br />Unity核心價值觀之一是讓遊戲開發大眾化,所以我們希望確保每一個想要學習與使用的人都能適用這個新的機器學習代理工具。首先我們與Unity機器學習團隊進行了合作,並製作了一些小型的範例專案,以瞭解它們的工作原理。我們碰到很多問題是第一次接觸機器學習代理的開發者也可能會碰到的,所以我們把問題記錄了下來,盡可能的簡單總結所有內容。這樣你在讀這篇文章時,即使你不知道機器學習是什麼或者它是如何運作的,你也仍然可以在Unity機器學習代理的世界中找到自己的方向!<br /><br />我們的機器學習範例專案《Machine Learning Roguelike》 是一款2D動作遊戲,玩家必須與兇惡狡猾的史萊姆戰鬥。這些由機器學習控制的敵人將會不斷攻擊我們的英雄,絲毫不留喘息的機會,而當它們感覺到有生命危險時則會四散而逃。</span><br />
<h2>
<span style="color: #e69138; font-size: large;">什麼是機器學習?</span></h2>
<span style="font-size: large;"><br />讓我們從介紹機器學習開始。機器學習是人工智慧的一種應用,它為系統提供了一種不靠人工設計,而是從資料中自主學習的能力。機器學習的工作原理是通過給系統提供可用於尋找模式的資訊與意見(observations),並對未來的結果進行預測。更籠統的說,系統需要習得期望之輸入與輸出的映射關係。這樣系統才可以選擇接下來的最佳動作,以達到最佳的結果。<br /><br />實現的方法有很多種,取決於我們將何種類型的意見提供給系統。在本文中環境中使用的強化學習(Reinforcement Learning)。強化學習的特點是:它不會告訴系統做什麼,而只會指出什麼是正確、什麼是錯誤。這意味著,我們讓系統執行隨機行為,而我們根據這些行為結果判斷對錯,提供獎勵或懲罰。最終系統將會明白,要獲得獎勵必須要執行什麼樣的操作。我們可以把這想像成訓練小狗坐下:小狗不會明白我們的意圖,但如果我們在它做對的行為時給予小獎勵,它最終將會把動作和獎勵聯繫到一起。 </span><br />
<span style="font-size: large;"><br /></span>
<img border="0" data-original-height="748" data-original-width="800" height="598" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/image6.png" style="text-align: center;" width="640" /><span style="font-size: large;"><br /><br /><br />我們使用強化學習來訓練一個神經網路(Neural Network),這是一個基於神經系統的電腦系統模型。神經網路由單元或“神經元”(Neuron)組成。神經元被分為多個層。與外部環境交互並收集所有資訊的層是輸入層。與之相反,輸出層的所有神經元被用於在網路中儲存某個特定輸入的結果資訊。在中間的是隱藏層,它們包含的神經元負責進行所有的計算。它們學習輸入資料的複雜抽象表徵,從而使它們的最終結果是“智慧”的。大多數的層是“完全連接”的,也就是意味著該層裡的神經元與前一層中的所有神經元都有連接。每個連接都由一個“權重”定義,這個數值用於強化或弱化神經元之間的連接。<br /><br />在Unity中,我們的“代理”(執行學習的實體)使用強化學習模型。代理在一個環境中執行動作。動作會引發環境的改變,引起的改變將會連同一些獎勵或懲罰回饋給代理。動作發生的地方我們稱之為學習環境(Learning Environment),在實踐中對應的就是一個常規的Unity場景。<br /><br />在學習環境中有一個學院(Academy),這是一個腳本,包涵了定義訓練的屬性,例如:幀率、時間尺度等。學院將這些參數傳遞給大腦(Brain),即包含了訓練模型的實體。最後代理連接到大腦,獲得動作和回饋資訊,以促進學習進程。為了執行訓練,系統需要使用一個額外的模組,允許大腦使用TensorFlow機器學習庫和外部的Python環境進行交流。一旦訓練完成後,這個環境會將學習過程提煉成一個“模型(Model)”,這是一個二進位格式的檔。隨後可以將模型重新導入Unity,作為一個已訓練的大腦。</span><br />
<h2>
<span style="color: #e69138; font-size: large;">將機器學習應用到遊戲</span></h2>
<span style="font-size: large;"><br />在製作簡單範例專案<a href="http://mp.weixin.qq.com/s?__biz=MjM5NjE1MTkwMg==&mid=2651044873&idx=1&sn=3d9a3e9131b0db3149d5740515fa68a0&chksm=bd1a8b388a6d022e8e527cb1e64cf859ff61b0c7700ebe41bd02b90b3b1cce91e3d02cdbb46f&scene=21#wechat_redirect">3D平衡小球</a>和其它用幾個小時完成的小專案之後,如下圖所示。我們被這項技術的潛力所吸引。<br /><br /> </span><img border="0" data-original-height="464" data-original-width="640" height="232" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/image12.gif" style="text-align: center;" width="320" /> <img border="0" data-original-height="620" data-original-width="750" height="264" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/image14.gif" style="text-align: center;" width="320" /><span style="font-size: large;"><br /></span><img border="0" data-original-height="613" data-original-width="600" height="320" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/image13.gif" style="text-align: center;" width="313" /> <img border="0" data-original-height="556" data-original-width="602" height="295" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/image15.gif" style="text-align: center;" width="320" /><span style="font-size: large;"><br /><br />我們發現了一個可用於2D Roguelike遊戲的實際應用。在建構場景時,我們還使用了2D Tilemap和Cinemachine 2D等新功能。<br /><br />機器學習範例專案《Machine Learning Roguelike》 的意圖是創作一款簡單的動作遊戲,而遊戲中所有的實體都是機器學習代理。這樣,我們建立了一種同時可用於玩家和敵人之間的通用交互語言。遊戲的目的非常簡單:四處移動,並在遭遇中倖存下來。<br /><br /> </span><br />
<h2>
<span style="color: #e69138; font-size: large;">訓練設定</span></h2>
<span style="font-size: large;">每一個良好的訓練都是從有關訓練演算法的高級腦力激盪會議開始的。這是在代理的類別中運行的程式,確定輸入對代理的影響以及產生的回報。我們先定義什麼是遊戲的基本動作(移動、攻擊、治療…)、動作彼此交互的方式、我們希望代理能從中學習到什麼,以及我們在什麼狀況會給予獎勵或懲罰。<br /><br />首先第一個要做的決定,是狀態(State)和動作(Action)應該使用離散(Discrete)資料還是連續(Continuous)資料。離散意味著狀態和動作一次只能有一個值—它是真實環境的簡化版本,因此代理可以更容易地將動作與獎勵聯繫起來。在範例中,我們使用離散的操作,一共有6個值:0:保持靜止; 1- 4:向一個方向移動; 5:攻擊。連續意味著可以有多個狀態或動作,且都是浮點數值。但是它們的可變性會使代理混淆,所以很難使用。在《Roguelike》專案中,我們使用連續狀態來檢測生命、目標、目標距離等。</span><br />
<h2>
<span style="color: #e69138; font-size: large;">獎勵功能</span></h2>
<span style="font-size: large;"><br />我們提出的初始演算法是,如果代理在不產生危險的前提下,能不斷接近目標就給予獎勵。同樣,如果發生危險時,它與目標之間的距離增加(代理“逃跑”),就會得到獎勵。此外,該演算法還包括對代理的懲罰,以防止它在不允許的情形下進行攻擊。</span><img border="0" data-original-height="255" data-original-width="800" height="204" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/image8.png" style="text-align: center;" width="640" /></div>
<div>
<div style="text-align: center;">
<br /></div>
<span style="font-size: large;">經過反復的測試,初始演算法發生了很大的變化。我們認識到,要獲得期望的行為,最好的方式就是遵循一個簡單的模式:嘗試,失敗,從失敗中學習,迴圈。就像我們希望機器從我們通過反復試驗得到的意見中學習一樣,我們也想從不斷的試錯意見中進行學習。<br /><br />例如,我們注意到的一件事是,代理總能找到一種方法來取得獎勵:在我們的案例中,代理開始來回移動,因為每當它再次向前移動時,它就會得到一些獎勵。基本上,它找到了一種利用我們的演算法獲得最大獎勵的方法!</span><br />
<h2>
<span style="color: #e69138; font-size: large;">我們學到什麼</span></h2>
<span style="font-size: large;">從尋找合適解決方案的研究中,我們學到了許多不同的東西,並成功將它們應用於我們最終的專案。要謹記,只要我們認為代理做“對”了,在遊戲中的任何時候都可以給予獎勵!。</span><br />
<h2>
<span style="color: #e69138; font-size: large;">訓練場景</span></h2>
<div>
<img border="0" data-original-height="418" data-original-width="800" height="334" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/image9.png" style="text-align: center;" width="640" /></div>
<div>
<br /></div>
<span style="font-size: large;">在設定好演算法後,下一步就是設定訓練場景。我們選擇設定一個小場景作為訓練環境,然後在另一個更大場景的遊戲中使用代理,訓練模型就是從此場景匯出的。我們決定創建4個不同的房間,每個房間都有不同的長度和寬度參數,這是為了讓代理能考慮所有可能的變數,避免它習慣於特定類型的房間。訓練場景負責代理位置的配置、代理與大腦的連接,以及學院和參數的設定。</span><br />
<h2>
<span style="color: #e69138; font-size: large;">我們學到甚麼</span></h2>
</div>
<div>
<span style="font-size: large;">從建立訓練場景的過程中,我們認識到使用平行訓練,代理可以獲得更多的資料進行學習,而不僅僅是重複幾次同樣的情況,因此能使訓練更加有效。要做到這一點,需要設定一些啟發式代理來執行一些簡單的操作,説明代理學習,且不會導致他們做出錯誤的假設。例如,我們設定了一個簡單的啟發式(Heuristic)腳本,使代理進行隨機攻擊,為我們的訓練代理提供一個範例,以瞭解當它們受到傷害時會發生什麼。<br /><br /><br /> </span><br />
<h2>
<span style="color: #e69138; font-size: large;">訓練</span></h2>
<span style="font-size: large;"><br />一旦環境準備就緒,就可以開始訓練了。如果我們計畫進行一個很長的訓練,最好檢查你的演算法邏輯有沒有問題。這不是編譯時的錯誤,或者與你是否是一個優秀的程式師無關—正如之前所提到的,代理將會找到一種方法來利用演算法,所以要確保沒有邏輯缺陷。要確保萬無一失,可以啟動一個1x倍速度的訓練,看看會發生什麼。觀察一下,看看你的代理是否像期望的那樣進行動作。<br /><br />訓練的準備工作就緒後,我們需要新建一個可以在Python中和TensorFlow環境進行互動的版本。<br /><br />首先,我們將進行外部訓練的大腦設定為“External”,然後產生(build)遊戲。完成後,我們打開Python環境,設定超參數(hyperparameter)然後啟動訓練。有關如何<a href="https://github.com/Unity-Technologies/ml-agents/blob/master/docs/Getting-Started-with-Balance-Ball.md">產生訓練專用版本</a>以及<a href="https://github.com/Unity-Technologies/ml-agents/blob/master/docs/best-practices-ppo.md">如何選擇超參數</a>的資訊,在機器學習的<a href="https://github.com/Unity-Technologies/ml-agents">Github</a>頁面都可以找到。</span><br />
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">我們在進行訓練的同時,可以觀察到代理所獲得的平均獎勵。獎勵應該會緩慢增加,直到代理停止學習時獎勵會趨於穩定。當我們對模型滿意後,就可以將它導回到Unity查看效果。<br /><br /> </span><img border="0" data-original-height="404" data-original-width="252" height="640" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/image10.gif" style="text-align: center;" width="398" /><span style="font-size: large;"><br /><br />上圖中的動畫展示了1小時訓練的成果:與我們的預期一致,史萊姆靠近另一個代理進行攻擊,直到被還擊並損失大部分生命。同時它開始逃跑進行回血,然後折返再次攻擊對手。</span><br />
<h2>
<span style="color: #e69138; font-size: large;">測試</span></h2>
<span style="font-size: large;">當我們把這個模型應用回Roguelike遊戲,可以看到它的行為方式保持一致。史萊姆已經學會如何有智慧地行動,以及適應與訓練環境不同的場景。<br /><br /> </span><br />
<h2>
<span style="color: #e69138; font-size: large;">結語</span></h2>
<span style="font-size: large;">本文旨在提供一些小型範例,說明你能用Unity的機器學習代理工具做些什麼,而不必對機器學習有任何具體的技術知識。</span></div>
<div>
<span style="font-size: large;">本專案你可以從這裡<a href="https://github.com/UnityTechnologies/MachineLearningRoguelike" target="_blank">下載</a>。<br /><br />如果你已經著手在遊戲製作中實現機器學習,還有很多事情可以做:例如將訓練和啟發式結合成一個複雜的行為,這會讓機器學習代理難以訓練,但同時會為遊戲帶來一些真實性。<br /><br />如果你想為訓練增加更多策略,也可以通過一個封閉的Beta測試或內部試玩來整合真實玩家的遊戲風格、策略和意圖。有了這些資料,你就可以進一步優化代理的訓練,以達到下一級別的AI複雜度。如果你喜歡大膽嘗試,你可以試著建立自己的機器學習模型和演算法,以獲得更多的靈活性!</span></div>
Unity Taiwanhttp://www.blogger.com/profile/05195645646153478011noreply@blogger.com0tag:blogger.com,1999:blog-6317841908377212626.post-13196535492642162292017-12-21T21:43:00.002-08:002017-12-22T04:53:53.692-08:00Unity機器學習ML-Agents v0.2版發佈<span style="font-size: large;">作者:Arthur Juliani <a href="https://blogs.unity3d.com/2017/12/08/introducing-ml-agents-v0-2-curriculum-learning-new-environments-and-more/" target="_blank">原文</a><br />潤稿:Wei J<br /><br /><br />Unity機器學習代理最新版ML-Agents v0.2現已發佈!在本版本裡,我們作了以下改進:</span><br />
<ul><span style="font-size: large;">
<li>為Unity SDK和Python API增加了新特性</li>
<li>更多新範例環境</li>
<li>改進了預設的增強學習演算法(PPO)</li>
<li>修復Bug及小功能改進</li>
</span></ul>
<span style="font-size: large;">
</span><span style="font-size: large;">查詢在<a href="https://github.com/Unity-Technologies/ml-agents/releases/tag/0.2.0" target="_blank">Github</a>上的更新紀錄或<a href="https://github.com/Unity-Technologies/ml-agents" target="_blank">下載專案</a>。</span><br />
<h2>
<span style="color: #e69138; font-size: large;">新的連續控制和平台化環境</span></h2>
<span style="font-size: large;"><br />很多開發者希望我們能提供更多的範例環境,讓他們在開發初期能有更多種類的基底幫忙構築專案。所以在ML-Agents v0.2版本中包含了四個新的環境。其中兩個是新的連續控制環境,另外兩個平台化環境為展示新的課程學習特性而設計。</span><br />
<div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<span style="font-size: large;"><iframe allow="encrypted-media" allowfullscreen="" frameborder="0" gesture="media" height="315" src="https://www.youtube.com/embed/vRPJAefVYEQ" width="560"></iframe><br /> <br /> </span><br />
<h2>
<span style="color: #e69138; font-size: large;">ML-Agents v0.2新特性</span></h2>
<span style="font-size: large;"><span style="color: #e69138;">課程學習 Curriculum Learning</span><br /><br />課程學習是一種訓練機器學習模型的方法,藉由對同一個問題逐漸增加難度,讓模型每次都接受最適合的挑戰。想要更深入研究可以參考<a href="https://qmro.qmul.ac.uk/xmlui/bitstream/handle/123456789/15972/Bengio%2C%202009%20Curriculum%20Learning.pdf?sequence=1">原文研究內容</a>。<br /><br />這種方法由來已久,因為這是人類的典型學習方法。如果你能回想小學教育,我們學習的課程和知識都是有一定次序。例如:我們先學算數再學代數。學習代數後,學習的微積分。我們在早期課程中所學到的技能和知識都為以後的課程提供了學習基礎。同樣的原理可以應用到機器學習中,在簡單的任務上進行訓練,是為後續更困難的任務提供基礎。</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><img border="0" data-original-height="220" data-original-width="800" height="176" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/image3-1.png" style="font-size: medium; text-align: center;" width="640" /><br /><br />課程學習中的數學課程範例:課程中的題目從簡單到複雜,每個題目都根基於前一個題目<br /><br /><br />當我們提到強化學習的實際運作方式,主要是透過訓練中偶爾會得到的獎勵作為學習信號。而在更複雜或困難的任務中,這種獎勵往往是稀少且難以獲得的。<br /><br />例如:在任務中代理需要推動並利用方塊來翻過一面牆並到達目標地點。一開始訓練代理會以隨機的模式作為完成此任務的策略,而隨機策略可能會導致代理在場景中裝忙,並且可能永遠無法越過牆壁到達地點來得到獎勵。但如果我們讓代理從一個簡單的任務開始,比如朝著沒有障礙的目標前進,那麼代理就可以很容易地學會完成這個任務。從這裡開始,我們可以通過逐漸增加牆的大小來慢慢提高任務的難度,直到代理能夠完成一開始不可能完成的任務-攀越牆壁。在我們的ML-Agents v0.2中就包含這樣的一個環境,叫Wall Area。<br /><br /> <img border="0" data-original-height="174" data-original-width="800" height="138" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/image4.png" style="font-size: medium; text-align: center;" width="640" /><br /><br />課程訓練場景的範例 : 場景中逐漸增高的牆阻礙了通往目標的道路<br /><br />要想在實際操作裡看到效果,觀察下面這二條曲線,顯示了使用PPO訓練的大腦隨時間進展得到的獎勵,兩組訓練皆使用了相同的訓練超參數和32個同時運行的代理所提供的資料。<br /><br />橙色線是大腦直接使用完整高度的牆來進行訓練的,而藍色線是大腦通過課程學習任務一點點增加牆的高度來訓練的。如你所見,如果沒有使用課程學習,代理要獲得獎勵很困難,即使在300萬步之後仍然沒有完成任務。我們認為,通過精心設計的課程,使用增強學習訓練的代理將能在較短的時間裡順利完成任務,否則就會困難得多。<br /><br /> <img border="0" data-original-height="344" data-original-width="800" height="274" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/image2-1.png" style="font-size: medium; text-align: center;" width="640" /><br /><br />藍線對應使用課程學習訓練的大腦<br />橙色線對應沒有使用課程學習訓練的大腦<br />垂直的藍色點線對應於在課程訓練期間的課程變化<br /><br />那麼課程學習是如何運作的?為了定義一個課程,第一步就是決定環境中的哪些參數會改變。在Wall Area環境中,牆的高度是會改變的。我們可以將牆的高度定義為我們場景中的學院物件的重置參數,並通過Python API來進行調整。接著我們創建一個簡單的JSON檔來描述課程的結構,而非自己手動調整。<br /><br />在訓練過程中,我們可以通過這個JSON檔來確定牆的高度在哪個點將會發生什麼變化,可以根據已經發生的訓練步驟的百分比決定,也可以根據代理最近獲得的平均獎勵決定。這些完成後,我們只要通過使用課程檔標記(–curriculum-file)指向JSON檔來打開ppo.py即可,接著PPO會使用課程學習來進行訓練。當然,我們可以通過TensorBoard來追蹤當前的課程和進展。<br /><br />下面是一個JSON檔的示例:定義了Wall Area環境的課程。</span><br />
<span style="font-size: large;"><img border="0" data-original-height="174" data-original-width="758" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3vt9BvztRziox6yWveWwqDK99n7AjTn7PFUYbfl71BxEui5uSEoERj8NcdVwQp0jYQEanpmD0kp7JLuTn1znoHKZeUmajCY7t-jKHc1Bl0kQWdnpeXjUBzwog1-yZGCYlkN2NV9Oy28g/s1600/111.PNG" style="font-size: medium; text-align: center;" /></span><br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<span style="font-size: large;">如果你成功創建了機器學習環境,卻很難讓自己的代理解決問題,我們鼓勵你嘗試使用課程學習,我們很樂意聽取你們從中發現了什麼。</span><br />
<h2>
<span style="color: #e69138; font-size: large;">廣播 Broadcasting</span></h2>
<span style="font-size: large;">如今三種大腦類型,也就是內部(internal)、啟發式(heuristic)和玩家(player)大腦,都加入了“廣播”功能,預設情況下這個功能是啟動的。<br /><br />在活動狀態下,所有與該大腦相連的代理的狀態、操作和獎勵都可通過Python API來獲得。這與v0.1版本不同,在之前的版本中,只有外部大腦可以向Python API發送資訊。該功能可用於記錄、分析或存儲來自Python的這些大腦類型的資訊。具體來說,這個功能使模仿學習變得可能,來自玩家、啟發式、或者內部大腦的資料能被作為監督信號來訓練一個獨立的網路,而不需要定義一個獎勵功能,或者額外增加一個獎勵功能來增強訓練信號。我們認為這能給遊戲開發者在思考如何讓遊戲更智慧時提供一個新思路。<br /><br /> <img border="0" data-original-height="419" data-original-width="800" height="335" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/image1-2.png" style="font-size: medium; text-align: center;" width="640" /><br /><br />檢視視窗中的 Brain元件加入了“Broadcas(廣播)”<br /><br /> </span><br />
<h2>
<span style="color: #e69138; font-size: large;">靈活的監控器 Flexible Monitor</span></h2>
<span style="font-size: large;">我們重寫了代理監控(Agent Monitor)以增強它的可用性,原來的監控器只能顯示代理的固定的一組統計資料,新的監控器現在可以顯示與代理相關的任何所需資訊。你只需要呼叫Monitor.Log()來把資訊顯示在螢幕上,或是場景中的代理上。<br /><br /> <img border="0" data-original-height="400" data-original-width="800" height="320" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/image5-1.png" style="font-size: medium; text-align: center;" width="640" /><br /><br />3D平衡小球環境中使用監控器來顯示各種訓練資訊</span><br />
<span style="font-size: large;"><br />作為一個Beta釋出版本肯定會有很多bug及問題,誠摯歡迎你在Github上的<a href="https://github.com/Unity-Technologies/ml-agents/issues">問題頁面</a>與大家分享你所遇到的問題。</span><br />
<h2>
<span style="color: #e69138; font-size: large;"><br /></span></h2>
<h2>
</h2>
<h2>
<span style="color: #e69138; font-size: large;">Unity機器學習社群挑戰賽</span></h2>
<span style="font-size: large; font-weight: 400;">文章的最後,我們很高興宣佈,Unity將會舉辦一個Unity機器學習社群挑戰賽。無論你是機器學習專家,或是對如何將ML-Agents應用到遊戲感興趣,這個挑戰賽都是你學習、探索和獲取靈感的最佳機會。</span><br />
<br style="font-size: x-large; font-weight: 400;" />
<span style="font-size: large; font-weight: 400;">我們很希望看到開發者如何應用新的課程學習方法,但我們沒有限定任何類型或風格,所以不要受到拘束自由發揮吧!在挑戰賽結束後將會頒發一些禮物及驚喜,給予那些活動中獲得最多讚的創作者。</span><br />
<br />
<br style="font-size: x-large; font-weight: 400;" />
<span style="font-size: large;"><span style="color: #e69138;">加入機器學習代理挑戰賽</span></span><br />
<br style="font-size: x-large; font-weight: 400;" />
<span style="font-size: large; font-weight: 400;">第一輪的機器學習代理挑戰賽從2017年12月7日開始至2018年一月31日止,歡迎任何有Unity基本知識經驗的開發者參加。</span><a href="http://bit.ly/2AJNIpB" style="font-size: x-large; font-weight: 400;">按此連結加入挑戰</a><span style="font-size: large; font-weight: 400;">。如果你有任何對於機器學習代理的疑問,歡迎</span><a href="mailto:ml-agents@unity3d.com" style="font-size: x-large; font-weight: 400;">透過mail聯絡我們</a><span style="font-size: large; font-weight: 400;">或加入Unity Connect上的</span><a href="https://connect.unity.com/i/6e5c5eda-b62e-40dc-9d03-f9a89f7b8e82" style="font-size: x-large; font-weight: 400;">機器學習Channel</a><span style="font-size: large; font-weight: 400;">。</span><br />
<span style="font-size: large;"><br /> </span></div>
Unity Taiwanhttp://www.blogger.com/profile/05195645646153478011noreply@blogger.com0tag:blogger.com,1999:blog-6317841908377212626.post-69497998609710369262017-12-19T17:36:00.000-08:002017-12-19T17:36:00.929-08:00ADAM : Unity 支援Alembic匯入工具的開發歷程<span style="font-size: large;">作者:Sean Low <a href="https://blogs.unity3d.com/2017/12/04/adam-the-evolution-of-alembic-support-in-unity/" target="_blank">原文</a></span><br />
<div>
<span style="font-size: large;">潤稿:Kelvin Lo</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<br />
<div style="margin-bottom: .0001pt; margin: 0cm;">
<span style="font-size: 18pt;">你是否好奇</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Oats Studios怎麼</span><span style="font-size: 18pt;">幫</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><a href="https://www.youtube.com/watch?v=R8NeB10INDo&t=34s" target="_blank">ADAM:The Mirror</a><span lang="EN-US" style="font-family: "新細明體",serif; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman";"><span lang="EN-US">和</span></span><a href="https://www.youtube.com/watch?v=tSDsi2ItktY&t=5s" target="_blank">ADAM:Episode 3</a>製作出</span><span style="font-size: 18pt;">那樣逼真的場景、人物和服飾?</span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="margin-bottom: .0001pt; margin: 0cm;">
<span style="font-size: 18pt;">接下來我們將提供一系列文章,解釋</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">ADAM</span><span style="font-size: 18pt;">製作過程中有關照明、</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">支援、布料模擬、著色器、即時渲染等內容。</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br />
</span><span style="font-size: 18pt;">我叫SerEn(Sean) Low, 是一名在Made with Unity團隊裡的美術工具設計師(Art Tool Engineer),我之前在迪士尼協助皮克斯、漫威和盧卡斯影業等團隊開發遊戲機的動畫工具。在Adam短片裡,我負責整合像是</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic和Timeline的工具,</span><span style="font-size: 18pt;">確保動畫流程的順暢和維護性。</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br /><br />
<br />
</span></div>
<h2>
<span style="color: #e69138;"><span style="font-size: 18pt;">背景:</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Unity</span><span style="font-size: 18pt;">中</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">的誕生</span></span></h2>
<span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">
<br />
</span><span style="font-size: 18pt;">大約二年前,</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Unity</span><span style="font-size: 18pt;">研發團隊開始開發</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic匯入工具</span><span style="font-size: 18pt;">,當時主要是給</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Marza</span><span style="font-size: 18pt;">動畫星球的</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><a href="https://blogs.unity3d.com/2016/09/06/progressing-beyond-pre-render-the-marza-movie-pipeline-for-unity/" target="_blank">TheGift</a></span><span style="font-size: 18pt;">的動畫短片用。</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">The Gift</span><span style="font-size: 18pt;">中最具挑戰性的鏡頭之一是將從</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Houdini模擬產生</span><span style="font-size: 18pt;">的</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">資料匯入</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Unity</span><span style="font-size: 18pt;">,那是一個有幾百萬顆塑膠球組成的巨浪。這結果證明Alembic很適合讓美術匯入來自各種其他程式的模擬資料</span><span style="font-size: 18pt;">。</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">還使美術可以突破即時引擎中基於關節網格變形的限制。</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br /><br />
</span><span style="font-size: 18pt;">當</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Oats Studios</span><span style="font-size: 18pt;">決定在製作過程中使用</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic工具</span><span style="font-size: 18pt;">時,還希望有一些額外的功能和優化,以便能處理布料模擬的擬真效果以及即時臉部捕捉。由於這些需求與當初</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic工具</span><span style="font-size: 18pt;">的設計目的差異很大,</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Unity</span><span style="font-size: 18pt;">開發團隊在升級這個工具上做了很大的努力。</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br /><br />
</span><h2>
<span style="color: #e69138;"><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">
Alembic工具</span><span style="font-size: 18pt;">的主要升級</span></span></h2>
<span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">
<br />
</span><span style="font-size: 18pt;">第一個主要改變是針對</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Timeline</span><span style="font-size: 18pt;">的整合。這讓</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">資料在執行時可以即時輸入並透過</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Timeline</span><span style="font-size: 18pt;">播放。同時在編輯狀態中,開發者可以在</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Timeline</span><span style="font-size: 18pt;">上直接拖動就可以播放</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">動畫。為了完成這個功能,我們在</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic Importer</span><span style="font-size: 18pt;">包裡面加了一個自訂</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">PlayableBehavior
(Alembic Stream Player)</span><span style="font-size: 18pt;">,</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"> PlayableAsset (Alembic Shot
Asset)</span><span style="font-size: 18pt;">和</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">TrackAsset (Alembic Track)</span><span style="font-size: 18pt;">。</span><br />
<div style="margin-bottom: .0001pt; margin: 0cm;">
<span lang="EN-US" style="font-size: 18pt;">想了解更多可以查看<a href="https://docs.unity3d.com/Manual/Playables.html" target="_blank">文件</a><br />
</span><span style="font-size: 18pt;">在</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Timeline</span><span style="font-size: 18pt;">中,你可以先加一個</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic
Track</span><span style="font-size: 18pt;">,然後建立一個</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic Shot Asset</span><span style="font-size: 18pt;">,最後透過一個</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic Stream Player</span><span style="font-size: 18pt;">元件將它和場景中的</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">實例進行關聯。</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br />
<br />
<img border="0" data-original-height="130" data-original-width="800" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/track_shotasset.png" style="font-family: "Times New Roman"; font-size: medium; text-align: center;" /></span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br /></span></div>
<div style="margin-bottom: .0001pt; margin: 0cm;">
<span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Timeline</span><span style="font-size: 18pt;">中的一個</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic Track</span><span style="font-size: 18pt;">和</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic Shot Asset<br />
<br />
<img border="0" data-original-height="450" data-original-width="800" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/streamPlayer-1280x720.png" style="font-family: "Times New Roman"; font-size: medium; text-align: center;" /></span><span style="font-size: 18pt;">場景物件上的一個</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic Stream Player</span><span style="font-size: 18pt;">元件</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br />
<br />
</span><span style="font-size: 18pt;">第二個重要更新是針對頂點共用(</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Vertext Sharing</span><span style="font-size: 18pt;">)的支持。這對優化網格拓撲資源的</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">流傳輸效能十分重要。典型的</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">資料是用來進行動態模擬,比如粒子,它們的網格拓撲會不停變化。我們將共用的頂點合併,以優化重播效能。這非常的重要,因為網格在每一幀都會基於資料流程進行即時重建。透過合併共用頂點,其它網格屬性,例如邊、</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">UV</span><span style="font-size: 18pt;">、法線以及切線也都會被更新,動態</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">網格現在的行為就與一個</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">FBX</span><span style="font-size: 18pt;">網格一樣。這確保了網格可以根據場景中指定的材質、著色器和光照做出回饋。</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br />
<br />
<img border="0" data-original-height="360" data-original-width="640" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/alembicMesh-640x360.png" style="font-family: "Times New Roman"; font-size: medium; text-align: center;" /></span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br /></span></div>
<div style="margin-bottom: .0001pt; margin: 0cm;">
<span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Unity</span><span style="font-size: 18pt;">中的</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">網格顯示共用頂點</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br />
<br />
</span><span style="font-size: 18pt;">第三個重要更新是在</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">頂點資料中添加了插值</span><span style="font-size: large;">(Interpolation)</span><span style="font-size: 18pt;">。既然</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">網格基本上是一個每幀都會重建的新網格,它就沒有先前以及之後頂點位置的變化資訊。這在你嘗試對</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">網格應用運動模糊進行渲染時會產生問題。有了插值,</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Unity</span><span style="font-size: 18pt;">中的</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">資源可以計算位置之間的插值,並輸出要進行運動向量計算所必需的速度。那意味著,你現在可以從</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">網格匯出精確的運動向量,以用於著色器計算或後期處理特效包</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Post-Processing Stack</span><span style="font-size: 18pt;">。這增強了最終渲染圖像中的運動模糊品質,同時還因為採樣數降低,使效能得到了提升。</span></div>
<div style="margin-bottom: .0001pt; margin: 0cm;">
<span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">
<br />
<img border="0" data-original-height="500" data-original-width="800" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/motion.gif" style="font-family: "Times New Roman"; font-size: medium; text-align: center;" /></span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br /></span></div>
<div style="margin-bottom: .0001pt; margin: 0cm;">
<span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">網格上的運動向量</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br />
<br />
<img border="0" data-original-height="450" data-original-width="800" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/MV_BeforeBlur-1-1280x720.png" style="font-family: "Times New Roman"; font-size: medium; text-align: center;" /></span><span style="font-size: 18pt;">計算運動模糊前</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br />
<br />
<img border="0" data-original-height="450" data-original-width="800" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/MV_AfterBlur-1280x720.png" style="font-family: "Times New Roman"; font-size: medium; text-align: center;" /></span><span style="font-size: 18pt;">計算運動模糊後</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br />
<br />
<img border="0" data-original-height="450" data-original-width="800" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/MV_MotionVectors-1280x720.png" style="font-family: "Times New Roman"; font-size: medium; text-align: center;" /></span><span style="font-size: 18pt;">運動向量緩衝區</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br />
<br />
</span><span style="font-size: 18pt;">此外我們還實現了好幾個對實際生產中有幫助的特性,能讓工作流程更順暢。例如</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic
Playable Asset</span><span style="font-size: 18pt;">的自動啟動,這使</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic Playable Asset</span><span style="font-size: 18pt;">無需在</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Timeline</span><span style="font-size: 18pt;">中增加額外的</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Activation Track</span><span style="font-size: 18pt;">即可啟動。</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Time Scale</span><span style="font-size: 18pt;">屬性使你可以重新調整</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">資料的重播時間。</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Turn Quad Edge</span><span style="font-size: 18pt;">屬性使你可以選擇網格表面三角化的方向。另外還有一個選項可以在</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">場景物件啟用時緩存所有</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">樣本,而無需在重播中緩存資料。</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br />
<br /></span></div>
<h2>
<span style="color: #e69138;"><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">
Oats Studios </span><span style="font-size: 18pt;">使用</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">的流程</span></span></h2>
<span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">
<br />
“Alembic串</span><span style="font-size: 18pt;">流傳輸對於我們來說,是此專案能夠成功一個非常重要的原因。將模擬的東西導入十分困難,而</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Unity</span><span style="font-size: 18pt;">中的</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic工具</span><span style="font-size: 18pt;">是個大功臣</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">”</span><span style="font-size: 18pt;">,</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Oats Studios</span><span style="font-size: 18pt;">的特效總監</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Chris Harvey</span><span style="font-size: 18pt;">說。</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br />
<br />
<img border="0" data-original-height="450" data-original-width="800" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/timeline_assemble-1280x720.png" style="font-family: "Times New Roman"; font-size: medium; text-align: center;" /></span><span style="font-size: 18pt;">在</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Timeline</span><span style="font-size: 18pt;">編輯器中組合多個</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">資源</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br />
<br /><br />
</span><span style="font-size: 18pt;">基於真實的演出服裝,</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Oats</span><span style="font-size: 18pt;">的</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">ADAM</span><span style="font-size: 18pt;">影片中所有的服飾,都是透過攝影製圖法(</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">photogrammetry)</span><span style="font-size: 18pt;">捕捉還原,然後在</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Marvelous Designer</span><span style="font-size: 18pt;">中重建和模擬。</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Sean
Frandsen負責</span><span style="font-size: 18pt;">在</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Marvelous Designer</span><span style="font-size: 18pt;">中對不同的編織類型羊毛、棉、皮革等賦予真實的物理屬性和動畫。同時捕捉的面部表情被轉換成一系列靜態網格用於</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">播放。幕後花絮可以看<a href="https://www.youtube.com/watch?v=fA4Ov7Veirk" target="_blank">這裡</a></span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br />
<br />
<img border="0" data-original-height="450" data-original-width="800" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/alembicMesh.gif" style="font-family: "Times New Roman"; font-size: medium; text-align: center;" /></span><span style="font-size: 18pt;"><br /></span></div>
<div>
<span style="font-size: 18pt;">在</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">ADAM</span><span style="font-size: 18pt;">中</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">被主要用在兩個地方:布料和臉部</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br />
<br /><br />
</span><span style="font-size: 18pt;">資料隨後被導入到</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Autodesk Maya</span><span style="font-size: 18pt;">,進行進一步處理和調整後匯出為一個</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">檔。這是流程的示意圖。</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br />
<br />
<img border="0" data-original-height="400" data-original-width="800" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/animation_pipeline.png" style="font-family: "Times New Roman"; font-size: medium; text-align: center;" /></span><span style="font-size: 18pt;"><br /></span></div>
<div>
<span style="font-size: 18pt;">導入</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Unity</span><span style="font-size: 18pt;">的</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">和</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">FBX</span><span style="font-size: 18pt;">資源流水線</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br />
<br />
</span><h2>
<span style="font-size: 18pt;"><span style="color: #e69138;">在空間和時間中組裝模擬資源</span></span></h2>
<span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">
<br />
</span><span style="font-size: 18pt;">在</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Unity</span><span style="font-size: 18pt;">階段,</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Oats</span><span style="font-size: 18pt;">將</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Timeline</span><span style="font-size: 18pt;">作為一個裝配工具,組合</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">資源,並在場景空間中將它們和其它資產一起進行編排。例如為了完整地組裝一套角色表演,使用了兩個</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">軌道,分別用於面部和布料。這兩個軌道位於一個包含</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">FBX</span><span style="font-size: 18pt;">格式的身體表演的</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Animation</span><span style="font-size: 18pt;">軌道之上,如下圖所示。</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br />
<br />
<img border="0" data-original-height="416" data-original-width="800" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/alembic_aseemble_graph.png" style="font-family: "Times New Roman"; font-size: medium; text-align: center;" /></span><span style="font-size: 18pt;">裝配好的角色在</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Timeline</span><span style="font-size: 18pt;">中栩栩如生</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br />
</span><span style="font-size: 18pt;">有了</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Timeline</span><span style="font-size: 18pt;">中的所有東西,</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Oats</span><span style="font-size: 18pt;">可以同步並根據每個鏡頭的時間對所有資源進行排序,以進行即時重播。但是在實際的生產過程中,大量的資源會很容易使</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Timeline</span><span style="font-size: 18pt;">編輯器介面雜亂不堪,極難維護。為了解決這個問題,</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Oats</span><span style="font-size: 18pt;">使用可自由展開和折疊的</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><a href="https://docs.unity3d.com/Manual/TimelineOrganizingTrackGroups.html" target="_blank">TrackGroup</a></span><span style="font-size: 18pt;">來組織場景中的資源。為了進行更好的組織管理,</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Oats</span><span style="font-size: 18pt;">還使用了另一個</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Unity</span><span style="font-size: 18pt;">特性</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">ControlTrack</span><span style="font-size: 18pt;">,它可用於處理多個嵌套的</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Timeline</span><span style="font-size: 18pt;">實例。</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br />
<br />
<img border="0" data-original-height="200" data-original-width="800" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/trackgroups.png" style="font-family: "Times New Roman"; font-size: medium; text-align: center;" /></span><span style="font-size: 18pt;">展開與折疊的</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Track Group<br />
<br />
<img border="0" data-original-height="201" data-original-width="800" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/controlTrack.png" style="font-family: "Times New Roman"; font-size: medium; text-align: center;" /></span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">ControlTracks</span><span style="font-size: 18pt;">處理嵌套時間軸資源</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br />
<br /><br />
</span><h2>
<span style="font-size: 18pt;"><span style="color: #e69138;">一鍵自動化</span></span></h2>
<span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">
<br />
</span><span style="font-size: 18pt;">在隨後的製作階段,面部捕捉和布料模擬生成的</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">資料檔案總數接近</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">300</span><span style="font-size: 18pt;">個。因此,</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Oats</span><span style="font-size: 18pt;">需要一個自動化過程來將多個</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">檔導入到</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Timeline</span><span style="font-size: 18pt;">,所以他們編寫了自己的匯入器,自動將</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">檔導入,進行預定義設定,在場景中產生實體並加上所需的元件,以及在</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Timeline</span><span style="font-size: 18pt;">中排序。在</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Unity</span><span style="font-size: 18pt;">開發團隊的幫助下,</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Oats</span><span style="font-size: 18pt;">最終可以只點一個按鈕就能啟動這整個自動化過程。我們從這個專案中還收集了許多很好的回饋和</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">API</span><span style="font-size: 18pt;">需求,用於對</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Timeline</span><span style="font-size: 18pt;">進行深入改進。</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br />
<br />
<img border="0" data-original-height="182" data-original-width="800" src="https://blogs.unity3d.com/wp-content/uploads/2017/12/AlembicsInTimeline.png" style="font-family: "Times New Roman"; font-size: medium; text-align: center;" /></span><span style="font-size: 18pt;">為不同的角色和道具管理幾百個</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">資源</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;"><br />
<br />
</span><h2>
<span style="font-size: 18pt;"><span style="color: #e69138;">小結</span></span></h2>
<span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">
<br />
</span><span style="font-size: 18pt;">在整個製作</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">ADAM專案</span><span style="font-size: 18pt;">的過程中,</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic匯入工具</span><span style="font-size: 18pt;">變得更加成熟和適於實際工作環境。</span><span style="font-size: 18pt;">你可以用它處理動態拓撲類比網格和靜態拓撲網格,如布料和臉部。它針對</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Unity</span><span style="font-size: 18pt;">現有的和即將到來的特性進行了優化,更好的整合。越來越多的美術和工作室對使用</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Alembic</span><span style="font-size: 18pt;">表現出興趣,特別是在即時</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">CG</span><span style="font-size: 18pt;">電影方面,我們很期待它可以成就許多驚豔的</span><span lang="EN-US" style="font-family: "Times New Roman", serif; font-size: 18pt;">Unity專案</span><span style="font-size: 18pt;">。</span><span style="font-size: large;"><br /><br />Alembic Vertex Sharing <a href="https://github.com/unity3d-jp/AlembicImporter/releases">Github發佈</a> 版本 (1.0f1) </span></div>
<div>
<span style="font-size: large;">以Unity Package格式<a href="https://github.com/unity3d-jp/AlembicImporter/releases/download/20171207/AlembicImporter.unitypackage">下載</a>.</span></div>
<div>
</div>
Unity Taiwanhttp://www.blogger.com/profile/05195645646153478011noreply@blogger.com0tag:blogger.com,1999:blog-6317841908377212626.post-56166644808294905802017-12-19T06:43:00.000-08:002017-12-19T06:43:43.903-08:00Unity 2017.3 新功能:程式集定義檔 <span style="font-size: large;">作者:Lukasz Paczkowski <a href="https://blogs.unity3d.com/2017/11/22/unity-2017-3b-feature-preview-assembly-definition-files-and-transform-tool/" target="_blank">原文</a><br />潤稿:Kelvin Lo</span><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
<span style="font-size: large;">隨著2017.3的到來,我們想要跟你介紹兩個你可能會喜歡的新功能。<br /><br /> 首先是程序集定義檔(Assembly Definition Files)。有了這個功能你可以選擇在一個文件夾中定義自己的託管程序集。透過定義依賴關係,就可以確保在腳本中進行更改時,只會重建所需的程序集,進而縮短編譯時間。</span><br />
<div>
<span style="font-size: large;"><br /></span></div>
<span style="font-size: large;">
<div>
當專案越大,編譯時間就不可避免地變久。在一個專案上迭代時很容易造成麻煩,所以設定合適的程序集定義檔可以幫助你更有效率,並花費更少的時間等待腳本的編譯。</div>
<div>
<br /></div>
<div>
第二個功能是新的變換工具(Transform Tool)。我們把三種常用的工具(移動、旋轉和縮放)整合成一個。對我們來說很容易辦到但卻可以節省很多調整時間。</div>
<div>
<br /></div>
<div>
快去下載新的Unity 2017.3。記住在升級專案之前最好先備份。</div>
</span><br />
<h2>
<span style="color: #e69138; font-size: large;">腳本編譯—程式集定義檔</span></h2>
<span style="font-size: large;"><br />Unity自動定義腳本編譯為託管程式集的方式。Unity編輯器中進行腳本更改反覆運算的編譯時間會隨腳本數量的增加而增加。當然,在進行迭代運算時,我們一定是希望編譯的速度越快越平順越好。<br /><br />使用新的程式集定義檔特性,基於資料夾中的腳本定義你自己的託管程式集。如果你將專案腳本分為多個程式集,並定義良好的依賴,確保你在更改某個腳本時,只重新產生必需的程式集。這減少了編譯時間,因此你可以在Unity專案中將每個託管程式集看做是單個的庫。</span></div>
<div>
<span style="font-size: large;"><br /></span><img border="0" data-original-height="315" data-original-width="800" src="https://blogs.unity3d.com/wp-content/uploads/2017/11/ScriptCompilation.png" style="text-align: center;" /><span style="font-size: large;"><br /> <br /><br />上圖展示可以將專案腳本分為多個程式集。如果你只改了Main.dll中的腳本,那其它程式集都不需要重新編譯。由於Main.dll包含的腳本更少,因此它的編譯速度比Assembly-CSharp.dll更快。 同樣的你對Stuff.dll的更改,僅會導致Main.dll和Stuff.dll重新編譯。<br /></span><br />
<h2>
<span style="color: #e69138; font-size: large;">如何使用程式集定義檔</span></h2>
<span style="font-size: large;"><br />程式集定義檔是資源檔,可以透過<span style="color: yellow;">Assets > Create > Assembly Definition</span>功能表來建立。它們的副檔名是.asmdef。<br /><br />你可以將一個程式集定義檔加到Unity專案中的一個資料夾裡,對裡面所有的腳本進行編譯,然後在檢視視窗中</span><span style="font-size: large;">設定</span><span style="font-size: large;">程式集名稱</span><span style="font-size: large;">。</span></div>
<div>
<span style="font-size: large;"><br />注意:程式集定義檔所在的資料夾名稱,以及程式集定義檔的檔案名,對程式集的名稱毫無影響。<br /><br /> </span><img border="0" data-original-height="669" data-original-width="349" src="https://blogs.unity3d.com/wp-content/uploads/2017/11/asmdef-inspector.png" style="text-align: center;" /><span style="font-size: large;"><br /><br />你還可以使用檢視視窗增加對專案中其它程式集定義檔的引用。編譯器集和定義程式集間的依賴時會用到這些引用。<br /><br />Unity使用引用來編譯器集,以及定義程式集之間的依賴關係。你可以在檢視視窗中設定程式集定義檔的平台相容性,也可以選擇排除或包括特定平台。<br /></span><br />
<h2>
<span style="color: #e69138; font-size: large;">資料夾層級中的多程式集定義檔</span></h2>
<span style="font-size: large;"><br />如果在一個資料夾層級中,有多個程式集定義檔(副檔名:asmdef),將會使每個腳本被添加到最短路徑距離的程式集定義檔中去。<br /><br />範例:<br /><br />假設你有一個Assets/ExampleFolder/MyLibrary.asmdef和一個Assets/ExampleFolder/ExampleFolder2/Utility.asmdef檔,那麼:<br /></span><br />
<ul><span style="font-size: large;">
<li>Assets > ExampleFolder > ExampleFolder2資料夾中的所有腳本將會被編譯到Assets/ExampleFolder/ExampleFolder2/Utility.asmdef定義的程式集中。</li>
<li>Assets > ExampleFolder資料夾中的所有腳本,除Assets > ExampleFolder> ExampleFolder2中的腳本之外,將會被編譯到Assets/ExampleFolder/MyLibrary.asmdef定義的程式集中。</li>
</span></ul>
<span style="font-size: large;">
</span><br />
<h2>
<span style="color: #e69138; font-size: large;">程式集定義檔不屬於產生系統的檔</span></h2>
<span style="font-size: large;"><br />注意:程式集定義檔不屬於程式集產生檔。它們不支援在產生系統中常見的條件化產生規則。<br /><br />這也是程式集定義檔不支援預處理指令(定義)的原因,因為它們一直是靜態的。<br /></span><br />
<h2>
<span style="color: #e69138; font-size: large;">向下相容與隱式依賴</span></h2>
<span style="font-size: large;"><br />程式集定義檔向下相容Unity中現存的[預定義編譯系統](<a href="https://docs.unity3d.com/Manual/ScriptCompileOrderFolders.html" target="_blank">Predefined Compilation System</a>)。也就是說,預定義程式集總是依賴於每個程式集定義檔的程式集。這與Unity中所有腳本都依賴於所有和當前生成目標相容的預編譯器集(外掛程式/.dll)的情況相似。<br /><br /> </span><img border="0" data-original-height="510" data-original-width="720" src="https://blogs.unity3d.com/wp-content/uploads/2017/11/AssemblyDependencies.png" style="text-align: center;" /><span style="font-size: large;"><br /><br />圖表顯示了預定義程式集、程式集定義檔以及預編譯器集之間的依賴關係。<br /><br />Unity給予程式集定義檔的優先順序要比[預定義編譯系統](ScriptCompileOrderFolders)高。<br /><br />這代表任何來自程式集定義檔資料夾內的預定義編譯的特殊資料夾名,都不會對編譯產生任何影響。Unity只將它們視為常規資料夾。<br /><br />強烈建議你對專案中的所有腳本使用程式集定義檔,或完全不使用。否則,沒有使用程式集定義檔的腳本會在每次程式集定義檔重新編譯時也被重新編譯。這會減少你在專案中程式集定義檔所帶來的好處。<br /><br /> </span><br />
<h2>
<span style="color: #e69138; font-size: large;">API</span></h2>
<span style="font-size: large;"><br />在UnityEditor.Compilation命名空間中,有一個靜態的CompilationPipeline類,你可用它獲取程式集定義檔以及所有由Unity生成的程式集的資訊。<br /><br /> </span><br />
<h2>
<span style="color: #e69138; font-size: large;">檔案格式</span></h2>
<span style="font-size: large;"><br />程式集定義檔都是JSON檔。它們有以下這些欄位:</span><br />
<table style="background-color: white; border-collapse: collapse; border-spacing: 0px; border: 1px solid black; box-sizing: border-box; color: #5a5a5b; font-family: Roboto, sans-serif; font-size: 16px; margin: 0px 0px 20px; padding: 0px; width: 715px;"><tbody style="border: 1px solid black; box-sizing: border-box; margin: 0px; padding: 0px;">
<tr style="border: 1px solid black; box-sizing: border-box; margin: 0px; padding: 0px;"><td style="border: 1px solid black; box-sizing: border-box; font-size: 1.125em; line-height: 1.5em; margin: 0px; padding: 8px; text-align: center; vertical-align: middle;"><strong style="box-sizing: border-box; margin: 0px; padding: 0px;">Field</strong></td><td style="border: 1px solid rgb(221, 221, 221); box-sizing: border-box; font-size: 1.125em; line-height: 1.5em; margin: 0px; padding: 8px; text-align: center; vertical-align: middle;"><strong style="box-sizing: border-box; margin: 0px; padding: 0px;">Type</strong></td></tr>
<tr style="border: 1px solid black; box-sizing: border-box; margin: 0px; padding: 0px;"><td style="border: 1px solid black; box-sizing: border-box; font-size: 1.125em; line-height: 1.5em; margin: 0px; padding: 8px; text-align: center; vertical-align: middle;"><em style="box-sizing: border-box; margin: 0px; padding: 0px;">name</em></td><td style="border: 1px solid rgb(221, 221, 221); box-sizing: border-box; font-size: 1.125em; line-height: 1.5em; margin: 0px; padding: 8px; text-align: center; vertical-align: middle;">string</td></tr>
<tr style="border: 1px solid black; box-sizing: border-box; margin: 0px; padding: 0px;"><td style="border: 1px solid black; box-sizing: border-box; font-size: 1.125em; line-height: 1.5em; margin: 0px; padding: 8px; text-align: center; vertical-align: middle;"><em style="box-sizing: border-box; margin: 0px; padding: 0px;">references</em> (optional)</td><td style="border: 1px solid rgb(221, 221, 221); box-sizing: border-box; font-size: 1.125em; line-height: 1.5em; margin: 0px; padding: 8px; text-align: center; vertical-align: middle;">string array</td></tr>
<tr style="border: 1px solid black; box-sizing: border-box; margin: 0px; padding: 0px;"><td style="border: 1px solid black; box-sizing: border-box; font-size: 1.125em; line-height: 1.5em; margin: 0px; padding: 8px; text-align: center; vertical-align: middle;"><em style="box-sizing: border-box; margin: 0px; padding: 0px;">includePlatforms</em> (optional)</td><td style="border: 1px solid rgb(221, 221, 221); box-sizing: border-box; font-size: 1.125em; line-height: 1.5em; margin: 0px; padding: 8px; text-align: center; vertical-align: middle;">string array</td></tr>
<tr style="border: 1px solid black; box-sizing: border-box; margin: 0px; padding: 0px;"><td style="border: 1px solid black; box-sizing: border-box; font-size: 1.125em; line-height: 1.5em; margin: 0px; padding: 8px; text-align: center; vertical-align: middle;"><em style="box-sizing: border-box; margin: 0px; padding: 0px;">excludePlatforms</em> (optional)</td><td style="border: 1px solid rgb(221, 221, 221); box-sizing: border-box; font-size: 1.125em; line-height: 1.5em; margin: 0px; padding: 8px; text-align: center; vertical-align: middle;">string array</td></tr>
</tbody></table>
<span style="font-size: large;"><br />欄位includePlatforms和 excludePlatforms不能在同一個程式集定義檔中使用。要獲取平台名,可使用:</span><br />
<table class="crayon-table" style="background-attachment: initial !important; background-clip: initial !important; background-color: #fdfdfd; background-image: none !important; background-origin: initial !important; background-position: initial !important; background-repeat: initial !important; background-size: initial !important; border-collapse: collapse; border-spacing: 0px !important; border: none !important; box-sizing: border-box; color: #5a5a5b; font-family: Monaco, MonacoRegular, "Courier New", monospace; font-size: 12px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding: 0px !important; table-layout: auto !important; width: 713px;"><tbody style="box-sizing: border-box; margin: 0px; padding: 0px;">
<tr class="crayon-row" style="background: 0px center; border: none !important; box-sizing: border-box; margin: 0px !important; padding: 0px !important; vertical-align: top !important;"><td class="crayon-nums " data-settings="show" style="background: rgb(223, 239, 255) !important; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: rgb(84, 153, 222) !important; font-size: 1.125em; line-height: 1.5em; margin: 0px !important; padding: 8px; text-align: center; vertical-align: middle;"><div class="crayon-nums-content" style="background: 0px center; border: 0px; box-sizing: border-box; font-size: 12px !important; line-height: 15px !important; margin: 0px; padding: 0px; text-align: left; white-space: nowrap;">
<div class="crayon-num" data-line="crayon-5a3888238e3c8770924402-1" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
1</div>
</div>
</td><td class="crayon-code" style="background: 0px center; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; line-height: 1.5em; margin: 0px !important; padding: 8px; text-align: center; vertical-align: middle; width: 695px;"><div class="crayon-pre" style="background: none !important; border: none !important; box-sizing: border-box; color: black; line-height: 15px !important; margin: 0px; overflow: visible; padding: 0px; tab-size: 4; text-align: left; white-space: pre;">
<div class="crayon-line" id="crayon-5a3888238e3c8770924402-1" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
<span style="font-size: large;"><span class="crayon-v" style="box-sizing: border-box; color: rgb(0 , 45 , 122); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">CompilationPipeline</span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">.</span><span class="crayon-v" style="box-sizing: border-box; color: rgb(0 , 45 , 122); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">GetAssemblyDefinitionPlatforms</span></span></div>
</div>
</td></tr>
</tbody></table>
<span style="font-size: large;"><br /> </span><br />
<h2>
<span style="color: #e69138; font-size: large;">範例</span></h2>
<span style="font-size: large;"><br /></span>
<div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-5a3888238e3d4163255544" style="background: rgb(253, 253, 253) !important; border-color: rgb(153, 153, 153) !important; border-style: solid !important; border-width: 1px !important; box-sizing: border-box; color: #5a5a5b; direction: ltr !important; font-family: Monaco, MonacoRegular, "Courier New", monospace; font-size: 12px !important; height: auto; line-height: 15px !important; margin: 12px 0px; overflow: hidden !important; padding: 0px; position: relative !important; text-shadow: none !important; text-size-adjust: none; width: 715px;">
<div class="crayon-plain-wrap" style="background: 0px center; border: 0px; box-sizing: border-box; height: auto !important; margin: 0px !important; padding: 0px !important;">
<textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-webkit-appearance: none; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-color: initial; border-radius: 0px; border-style: initial; border-width: 0px; box-shadow: none; color: black; display: block; font-family: Monaco, MonacoRegular, "Courier New", monospace !important; font-size: 12px !important; height: 90px; line-height: 15px !important; margin: 0px; opacity: 0; outline: none; overflow: hidden; padding-left: 5px; padding-right: 5px; padding-top: 0px; position: absolute; resize: none; tab-size: 4; white-space: pre; width: 713px; word-wrap: normal; z-index: 0;" wrap="soft"></textarea></div>
<div class="crayon-main" style="background: 0px center; border: 0px; box-sizing: border-box; margin: 0px; overflow: hidden; padding: 0px; position: relative; width: 713px; z-index: 1;">
<table class="crayon-table" style="background: none !important; border-collapse: collapse; border-spacing: 0px !important; border: none !important; box-sizing: border-box; font-size: 12px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding: 0px !important; table-layout: auto !important; width: 713px;"><tbody style="box-sizing: border-box; margin: 0px; padding: 0px;">
<tr class="crayon-row" style="background: 0px center; border: none !important; box-sizing: border-box; margin: 0px !important; padding: 0px !important; vertical-align: top !important;"><td class="crayon-nums " data-settings="show" style="background: rgb(223, 239, 255) !important; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: rgb(84, 153, 222) !important; font-size: 1.125em; line-height: 1.5em; margin: 0px !important; padding: 8px; text-align: center; vertical-align: middle;"><div class="crayon-nums-content" style="background: 0px center; border: 0px; box-sizing: border-box; font-size: 12px !important; line-height: 15px !important; margin: 0px; padding: 0px; text-align: left; white-space: nowrap;">
<div class="crayon-num" data-line="crayon-5a3888238e3d4163255544-1" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
1</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5a3888238e3d4163255544-2" style="background: rgb(200, 225, 250) !important; border: 0px; box-sizing: border-box; color: rgb(49, 124, 197) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
2</div>
<div class="crayon-num" data-line="crayon-5a3888238e3d4163255544-3" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
3</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5a3888238e3d4163255544-4" style="background: rgb(200, 225, 250) !important; border: 0px; box-sizing: border-box; color: rgb(49, 124, 197) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
4</div>
<div class="crayon-num" data-line="crayon-5a3888238e3d4163255544-5" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
5</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5a3888238e3d4163255544-6" style="background: rgb(200, 225, 250) !important; border: 0px; box-sizing: border-box; color: rgb(49, 124, 197) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
6</div>
</div>
</td><td class="crayon-code" style="background: 0px center; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; line-height: 1.5em; margin: 0px !important; padding: 8px; text-align: center; vertical-align: middle; width: 695px;"><div class="crayon-pre" style="background: none !important; border: none !important; box-sizing: border-box; line-height: 15px !important; margin: 0px; overflow: visible; padding: 0px; tab-size: 4; text-align: left; white-space: pre;">
<div class="crayon-line" id="crayon-5a3888238e3d4163255544-1" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
<span style="font-size: large;"><span class="crayon-v" style="box-sizing: border-box; color: rgb(0 , 45 , 122); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">MyLibrary</span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">.</span><span class="crayon-i" style="box-sizing: border-box; font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">asmdef</span></span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5a3888238e3d4163255544-2" style="background: rgb(247, 247, 247) !important; border: 0px; box-sizing: border-box; font-family: inherit; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
<span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"><span style="font-size: large;">{</span></span></div>
<div class="crayon-line" id="crayon-5a3888238e3d4163255544-3" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
<span style="font-size: large;"><span class="crayon-s" style="box-sizing: border-box; color: rgb(0 , 128 , 0); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">"name"</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-o" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">:</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-s" style="box-sizing: border-box; color: rgb(0 , 128 , 0); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">"MyLibrary"</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">,</span></span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5a3888238e3d4163255544-4" style="background: rgb(247, 247, 247) !important; border: 0px; box-sizing: border-box; font-family: inherit; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
<span style="font-size: large;"><span class="crayon-s" style="box-sizing: border-box; color: rgb(0 , 128 , 0); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">"references"</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-o" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">:</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">[</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-s" style="box-sizing: border-box; color: rgb(0 , 128 , 0); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">"Utility"</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">]</span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">,</span></span></div>
<div class="crayon-line" id="crayon-5a3888238e3d4163255544-5" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
<span style="font-size: large;"><span class="crayon-s" style="box-sizing: border-box; color: rgb(0 , 128 , 0); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">"includePlatforms"</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-o" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">:</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">[</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-s" style="box-sizing: border-box; color: rgb(0 , 128 , 0); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">"Android"</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">,</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-s" style="box-sizing: border-box; color: rgb(0 , 128 , 0); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">"iOS"</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">]</span></span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5a3888238e3d4163255544-6" style="background: rgb(247, 247, 247) !important; border: 0px; box-sizing: border-box; font-family: inherit; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
<span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"><span style="font-size: large;">}</span></span></div>
</div>
</td></tr>
</tbody></table>
</div>
</div>
<div style="background-color: white; box-sizing: border-box; color: #002835; font-family: Roboto, sans-serif; line-height: 1.5em; margin-bottom: 15px; padding: 0px;">
</div>
<div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-5a3888238e3d8216896102" style="background: rgb(253, 253, 253) !important; border-color: rgb(153, 153, 153) !important; border-style: solid !important; border-width: 1px !important; box-sizing: border-box; color: #5a5a5b; direction: ltr !important; font-family: Monaco, MonacoRegular, "Courier New", monospace; font-size: 12px !important; height: auto; line-height: 15px !important; margin: 12px 0px; overflow: hidden !important; padding: 0px; position: relative !important; text-shadow: none !important; text-size-adjust: none; width: 715px;">
<div class="crayon-plain-wrap" style="background: 0px center; border: 0px; box-sizing: border-box; height: auto !important; margin: 0px !important; padding: 0px !important;">
<textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-webkit-appearance: none; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-color: initial; border-radius: 0px; border-style: initial; border-width: 0px; box-shadow: none; color: black; display: block; font-family: Monaco, MonacoRegular, "Courier New", monospace !important; height: 90px; line-height: 15px !important; margin: 0px; opacity: 0; outline: none; overflow: hidden; padding-left: 5px; padding-right: 5px; padding-top: 0px; position: absolute; resize: none; tab-size: 4; white-space: pre; width: 713px; word-wrap: normal; z-index: 0;" wrap="soft"></textarea></div>
<div class="crayon-main" style="background: 0px center; border: 0px; box-sizing: border-box; margin: 0px; overflow: hidden; padding: 0px; position: relative; width: 713px; z-index: 1;">
<table class="crayon-table" style="background: none !important; border-collapse: collapse; border-spacing: 0px !important; border: none !important; box-sizing: border-box; font-size: 12px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding: 0px !important; table-layout: auto !important; width: 713px;"><tbody style="box-sizing: border-box; margin: 0px; padding: 0px;">
<tr class="crayon-row" style="background: 0px center; border: none !important; box-sizing: border-box; margin: 0px !important; padding: 0px !important; vertical-align: top !important;"><td class="crayon-nums " data-settings="show" style="background: rgb(223, 239, 255) !important; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: rgb(84, 153, 222) !important; line-height: 1.5em; margin: 0px !important; padding: 8px; text-align: center; vertical-align: middle;"><div class="crayon-nums-content" style="background: 0px center; border: 0px; box-sizing: border-box; line-height: 15px !important; margin: 0px; padding: 0px; text-align: left; white-space: nowrap;">
<div class="crayon-num" data-line="crayon-5a3888238e3d8216896102-1" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
<span style="font-size: large;">1</span></div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5a3888238e3d8216896102-2" style="background: rgb(200, 225, 250) !important; border: 0px; box-sizing: border-box; color: rgb(49, 124, 197) !important; font-family: inherit; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
<span style="font-size: large;">2</span></div>
<div class="crayon-num" data-line="crayon-5a3888238e3d8216896102-3" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
<span style="font-size: large;">3</span></div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5a3888238e3d8216896102-4" style="background: rgb(200, 225, 250) !important; border: 0px; box-sizing: border-box; color: rgb(49, 124, 197) !important; font-family: inherit; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
<span style="font-size: large;">4</span></div>
<div class="crayon-num" data-line="crayon-5a3888238e3d8216896102-5" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
<span style="font-size: large;">5</span></div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5a3888238e3d8216896102-6" style="background: rgb(200, 225, 250) !important; border: 0px; box-sizing: border-box; color: rgb(49, 124, 197) !important; font-family: inherit; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
<span style="font-size: large;">6</span></div>
</div>
</td><td class="crayon-code" style="background: 0px center; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; line-height: 1.5em; margin: 0px !important; padding: 8px; text-align: center; vertical-align: middle; width: 695px;"><div class="crayon-pre" style="background: none !important; border: none !important; box-sizing: border-box; line-height: 15px !important; margin: 0px; overflow: visible; padding: 0px; tab-size: 4; text-align: left; white-space: pre;">
<div class="crayon-line" id="crayon-5a3888238e3d8216896102-1" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
<span style="font-size: large;"><span class="crayon-v" style="box-sizing: border-box; color: rgb(0 , 45 , 122); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">MyLibrary2</span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">.</span><span class="crayon-i" style="box-sizing: border-box; font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">asmdef</span></span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5a3888238e3d8216896102-2" style="background: rgb(247, 247, 247) !important; border: 0px; box-sizing: border-box; font-family: inherit; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
<span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"><span style="font-size: large;">{</span></span></div>
<div class="crayon-line" id="crayon-5a3888238e3d8216896102-3" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
<span style="font-size: large;"><span class="crayon-s" style="box-sizing: border-box; color: rgb(0 , 128 , 0); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">"name"</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-o" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">:</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-s" style="box-sizing: border-box; color: rgb(0 , 128 , 0); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">"MyLibrary2"</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">,</span></span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5a3888238e3d8216896102-4" style="background: rgb(247, 247, 247) !important; border: 0px; box-sizing: border-box; font-family: inherit; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
<span style="font-size: large;"><span class="crayon-s" style="box-sizing: border-box; color: rgb(0 , 128 , 0); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">"references"</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-o" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">:</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">[</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-s" style="box-sizing: border-box; color: rgb(0 , 128 , 0); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">"Utility"</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">]</span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">,</span></span></div>
<div class="crayon-line" id="crayon-5a3888238e3d8216896102-5" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
<span style="font-size: large;"><span class="crayon-s" style="box-sizing: border-box; color: rgb(0 , 128 , 0); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">"excludePlatforms"</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-o" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">:</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">[</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-s" style="box-sizing: border-box; color: rgb(0 , 128 , 0); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">"WebGL"</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">]</span></span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5a3888238e3d8216896102-6" style="background: rgb(247, 247, 247) !important; border: 0px; box-sizing: border-box; font-family: inherit; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
<span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"><span style="font-size: large;">}</span></span></div>
</div>
</td></tr>
</tbody></table>
</div>
</div>
<span style="font-size: large;"><br />更多相關討論與範例可以訪問<a href="https://forum.unity.com/threads/example-project-assembly-definition-files.482313/unread" target="_blank">討論區</a><br /></span><br />
<h2>
<span style="color: #e69138; font-size: large;">變換工具 Transform Tool</span></h2>
</div>
<div>
<span style="font-size: large;">2017.3裡你會發現一個新的變換工具,從此你就不需要再移動、旋轉、縮放之間切來切去,一個工具搞定。</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">點工具列最右邊的按鈕,或按"Y"即可開始使用。</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;"><b>World gizmo</b></span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">將軸心旋轉設為"Global"模式,可以沿著世界座標軸平移和旋轉物件。</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<img border="0" data-original-height="300" data-original-width="600" src="https://blogs.unity3d.com/wp-content/uploads/2017/11/image8.gif" style="text-align: center;" /></div>
<div>
<span style="font-size: large;">座標軸平移,平面平移</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<img border="0" data-original-height="267" data-original-width="800" src="https://blogs.unity3d.com/wp-content/uploads/2017/11/image7.gif" style="text-align: center;" /></div>
<div>
<span style="font-size: large;">座標軸旋轉,螢幕空間旋轉,自由旋轉</span></div>
<div>
<br /></div>
<div>
<img border="0" data-original-height="300" data-original-width="300" src="https://blogs.unity3d.com/wp-content/uploads/2017/11/image3.gif" style="text-align: center;" /></div>
<div>
<span style="font-size: large;">全域縮放</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;"><b>Local gizmo</b></span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">當軸心設為"Local"模式,你可以沿本地座標軸進行縮放</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<img border="0" data-original-height="300" data-original-width="300" src="https://blogs.unity3d.com/wp-content/uploads/2017/11/image5-1.gif" style="text-align: center;" /></div>
<div>
<span style="font-size: large;">本地座標軸縮放</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;"><b>Screen Space Gizmo</b></span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">如果你按住Shift鍵會進入螢幕空間模式。這個模式可以在整個螢幕裡移動和旋轉。</span></div>
<div>
<img border="0" data-original-height="200" data-original-width="800" src="https://blogs.unity3d.com/wp-content/uploads/2017/11/image2.gif" style="text-align: center;" /></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;"><b>鎖定(Snapping)</b></span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">當你按住Ctrl(Win)或Command(Mac)時,會賦予鎖定(Snap)給下列功能:</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<ul>
<li><span style="font-size: large;">坐標軸平移 Axes translations</span></li>
<li><span style="font-size: large;">平面平移 Plane translations</span></li>
<li><span style="font-size: large;">座標軸旋轉 Axes rotations</span></li>
<li><span style="font-size: large;">座標軸縮放 Axes scaling</span></li>
<li><span style="font-size: large;">全域縮放 Global scaling</span></li>
</ul>
</div>
<div>
<img border="0" data-original-height="200" data-original-width="800" src="https://blogs.unity3d.com/wp-content/uploads/2017/11/image10.gif" style="text-align: center;" /></div>
<div>
<span style="font-size: large;">平面平移,座標軸平移,全域縮放,座標軸旋轉</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<br /></div>
<div>
<span style="font-size: large;"><b>頂點吸附(Vertex Snapping)</b></span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;">當你按住V鍵時,物件會進入頂點吸附模式。這樣你可以平移所選物件,讓他的頂點與另外一個物件頂點黏合。</span></div>
<div>
<span style="font-size: large;"><br /></span></div>
<div>
<img border="0" data-original-height="300" data-original-width="300" src="https://blogs.unity3d.com/wp-content/uploads/2017/11/image4.gif" style="text-align: center;" /></div>
<div>
<span style="font-size: large;"><br />Unity 2017.3已經發佈,立刻到<a href="https://unity3d.com/" target="_blank">官網</a>下載體驗!</span></div>
Unity Taiwanhttp://www.blogger.com/profile/05195645646153478011noreply@blogger.com0tag:blogger.com,1999:blog-6317841908377212626.post-29459792683564310332017-12-18T22:30:00.000-08:002017-12-18T22:30:49.451-08:00Simple Animation組件介紹<span style="font-size: large;">作者:David Geoffroy <a href="https://blogs.unity3d.com/2017/11/28/introducing-the-simple-animation-component/" target="_blank">原文</a><br />潤稿:Kelvin Lo<br /><br /><br />或者說,我應該怎麼處理動畫播放?</span><div>
<span style="font-size: large;"><br /></span></div>
<div>
<span style="font-size: large;"><br />Playables這個東西自從Unity 5.2中導入以來,一直就非常神秘。許多開發者問我們:"到底可以用在哪?",</span><span style="font-size: large;">我們的回答是:“任何東西!” 。雖然當時我們沒有提供任何範例……</span></div>
<div>
<span style="font-size: large;"><br />經過多次API和Unity的版本更新,Playables已結束測試並正式與Timeline一起加入了Unity 2017.1。從這時起,我們的回答變成了“你想要的任何東西,包括自訂Timeline軌道,或自訂Timeline一樣複雜的東西”。<br /><br />製作自己的Timeline是一件很少有人會去嘗試的事情,只是我們缺少一些如何製作 “你想要的任何東西”的範例。<br /></span><h2>
<span style="color: #e69138; font-size: large;">為什麼不用Animation元件?</span></h2>
<span style="font-size: large;"><br />在Animation團隊,我們常收到的一個回饋是:對於那些只需要在一個物件上使用單一或少量動畫的情況,Animator元件和AnimatorController過於複雜。<br /><br />另一個經常被問的是:提供更複雜的Playables範例。雖然我們有一些基礎範例,用來演示簡單的API使用方式,但它們對於展現Playables的能力並沒有太大用處。<br /><br />因此,我們決定同時解決這二個問題,使用C#製作一個簡單的Animation元件,並將它開源,作為一個活生生可用的Playables範例。如果你想直接跳到程式部分嘗試。可以直接<a href="https://github.com/Unity-Technologies/SimpleAnimation" target="_blank">下載</a>範例程式。</span><div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h2>
<span style="color: #e69138; font-size: large;">新舊參雜</span></h2>
<img border="0" data-original-height="472" data-original-width="533" src="https://blogs.unity3d.com/wp-content/uploads/2017/11/image3-1.png" style="text-align: center;" /><span style="font-size: large;"><br /><br /><strike>Animation元件已有很好的文件說明,也很多人用</strike>,除了一些更進階的功能之外,還有一個簡單直接的介面。就舉例本身來說,重新實現我們的開發者已經知道並且能夠直覺理解的內容似乎是一個顯而易見的選擇。<br /><br />就如上面的檢視視窗所示,SimpleAnimation檢視視窗與Animation檢視視窗非常相似,除了一點:SimpleAnimation元件需要Animator才能運行。<br /><br />在Playables中,使用Animator作為動畫輸出,因此Playable Graph必須要有Animator。但那只是它使用的局限。增加一個SimpleAnimation元件到一個物件時,會自動增加Animator。你可以將它折疊起來不必管它。<br /><br />在腳本方面,其介面與Animation元件的介面幾乎一樣。你可以在Github專案的wiki上找到一份有關兩者區別的深入解釋。<br /><br /></span><h2>
<span style="color: #e69138; font-size: large;">復古的外觀與嶄新的引擎</span></h2>
<img border="0" data-original-height="393" data-original-width="744" src="https://blogs.unity3d.com/wp-content/uploads/2017/11/image4-3.png" style="text-align: center;" /><span style="font-size: large;"><br />SimpleAnimation Playable Graph的<a href="https://github.com/Unity-Technologies/graph-visualizer" target="_blank">Graph Visualizer</a>視圖<br /><br />儘管SimpleAnimation元件外表看起來很像舊的Animation元件,但在背後所有的Animation邏輯都是經由Playables實現的。這樣元件就可與Timeline以及其它Playable圖表相容,而Animation邏輯也可以在其他的Playable圖表中使用。<br /><br /> </span><h2>
<span style="color: #e69138; font-size: large;">不止是Playable範例</span></h2>
<img border="0" data-original-height="585" data-original-width="621" src="https://blogs.unity3d.com/wp-content/uploads/2017/11/image1-2.png" style="text-align: center;" /><span style="font-size: large;"><br />Unity Test Runner中的Simple Animation測試<br /><br />為了能從Animation元件平滑轉移,我們必須確保SimpleAnimation元件的行為盡可能接近Animation元件。因為我們在Unity內部使用的某些測試工具已經公開,所以我們可以很輕鬆的創建測試並將其包含到專案中。<br /><br />專案包含一套100多個比較測試,驗證Animation和SimpleAnimation元件行為一致。當你從<a href="https://github.com/Unity-Technologies/SimpleAnimation" target="_blank">GitHub下載</a>SimpleAnimation工具時,可以在Assets/SimpleAnimationComponent/Tests下找到那些測試。如果你想自訂或擴展元件,你可以使用這些測試來驗證你的成果。</span><br /> </div>
Unity Taiwanhttp://www.blogger.com/profile/05195645646153478011noreply@blogger.com0tag:blogger.com,1999:blog-6317841908377212626.post-9445235716493212672017-11-09T07:10:00.001-08:002017-11-09T07:10:35.113-08:00 iPhoneX上的ARKit人臉識別<span style="font-size: large;">作者:Jimmy Alamparambil <a href="https://blogs.unity3d.com/2017/11/03/arkit-face-tracking-on-iphone-x/" target="_blank">原文</a></span><br />
<div>
<span style="font-size: large;">潤稿:Kelvin Lo</span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
<span style="font-size: large;">自從6月份在WWDC大會上首次發佈ARKit以來,它已經成為實現穩定商品等級AR的方法。最近在iPhone X發佈會上,</span><span style="font-size: large;">Apple</span><span style="font-size: large;">發表將會為ARKit加入一些只在iPhone X上可用的人臉辨識功能,這功能會用到iPhoneX上面的深度鏡頭的前置鏡頭組。<br /><br />Unity一直與</span><span style="font-size: large;">Apple</span><span style="font-size: large;">密切合作,在ARKit發佈的同時就提供了對應的Unity ARKit套件,確保Unity開發者可以在最短的時間內就可以開發出ARKit產品應用。我們與Apple公司緊密合作,把ARKit的人臉識別包入了Unity ARKit套件。<br /><br />這些新功能的相關程式與範例已整合在Unity ARKit套件裡,你可以從<a href="https://bitbucket.org/Unity-Technologies/unity-arkit-plugin" target="_blank">BitBucket</a>或<a href="https://www.assetstore.unity3d.com/en/#!/content/92515" target="_blank">Asset Store</a>找到它。<br /></span><br />
<h2>
<span style="color: #e69138; font-size: large;">套件新增的API內容</span></h2>
<span style="font-size: large;"><br />如果你的產品會在iPhoneX執行,現在可以使用一個名為ARKitFaceTrackingConfiguration的設定資訊。新的RunWithConfig 和 RunWithConfigAndOptions方法可以使用ARKitFaceTrackingConfiguration設定資訊來啟動AR。<br /></span><br />
<div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-5a045d9e299c1274047728" style="background: rgb(253, 253, 253) !important; border-color: rgb(153, 153, 153) !important; border-style: solid !important; border-width: 1px !important; box-sizing: border-box; color: #5a5a5b; direction: ltr !important; font-family: Monaco, MonacoRegular, "Courier New", monospace; font-size: 12px !important; height: auto; line-height: 15px !important; margin: 12px 0px; overflow: hidden !important; padding: 0px; position: relative !important; text-shadow: none !important; text-size-adjust: none; width: 881.656px;">
<div class="crayon-plain-wrap" style="background: 0px center; border: 0px; box-sizing: border-box; height: auto !important; margin: 0px !important; padding: 0px !important;">
<textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-webkit-appearance: none; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-color: initial; border-radius: 0px; border-style: initial; border-width: 0px; box-shadow: none; color: black; display: block; font-family: Monaco, MonacoRegular, "Courier New", monospace !important; font-size: 12px !important; height: 45px; line-height: 15px !important; margin: 0px; opacity: 0; outline: none; overflow: hidden; padding-left: 5px; padding-right: 5px; padding-top: 0px; position: absolute; resize: none; tab-size: 4; white-space: pre; width: 879.656px; word-wrap: normal; z-index: 0;" wrap="soft"></textarea></div>
<div class="crayon-main" style="background: 0px center; border: 0px; box-sizing: border-box; margin: 0px; overflow: hidden; padding: 0px; position: relative; width: 879.656px; z-index: 1;">
<table class="crayon-table" style="background: none !important; border-collapse: collapse !important; border-spacing: 0px !important; border: none !important; box-sizing: border-box; font-size: 12px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding: 0px !important; table-layout: auto !important; width: auto !important;"><tbody style="box-sizing: border-box; margin: 0px; padding: 0px;">
<tr class="crayon-row" style="background: 0px center; border: none !important; box-sizing: border-box; margin: 0px !important; padding: 0px !important; vertical-align: top !important;"><td class="crayon-nums " data-settings="show" style="background: rgb(223, 239, 255) !important; border: 0px; box-sizing: border-box; color: rgb(84, 153, 222) !important; font-size: 1.125em; line-height: 1.5em; margin: 0px !important; padding: 0px !important; vertical-align: top !important;"><div class="crayon-nums-content" style="background: 0px center; border: 0px; box-sizing: border-box; font-size: 12px !important; line-height: 15px !important; margin: 0px; padding: 0px; white-space: nowrap;">
<div class="crayon-num" data-line="crayon-5a045d9e299c1274047728-1" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
1</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5a045d9e299c1274047728-2" style="background: rgb(200, 225, 250) !important; border: 0px; box-sizing: border-box; color: rgb(49, 124, 197) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
2</div>
<div class="crayon-num" data-line="crayon-5a045d9e299c1274047728-3" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
3</div>
</div>
</td><td class="crayon-code" style="background: 0px center; border: 0px; box-sizing: border-box; font-size: 1.125em; line-height: 1.5em; margin: 0px !important; padding: 0px !important; vertical-align: top !important; width: 861px;"><div class="crayon-pre" style="background: none !important; border: none !important; box-sizing: border-box; font-size: 12px !important; line-height: 15px !important; margin: 0px; overflow: visible; padding: 0px; tab-size: 4; white-space: pre;">
<div class="crayon-line" id="crayon-5a045d9e299c1274047728-1" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
<span class="crayon-m" style="box-sizing: border-box; color: rgb(128 , 0 , 128); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">public</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-t" style="box-sizing: border-box; color: rgb(128 , 0 , 128); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">void</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-e" style="box-sizing: border-box; color: rgb(0 , 78 , 208); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">RunWithConfig</span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">(</span><span class="crayon-e" style="box-sizing: border-box; color: rgb(0 , 78 , 208); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">ARKitFaceTrackingConfiguration </span><span class="crayon-v" style="box-sizing: border-box; color: rgb(0 , 45 , 122); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">config</span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">)</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5a045d9e299c1274047728-2" style="background: rgb(247, 247, 247) !important; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
</div>
<div class="crayon-line" id="crayon-5a045d9e299c1274047728-3" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
<span class="crayon-m" style="box-sizing: border-box; color: rgb(128 , 0 , 128); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">public</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-t" style="box-sizing: border-box; color: rgb(128 , 0 , 128); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">void</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-e" style="box-sizing: border-box; color: rgb(0 , 78 , 208); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">RunWithConfigAndOptions</span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">(</span><span class="crayon-e" style="box-sizing: border-box; color: rgb(0 , 78 , 208); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">ARKitFaceTrackingConfiguration </span><span class="crayon-v" style="box-sizing: border-box; color: rgb(0 , 45 , 122); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">config</span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">,</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-e" style="box-sizing: border-box; color: rgb(0 , 78 , 208); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">UnityARSessionRunOption </span><span class="crayon-v" style="box-sizing: border-box; color: rgb(0 , 45 , 122); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">runOptions</span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">)</span></div>
</div>
</td></tr>
</tbody></table>
</div>
</div>
<span style="font-size: large;">新增了用來增加、刪除或更新ARFaceAnchor的事件Callback。</span><br />
<div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-5a045d9e299cb972510842" style="background: rgb(253, 253, 253) !important; border-color: rgb(153, 153, 153) !important; border-style: solid !important; border-width: 1px !important; box-sizing: border-box; color: #5a5a5b; direction: ltr !important; font-family: Monaco, MonacoRegular, "Courier New", monospace; font-size: 12px !important; height: auto; line-height: 15px !important; margin: 12px 0px; overflow: hidden !important; padding: 0px; position: relative !important; text-shadow: none !important; text-size-adjust: none; width: 881.656px;">
<div class="crayon-plain-wrap" style="background: 0px center; border: 0px; box-sizing: border-box; height: auto !important; margin: 0px !important; padding: 0px !important;">
<textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-webkit-appearance: none; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-color: initial; border-radius: 0px; border-style: initial; border-width: 0px; box-shadow: none; color: black; display: block; font-family: Monaco, MonacoRegular, "Courier New", monospace !important; font-size: 12px !important; height: 225px; line-height: 15px !important; margin: 0px; opacity: 0; outline: none; overflow: hidden; padding-left: 5px; padding-right: 5px; padding-top: 0px; position: absolute; resize: none; tab-size: 4; white-space: pre; width: 879.656px; word-wrap: normal; z-index: 0;" wrap="soft"></textarea></div>
<div class="crayon-main" style="background: 0px center; border: 0px; box-sizing: border-box; margin: 0px; overflow: hidden; padding: 0px; position: relative; width: 879.656px; z-index: 1;">
<table class="crayon-table" style="background: none !important; border-collapse: collapse !important; border-spacing: 0px !important; border: none !important; box-sizing: border-box; font-size: 12px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding: 0px !important; table-layout: auto !important; width: auto !important;"><tbody style="box-sizing: border-box; margin: 0px; padding: 0px;">
<tr class="crayon-row" style="background: 0px center; border: none !important; box-sizing: border-box; margin: 0px !important; padding: 0px !important; vertical-align: top !important;"><td class="crayon-nums " data-settings="show" style="background: rgb(223, 239, 255) !important; border: 0px; box-sizing: border-box; color: rgb(84, 153, 222) !important; font-size: 1.125em; line-height: 1.5em; margin: 0px !important; padding: 0px !important; vertical-align: top !important;"><div class="crayon-nums-content" style="background: 0px center; border: 0px; box-sizing: border-box; font-size: 12px !important; line-height: 15px !important; margin: 0px; padding: 0px; white-space: nowrap;">
<div class="crayon-num" data-line="crayon-5a045d9e299cb972510842-1" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
1</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5a045d9e299cb972510842-2" style="background: rgb(200, 225, 250) !important; border: 0px; box-sizing: border-box; color: rgb(49, 124, 197) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
2</div>
<div class="crayon-num" data-line="crayon-5a045d9e299cb972510842-3" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
3</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5a045d9e299cb972510842-4" style="background: rgb(200, 225, 250) !important; border: 0px; box-sizing: border-box; color: rgb(49, 124, 197) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
4</div>
<div class="crayon-num" data-line="crayon-5a045d9e299cb972510842-5" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
5</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5a045d9e299cb972510842-6" style="background: rgb(200, 225, 250) !important; border: 0px; box-sizing: border-box; color: rgb(49, 124, 197) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
6</div>
<div class="crayon-num" data-line="crayon-5a045d9e299cb972510842-7" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
7</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5a045d9e299cb972510842-8" style="background: rgb(200, 225, 250) !important; border: 0px; box-sizing: border-box; color: rgb(49, 124, 197) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
8</div>
<div class="crayon-num" data-line="crayon-5a045d9e299cb972510842-9" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
9</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5a045d9e299cb972510842-10" style="background: rgb(200, 225, 250) !important; border: 0px; box-sizing: border-box; color: rgb(49, 124, 197) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
10</div>
<div class="crayon-num" data-line="crayon-5a045d9e299cb972510842-11" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
11</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5a045d9e299cb972510842-12" style="background: rgb(200, 225, 250) !important; border: 0px; box-sizing: border-box; color: rgb(49, 124, 197) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
12</div>
<div class="crayon-num" data-line="crayon-5a045d9e299cb972510842-13" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
13</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5a045d9e299cb972510842-14" style="background: rgb(200, 225, 250) !important; border: 0px; box-sizing: border-box; color: rgb(49, 124, 197) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
14</div>
<div class="crayon-num" data-line="crayon-5a045d9e299cb972510842-15" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
15</div>
</div>
</td><td class="crayon-code" style="background: 0px center; border: 0px; box-sizing: border-box; font-size: 1.125em; line-height: 1.5em; margin: 0px !important; padding: 0px !important; vertical-align: top !important; width: 854px;"><div class="crayon-pre" style="background: none !important; border: none !important; box-sizing: border-box; font-size: 12px !important; line-height: 15px !important; margin: 0px; overflow: visible; padding: 0px; tab-size: 4; white-space: pre;">
<div class="crayon-line" id="crayon-5a045d9e299cb972510842-1" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
<span class="crayon-m" style="box-sizing: border-box; color: rgb(128 , 0 , 128); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">public</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-e" style="box-sizing: border-box; color: rgb(0 , 78 , 208); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">delegate </span><span class="crayon-t" style="box-sizing: border-box; color: rgb(128 , 0 , 128); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">void</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-e" style="box-sizing: border-box; color: rgb(0 , 78 , 208); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">ARFaceAnchorAdded</span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">(</span><span class="crayon-e" style="box-sizing: border-box; color: rgb(0 , 78 , 208); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">ARFaceAnchor </span><span class="crayon-v" style="box-sizing: border-box; color: rgb(0 , 45 , 122); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">anchorData</span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">)</span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">;</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5a045d9e299cb972510842-2" style="background: rgb(247, 247, 247) !important; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
</div>
<div class="crayon-line" id="crayon-5a045d9e299cb972510842-3" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
<span class="crayon-m" style="box-sizing: border-box; color: rgb(128 , 0 , 128); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">public</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-m" style="box-sizing: border-box; color: rgb(128 , 0 , 128); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">static</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-e" style="box-sizing: border-box; color: rgb(0 , 78 , 208); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">event </span><span class="crayon-e" style="box-sizing: border-box; color: rgb(0 , 78 , 208); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">ARFaceAnchorAdded </span><span class="crayon-v" style="box-sizing: border-box; color: rgb(0 , 45 , 122); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">ARFaceAnchorAddedEvent</span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">;</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5a045d9e299cb972510842-4" style="background: rgb(247, 247, 247) !important; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
</div>
<div class="crayon-line" id="crayon-5a045d9e299cb972510842-5" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
</div>
<div class="crayon-line crayon-striped-line" id="crayon-5a045d9e299cb972510842-6" style="background: rgb(247, 247, 247) !important; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
</div>
<div class="crayon-line" id="crayon-5a045d9e299cb972510842-7" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
<span class="crayon-m" style="box-sizing: border-box; color: rgb(128 , 0 , 128); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">public</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-e" style="box-sizing: border-box; color: rgb(0 , 78 , 208); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">delegate </span><span class="crayon-t" style="box-sizing: border-box; color: rgb(128 , 0 , 128); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">void</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-e" style="box-sizing: border-box; color: rgb(0 , 78 , 208); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">ARFaceAnchorUpdated</span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">(</span><span class="crayon-e" style="box-sizing: border-box; color: rgb(0 , 78 , 208); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">ARFaceAnchor </span><span class="crayon-v" style="box-sizing: border-box; color: rgb(0 , 45 , 122); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">anchorData</span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">)</span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">;</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5a045d9e299cb972510842-8" style="background: rgb(247, 247, 247) !important; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
</div>
<div class="crayon-line" id="crayon-5a045d9e299cb972510842-9" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
<span class="crayon-m" style="box-sizing: border-box; color: rgb(128 , 0 , 128); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">public</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-m" style="box-sizing: border-box; color: rgb(128 , 0 , 128); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">static</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-e" style="box-sizing: border-box; color: rgb(0 , 78 , 208); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">event </span><span class="crayon-e" style="box-sizing: border-box; color: rgb(0 , 78 , 208); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">ARFaceAnchorUpdated </span><span class="crayon-v" style="box-sizing: border-box; color: rgb(0 , 45 , 122); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">ARFaceAnchorUpdatedEvent</span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">;</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5a045d9e299cb972510842-10" style="background: rgb(247, 247, 247) !important; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
</div>
<div class="crayon-line" id="crayon-5a045d9e299cb972510842-11" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
</div>
<div class="crayon-line crayon-striped-line" id="crayon-5a045d9e299cb972510842-12" style="background: rgb(247, 247, 247) !important; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
</div>
<div class="crayon-line" id="crayon-5a045d9e299cb972510842-13" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
<span class="crayon-m" style="box-sizing: border-box; color: rgb(128 , 0 , 128); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">public</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-e" style="box-sizing: border-box; color: rgb(0 , 78 , 208); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">delegate </span><span class="crayon-t" style="box-sizing: border-box; color: rgb(128 , 0 , 128); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">void</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-e" style="box-sizing: border-box; color: rgb(0 , 78 , 208); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">ARFaceAnchorRemoved</span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">(</span><span class="crayon-e" style="box-sizing: border-box; color: rgb(0 , 78 , 208); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">ARFaceAnchor </span><span class="crayon-v" style="box-sizing: border-box; color: rgb(0 , 45 , 122); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">anchorData</span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">)</span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">;</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5a045d9e299cb972510842-14" style="background: rgb(247, 247, 247) !important; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
</div>
<div class="crayon-line" id="crayon-5a045d9e299cb972510842-15" style="background: 0px center; border: 0px; box-sizing: border-box; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px;">
<span class="crayon-m" style="box-sizing: border-box; color: rgb(128 , 0 , 128); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">public</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-m" style="box-sizing: border-box; color: rgb(128 , 0 , 128); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">static</span><span class="crayon-h" style="box-sizing: border-box; color: rgb(0 , 111 , 224); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="crayon-e" style="box-sizing: border-box; color: rgb(0 , 78 , 208); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">event </span><span class="crayon-e" style="box-sizing: border-box; color: rgb(0 , 78 , 208); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">ARFaceAnchorRemoved </span><span class="crayon-v" style="box-sizing: border-box; color: rgb(0 , 45 , 122); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">ARFaceAnchorRemovedEvent</span><span class="crayon-sy" style="box-sizing: border-box; color: rgb(51 , 51 , 51); font-family: inherit; font-size: inherit; font-weight: inherit; height: inherit; line-height: inherit; margin: 0px; padding: 0px;">;</span></div>
</div>
</td></tr>
</tbody></table>
</div>
</div>
<div style="background-color: white; box-sizing: border-box; color: #002835; font-family: Roboto, sans-serif; font-size: 1.25em; line-height: 1.5em; margin-bottom: 15px; padding: 0px;">
</div>
<span style="font-size: large;"><br /></span>
<h2>
<span style="color: #e69138; font-size: large;">人臉辨識功能</span></h2>
<span style="font-size: large;">ARKit中的人臉辨識有四個主要功能。下面會一一介紹並展示範例。<br /><br />臉部定位(Face Anchor)</span></div>
<div>
<span style="font-size: large;"><br /></span><img border="0" data-original-height="370" data-original-width="800" height="295" src="https://blogs.unity3d.com/wp-content/uploads/2017/11/IMG_0013-2.png" style="text-align: center;" width="640" /><span style="font-size: large;"><br /> <br />人臉辨識的一個基本功能是當iPhoneX的前鏡頭偵測到人臉時提供一個<a href="https://developer.apple.com/documentation/arkit/arfaceanchor" target="_blank">定位錨點</a>。這個定位錨點與ARKit通常回傳的平面錨點相似。當你移動頭部時,它會追蹤頭部中心的位置和方向。透過這種方式就可以使用臉部運動作為ARKit應用的輸入,同時也允許你使用這個錨點將物件附加到臉部或頭部,就能做到3D物件會隨著你頭部移動。 </span></div>
<div>
<span style="font-size: large;">我們製作了一個展示場景FaceAnchorScene來展示這個功能。它裡面有一個附加了UnityARFaceAnchorManager元件的GameObject,這個元件會使用ARKitFaceTrackingConfiguration初始化ARKit。它還連接到FaceAnchor,建立、更新和移除事件,以便執行以下操作: <br /></span><br />
<ol><span style="font-size: large;">
<li>在建立臉部錨點時,它會啟用一個GameObject。在範例中是一個如上圖的三軸座標模型,會將這個模型移到由FaceAnchor給予的位置和方向上面。 </li>
<li>在臉部錨點更新時,它會更新GameObject的位置和方向。 </li>
<li>當移除臉部錨點時,它會關掉這個GameObject。 </li>
</span></ol>
<span style="font-size: large;">
這個場景還用了ARCameraTracker元件,這個元件透過FrameUpdateEvent更新Main Camera,和一般的ARKit應用程式一樣。 <br /></span><br />
<h2>
<span style="color: #e69138; font-size: large;">臉部網格Face Mesh Geometry</span></h2>
<img border="0" data-original-height="370" data-original-width="800" height="294" src="https://blogs.unity3d.com/wp-content/uploads/2017/11/IMG_0014-2.png" style="text-align: center;" width="640" /><span style="font-size: large;"><br /> <br />臉部辨識API還可以將檢測到的人臉形狀傳回一個<a href="https://developer.apple.com/documentation/arkit/arfacegeometry" target="_blank">網格</a>。在Unity中使用這些網格點就可以建立一個臉部網格。然後與透明紋理一起使用就可以幫臉部做表面繪製。當我們這個網格放在上面提到臉部錨點時,賦予一個材質就能換臉。 <br /><br />展示場景FaceMeshScene展示了如何在你的臉上放一個用預設材質的臉部網格 。它有一個常見的ARCameraTracker物件,用在在場景中的鏡頭。還有一個ARFaceMeshManager物件,該物件有一個基本網格以及一個空的Mesh Filter元件。這個物件還有UnityARFaceMeshManager元件,用來執行以下操作: <br /></span><br />
<ol><span style="font-size: large;">
<li>設定臉部辨識 </li>
<li>根據錨點位置和旋轉,更新對應物件的transform資訊。</li>
<li>展出每幀錨點的網格資料,填充成一個網格,並將此網格賦予Mesh filter元件</li>
</span></ol>
<span style="font-size: large;">
</span></div>
<h2>
<span style="color: #e69138; font-size: large;">變形 Blend Shapes</span></h2>
<div>
<span style="font-size: large;"><br /></span><img border="0" data-original-height="370" data-original-width="800" height="294" src="https://blogs.unity3d.com/wp-content/uploads/2017/11/IMG_0015-2.png" style="text-align: center;" width="640" /><span style="font-size: large;"><br /> <br /><br />我們從臉部辨識得到的另一組資料是描述臉部表情的<a href="https://developer.apple.com/documentation/arkit/arfaceanchor.blendshapelocation" target="_blank">係數</a>,將它們映射到一個虛擬面部,就可以模仿你的表情。 <br /><br />範例場景FaceBlendShapeScene展示了這個應用。在UI中它顯示了根據當下表情返回的不同混合形狀值的係數。看看它們在你改變表情時是如何變化的。 <br /><br />這個場景與FaceMeshScene擁有相同的物件,但是另外還有一個包含了BlendshapePrinter元件的BlendshapeOutput物件。該元件從臉部錨點中提取存在的Blend Shapes,並輸出到螢幕UI。 <br /><br />我們正在製作一個更詳細的例子,在這個例子中,這些值將被映射到虛擬頭部的臉部動畫中,以幫助你更好地瞭解它的用途。 <br /></span><br />
<h2>
<span style="color: #e69138; font-size: large;">定向光估計 Directional Light Estimate</span></h2>
<img border="0" data-original-height="370" data-original-width="800" height="294" src="https://blogs.unity3d.com/wp-content/uploads/2017/11/IMG_0021-2-1.png" style="text-align: center;" width="640" /><span style="font-size: large;"><br /> <br />使用臉部辨識還能獲取另一組有趣的資料,將你的臉當成場景裡的<a href="https://developer.apple.com/documentation/arkit/ardirectionallightestimate?language=objc" target="_blank">定向光偵測器</a>,來產生場景的定向光推算 。產生的資料包含三個: <br /></span><br />
<ol><span style="font-size: large;">
<li>主光源方向 </li>
<li>主光源亮度 </li>
<li>預估的全向照明環境的球面調和係數 (Spherical harmonics coefficients)</li>
</span></ol>
<span style="font-size: large;">
最後一項在Unity中對我們來說很有意思,因為它剛好是我們標準渲染管線中用於動態全域照明的解決方法。瞭解這些資訊後,我們就可以在範例場景中使用。 <br /><br />FaceDirectionalLightEstimate場景有一個ARCameraTracker和一個ARFaceAnchorManager,它使一個灰色球體會隨你的臉四處移動。ARKitLightManager物件是新增的,它包含一個UnityARKitLightManager元件,用於從FrameUpdated事件獲取球面調和係數,並將它指到場景中所有的Unity光線探頭,包括環境光線探頭。這樣就能根據估計的環境光線,有效地為場景中的網格提供動態照明。 <br /><br />如果你希望使用自己的機制來提供場景照明,可以通過FrameUpdated事件,獲取以Unity坐標系統表示的原始球面調和係數,放到你的照明公式中。你也可能只是想使用主光源的方向和強度來照明,那麼同樣的方式也適用。 <br /></span><br />
<h2>
請注意:本文中所提供的範例場景,只有在從Bitbucket下載的套件裡才有。 </h2>
<h2>
<span style="color: #e69138; font-size: large;"><br /></span></h2>
<h2>
<span style="color: #e69138; font-size: large;">小結</span></h2>
<span style="font-size: large;">正如你所看到的,在iPhone X上有一些和臉部辨識有關的ARKit功能。Unity的ARKit套件可以幫助你輕鬆地在你的應用中實現這些功能。iPhone X目前已正式發售,所以如果你是AR的開發者,趕緊研究如何在你的應用加入臉部辨識吧。</span></div>
Unity Taiwanhttp://www.blogger.com/profile/05195645646153478011noreply@blogger.com0tag:blogger.com,1999:blog-6317841908377212626.post-78388506165427438502017-10-24T02:44:00.001-07:002017-10-24T02:44:50.777-07:00We are Hiring<div class="page" title="Page 1">
<div class="layoutArea">
<div class="column">
<br />
<span style="font-family: "helvetica,bold"; font-size: 24.000000pt;">Field Engineer
</span><br />
<span style="font-family: "helvetica"; font-size: 12.000000pt;">at Unity Technologies
</span><br />
<span style="font-family: "helvetica"; font-size: 10pt;"><span style="color: #ffe599;">China (Shanghai / Beijing / Guangzhou)
</span></span></div>
</div>
<table style="border-collapse: collapse;">
<tbody>
<tr>
<td style="background-color: rgb(100.000000%, 100.000000%, 100.000000%); border-bottom-color: rgb(0.000000%, 0.000000%, 0.000000%); border-bottom-width: 0.010000pt; border-left-color: rgb(0.000000%, 0.000000%, 0.000000%); border-left-width: 0.000000pt; border-right-color: rgb(0.000000%, 0.000000%, 0.000000%); border-right-width: 0.000000pt; border-style: solid; border-top-width: 0.000000pt;"><div class="layoutArea">
<div class="column">
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">Brief Description<br />
Unity Technologies is currently seeking an experienced Field Engineer who
will lead handle incoming technical issues from Unity users. This incumbent
would have deep knowledge of Unity and how it is used in large projects.
</span></span></div>
</div>
</td>
</tr>
<tr>
<td style="background-color: rgb(100.000000%, 100.000000%, 100.000000%); border-bottom-color: rgb(0.000000%, 0.000000%, 0.000000%); border-bottom-width: 0.005000pt; border-left-color: rgb(0.000000%, 0.000000%, 0.000000%); border-left-width: 0.000000pt; border-right-color: rgb(0.000000%, 0.000000%, 0.000000%); border-right-width: 0.000000pt; border-style: solid; border-top-color: rgb(0.000000%, 0.000000%, 0.000000%); border-top-width: 0.010000pt;"><div class="layoutArea">
<div class="column">
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">Instrumental in helping key Unity users ship amazing games and applications.
</span></span><br />
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">Goals and responsibilities:
</span></span><br />
<ol style="list-style-type: decimal;">
<li style="font-family: 'ArialMT'; font-size: 12.000000pt;">
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">Provide in-depth consultation and support to developers who are planning
</span></span><br />
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">to use Unity for their games and simulations;
</span></span><br />
</li>
<li style="font-family: 'ArialMT'; font-size: 12.000000pt;">
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">Become a technical expert in the use of Unity product portfolio (Unity Pro,
</span></span><br />
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">Source Code, etc) for game and simulation development;
</span></span><br />
</li>
<li style="font-family: 'ArialMT'; font-size: 12.000000pt;">
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">Build long-term relationships with technical decision makers and
</span></span><br />
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">influencers within key accounts;
</span></span><br />
</li>
<li style="font-family: 'ArialMT'; font-size: 12.000000pt;">
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">Provide technical presentations and technology demos at trade shows and
</span></span><br />
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">on customer site visits;
</span></span><br />
</li>
<li style="font-family: 'ArialMT'; font-size: 12.000000pt;">
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">Provide product development recommendations and technical data to
</span></span><br />
<span style="color: #444444;"><span style="font-family: "arialmt"; font-size: 12.000000pt;">Unity’s product </span><span style="font-family: "arialmt"; font-size: 12.000000pt;">development teams;
</span></span><br />
</li>
<li style="font-family: 'ArialMT'; font-size: 12.000000pt;">
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">Act as a strong internal advocate for our customers ensuring feedback is
</span></span><br />
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">communicated between sales and product engineering;
</span></span><br />
</li>
</ol>
</div>
</div>
</td>
</tr>
<tr>
<td style="background-color: rgb(100.000000%, 100.000000%, 100.000000%); border-bottom-color: rgb(0.000000%, 0.000000%, 0.000000%); border-bottom-width: 0.005000pt; border-left-color: rgb(0.000000%, 0.000000%, 0.000000%); border-left-width: 0.000000pt; border-right-color: rgb(0.000000%, 0.000000%, 0.000000%); border-right-width: 0.000000pt; border-style: solid; border-top-color: rgb(0.000000%, 0.000000%, 0.000000%); border-top-width: 0.005000pt;"><div class="layoutArea">
<div class="column">
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">7. Act as an ambassador for our customers offering regionalized feedback to
our product development processes.
</span></span><br />
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">Requirements:
</span></span><br />
<ol style="list-style-type: decimal;">
<li style="font-family: 'ArialMT'; font-size: 12.000000pt;">
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">5+ years of experience in game programming, simulation programming or
</span></span><br />
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">games middleware with knowledge of game development process and
</span></span><br />
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">platforms;
</span></span><br />
</li>
<li style="font-family: 'ArialMT'; font-size: 12.000000pt;">
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">A bachelor’s degree (or equivalent) in computer science, math, or a related
</span></span><br />
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">field;
</span></span><br />
</li>
<li style="font-family: 'ArialMT'; font-size: 12.000000pt;">
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">Practical understanding of 3D graphics algorithms and web technologies;
</span></span><br />
</li>
</ol>
</div>
</div>
</td>
</tr>
<tr>
<td style="background-color: rgb(100.000000%, 100.000000%, 100.000000%); border-bottom-color: rgb(0.000000%, 0.000000%, 0.000000%); border-bottom-width: 0.005000pt; border-left-color: rgb(0.000000%, 0.000000%, 0.000000%); border-left-width: 0.000000pt; border-right-color: rgb(0.000000%, 0.000000%, 0.000000%); border-right-width: 0.000000pt; border-style: solid; border-top-color: rgb(0.000000%, 0.000000%, 0.000000%); border-top-width: 0.005000pt;"><div class="layoutArea">
<div class="column">
<ol start="4" style="list-style-type: decimal;">
<li style="font-family: 'ArialMT'; font-size: 12.000000pt;">
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">Strong oral and written communication skills addressing various groups of
customers: technical, business, and/or project management
</span></span><br />
</li>
<li style="font-family: 'ArialMT'; font-size: 12.000000pt;">
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">Demonstrated consultative customer management skills;
</span></span><br />
</li>
<li style="font-family: 'ArialMT'; font-size: 12.000000pt;">
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">Willing to travel;
</span></span><br />
</li>
<li style="font-family: 'ArialMT'; font-size: 12.000000pt;">
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">Self-starter, highly motivated individual;
</span></span><br />
</li>
<li style="font-family: 'ArialMT'; font-size: 12.000000pt;">
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">Experience in working as developer support engineer in related field;
</span></span><br />
</li>
</ol>
</div>
</div>
</td>
</tr>
<tr>
<td style="background-color: rgb(100.000000%, 100.000000%, 100.000000%); border-bottom-width: 0.000000pt; border-left-color: rgb(0.000000%, 0.000000%, 0.000000%); border-left-width: 0.000000pt; border-right-color: rgb(0.000000%, 0.000000%, 0.000000%); border-right-width: 0.000000pt; border-style: solid; border-top-color: rgb(0.000000%, 0.000000%, 0.000000%); border-top-width: 0.005000pt;"><div class="layoutArea">
<div class="column">
<span style="font-family: "arialmt"; font-size: 12.000000pt;"><span style="color: #444444;">9. Experience in working as part of a cross-functional team.
</span></span></div>
</div>
</td>
</tr>
</tbody></table>
<div class="layoutArea">
<div class="column">
<span style="font-family: "arial"; font-size: 12.000000pt; font-weight: 700;">Who we are
</span></div>
</div>
</div>
<br />
<div class="page" title="Page 2">
<div class="layoutArea">
<div class="column">
<span style="font-family: "arialmt"; font-size: 12.000000pt;">We are product-driven, curious, and creative. We aggressively reinvest in
</span></div>
</div>
<div class="layoutArea">
<div class="column">
<span style="font-family: "arialmt"; font-size: 12.000000pt;">development to keep Unity moving and evolving - from expanding usability and
</span></div>
</div>
<div class="layoutArea">
<div class="column">
<span style="font-family: "arialmt"; font-size: 12.000000pt;">power, to platform reach. With over a billion installs per month, Unity touches
</span></div>
</div>
<div class="layoutArea">
<div class="column">
<span style="font-family: "arialmt"; font-size: 12.000000pt;">gamers and non-gamers alike. As well as video games, our software is used in
</span></div>
</div>
<div class="layoutArea">
<div class="column">
<span style="font-family: "arialmt"; font-size: 12.000000pt;">industries as diverse as medicine, visualization and shopping - democratizing
</span></div>
</div>
<div class="layoutArea">
<div class="column">
<span style="font-family: "arialmt"; font-size: 12.000000pt;">game development while solving hard problems and enabling success for a
</span></div>
</div>
<div class="layoutArea">
<div class="column">
<span style="font-family: "arialmt"; font-size: 12.000000pt;">huge range of developers worldwide.<br />
Today, Unity has expanded to over 15 international offices and has employees
</span></div>
</div>
<div class="layoutArea">
<div class="column">
<span style="font-family: "arialmt"; font-size: 12.000000pt;">in 23 countries. Every person at Unity Technologies has an inherent passion
</span><span style="font-family: "arialmt"; font-size: 12.000000pt;">and driven spirit and it isn’t enough to be able to do the job</span><span style="font-family: "arialmt"; font-size: 12.000000pt;">- </span><span style="font-family: "arialmt"; font-size: 12.000000pt;">we’re looking for
</span><span style="font-family: "arialmt"; font-size: 12.000000pt;">people that color outside the lines, are looking to be freed from the process
tangle, and can dream big!
</span></div>
</div>
<div class="layoutArea">
<div class="column">
<span style="font-family: "arialmt"; font-size: 12.000000pt;">Those interested in applying for this role please submit resumes to
</span></div>
</div>
<div class="layoutArea">
<div class="column">
<span style="font-family: "arialmt"; font-size: 12pt;"><span style="color: #ffe599;">emmali@unity3d.com</span></span><span style="font-family: "arialmt"; font-size: 12.000000pt;">. </span></div>
</div>
</div>
Unity Taiwanhttp://www.blogger.com/profile/05195645646153478011noreply@blogger.com1