2022/4/6

玻璃透明效果优化

优化前:

  1. fn setParam = (
  2. local mt = makeMt mtName
  3. mt.texmap_bump.normal_map.fileName = Normal
  4. local c = (1-粗糙度)*255
  5. mt.Reflection = (color c c c)
  6. c= 250-不透明度*100
  7. mt.Refraction = (color c c c)
  8. mt.reflection_metalness = 金属度/10.0
  9. mt.texmap_bump.normal_map.coords.U_Tiling = 法线密度
  10. mt.texmap_bump.normal_map.coords.V_Tiling = 法线密度
  11. mt.texmap_bump.normal_map_multiplier = 法线强度
  12. mt.refraction_ior = 折射率
  13. mt.Diffuse = 颜色
  14. )

image.pngimage.png

优化后:

  1. fn setParam = (
  2. local mt = makeMt mtName
  3. mt.Diffuse = 颜色
  4. mt.texmap_bump.normal_map.HDRIMapName = Normal
  5. mt.texmap_reflection.output.RGB_Level = (1.0-粗糙度)
  6. mt.texmap_refraction.output.RGB_Level = (1.0-不透明度)+ 0.15
  7. mt.reflection_metalness = 金属度/10.0
  8. mt.texmap_bump.normal_map.coords.U_Tiling = 法线密度
  9. mt.texmap_bump.normal_map.coords.V_Tiling = 法线密度
  10. mt.texmap_bump.normal_map_multiplier = 法线强度
  11. )

image.png
image.png

毛玻璃透明效果优化

优化前:

  1. fn setParam = (
  2. local mt = makeMt mtName
  3. --mt.texmap_bump.normal_map.fileName = Normal
  4. mt.Diffuse =颜色
  5. mt.Reflection = (color ((1-粗糙度)*255) ((1-粗糙度)*255) ((1-粗糙度)*255))
  6. mt.Refraction = (color ((1-不透明度)*50+200) ((1-不透明度)*50+200) ((1-不透明度)*50+200))
  7. mt.reflection_metalness = 金属度/10
  8. mt.texmap_bump.normal_map_multiplier=法线强度
  9. local nc = mt.texmap_bump.normal_map.coords
  10. nc.U_Tiling = 法线密度
  11. nc.V_Tiling = 法线密度
  12. )

image.png
image.png

优化后:

image.png
image.png