• 蔬菜-热门标签-华商生活 2019-09-28
  • 新华社评论员:与世界携手构建人类命运共同体 2019-09-28
  • 男子过收费站缴费工具亮眼 众网友被逗乐 2019-09-17
  • 大智慧被证监会立案调查 涉嫌信息披露违规 2019-09-17
  • 苏宁苦追的神锋将来中超!身价超5千万的他似卡卡 2019-09-16
  • 难民救援船将抵达西班牙 2019-09-16
  • 两个第一、两个第二!来大洋网有你好看 2019-09-13
  • 女大学生“裸条”借贷背后:牌照未至 巨头已各占山头 2019-08-26
  • 村教扶智,幕天在行动:“千城万区助村教”行动走进北京、泉州等全国各地城市 2019-08-21
  • 土地红线不断的下降,农民却越吃越饱,中国农民是一只神的力量,会魔法 2019-08-16
  • 湖州南浔:“文体惠民”送进村 2019-08-03
  • 人工智能:新技术的“双刃剑” 2019-08-01
  • 奋力开创老区改革发展新局面 2019-08-01
  • 中国风水井坊:当“非遗”遇上时尚 2019-07-11
  • 本溪“6·5”事故原因公布 国务院安委会挂牌督办 2019-07-08
  • 双色球开奖结果走势图: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.

    Fetching www.zpfl.netments...

    Post a www.zpfl.netment

  • 蔬菜-热门标签-华商生活 2019-09-28
  • 新华社评论员:与世界携手构建人类命运共同体 2019-09-28
  • 男子过收费站缴费工具亮眼 众网友被逗乐 2019-09-17
  • 大智慧被证监会立案调查 涉嫌信息披露违规 2019-09-17
  • 苏宁苦追的神锋将来中超!身价超5千万的他似卡卡 2019-09-16
  • 难民救援船将抵达西班牙 2019-09-16
  • 两个第一、两个第二!来大洋网有你好看 2019-09-13
  • 女大学生“裸条”借贷背后:牌照未至 巨头已各占山头 2019-08-26
  • 村教扶智,幕天在行动:“千城万区助村教”行动走进北京、泉州等全国各地城市 2019-08-21
  • 土地红线不断的下降,农民却越吃越饱,中国农民是一只神的力量,会魔法 2019-08-16
  • 湖州南浔:“文体惠民”送进村 2019-08-03
  • 人工智能:新技术的“双刃剑” 2019-08-01
  • 奋力开创老区改革发展新局面 2019-08-01
  • 中国风水井坊:当“非遗”遇上时尚 2019-07-11
  • 本溪“6·5”事故原因公布 国务院安委会挂牌督办 2019-07-08
  • 贵州快3每天多少期 捕鱼达人怎么挣人民币 江西时时彩和值走势图 平台龙虎刷佣金是真的吗 捕鱼app作弊 七乐彩开奖历史记录表 足彩胜负彩18160期任九开奖 2019上海大师赛斯诺克 体彩超级大乐透127期开奖结果 体彩6十1中奖规则图表 五五肖是什么 豪牛娱乐怎么进不去 什么叫杂六 pk10红马计划软件 宁夏十一选五走势