透明材质及屏蔽反射、修正体积内暗部
重点:1.按场景所需添加材质发光; 2.复合漫反射材质增加浑浊度; 3.添加反射层。
三点都是低强度的比较细节层次的改变。
引申问题1:屏蔽来自其它物体的反射。
将上述OSL代码链接到影响出现反射的其它物体(图中为渐变背景布)的材质opacity,refl设置为0
/* opacity control / shader raytype_contribution( float cam = 1 [[string label = "Camera", float min=0, float max=1]], float shad = 1 [[string label = "Shadow", float min=0, float max=1]], float AO = 1 [[string label = "Ambient occlusion", float min=0, float max=1]], float diff = 1 [[string label = "Diffuse", float min=0, float max=1]], float refl = 1 [[string label = "Reflection", float min=0, float max=1]], float refr = 1 [[string label = "Refraction", float min=0, float max=1]], output color c = 0 ) { c = camraytype("camera") + shadraytype("shadow") + AOraytype("AO") + diffraytype("diffuse") + reflraytype("reflection") + refr*raytype("refraction"); }
引申问题2:修正engine错误计算物体本身的漫反射造成的体积内部过暗。
将上述OSL代码链接到出现过暗情况物体的材质opacity,diff设置从1降为0.3左右