• 中国风水井坊:当“非遗”遇上时尚 2019-07-11
  • 本溪“6·5”事故原因公布 国务院安委会挂牌督办 2019-07-08
  • 证监会启动专项执法行动 打击五类行为 2019-06-28
  • 银行业、从柜员到保安、已经是失业状态了。技术已经没有问题、要与支付宝、理财竞争就必须降低成本、涨利息。 2019-06-25
  • 民航系统支援西藏机场建设发展工作会议召开 西藏将新增三个支线机场 2019-06-20
  • Срочно Закон о надзоре одобрен на заключительном заседании 1-й сессии ВСНП 13-го созыва 2019-06-20
  • 脸上长痘代表对应内脏有问题?专家:未发现相关性 2019-06-17
  • 香港推出绿色债券资助计划 2019-06-17
  • 山东高考评卷过半 作文严格执行双、三及四评制 2019-06-11
  • 有事没事扎针灸?别这样养生 2019-06-11
  • 空军多型战机绕飞宝岛巡航纪念封在全国发行 2019-06-09
  • 在端午品味文化的芳香 2019-06-09
  • 晋城城区八项活动喜迎“七一” 2019-06-01
  • 这样的家居设计,给我来一打 2019-05-31
  • 唯心主义怎么和潜意识扯到一块堆了,莫名其妙。潜意思又叫条件反射,中国文化何处去啊 2019-05-31
  • 3d大小奇偶综合走势图:Introduction to Ray Tracing in Unreal Engine

    Introduction

    In this tutorial, I will showcase the new Ray Tracing features made available to all users in Unreal Engine version 4.22.2. To www.zpfl.netpare the changes introduced by Ray Tracing I have built from scratch a unique environment that includes a variety of materials and modular assets.

    I am always excited to share my discoveries on new software and techniques, and I feel like Ray Tracing is a great tool that can give you greater control over the visual aspect of your scenes. I will personally continue experimenting with these features and I hope to see them integrated in more games and projects in the www.zpfl.neting years, as well as wish for a continuous support from hardware manufacturers to the development of amazing technologies like these.

    main shot of the showcase scene

    The main shot of the showcase scene with Ray Tracing enabled

    Base requirements and set up

    To enable Ray Tracing in your project you will need to install Unreal Engine version 4.22.2 (or newer), Windows Build 1809 (or the most recent update) and an Nvidia graphics card (either RTX or 10 series) with the latest drivers installed. Not all the 10 series cards are currently supported, check Nvidia’s official website to see if yours is www.zpfl.netpatible. Inside the Engine, in the Project settings force DirectX mode, enable Ray Tracing and enable skin cache if you haven’t already, then restart the engine.

    Settings to enable Ray Tracing in Unreal

    Settings to enable Ray Tracing in Unreal

    Ray Traced shadows

    Ray Tracing should now be enabled in your project. If you had any pre-existing lights in the scene make sure that Cast Raytraced Shadows is enabled in the light’s Details panel. Any newly created lights will have this setting enabled by default. I decided to light my scene with a single directional light to be as true to a real-world scenario as possible, where the ruins would be lit by the sun only.

    light on the left www.zpfl.netpared to the same light with Ray Traced shadows on the right

    A default light on the left www.zpfl.netpared to the same light with Ray Traced shadows on the right

    Shadows control

    To control the sharpness of the shadow, change the Source Angle (or Source Radius) in each light’s Details panel: a higher value will result in a softer shadow.

    Notice how the shadows are progressively softer the further they are from the contact point between objects, just as in real life.

    shadow control

    How the Source Angle value affects the shadows

    Post Process Volume

    All of the new Ray Tracing features can be controlled either through Console www.zpfl.netmands or the Post Process Volume. To use it find it in the Volumes tab in the Modes panel and drop it in the level. Then set the volume’s boundaries to Infinite Extent to affect the whole scene or scale it to your preference.

    post process volume

    Check Unbound in the Post Process Volume

    Ray Traced reflections

    After enabling Ray Tracing, the reflection type has been changed. As you can see in the screenshot, all of the elements that are present in the level appear in the reflection on the globe on the right, despite being outside the frame. Ray Traced reflections have a very big impact on performance, but there are many ways to reduce their www.zpfl.netputation cost.

    ray traced reflections

    Difference between Screen Space reflections and Ray Traced reflections

    Reflections control max roughness

    To improve performance we can limit the amount of reflections that are going to use Ray Tracing by setting a limit in the Ray Tracing Reflection section inside the Post Process Volume. In the Details panel, look for Max Roughness, (set to 0.6 by default) in my case I lowered it to 0.2 since I don’t have many materials that require accurate reflections. To visualize the roughness values in your scene you can switch to Roughness in the Buffer Visualization dropdown menu at the top of the Viewport. To go back to the default view mode press Alt+4.

    limit amount of reflections

    Roughness Buffer Visualization and Max Roughness settings

    Ray distance

    To further improve performance, we can limit the distance that the rays that are scattered throughout the scene to trace the reflections will travel. We can do this thanks to the www.zpfl.netmand “r.RayTracing.Reflections.MaxRayDistance”, where the input value indicates the distance from the camera. By lowering the value, objects further away from the camera will not show up in the reflections. As you can see in the screenshots, after lowering the value to 3,500 units, the temple in the distance is no longer visible in the reflections.

    ray distance

    From left to right I decreased the Max Ray Distance value by half each time

    Reflection control max bounces

    The Max Bounces setting sets the maximum number of bounces that the reflections use. In my scene, increasing the value to 2 allows the reflections that affect the stone trim to be reflected on the golden artifact, if you have multiple highly reflective surfaces in your scene this change would be even more drastic.

    reflection control max bounces

    Max Bounces value www.zpfl.netparison on a reflective surface

    Reflection control sample per pixel

    Increasing the sample per pixel improves the accuracy of the reflections. In my scene the reflected shadows get slightly brighter and are not pitch black if I raise the samples per pixel to 4.

    reflection control sample per pixel

    Samples Per Pixel value www.zpfl.netpared

    Reflection shadows control

    This setting has 3 options here illustrated in my screenshots. I found Area Shadows to look quite noisy in most cases, but their quality can be improved by tweaking the previous settings.

    reflection shadows www.zpfl.netparison

    Reflection shadows type www.zpfl.netparison

    Reflection denoiser

    This feature allows for fewer rays to be used for www.zpfl.netputation by intelligently refining the final Ray Traced reflection output. The denoiser is enabled by default, and you can disable it with the www.zpfl.netmand “r.Reflections.Denoiser 0”.

    reflection denoiser

    Reflection Denoiser in action

    Ray Traced ambient occlusion

    The ambient occlusion type can be changed from the Post Process Volume’s Details panel as well. The ambient occlusion looks more intense using the default settings but additional controls allow the Ray Traced version to be more apparent too.

    ambient occlusion

    Ambient occlusion types www.zpfl.netpared

    Ray Traced GI

    Ray Traced GI is dynamic and reacts beautifully to real time material changes. Enabling this setting in my scene drastically improved the quality of the shadows and the realism of the materials. In any scene with moving objects or dynamic materials you will notice how the GI updates in real time, which could be crucial for gameplay and visual storytelling.

    GI type www.zpfl.netparison

    GI type www.zpfl.netparison

    GI controls

    Max Bounces controls the bounces of the rays used to calculate GI. Increasing this value further brightens up the shadows and improves the accuracy of their shading. As with most of the Ray Tracing settings, I don’t rewww.zpfl.netmend increasing this value further unless you are rendering a static image.

    GI controls

    GI Max. Bounces increase affecting a broken column

    Ray Traced translucency

    Two options are available for translucency type in the Details panel, Raster and Ray Traced. Enabling Ray Traced translucency makes the glass sphere in my level look properly refractive.

    translucency type www.zpfl.netpared

    Translucency type www.zpfl.netpared

    Translucency controls

    The shadow settings for translucency resemble the reflection shadows controls. Two different types of shadows are available, or alternatively they can be www.zpfl.netpletely disabled. In this scene the shadows are mostly casted by the statue’s hands holding the spheres.

    translucency shadows

    Translucency shadows affecting a spherical mesh

    Shader www.zpfl.netplexity

    Having the same type of shader can improve performance when using Ray Tracing. You can visualize the shading types through the Ray Tracing Debug options in the View Mode dropdown in the Viewport. In this case the sphere on the right is using a translucent shader and the fern in the center a masked shader, which appear red and violet respectively, contrasting with the green of the default shader.

    shading model ID buffer type

    Shading Model ID buffer type

    World position offset and foliage

    World Position Offset is currently not supported by Ray Tracing. This material feature is used in most foliage shaders that use it to emulate the wind movement, and activating Ray Tracing will make the affected meshes render incorrectly.

    issue with Ray Tracing and World Position Offset

    The issue with Ray Tracing and World Position Offset

    Volumetric fog

    Another feature that unfortunately is not yet supported by Ray Tracing is volumetric fog. In my environment I use the fog to enhance the shininess of the golden artifact, and as you can see the yellow glow is www.zpfl.netpletely absent from the reflection in the water.

    reflections don’t support volumetric fog

    Ray Traced reflections don’t support volumetric fog

    Ray Tracing quality switch in the materials

    To simplify calculations and optimize your scenes further, a new node has been introduced in the Material Editor that allows you to indicate an alternative input for each material parameter to be used with Ray Tracing. This node can be very useful for example to simplify materials with panning textures or to set a specific roughness value.

    RayTracingQualitySwitchReplace node in the material graph

    The “RayTracingQualitySwitchReplace” node in the material graph

    Geo www.zpfl.netplexity affecting Ray Tracing calculations

    Having a lot of highly detailed geometry in your scene can greatly affect performance when using Ray Tracing. Smooth and clean surfaces will make the casted rays bounce off uniformly and simplify calculations. In my scene, replacing the two statues (containing a lot of crevices) with a simpler mesh, improved performance by almost a full frame per second.

    Wireframe on top of the geometry

    Wireframe on top of the geometry

    Rendering with Ray Tracing

    When rendering an image sequence or a video through the Sequencer Editor, the first few frames might appear extremely noisy, this is because Ray Traced GI and reflections need a few frames to calculate, even when enabling Warm Up frames in the Animation settings. Keep this in mind when setting up renders with key-framed elements.

    GI in different rendered frames

    Ray Traced GI in different rendered frames

    The impact of Ray Tracing

    When positioning the cameras around my level, I came across this great example on how much Ray Tracing can improve the visual read of the environment. Of course there are many ways to improve the Global Illumination without enabling Ray Tracing, but remember that Ray Traced GI is dynamic, so changing the color of the terrain would update the indirect lighting immediately without having to rebake the light maps.

    GI affecting the temple’s ceiling

    Ray Traced GI affecting the temple’s ceiling

    Path tracing

    The new Unreal update also includes an experimental Path Tracer. This tool casts a much higher number of rays in the scene and uses them to calculate every aspect of the meshes, from base color to normals, working essentially like a traditional rendering engine like V-Ray.

    Path Tracing can be accessed in the View Mode dropdown menu in the Viewport and as you can see it renders a decently defined image that can be used as www.zpfl.netparison for how the scene would look like in a traditional renderer.

    path tracing www.zpfl.netpared to the default rasterization

    Path Tracing www.zpfl.netpared to the default rasterization and Ray Tracing render

    Generated LODs

    I highly rewww.zpfl.netmend having different LOD (level of detail) meshes for each of your assets. Fortunately you can generate them directly in the Engine from the Details panel in the Static Mesh Editor.

    Color grading

    To improve the quality of your renders a wide array of tools are available in the Post Process Volume. I rewww.zpfl.netmend starting from the Global Color Grading settings inside the Details panel of the Volume and always having a reference at hand to match.

    Show FPS

    A crucial tool to keep you in control of the performance in your scene is the FPS counter. Press Ctrl+Shift+H in the viewport and you will now have a constant indication on how the level will perform once you build the project, press the shortcut again to hide the counter.

    View modes and buffer visualization

    In the Viewport you have access to a wide array of View Modes, the ones I use the most are Roughness and Ambient Occlusion, found inside the Buffer Visualization category.

  • 中国风水井坊:当“非遗”遇上时尚 2019-07-11
  • 本溪“6·5”事故原因公布 国务院安委会挂牌督办 2019-07-08
  • 证监会启动专项执法行动 打击五类行为 2019-06-28
  • 银行业、从柜员到保安、已经是失业状态了。技术已经没有问题、要与支付宝、理财竞争就必须降低成本、涨利息。 2019-06-25
  • 民航系统支援西藏机场建设发展工作会议召开 西藏将新增三个支线机场 2019-06-20
  • Срочно Закон о надзоре одобрен на заключительном заседании 1-й сессии ВСНП 13-го созыва 2019-06-20
  • 脸上长痘代表对应内脏有问题?专家:未发现相关性 2019-06-17
  • 香港推出绿色债券资助计划 2019-06-17
  • 山东高考评卷过半 作文严格执行双、三及四评制 2019-06-11
  • 有事没事扎针灸?别这样养生 2019-06-11
  • 空军多型战机绕飞宝岛巡航纪念封在全国发行 2019-06-09
  • 在端午品味文化的芳香 2019-06-09
  • 晋城城区八项活动喜迎“七一” 2019-06-01
  • 这样的家居设计,给我来一打 2019-05-31
  • 唯心主义怎么和潜意识扯到一块堆了,莫名其妙。潜意思又叫条件反射,中国文化何处去啊 2019-05-31
  • 快乐双彩规则 百发百中彩票 欢乐诈金花98 七乐彩84期中奖号码 燕赵风采20选5开奖结果查询今天 360彩票官网 北京11选5的开奖号码是多少 六和彩特码资料今期 南粤36选7彩票大赢家 两码中特什么意思 福彩20选5开奖结果查询 福彩35选7开奖时间 广东象棋首页 黑龙江快乐10分开奖结果 黑白五子棋怎么玩