Click here to watch the video of my speech.
https://www.youtube.com/watch?v=C_xkgdsnm0I
English slides are available for download here
https://epicgames.box.com/s/1wgnxgjtfrktr03djrg7eu0zdllflje0
The Japanese slides are here.
https://www.slideshare.net/EpicGamesJapan/ue4-ray-tracing
https://epicgames.box.com/s/sa3h9b96xvik2rzmjeyhoofl83xm0ce0
Presented by Hiroyuki Kobayashi (Epic Games Japan)
This slide is from the "UE4 Ray Tracing Night Week" presentation on August 17, 2020 - August 24, 2020.
8. #UE4 | @UNREALENGINE
Ray tracing verification
● Ambient Occlusion
● Global Illumination
● Sky Light
● Reflection
● Translucency
Verification environment RTX 2080ti Full HD
9. #UE4 | @UNREALENGINE
Ray tracing verification
Dynamic lighting is important because the train itself keeps moving.
Is it okay to move it in the first place?
Does the noise increase?
12. #UE4 | @UNREALENGINE
Ray Tracing Ambient Occlusion
High quality and good performance.
l though it depends on the resolution, the difference from SSAO is about 1 to 2 ms.
Ray TracingSSAO
14. #UE4 | @UNREALENGINE
Ray Tracing Ambient Occlusion
When movedWhen stoped
What happens when
the train moves?
The noise increased a little.
15. #UE4 | @UNREALENGINE
Ray Tracing Ambient Occlusion
Only AOLit
What happens when
move the train?
There is no problem because it is almost inconspicuous in the Lit mode.
19. #UE4 | @UNREALENGINE
Ray Tracing Global Illumination
Looking at the processing load breakdown...
20. #UE4 | @UNREALENGINE
Ray Tracing Global Illumination
Sky Light Global Illumination Reflection
Looking at the processing load breakdown...
21. #UE4 | @UNREALENGINE
Ray Tracing Global Illumination
Sky Light Global Illumination Reflection
Looking at the processing load breakdown...
22. #UE4 | @UNREALENGINE
Ray Tracing Global Illumination
Sky Light Global Illumination Reflection
About 31ms!!
Looking at the processing load breakdown...
30. #UE4 | @UNREALENGINE
Ray Tracing Global Illumination
Final GatherBrute Force
What happens when
move the train?
31. #UE4 | @UNREALENGINE
Ray Tracing Global Illumination
Final GatherBrute Force
What happens when
move the train?
Final gather has problems with movemet
32. #UE4 | @UNREALENGINE
Ray Tracing Global Illumination
What happens when
move the train?
Sample Per Pixel 64Sample Per Pixel 4
It didn't change much even if I increased the number of samples.
35. #UE4 | @UNREALENGINE
Ray Tracing Global Illumination
Brute Force
Sample Per Pixel 1Sample Per Pixel 4
It's cleaner with a higher sample size.
But not by much.
36. #UE4 | @UNREALENGINE
Ray Tracing Global Illumination
Brute Force
The noise stands out when you move.
But not as much as Final Gather.
When movedWhen stoped
37. #UE4 | @UNREALENGINE
Ray Tracing Global Illumination
Final Gather
● Fast
● Not good at movement
Brute Force
● Slow
● not good at movement, but better than final gather
38. #UE4 | @UNREALENGINE
Ray Tracing Global Illumination
Final Gather
● Fast
● Not good at movement
Brute Force
● Slow
● not good at movement, but better than final gather
Neither of them are good at
movement!
41. #UE4 | @UNREALENGINE
Global Illumination Denoiser
Denoiser related console commands are also available
GI and Sky Light denoisers are common
42. #UE4 | @UNREALENGINE
Global Illumination Denoiser
r.GlobalIllumination.Denoiser.PreConvolution=2
● Increasing the value suppresses noise to some extent, but gives an overall vague
impression.
r.GlobalIllumination.Denoiser.ReconstructionSamples=1
● Noise jaggies can be suppressed by lowering the value
43. #UE4 | @UNREALENGINE
Global Illumination Denoiser
Adjust the denoiser
PreConvolution=2PreConvolution=1
ReconstructionSamples=1ReconstructionSamples=16
Even when you move it, it doesn't stand out much!
45. #UE4 | @UNREALENGINE
Ray Tracing Sky Light
Shadow related issues
● Masked material shadow ignores Opacity Mask
● Cast shadow for each material element does not work
● Sky Light looks different in reflection
46. #UE4 | @UNREALENGINE
Ray Tracing Sky Light
Avoid with r.RayTracing.SkyLight.EnableTwoSidedGeometry = 0
Whether to enable shadows for double-sided materials
Turn off because the shadows of plants etc. may become too dark
Masked material shadow ignores Opacity Mask
47. #UE4 | @UNREALENGINE
Ray Tracing Sky Light
Avoid windowpanes that you do not want to cast shadows by making them separate objects
Cast shadow for each material element does not work
48. #UE4 | @UNREALENGINE
Ray Tracing Sky Light
With shadowNo shadow
r.RayTracing.Reflections.RayTraceSkyLightContribution=1
Draw skylight shadows in ray tracing reflection
It doesn't look exactly the same without denoising, and it gets quite dark.
Sky Light looks different in reflection
49. #UE4 | @UNREALENGINE
Ray Tracing Sky Light
What happens when
move the train?
Not as much as GI, but still stands out when moving
When movedWhen stoped
50. #UE4 | @UNREALENGINE
Ray Tracing Sky Light
After adjustmentBefore adjustment
Adjust Denoiser
Just like GI, adjust the denoiser to solve the problem!
52. #UE4 | @UNREALENGINE
Ray Tracing Sky Light
What happens when
move the train?
There is a slight increase in noise, but there is almost no problem.
When movedWhen stoped
53. #UE4 | @UNREALENGINE
Ray Tracing Reflection
Many RT Reflections do not look right
● AO
● Global Illumination
● Denoised Sky Light and Soft Shadow
● SubSurface Scattering
etc
56. #UE4 | @UNREALENGINE
Ray Tracing Reflection
The shadow of the Two Sided material turns pink
Solved by rewriting the shader code!
#if MATERIAL_SHADINGMODEL_SUBSURFACE || MATERIAL_SHADINGMODEL_TWOSIDED_FOLIAGE
uint ShadingModel = GetMaterialShadingModel(PixelMaterialInputs);
if ( ShadingModel == SHADINGMODELID_SUBSURFACE || ShadingModel == SHADINGMODELID_TWOSIDED_FOLIAGE )
{
Payload.CustomData = GetMaterialSubsurfaceData(PixelMaterialInputs);
}
#endif
EngineShadersPrivateRayTracingRayTracingMaterialHitShaders.usf Around line 385
57. #UE4 | @UNREALENGINE
Ray Tracing Reflection
AfterBefore
Scheduled to be fixed in 4.26
Thank you Monsyo and Nori!
59. #UE4 | @UNREALENGINE
Ray Tracing Reflection
Sky Light shadow is not drawn and it is too bright
RayTraceSkyLightContribution=1 or
AfterBefore
60. #UE4 | @UNREALENGINE
Ray Tracing Reflection
Sky Light shadow is not drawn and it is too bright
It gets pretty dark, but ...
RayTraceSkyLightContribution=1 or
61. #UE4 | @UNREALENGINE
Ray Tracing Reflection
Sky Light shadow is not drawn and it is too bright
It doesn't bother me so much in lit mode
RayTraceSkyLightContribution=1 or
62. #UE4 | @UNREALENGINE
Ray Tracing Reflection
Soft shadows can also be selected,
but they are rough without
denoising
63. #UE4 | @UNREALENGINE
Ray Tracing Reflection
Soft shadows can also be selected, but they are rough without denoising
Distorts normal or is inconspicuous if the material is rough to some extent
LitReflection
64. #UE4 | @UNREALENGINE
Ray Tracing Reflection
Soft shadows can also be selected, but they are rough without denoising
Distorts Normal or is inconspicuous if the material is rough to some extent
High RoughnessLow Roughness
65. #UE4 | @UNREALENGINE
Ray Tracing Reflection
I didn't use it this time, but there is also a reflection-related denoiser option
67. #UE4 | @UNREALENGINE
Ray Tracing Translucency
Many RT Reflections and Refraction do not look right
● AO
● Global Illumination
● Denoised Sky Light and Soft Shadow
● SubSurface Scattering
etc
68. #UE4 | @UNREALENGINE
Ray Tracing Translucency
Refraction of RT Translucency
There is a lot of information that does not appear
accurately, and there is a lot of noise when moving it.
69. #UE4 | @UNREALENGINE
Ray Tracing Translucency
I didn't use Refraction
Turn off Refraction and operate with Max Refraction Rays 1
70. #UE4 | @UNREALENGINE
Ray Tracing Translucency
It may be usable if it is about Prop with a
small drawing area
I didn't use Refraction
71. #UE4 | @UNREALENGINE
Ray Tracing Translucency
Reflection of RT Translucency
Can be used even when Refraction is off
72. #UE4 | @UNREALENGINE
Ray Tracing Translucency
What happens when
move the train?
Like opaque reflection, it doesn't bother you much when you move
When movedWhen stoped
73. #UE4 | @UNREALENGINE
Ray Tracing Translucency
Nvidia RTX Branch https://github.com/NvPhysX/UnrealEngine/tree/RTX-4.25
Translucent drawing is rasterized, and there is also Hybrid Translucency where only
the reflective part is ray-traced
75. #UE4 | @UNREALENGINE
Ray tracing verification summary
Ambient Occlusion
● Excellent quality and performance
76. #UE4 | @UNREALENGINE
Ray tracing verification summary
Global Illumination
● Slow performance
● Weak to fast movements
● Real-time is also possible by adjusting the denoiser
77. #UE4 | @UNREALENGINE
Ray tracing verification summary
Sky Light
● Beware of shadow-related issues
● Weak to fast movements, but improved by adjusting the denoiser like GI
78. #UE4 | @UNREALENGINE
Ray tracing verification summary
Reflection
● Know what isn't exactly reflected in the reflection
● Adjust Normal and Roughness for areas where roughness is noticeable
79. #UE4 | @UNREALENGINE
Ray tracing verification summary
Translucency
● Know what isn't exactly reflected in Reflection and Refraction
● It may be difficult to use Refraction in a large area
● We can also turn off Refraction and use only Reflection
80. #UE4 | @UNREALENGINE
A completely dynamic scene has been created!
RTX2080ti
1920 x 1080
About 30fps
83. #UE4 | @UNREALENGINE
Sun and Sky
Simulate lighting from coordinates and time
Sun and Sky documentation
https://docs.unrealengine.com/ja/Engine/Rendering/LightingAndShadows/SunSky/index.html
84. #UE4 | @UNREALENGINE
Sun and Sky
Freely change the time and seasons!
* Winter assets are required to create a snowy landscape
93. #UE4 | @UNREALENGINE
Translucent verification
I want an effect like the Roughness of RT Reflection
Unfortunately it is not possible with
ray tracing translucency
94. #UE4 | @UNREALENGINE
Translucent verification
I want an effect like the Roughness of RT Reflection
If you let the reflection ray penetrate, it
will look translucent ...?
100. #UE4 | @UNREALENGINE
Translucent verification
Make it translucent using RT Reflection
Roughness and Normal are devised
to make it look like frosted glass
101. #UE4 | @UNREALENGINE
Translucent verification
It looks transparent, but it is actually treated as an opaque reflection
It is drawn firmly in Depth
102. #UE4 | @UNREALENGINE
Translucent verification
It looks transparent, but it is actually treated as an opaque reflection
It is drawn firmly in Depth
DoF can be used!
104. #UE4 | @UNREALENGINE
Executable file
https://drive.google.com/file/d/1N7K9O1vj6ypwsAB_v6m5k4E2RzPmR5A9/view?usp=sharing
Project
https://drive.google.com/file/d/1nlYv0YoLzNXgeU1sN6BSt5CrB9FKO9M1/view?usp=sharing
Executable file & project is
open to the public
105. #UE4 | @UNREALENGINE
Is it possible to create real-time content
using evry ray tracing function of UE4?
108. #UE4 | @UNREALENGINE
Advantages and disadvantages of creating ray tracing content with UE4
Advantages
● Dynamic change in lighting
You can easily simulate date and time and seasonal changes by combining with Sun and Sky
Can handle lighting on moving objects such as trains and airplanes
● Physical accuracy
Reflection and GI are now accurate and dynamic, enabling expressions that were previously difficult
● Iteration speed
No need to bake, so of course no Light Map
From modeling to checking lighting is much faster
109. #UE4 | @UNREALENGINE
Advantages and disadvantages of creating ray tracing content with UE4
Disadvantages
● Processing load
It is considerably heavier than the conventional functions, including GI
Depending on the scene, even conventional expressions may be able to produce sufficient quality
● Unsupported part
There are parts that I am not good at, such as reflection and translucent reflection
● Noise basically increases when movement is added
I was moving it late this time, but the GI noise was still severe
If it moves faster, another response may be necessary