zoukankan      html  css  js  c++  java
  • 在UnrealEngine中用Custom节点实现毛玻璃的效果

    本人在论坛上找到了一篇实现毛玻璃效果的文章:
    https://forums.unrealengine.com/showthread.php?70143-So-Blurred-glass-material-is-impossible-in-Unreal-Engine-4&highlight=SceneTextureLookup
    原理是通过SceneColor获得translucent物体后面的场景渲染结果,之后根据后面的场景距离进行模糊。相关参数中还增加了TempAAParamer来实现随机值、以及添加了Noise实现磨砂效果。

    但是获取translucent物体后面的场景距离这个方法相当值得学习,我总结在之前的Blog里了:http://www.cnblogs.com/blueroses/p/6361517.html

    本人还考虑如何计算出前表面像素到后表面像素的距离的,但是经过思考发现因为材质编辑器管线的关系是无法做到的(没有Pass的概念)不然可以通过额外渲染一次背面的像素深度来计算。
    所以只能通过RayMarching来计算了。

    文档中关于玻璃与水面的关键点:

    PixelNormalOffset

    https://docs-origin.unrealengine.com/latest/INT/Engine/Rendering/Materials/PixelNormalOffset/index.html

    PlanarReflections

    https://docs.unrealengine.com/latest/CHN/Engine/Rendering/LightingAndShadows/PlanarReflections/index.html

  • 相关阅读:
    spring mvc ajax请求
    spring mvc 返回页面数据
    spring mvc 参数传递的三种方式
    spring mvc 注解示例
    spring mvc handler的三种方式
    MyBatis 一级、二级缓存
    MyBatis 调用存储过程
    MyBatis动态SQL与模糊查询
    spring mvc 注解入门示例
    MyBatis 一对多关联查询
  • 原文地址:https://www.cnblogs.com/blueroses/p/6556998.html
Copyright © 2011-2022 走看看