top of page
搜尋
  • 作家相片Liling Liu

[Material] Unreal Engine 5.2視差遮擋貼圖(POM)教學 |Parallax occlusion mapping (POM)


Parallax occlusion mapping




視差遮擋貼圖 Parallax Occlusion Mapping (POM)




視差遮擋貼圖 (POM) 是視差貼圖技術的增強。 視差遮擋貼圖 用於在紋理表面中按程式建立 3D 定義,使用Displacement map而不是透過產生新幾何體。 這使得3D 渲染應用程式的開發人員能夠在紋理中添加3D 複雜性,這些紋理會相對於透視正確地變化並即時進行自遮擋(另外還可以實現自陰影),而無需犧牲透過幾何計算創建相同效果所需的處理器週期.




From Wikipedia:

https://en.wikipedia.org/wiki/Parallax_occlusion_mapping




Normal Map VS Relief Map


從某些角度觀看時,法線貼圖的結果會顯得過於平坦。 即時渲染時必須始終考慮資料成本,因此擴展了 Relief Mapping(浮雕映射)。 然而,Relief Mapping 在特殊角度下仍然會存在一些缺陷。


The main steps of POM:


Height map 提供的高度信息,以及從像素深度和相機位置導出的向量。 從目前 UV 和高度圖執行線性碰撞檢測。 當偵測到碰撞時,返回目前的偏移量,並將採樣的UV添加到此Offset中,這意味著使用反向高度圖追蹤。 一般POM用於混凝土路面等平坦表面





Create Material




Add Parallax Occlusion Mapping node



Height Map into Material, 但無法連接上 Heightmap texture



Must change to Texture object

Right click > Converts to Texture Object and connect it



Scalar Parameter

有三種方法 得到 scalar parameter


方法 1:


方法2:

1.鍵盤按1,並按下左鍵會生成一個節點

在節點按下右鍵,Convert to Parameter



方法3:

鍵盤按S,並按下左鍵會生成一個節點



Default:

*Height rate: 0.04

*Min Stepts: 8

*Max Stepts: 16

*Ref Plane: 0.2


Heightmap channel (V4)


Search Constant4Vector



Constant4Vector:

R:1, G:0 , B:0, A:0



Render shadows (occlusion mapping) : StaticBool (True)

Light Vector: SkyAtmosphereLightDirection

Shadow stepts: 32




分類

Group 輸入分類名字,將全部的 Parameter 放進這個Group




將Basic Color, roughness, normal map放進來


因POM已經生成一個shadow mask 我們在Basic color 使用Lerp處理這張Mask


Pixel Depth offset 連上 Pixel Depth offset



Final Material



Material Instance: 調整屬性


Create Material Instance


Material > Right Click > Create Material Instance



Material Instance: Adjust properties



新增地板,材質放入,看效果,再去做材質屬性調整。



1.Create Plane

Shapes > Plane


2.Crabe Material Instance into plane


Shadow:


Select plane > detials >cast shdow : Turn off






Youtube Tutorial:



pebbles texture download:



教學材質球和文件下載 / Material and Document Download:



贊助 / Support Me











2 次查看0 則留言
bottom of page