u3d高級手冊0501方向陰影細節(jié)_第1頁
u3d高級手冊0501方向陰影細節(jié)_第2頁
u3d高級手冊0501方向陰影細節(jié)_第3頁
u3d高級手冊0501方向陰影細節(jié)_第4頁
u3d高級手冊0501方向陰影細節(jié)_第5頁
已閱讀5頁,還剩4頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、Unity Manual Advanced Shadows in Unity Directional Shadow DetailsUnity 手冊-高級-Unity 中的陰影-方向陰影細節(jié)Directional Shadow Details 方向陰影細節(jié)This page explains shadows from Directional lights in detail. 本從定向光源細節(jié)解釋陰影。Directional lights are mostly used as a key light - sunlight or moonlight - in an outdoame. Viewin

2、g distancan be huge, espelly inand thirdgames, and shadows often require some tuning to get the bestquality vs. performance balance for your situation. 定向光源大多是用來作為主光源-陽光或月光-在室外里。視距可以是巨大的,尤其是在第一和第三人稱最好的質量。,以及陰影往往需要一些調整,以獲得與性能的平衡狀況Lets start out wigood looking shadow setup for a 3rdgame:讓開始一個漂亮的陰影設置的第

3、三人稱:Shadows here look pretty good! 陰影這里看來相當不錯!Here, vis ble distance is about 50 game units, so Shadow Distance was set to 50 in Quality Settings. Also,Shadow Cascades was set to 4, Shadow Resolution to High, and the light uses Soft Shadows. 在這里,可視距離約 50,因此在質量設置里設置距離為 50。此影級聯(lián)被設置為 4,陰影的分辨率設置為高,而燈光使用軟

4、陰影。Chapters below dissect each aspect of directional light shadows: 以下各章解剖定向光陰影每個方面:Hard versus Soft shadows 硬陰影與軟陰影Shadow Cascade count陰影級聯(lián)數(shù)Shadow Distance is Important! 陰影距離很重要!Hard versus Soft shadows 硬陰影與軟陰影Using the same light setup, if we switch Shadow Type to Hard Shadows, then the transition

5、 from lit toshadowed regions is hard - either something is 100% in shadow, or 100% lit. Hard shadows are faster torender but often they look less realistic. 使用相同的光源設置,如果改用陰影類型的硬陰影,然后從照亮陰影區(qū)的過渡轉換到“硬” -無論事情是 100%的陰影,或 100照亮。硬陰影被快速渲染但往往它們看起來不太現(xiàn)實。Hard shadows with distance of 50 and four cascades. 50 個硬陰

6、影和 4 個級聯(lián)距離。Shadow Cascade count 陰影級聯(lián)數(shù)量For Directional lights Unity can use so called Cascaded Shadow Maps (alternatively called Parallel SplitShadow Maps) which give very good shadow quality, espelly for long viewing distan. Cascadedshadows work by dividing viewing areao progressively largortions an

7、d using the same size shadow mapon each. The result ist objects close to the viewer get more shadow map pixelsn objects far away.Unity 定向光源可以使用所謂的級聯(lián)陰影地圖(也稱“平行拆分陰影地圖”),提供很好的陰影質量,特別是長視距。級聯(lián)分成逐步較大的部分,并在每個使用同樣大小的陰影圖可視面積陰影工作。其結果是,物體接近觀眾得到的陰影像素超過更遠的物體。he images below well use Hard shadows because shadow pi

8、xels are better vis ble there. 在以下將使用硬陰影,因為在那里陰影像素更好可見。,If no cascaded shadow maps were used, the entire shadow distance (still 50 units in our case) must be coveredby the shadow texture uniformly. Hard shadows would look like this with no cascades: 如果沒有級聯(lián)陰影地圖使用,整個陰影的距離(仍舊 50 個沒有瀑布:在的方案里)必須由陰影紋理均勻覆蓋

