天天看點

[sig10]CryENGINE 3: reaching the speed of light

http://advances.realtimerendering.com/s2010/Kaplanyan-CryEngine3(SIGGRAPH%202010%20Advanced%20RealTime%20Rendering%20Course).pdf

siggraph10的paper。

總體看下來,crytek在處理很多我們還沒發掘到的問題,看着有種無力感。

另外感覺crytek在逐漸從engineer更新到scientist,說是大師級也不為過。

 texture compress improvement

 看着就比較煩,

  • 一頓搞---做的時候用16bit的texture,然後histogram normalize什麼的,然後出來的效果得放大了才能看出些許優勢。
  • srgb space的texture

normalmap用3dc格式壓縮---大家都這麼幹。

但是crytek又要改進算法,還是在很少的情況(很近很精細)下才會有不同可以看出來。

在看一些類似車的表面的時候,平滑中帶着些許糙面的情況,16bit的normal優勢很大。 

 occlusion culling

console上是把上一幀的zbuffer downsample幾個mipmap,然後用hi-z的算法在cpu端針對obj的aabb做culling----省了大量的cpu和gpu的計算。

pc上是使用比較傳統的手工occluder,因為cpu-gpu帶寬太低,沒法搞zbuffer的傳輸。

 ssao

輕描淡寫的一頁,裡面充滿了名詞,好幾個不懂

  • encode depth into 2 16bit channel
  • quater buffer
  • bilateral blur fetch----囧
  • VolumetricObscurrance with 4! samples----囧
  • reprojection 

最後是720p情況下:360 1.1ms, ps3 1.3ms,orz!

 deferred pipeline

 lighting model:

• Indirectlighting – Ambientterm – Taggedambient areas – Localcubemaps – Localdeferred lights – DiffuseIndirect Lighting from LPVs – SSAO • Directlighting – Alldirect light sources, with and without shadows 使用的是light prepass, format:

  • 24bit depth, 8bit stencil----各種mask資訊的存儲
  • 24bit normal, 8bit glossness

 normal

這一塊覺得巨給力。

用24bit存normalized normal會精度很差:

[sig10]CryENGINE 3: reaching the speed of light

其實24bit真的已經很多了,可以存儲相當大的資訊量,足夠了。

之是以精度不夠根本原因是我們存的是normalized normal,這樣一來,隻用了%1.73的理論存儲能力。

crytek給了算法利用到了%98.2,是以也獲得了非常高的精度:

[sig10]CryENGINE 3: reaching the speed of light

算法和代碼文中都給了,大緻思路就是根據normal的方向取一個最接近的方向來存(因為最終存起來的是離散的定點數),存的這個不是normalized的。

然後在lighting的時候隻要再normalize一下就可以了。

的确相當巧妙,這種高效利用存儲的空間的思想真是太太太給力了。

 後面一部分将phong brdf,這個目前的lighting model和這個在玩家看起來沒有明顯差距。

說實話關于這裡,halo3在社群裡畫面品質和gears of war相提并論真是讓我很不爽,甚至說gears更好。

halo3在理論上明顯高出一截的。

需要硬體繼續發展,到了更具差別能力的shading model的時候才行了。

hdr

力求在同樣帶寬上實作hdr效果,ps3上rgbm,360上用r11g11b10的格式。

最後tonemapping的時候有exponential tone mapping和film tone mapping,兩者各有千秋吧。

clip volume

不用shadow的話,lighting容易出現bleeding的情況,解決辦法是放置一個clip volume用stencil mask來解決。

anti aliasing

crytek上來說msaa和mlaa都沒法解決畫面在變化時候的閃爍問題。

尤其是在很細的地方,欄杆,草這些東西。

也就是說關注點已經不是靜态畫面,而是動态時候的畫質問題。

這個我稍微抱有懷疑态度,找了些mlaa的video,覺得還是沒有太大問題:

http://www.desivideonetwork.com/view/tji5w7378/incredible-killzone-3-mlaa-incorporated-gameplay-and-graphics-best-looking-game-ever-made/

還有戰神的一些video。

crytek的解決方案是繼續用reverse projection,記錄變化的地方,然後對這些地方blur,來降低camera移動時候造成的flicker。

靜态畫面上是edge aa.

最後看credit:

•VaclavKyba from R&D for implementation oftemporal AA

• CarstenDachsbacher for suggestions on the talk • HolgerGruen for invaluable help on effects • IvanNevraev and David Cook for consulting on Xbox 360 GPU • YuryUralsky and Miguel Sainz for consulting • PhilScott, Sebastien Domine, Kumar Iyer and the whole Parallel Nsight team • TiagoSousa, Sergey Sokov and the whole Crytek R&D department 這就是大師級crytek和其他工作室根本差別所在。

繼續閱讀