Real-time content creation with UE4 ray tracing【UE4 Ray Tracing Night Week 2020】
スライド概要
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.docswell.com/s/EpicGamesJapan/5EE9E5-UE4_RayTracingNW20_Train
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.
日本語版はこちら
https://www.docswell.com/s/EpicGamesJapan/5EE9E5-UE4_RayTracingNW20_Train
作者について:
Unreal Engineを開発・提供しているエピック ゲームズ ジャパンによる公式アカウントです。 勉強会や配信などで行った講演資料を公開しています。 公式サイトはこちら https://www.unrealengine.com/ja/
スライド一覧各ページのテキスト
1. Real-time content creation with UE4 ray tracing Epic Games Japan / Technical Artist Developer Relations Hiroyuki Kobayashi
2. Ray Tracing in UE4.25 #UE4 | @UNREALENGINE
3. Ray Tracing in UE4.25 Production Ready ! #UE4 | @UNREALENGINE
4. Are you sure it’s okay? #UE4 | @UNREALENGINE
5. I tried to create real-time content using evry ray tracing function of UE4! #UE4 | @UNREALENGINE
6. Example: Train #UE4 | @UNREALENGINE
7. #UE4 | @UNREALENGINE
8. Ray tracing verification ● Ambient Occlusion ● Global Illumination ● Sky Light ● Reflection ● Translucency Verification environment RTX 2080ti Full HD #UE4 | @UNREALENGINE
9. 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? #UE4 | @UNREALENGINE
10. Ambient Occlusion #UE4 | @UNREALENGINE
11. Ray Tracing Ambient Occlusion SSAO #UE4 | @UNREALENGINE Ray Tracing
12. Ray Tracing Ambient Occlusion SSAO Ray Tracing High quality and good performance. l though it depends on the resolution, the difference from SSAO is about 1 to 2 ms. #UE4 | @UNREALENGINE
13. What happens when move the train? #UE4 | @UNREALENGINE
14. Ray Tracing Ambient Occlusion What happens when the train moves? When stoped The noise increased a little. #UE4 | @UNREALENGINE When moved
15. Ray Tracing Ambient Occlusion What happens when move the train? Lit There is no problem because it is almost inconspicuous in the Lit mode. #UE4 | @UNREALENGINE Only AO
16. Global Illumination #UE4 | @UNREALENGINE
17. Ray Tracing Global Illumination Summer #UE4 | @UNREALENGINE Winter
18. But... #UE4 | @UNREALENGINE
19. Ray Tracing Global Illumination Looking at the processing load breakdown... #UE4 | @UNREALENGINE
20. Ray Tracing Global Illumination Looking at the processing load breakdown... Sky Light #UE4 | @UNREALENGINE Global Illumination Reflection
21. Ray Tracing Global Illumination Looking at the processing load breakdown... Sky Light #UE4 | @UNREALENGINE Global Illumination Reflection
22. Ray Tracing Global Illumination Looking at the processing load breakdown... Sky Light Global Illumination Reflection About 31ms!! #UE4 | @UNREALENGINE
23. It was heavy... #UE4 | @UNREALENGINE
24. Ray Tracing Global Illumination Brute Force Sample Per Pixel 4 Sky Light #UE4 | @UNREALENGINE Global Illumination Reflection
25. Ray Tracing Global Illumination Type of RTGI ● Brute Force ● Final Gather We can change from post process volume. #UE4 | @UNREALENGINE
26. How’s final gather? #UE4 | @UNREALENGINE
27. Ray Tracing Global Illumination Final Gather Sample Per Pixel 4 #UE4 | @UNREALENGINE
28. Ray Tracing Global Illumination Final Gather Sample Per Pixel 4 About 9ms!! #UE4 | @UNREALENGINE
29. But... #UE4 | @UNREALENGINE
30. Ray Tracing Global Illumination What happens when move the train? Brute Force #UE4 | @UNREALENGINE Final Gather
31. Ray Tracing Global Illumination What happens when move the train? Brute Force Final gather has problems with movemet #UE4 | @UNREALENGINE Final Gather
32. Ray Tracing Global Illumination What happens when move the train? Sample Per Pixel 4 It didn't change much even if I increased the number of samples. #UE4 | @UNREALENGINE Sample Per Pixel 64
33. Try lowering the brute force sample per pixel #UE4 | @UNREALENGINE
34. Ray Tracing Global Illumination Brute Force Sample Per Pixel 1 About 7ms!! #UE4 | @UNREALENGINE
35. Ray Tracing Global Illumination Brute Force Sample Per Pixel 4 It's cleaner with a higher sample size. But not by much. #UE4 | @UNREALENGINE Sample Per Pixel 1
36. Ray Tracing Global Illumination Brute Force When stoped The noise stands out when you move. But not as much as Final Gather. #UE4 | @UNREALENGINE When moved
37. Ray Tracing Global Illumination Final Gather ● Fast ● Not good at movement Brute Force ● Slow ● not good at movement, but better than final gather #UE4 | @UNREALENGINE
38. Ray Tracing Global Illumination Final Gather ● Fast ● Not good at movement Brute Force Neither of them are good at movement! ● Slow ● not good at movement, but better than final gather #UE4 | @UNREALENGINE
39. What do we do then? #UE4 | @UNREALENGINE
40. Let's adjust the denoiser. #UE4 | @UNREALENGINE
41. Global Illumination Denoiser Denoiser related console commands are also available GI and Sky Light denoisers are common #UE4 | @UNREALENGINE
42. 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 #UE4 | @UNREALENGINE
43. Global Illumination Denoiser Adjust the denoiser PreConvolution=1 PreConvolution=2 ReconstructionSamples=16 ReconstructionSamples=1 Even when you move it, it doesn't stand out much! #UE4 | @UNREALENGINE
44. Sky Light #UE4 | @UNREALENGINE
45. 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 #UE4 | @UNREALENGINE
46. Ray Tracing Sky Light Masked material shadow ignores Opacity Mask 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 #UE4 | @UNREALENGINE
47. Ray Tracing Sky Light Cast shadow for each material element does not work Avoid windowpanes that you do not want to cast shadows by making them separate objects #UE4 | @UNREALENGINE
48. Ray Tracing Sky Light Sky Light looks different in reflection 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. No shadow #UE4 | @UNREALENGINE With shadow
49. Ray Tracing Sky Light What happens when move the train? When stoped Not as much as GI, but still stands out when moving #UE4 | @UNREALENGINE When moved
50. Ray Tracing Sky Light Adjust Denoiser Before adjustment Just like GI, adjust the denoiser to solve the problem! #UE4 | @UNREALENGINE After adjustment
51. Reflection #UE4 | @UNREALENGINE
52. Ray Tracing Sky Light What happens when move the train? When stoped There is a slight increase in noise, but there is almost no problem. #UE4 | @UNREALENGINE When moved
53. Ray Tracing Reflection Many RT Reflections do not look right ● AO ● Global Illumination ● Denoised Sky Light and Soft Shadow ● SubSurface Scattering etc #UE4 | @UNREALENGINE
54. Ray Tracing Reflection Many RT Reflections do not look right #UE4 | @UNREALENGINE
55. Ray Tracing Reflection The shadow of the Two Sided material turns pink #UE4 | @UNREALENGINE
56. 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 Engine\Shaders\Private\RayTracing\RayTracingMaterialHitShaders.usf Around line 385 #UE4 | @UNREALENGINE
57. Ray Tracing Reflection Before Scheduled to be fixed in 4.26 Thank you Monsyo and Nori! #UE4 | @UNREALENGINE After
58. Ray Tracing Reflection Sky Light shadow is not drawn. Too bright #UE4 | @UNREALENGINE
59. Ray Tracing Reflection Sky Light shadow is not drawn and it is too bright RayTraceSkyLightContribution=1 Before #UE4 | @UNREALENGINE or After
60. Ray Tracing Reflection Sky Light shadow is not drawn and it is too bright RayTraceSkyLightContribution=1 It gets pretty dark, but ... #UE4 | @UNREALENGINE or
61. Ray Tracing Reflection Sky Light shadow is not drawn and it is too bright RayTraceSkyLightContribution=1 or It doesn't bother me so much in lit mode #UE4 | @UNREALENGINE
62. Ray Tracing Reflection Soft shadows can also be selected, but they are rough without denoising #UE4 | @UNREALENGINE
63. 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 Reflection #UE4 | @UNREALENGINE Lit
64. 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 Low Roughness #UE4 | @UNREALENGINE High Roughness
65. Ray Tracing Reflection I didn't use it this time, but there is also a reflection-related denoiser option #UE4 | @UNREALENGINE
66. Translucency #UE4 | @UNREALENGINE
67. Ray Tracing Translucency Many RT Reflections and Refraction do not look right ● AO ● Global Illumination ● Denoised Sky Light and Soft Shadow ● SubSurface Scattering etc #UE4 | @UNREALENGINE
68. 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. #UE4 | @UNREALENGINE
69. Ray Tracing Translucency I didn't use Refraction Turn off Refraction and operate with Max Refraction Rays 1 #UE4 | @UNREALENGINE
70. Ray Tracing Translucency I didn't use Refraction It may be usable if it is about Prop with a small drawing area #UE4 | @UNREALENGINE
71. Ray Tracing Translucency Reflection of RT Translucency Can be used even when Refraction is off #UE4 | @UNREALENGINE
72. Ray Tracing Translucency What happens when move the train? When stoped Like opaque reflection, it doesn't bother you much when you move #UE4 | @UNREALENGINE When moved
73. 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 #UE4 | @UNREALENGINE
74. Ray tracing verification summary ● Ambient Occlusion ● Global Illumination ● Sky Light ● Reflection ● Translucency #UE4 | @UNREALENGINE
75. Ray tracing verification summary Ambient Occlusion ● Excellent quality and performance #UE4 | @UNREALENGINE
76. Ray tracing verification summary Global Illumination ● Slow performance ● Weak to fast movements ● Real-time is also possible by adjusting the denoiser #UE4 | @UNREALENGINE
77. Ray tracing verification summary Sky Light ● Beware of shadow-related issues ● Weak to fast movements, but improved by adjusting the denoiser like GI #UE4 | @UNREALENGINE
78. Ray tracing verification summary Reflection ● Know what isn't exactly reflected in the reflection ● Adjust Normal and Roughness for areas where roughness is noticeable #UE4 | @UNREALENGINE
79. 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 #UE4 | @UNREALENGINE
80. A completely dynamic scene has been created! RTX2080ti 1920 x 1080 About 30fps #UE4 | @UNREALENGINE
81. Let's move the light #UE4 | @UNREALENGINE
82. Lighting with Sun and Sky #UE4 | @UNREALENGINE
83. Sun and Sky Simulate lighting from coordinates and time Sun and Sky documentation https://docs.unrealengine.com/ja/Engine/Rendering/LightingAndShadows/SunSky/index.html #UE4 | @UNREALENGINE
84. Sun and Sky Freely change the time and seasons! * Winter assets are required to create a snowy landscape #UE4 | @UNREALENGINE
85. Example: Jelly Fish #UE4 | @UNREALENGINE
86. #UE4 | @UNREALENGINE
87. Verification content ● Ambient Occlusion ● Global Illumination ● Sky Light ● Translucency ● Reflection #UE4 | @UNREALENGINE
88. Verification content ● Ambient Occlusion ● Global Illumination ● Sky Light ● Translucency ● Reflection #UE4 | @UNREALENGINE Not used this time
89. Why did se reflection for jellyfish? #UE4 | @UNREALENGINE
90. Because I make jellyfish ... ● I want to express a soft sheer feeling like frosted glass ● I want to use DoF #UE4 | @UNREALENGINE
91. Because I make jellyfish ... The internal organs can be seenthrough vaguely I want to reproduce this #UE4 | @UNREALENGINE
92. Translucent verification I want an effect like the Roughness of RT Reflection Roughness 0.0 #UE4 | @UNREALENGINE Roughness 0.25
93. Translucent verification I want an effect like the Roughness of RT Reflection Unfortunately it is not possible with ray tracing translucency #UE4 | @UNREALENGINE
94. Translucent verification I want an effect like the Roughness of RT Reflection If you let the reflection ray penetrate, it will look translucent ...? #UE4 | @UNREALENGINE
95. How to get through Ray #UE4 | @UNREALENGINE
96. Tweak normals in materials #UE4 | @UNREALENGINE
97. Translucent verification Make it translucent using RT Reflection By using the inverted camera vector as the normal ... #UE4 | @UNREALENGINE
98. Translucent verification Make it translucent using RT Reflection Tangent Space Normal needs to be turned off #UE4 | @UNREALENGINE
99. Translucent verification Make it translucent using RT Reflection Ray flies almost in the opposite direction #UE4 | @UNREALENGINE
100. Translucent verification Make it translucent using RT Reflection Roughness and Normal are devised to make it look like frosted glass #UE4 | @UNREALENGINE
101. Translucent verification It looks transparent, but it is actually treated as an opaque reflection It is drawn firmly in Depth #UE4 | @UNREALENGINE
102. Translucent verification It looks transparent, but it is actually treated as an opaque reflection It is drawn firmly in Depth DoF can be used! #UE4 | @UNREALENGINE
103. I was able to express the transparency and DoF I was aiming for! #UE4 | @UNREALENGINE
104. Executable file & project is open to the public Executable file https://drive.google.com/file/d/1N7K9O1vj6ypwsAB_v6m5k4E2RzPmR5A9/view?usp=sharing Project https://drive.google.com/file/d/1nlYv0YoLzNXgeU1sN6BSt5CrB9FKO9M1/view?usp=sharing #UE4 | @UNREALENGINE
105. Is it possible to create real-time content using evry ray tracing function of UE4? #UE4 | @UNREALENGINE
106. Did it! #UE4 | @UNREALENGINE
107. Understand the advantages and disadvantages of ray tracing and use it appropriately for each project #UE4 | @UNREALENGINE
108. 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 #UE4 | @UNREALENGINE
109. 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 #UE4 | @UNREALENGINE
110. Thank you! #UE4 | @UNREALENGINE