top of page
  • 작성자 사진JP Lee

CHARACTER MATERIAL LOD STRATEGY

MATERIALS LOD FOR IN-GAME PLAY.

Author / JP.Lee


Commit schedule : 2016-9-26.

Example directory of Demo Scene path.

[ Demo_DistanceLOD.unity ]

[ Demo_DistanceLOD_Monster.unity ]

Development history log.

Change Log.

2016-09-26.

- LOD2 : Normal Map turn on-off toggle added. that is optional.

2016-09-23.

- Separated to LOD shaders of three phases.


Overview

游戏中,根据用户设置的品质模板的改变,游戏中使用的Shader的运算品质,Shader的种类等,都会自动变更。

变更要素已经决定使用Shader LOD和Material Quality Phase Set(根据品质设定,会更换成预先定义的Material)。

优点

整体实现较为简单。

缺点

美术得对Matrial的管理费点心思。

优点

整体实现较为简单。

缺点

美术得对Matrial的管理费点心思。

Shader structure of QUALITY PHASE.

随着距离的不同,可以使用根据各品质别设置的灯光模型的优化Shader。

#性能问题#Metallic Roughness值上面使用贴图和使用变量参数,性能上有25%左右的差别。我们要划分好品质等级和LOD等级,定好规则,使用变量参数。




美术材质球品质设置脚本

只有打开Edit Mode的时候,即使不点击gameplay,也能在编辑状态上预览到变更结果。

距离总共分为3档,使用3个LOD material。

样本代码的材质球得手动设置。


细部构成概要

3档材质球

-材质球名_LOD_0

-材质球名_LOD_1

-材质球名_LOD_2

各个档的Shader.

-shaderName LOD 0 ( LOD 300 , LOD 200 , LOD 100 )

- Full shader

-shaderName LOD 1 ( LOD 300 , LOD 200 , LOD 100 )

- Down to data precision ( float to half ).

- roughness texture fetch to constant value.

-shaderName LOD 2 ( LOD 300 , LOD 200 , LOD 100 )

- Down to data precision ( half to fixed )

- roughness with metallic texture fetch to constant value.

- Optional normal map enabler.





Just materials LOD that change along with distance of camera GameObject was already to Instance. Custom control use to three phases to camera distance. Performance risk decrease through degree of precision or remove to texture fetch from individually State of PBR shader.

#Mesh LOD的话,可以以Mech renderer单位来登录LOD。


조회수 66회댓글 0개

최근 게시물

전체 보기
bottom of page