9、。硬陰影看起來像這樣的,Hard shadows with distance of 50 and no cascades. 50 距離的硬陰影而沒有級聯(lián)。Thxels of the shadow texture are the same size everywhere, and while they look good in distance, thequality is not s lar up close. The shadow texture covers the entire viewing area, and if visualized it would looklike this:

10、 陰影紋理像素的大小相同隨處可見,而在距離里他們看起來良好,質量是沒有星體的近距離。陰影紋理覆蓋整個顯示區(qū)域,如果直觀的它將看起來像這樣:With no cascades, shadow texture covers viewing area uniformly. 沒有級聯(lián),陰影紋理平均的覆蓋。When two shadow cascades are used, the entire shadow distance is dividedo a smaller ck near theviewer and a larger ck far away. Hard shadows would look

11、like this with two cascades:當兩個陰影級聯(lián)使用,整個陰影距離分為接近的觀眾一小塊和遠處的一大塊。硬陰影是這樣的兩個級聯(lián):Hard shadows with distance of 50 and two cascades. 50 的距離的硬陰影和兩個級聯(lián)。In exchange for some performance, we get better shadow resolution up close. 調整一些性能,陰影的近距離的清晰度。獲得更好的With two cascades, two shadow textures cover different sized

12、 portions of viewing area.利用 2 個級聯(lián),2 個陰影紋理覆蓋不同大小視圖區(qū)域的位置。And finally when four shadow cascades are used, the shadow distance is dividedo four progressively largerportions. Hard shadows would look like this with four cascades:個大的部分逐漸分化。硬陰影是這樣的四個級聯(lián):最后,當 4 級聯(lián)陰影使用,陰影的距離分為四Hard shadows with distance of 50

13、 and four cascades. Hey, weve seen this already!聯(lián)。50 距離的硬陰影和 4 個級With four cascades, four shadow textures cover different sized portions of viewing area. 利用 4 個級聯(lián),四個陰影紋理覆蓋不同大小視圖區(qū)域位置。Shadow Distance is Important! 陰影距離很重要!Shadow Distance is extremely important for both quality and performance of direc

14、tional light shadows. Justlike shadow cascade count, shadow distance can be set in Quality Settings and allows an easy way to scaleshadows down on less performanrdware.陰影距離是非常重要的對質量和陰影的定向光性能而言。就像陰影級聯(lián)計數(shù),在質量設置里可以設定陰影距離,并允許一個簡單的方法來伸影向下在少高性能的硬件上。Shadows fade ousituations shadows furtherof shadow distanc

15、e, and furthernt objects are not shadowed.ostn some distancehe game would not be noticeable anyway! 陰影淡出在陰影距離的末尾,并進一步比物體不帶陰影。在大多數(shù)情況下的陰影比一些距離在中明顯不會失去!With no shadow cascades, hard shadows and shadow distanet to 20 units our shadows look likcturebelow. Notet shadows do fade outhe distance, buthe same

16、time shadow quality is much betternit was with no cascades and a distance of 50 units. 由于沒有級聯(lián),硬陰影和陰影距離設置為 20 個的陰影看起來像下面的離。請注意,陰影不在遠方,但同時陰影質量明顯優(yōu)于它沒有級聯(lián)和 50 個的距Hard shadows with distance of 20 and no cascades. 20 的距離硬陰影而沒有級聯(lián)。If on the other hand we set shadow distance too high, shadows wont look good a

17、t all. Setting distance to 100here only decreases both performance and quality and does not make much sense - no objectshe sceneare furthern about 50 meters anyway!如果在另一方面,設置陰影距離過高,陰影根本不會好看。這里設置距離只有 100,既降低性能和質量而沒有太大意義-在場景里無路如何沒有對象進一步超過 50 米!Hard shadows with distance of 100 and no cascades. Ouch! 100 距離的硬陰影和沒有級聯(lián)。唉喲!Shadow maps with cascades scale with distance much better. For exle, four cascade soft shadows withcovering 300 units in front of the camera look likcture below. Its somewhat worsen thcture at the topof this page, but not very bad either for

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論