YouTube2Text

Rendering Tiny Glades With Entirely Too Much Ray Marching — Transcript

by Graphics Programming Conference · 12,132 words · 1,665 segments · language en · Watch on YouTube

Full transcript

  1. 0:00[Applause]
  2. 0:01hello uh Welcome to The Strange Talk
  3. 0:03where we solve all of life's problems
  4. 0:05using uh only Ray marching and stupid
  5. 0:08rendering tricks um I'm Tom and half of
  6. 0:11a new new uh IND the game studio called
  7. 0:13poun light and we have recently released
  8. 0:14our first game called tiny Glade uh in
  9. 0:16case you haven't seen it uh here's our
  10. 0:18[Music]
  11. 0:21trailer so it's a little cozy dama
  12. 0:24doodling game where you just uh build
  13. 0:26things for your own enjoyment uh making
  14. 0:28uh Co cages romantic ruins uh and uh
  15. 0:32lovely
  16. 0:33castles there's no goals uh there's no
  17. 0:35stress uh you just uh s k back and uh
  18. 0:39enjoy yourself making something
  19. 0:43[Music]
  20. 0:47pretty and one of the premises of the
  21. 0:50game is that uh whatever you do uh the
  22. 0:52game will make beautiful it's rendering
  23. 0:55and protig generation
  24. 1:02[Music]
  25. 1:10[Music]
  26. 1:23[Applause]
  27. 1:29thank you but we're here the graphics so
  28. 1:30from the graphics nerd angle uh the game
  29. 1:33essentially does doodling so like Ms
  30. 1:35Spain style but with pres generation uh
  31. 1:37we have hundreds of thousands of
  32. 1:39individual objects with modable geometry
  33. 1:41and dynamic time of day uh but the uh
  34. 1:44audience is casual therefore the
  35. 1:46hardware is like often 10 years old so
  36. 1:48we have to run kind of potato devices uh
  37. 1:50and to pull this off we have crafted a
  38. 1:52custom engine on top of Vulcan rust and
  39. 1:54HL uh and it is mostly written from
  40. 1:57scratch but using tons and tons of Open
  41. 1:59Source software and some of our own uh
  42. 2:01secret sauce uh but nobody actually
  43. 2:03works on fulltime fulltime on rendering
  44. 2:05in our game uh besides me doing kind of
  45. 2:07long like night shifts and not knowing
  46. 2:09the separation between uh work and life
  47. 2:11uh so it's a it's going to be a lot of
  48. 2:13Jank warning and things kind of like if
  49. 2:15you think I'm saying something wrong
  50. 2:16it's probably it is wrong because we
  51. 2:17don't really have time to properly
  52. 2:18research things uh because the team is
  53. 2:20super tiny it's it's Anar and I and we
  54. 2:22have collaborated with um UD and Martin
  55. 2:24from KNN audio for the games
  56. 2:26audio so you might be wondering why did
  57. 2:29such a tiny Studio decided to make a
  58. 2:30custom engine and the story of that is
  59. 2:32kind of connected to Where it All Began
  60. 2:34and it started as a side project by Anna
  61. 2:37uh and it was a hobby project for about
  62. 2:38a year before it turned to into a game
  63. 2:41uh and only joined after that one year
  64. 2:43and within that time it was a u a hubby
  65. 2:46thing to learn rendering so Anna was
  66. 2:48quite vers in proced procedual
  67. 2:49generation offline but she wanted to uh
  68. 2:52learn rendering and actually tried to do
  69. 2:53procedure in real time as well using
  70. 2:54computer shaders and all the stuff that
  71. 2:56we all love uh and the whole thing
  72. 2:58started with just one wall generat that
  73. 3:00was placing bricks procedurally then the
  74. 3:02whole thing turned into multiple walls
  75. 3:03archers terrain and so on and after a
  76. 3:06few months it kind of got this moniker a
  77. 3:08tiny building game and a lot of people
  78. 3:11got uh enroled by that uh uh and the
  79. 3:14things they fall fell in love with was
  80. 3:16the kind of very gradual or granular
  81. 3:18procedure generation and and the organic
  82. 3:20nature of it so that time some of the
  83. 3:22elements of that were already set in
  84. 3:24stone that uh we had this like tons of
  85. 3:26individual bricks and so on and every
  86. 3:28tble and plank were unique
  87. 3:30and uh that was fine initially because
  88. 3:33this is the the first announce trailer
  89. 3:34we had for the game uh as you can see it
  90. 3:36was not much complexity just a few
  91. 3:37buildings uh and maybe a thousand bricks
  92. 3:40and but it had to scale it will scale a
  93. 3:42lot because uh the more we streamline ux
  94. 3:45and the more we optimize things U people
  95. 3:47just kept building crazier and crazier
  96. 3:49things uh some people just don't accept
  97. 3:51the tiny part of tiny Glade uh and some
  98. 3:54of them are just fine working for like
  99. 3:5510 FPS all the time so builds get crazy
  100. 3:58uh this is just a few samples of what
  101. 4:00the community has created and this is
  102. 4:02still on the same side uh just like lots
  103. 4:04of beautiful
  104. 4:06things different kinds of Aesthetics
  105. 4:08some people just decide to enti build
  106. 4:10entire towns or even fragments and
  107. 4:11cities in the
  108. 4:13game just uh yeah comparing to the
  109. 4:16initial shots this is this is completely
  110. 4:22Bonkers uh oh yeah people some people
  111. 4:24just recreate parts of Lord Rings
  112. 4:25because why not and running into the the
  113. 4:28limits of all the instances we have in
  114. 4:29the
  115. 4:30game all of those are individual Bricks
  116. 4:32by the way just me to render separately
  117. 4:34and so people just like like okay cool
  118. 4:36it's the dueling app going to make
  119. 4:38something
  120. 4:39funky and like just making things we
  121. 4:41never anticipated and and and by the way
  122. 4:43we don't have don't we don't have
  123. 4:44indoors in the games all Outdoors people
  124. 4:46just have figured out how to still make
  125. 4:48indoors work somehow so it's ugc game
  126. 4:51for you so how to deal with it uh well
  127. 4:54we have tons of geometry to somehow make
  128. 4:56it appear uh so we employ driven Runing
  129. 5:00for that uh so the reason is that just
  130. 5:03like at the start our generators don't
  131. 5:05synthesize meeses we don't deform
  132. 5:06geometry any fcy skinning which generate
  133. 5:08tons and tons of individual Briggs and
  134. 5:10planks like hundreds of thousands of
  135. 5:11them uh and similar for uh tiles and
  136. 5:15Pebbles and P up plants and window
  137. 5:17shutters and so on everything just comes
  138. 5:18out those little bits uh and well gpus
  139. 5:20are way better dealing with with the
  140. 5:22crazy amounts of stuff therefore we do
  141. 5:24it on the GPU but before you create a
  142. 5:26cool runer system you have to name it
  143. 5:28right so everyone does that days uh but
  144. 5:31n night was already taken so ours is
  145. 5:32called
  146. 5:34N9 and what n does is performs GPU Dr
  147. 5:38calling sorting LOD and Dr generation uh
  148. 5:41we don't use clusters of any of the new
  149. 5:42fancy stuff because our meshes are way
  150. 5:44too simple for that like our plank or
  151. 5:46brick would just like one cluster
  152. 5:47probably and we don't use M shaders
  153. 5:49because our Min spec doesn't support
  154. 5:50them um but we do have one pretty simple
  155. 5:52scheme that we just uh like put all the
  156. 5:55geometry data for that for single
  157. 5:57material into the same vertx buffer and
  158. 5:58we can render any mesh from that using
  159. 6:00just Sub sub slicing from that index
  160. 6:02buffer uh and for example changing to
  161. 6:05different discrete LOD just becomes a
  162. 6:07plus one to the um index in the mesh
  163. 6:09array or in the
  164. 6:12atlas and in terms of calling uh It Is
  165. 6:15by now pretty standard stuff that was
  166. 6:16already covered by at the conference
  167. 6:17today few days ago uh which is the two
  168. 6:21plus two pass occlusion calling uh
  169. 6:24introduced I think by Seb Alon and kind
  170. 6:26of popularized by nanite uh we render a
  171. 6:29first pass where we draw everything that
  172. 6:30was visible in in the previous frame uh
  173. 6:32that we can know du to stable mesh IDs
  174. 6:34between frames uh then we build a depth
  175. 6:36pyramid and then we detect what we had
  176. 6:38missed render those objects and then
  177. 6:41rins and
  178. 6:42repeat so that is pretty standard uh and
  179. 6:45then in the simplest path once we have
  180. 6:46determined what is visible uh the uh we
  181. 6:50can just potentially just add every
  182. 6:51object to a separate draw list U and uh
  183. 6:55the simple path essentially has one
  184. 6:57drist per uh material and mesh type uh
  185. 7:01we just add increment integer we uh draw
  186. 7:04to write to an IND direction map uh and
  187. 7:07then we can draw everything using sing
  188. 7:08Single draw index indirect and because
  189. 7:10uh uh all the meshes for a single
  190. 7:13material are packed into the same mesh
  191. 7:16uh or like verx buffer we can draw
  192. 7:18essentially all of the uh meshes of a
  193. 7:20single material using a single draw
  194. 7:21index indirect so the draw count number
  195. 7:24of draws is the number of meshes we have
  196. 7:26so we can use the correct uh sub spice
  197. 7:28of the index buffer and then the number
  198. 7:30of instances in each of the Gen draws is
  199. 7:32just the number of visible instances so
  200. 7:34pretty simple stuff here and that works
  201. 7:36well for bricks because for them we need
  202. 7:38something with very low overhead since
  203. 7:40we have up to a million of them and
  204. 7:41we're going to be extending to up to two
  205. 7:43millions soon uh but it's still flexible
  206. 7:46enough that you can actually do some
  207. 7:47pretty cool stuff like for the last LOD
  208. 7:49for bricks uh we actually have a model
  209. 7:51which uses just six triangles uh which
  210. 7:52is like half a cube that we flip the
  211. 7:55vertices to actually make them always
  212. 7:56front front facing and that's uh the Pix
  213. 7:59sh essentially becomes just a dispatch
  214. 8:01mechanism for Ray marching or in this
  215. 8:03case analytical intersection with a
  216. 8:05campert box so we can synthesize little
  217. 8:07bevels around the edges and make sure
  218. 8:09that even far away we can catch lights
  219. 8:10on those kind of fin lines and get a
  220. 8:13similar look to what we have with the
  221. 8:14full mashing
  222. 8:17top but not everything is so simple uh
  223. 8:19for example our trees they use a scheme
  224. 8:22of expanding Billboards from geometry uh
  225. 8:24and that scheme introduces a bunch of
  226. 8:27overdraw and on top of that we also have
  227. 8:29dep writing in order to break up the the
  228. 8:32detail actually make it appear like we
  229. 8:34have individual leaves uh which means
  230. 8:36that the whole pass becomes more overdo
  231. 8:37heavy and we need to do something more
  232. 8:39and uh if you have something like this
  233. 8:41you really want to sort things front to
  234. 8:42back but even with a simple scheme uh I
  235. 8:45mean with with our system it's pretty
  236. 8:46simple to do that so uh we use
  237. 8:48approximate sorting but just binning
  238. 8:50things into a number of buckets we use
  239. 8:52at24 and essentially do a single pass
  240. 8:55radic um over the the visible meshes or
  241. 8:58a counter Counting SW if you will uh so
  242. 9:00we uh insert uh the meshes or the
  243. 9:03visible instances in the correct place
  244. 9:05place based on the the uh on the depth
  245. 9:08slice uh then we end up with a single
  246. 9:10mesh single list which is approximately
  247. 9:12sorted uh and once we have that list we
  248. 9:14can generate DRS from from it but
  249. 9:16because it is uh sorted roughly from
  250. 9:19front to back it means that something
  251. 9:21have a mhes meshes which are different
  252. 9:22so you have to switch the which Mass
  253. 9:24you're drawing in between uh and to uh
  254. 9:26to strike a balance between sort and
  255. 9:30number of draws we what we generate from
  256. 9:31it uh we process the uh the instances in
  257. 9:34in groups and in each group we generate
  258. 9:37a many histogram of which M meshes are
  259. 9:39actually visible which means that if you
  260. 9:41happen to have uh the same mesh and just
  261. 9:44say 32 in of of them uh you you should
  262. 9:46just one draw from that but if you have
  263. 9:48mixure you you do as many uh draws as
  264. 9:50you have matches within the group uh and
  265. 9:53you can kind of fine tune just how much
  266. 9:54sorting you get and how much how many
  267. 9:56draws you generate uh by just changing
  268. 9:58the group size in that process and then
  269. 10:00uh it also means that uh just like with
  270. 10:02the previous scheme you can we can draw
  271. 10:03essentially everything using a single uh
  272. 10:06in this case draw index indir count
  273. 10:08which means on the CPU side it is still
  274. 10:10very
  275. 10:11cheap and in terms of the the wind this
  276. 10:14gets us uh for the sort approach on the
  277. 10:16for the trees on the chunky GPU is
  278. 10:17roughly 65% of the Rend time compared to
  279. 10:20the unsorted and in general it seems to
  280. 10:22be a bit faster on on AMD at least but
  281. 10:26we're still kind of looking into it and
  282. 10:27figuring out what works best because we
  283. 10:28discovered that that's uh like pre-
  284. 10:30touring Nvidia cards actually have a
  285. 10:32pretty bad tax on the indirect count
  286. 10:34because you have to provide the maximum
  287. 10:36number you can provide and it seems to
  288. 10:38just Spam the command processor of the
  289. 10:40GPU uh and you end up paying a pretty
  290. 10:41hefty tax and you look at the GPU
  291. 10:43profiler and just like sitting there and
  292. 10:45sleeping so still figuring out with the
  293. 10:47best approach
  294. 10:48here and in terms of deferring stuff uh
  295. 10:51this is not as neat as something like a
  296. 10:53V buffer approach like n nuse uh and
  297. 10:56probably wouldn't scale thousands of
  298. 10:57materials but we don't have thousands of
  299. 10:58materials we have a just a handful of
  300. 11:01hand handcrafted materials uh and it
  301. 11:03ends up being good enough for us
  302. 11:05partially because uh we can kind of
  303. 11:07roughly know at the material stage in
  304. 11:09which order things should be drown like
  305. 11:10we know that grass will usually not
  306. 11:12include buildings and trees will then to
  307. 11:14include buildings and so on so we can
  308. 11:15kind of just do a classic pre- sorting
  309. 11:17Bas of materials and it just happens
  310. 11:19that our G buffer is very thin so we can
  311. 11:22suffer some
  312. 11:25overdraw and speaking of Jers and light
  313. 11:27we they usually plug into lighting so
  314. 11:29it's like about lighting or starting
  315. 11:31with the lack thereof which is Shadows
  316. 11:33uh the most important light source we
  317. 11:34have is the sun uh and we knew from the
  318. 11:36start that it will be soft so we look at
  319. 11:39the most uh U attractive entry into it
  320. 11:42at the start which is nor Shadow mapping
  321. 11:44and after some initial tests uh we have
  322. 11:47determined that the game seems to be a
  323. 11:49worst case generator for moment Shadow
  324. 11:51Maps if you use vssm you might have seen
  325. 11:53some like that we just get this kind of
  326. 11:54leaking whenever there's multiple depth
  327. 11:55layering and MSM is supposed to fix it
  328. 11:57but uh we have found that uh
  329. 11:59because of the free form nature of the
  330. 12:01game and the ugc of it people will just
  331. 12:03create scenes that will that create
  332. 12:05those kind of artifacts so we can really
  333. 12:07go with with MSM as as nice as it would
  334. 12:09would have been uh so we have to go with
  335. 12:11PCF that we all love and I guess know
  336. 12:14and hate I guess uh it's it does work in
  337. 12:17general but requires lots of bias
  338. 12:19tweaking but we can mostly get away with
  339. 12:21the the normal off the bias and just
  340. 12:22lots of hand tuning of the whole thing
  341. 12:25uh and then uh we just throw out pretty
  342. 12:26standard pcss uh content sharpening on
  343. 12:29of
  344. 12:31it however if you implement Shadows uh
  345. 12:34with even syn softness and you do your
  346. 12:36all of your biasing well you still end
  347. 12:37up with something like this and in our
  348. 12:40game we have continuous time of day and
  349. 12:41you can also change the time of day as
  350. 12:43you like and you end up this kind of hor
  351. 12:45aliasing so unless you have enough
  352. 12:47Shadow M up resolution and you rely do
  353. 12:50you will end up with this artifact
  354. 12:52however if you uh if we see something
  355. 12:54like this in the primary visibility we
  356. 12:56typically throw it at anti-aliasing
  357. 12:58right so why don't we do it for Shadows
  358. 13:00uh and ta specifically is really good at
  359. 13:02dealing with kind of temporal aing so uh
  360. 13:06typically in in ta you would take the
  361. 13:08new input you have just rendered uh you
  362. 13:10combine it with with history that you
  363. 13:12Rectify modify or reject in some way and
  364. 13:16you do that by by estimating some some
  365. 13:18kind of Statistics from a local
  366. 13:19neighborhood of the new input uh and
  367. 13:21then clamp to those statistics for
  368. 13:23example but if you do it in screen space
  369. 13:25it will not do anything because the the
  370. 13:26the features that are flickering are uh
  371. 13:29larger than that tiny 3x3 kernel you
  372. 13:30would throw at it so what you do instead
  373. 13:32is you derive those statistics from the
  374. 13:34the actual space in which the the
  375. 13:36content changes and in this case it is
  376. 13:38the shadow kernel in the shadow m space
  377. 13:41uh that is the exact resolution or the
  378. 13:43frequency of which you need to to offset
  379. 13:45and find your neighboring
  380. 13:46samples and so nice thing about it is
  381. 13:49that you're already likely fetching all
  382. 13:50of this data for your PCF kernel so you
  383. 13:52actually don't do anything special uh
  384. 13:54typically you when calculating self
  385. 13:56Shadows you are essentially doing a mean
  386. 13:58estimator which is the first statistical
  387. 14:00moment if you also track the second
  388. 14:01statistical moment you can calculate
  389. 14:02variance from that and then borrowing
  390. 14:04from
  391. 14:05Marv's variant based TAA you can
  392. 14:07calculate a bounding box for clipping
  393. 14:10the history and thus you can essentially
  394. 14:12apply TAA to history as well to the
  395. 14:16Shadows uh you end up with a slight
  396. 14:19artifact in that's in areas of high
  397. 14:22variance you can have ghosting but
  398. 14:23that's also pretty easily fixable
  399. 14:25because the largest areas of variant
  400. 14:26will be in VAR s shadows and those are
  401. 14:28less on to aliasing so you can just
  402. 14:30shring that box and you can control the
  403. 14:32size of the bounding box based on on the
  404. 14:34shadow softness and if you combine all
  405. 14:36of that together you can end up with
  406. 14:38shadows something like this from the
  407. 14:39same resolution of uh of Shadow M
  408. 14:43data so you can still see a little bit
  409. 14:45of flickering but it's uh generally much
  410. 14:47more stable even some like subance some
  411. 14:49of the motion of like the flag waving
  412. 14:51and own
  413. 14:54own but this is still not sufficient
  414. 14:56resolution and unless you have the
  415. 14:57budget you cannot really uh crank up
  416. 15:00your uh shut up resolution to the point
  417. 15:02where you get all the fine
  418. 15:04details and that is something that's uh
  419. 15:06uh has been fixed in post in recent
  420. 15:08years uh days back I think all the way
  421. 15:10to crisis 2 uh but the idea General is
  422. 15:12that you rearch towards the um this the
  423. 15:15light source and then uh in the screen
  424. 15:18space you can detect whether you
  425. 15:18actually intersect something and then uh
  426. 15:20claim out the be Shadow as
  427. 15:23well and uh there is uh yeah in our case
  428. 15:27we just do a simple Ray March uh using
  429. 15:29um just like a Shader we use essentially
  430. 15:31for all all of array marching but there
  431. 15:33also a solution uh that has recently
  432. 15:36been quite popular from Ben Studio we
  433. 15:38tried it as well I have a comparison but
  434. 15:40we also found that our approach was
  435. 15:42slightly better fit and just for
  436. 15:45comparison this is uh what we get with
  437. 15:47no contact shadows in a pretty extreme
  438. 15:49uh case where the sound is just like
  439. 15:50grazing building that typically you just
  440. 15:52get look just blurryness and nothing
  441. 15:54cool and if you just add three tabs of
  442. 15:57Ray marching uh suddenly all the pops
  443. 15:59and looks like oh you've actually just
  444. 16:00added geometry so that was kind of fun
  445. 16:02to see like we actually had to Frink the
  446. 16:04bricks a little bit because they're
  447. 16:05sticking out too much because we're over
  448. 16:06compensating previously and then
  449. 16:09comparing that to the B Studio Version
  450. 16:11uh you actually get slightly better
  451. 16:12detail resolution with their approach
  452. 16:15but we found that we can get the same if
  453. 16:16we just increase the number of of tabs
  454. 16:18in R marcher just a little bit uh and
  455. 16:21having the control over how many uh tabs
  456. 16:23we have and having also ability to to
  457. 16:25potentially move them shoot them at an
  458. 16:27angle to get soft Shadows was a win for
  459. 16:30us also nice thing is that compared to
  460. 16:33the Ben cud version ours is fully stable
  461. 16:37as well if you use them in and out
  462. 16:38because it doesn't have that dispatch
  463. 16:41restrictions but other pressure works
  464. 16:43for you then that's
  465. 16:44cool uh but if you try impant R marching
  466. 16:47you will quickly run into this kind of
  467. 16:48issue which is uh just uncontrollable
  468. 16:51acne
  469. 16:52uh that just doesn't look good today if
  470. 16:56you don't apply any bias you're just
  471. 16:58going to have a bad time if you apply
  472. 17:00some bias you'll probably still have it
  473. 17:01if you app a lot of bias you remove all
  474. 17:03of the detail and still end up with uh
  475. 17:06kind of we started with and then if you
  476. 17:08look at the same thing from different
  477. 17:09angle it turns out you still haven't
  478. 17:11remove bias and you end up fighting the
  479. 17:13same War as as you had with PCF self
  480. 17:16Shadows but um what if I told you
  481. 17:18there's a thing you can do to uh remove
  482. 17:20pretty much all the acne and uh and keep
  483. 17:23all of the detail so this is comparing
  484. 17:25to the nobias version and even behaves
  485. 17:28itself smoothly in temporal
  486. 17:35cases so it's going to be weird uh
  487. 17:37because um so you know your parents told
  488. 17:40you not to sample depth maps using
  489. 17:42linear Samplers well listen to them but
  490. 17:45also don't listen to them um let me
  491. 17:47explain so if you Point sample Shad them
  492. 17:50UPS you end up with this kind of like
  493. 17:51Duplo legol of the micro scale where the
  494. 17:54stair steps between samples create this
  495. 17:57kind of sharp edges and you you end up
  496. 17:59hitting them accidentally and this is
  497. 18:00what the acne comes from and biasing
  498. 18:02essentially just offsets the ray from
  499. 18:04the geometry which also removes
  500. 18:05interesting detail but if you use a
  501. 18:07linear sampler you can reconstruct the
  502. 18:08underlying
  503. 18:10geometry but so why don't we just use
  504. 18:12linear Samplers for our depth uh well
  505. 18:14because not everything is continuous and
  506. 18:16the the linear sampler would pretend
  507. 18:18that everything is going to shrink
  508. 18:19wrapped and everything is a continuous
  509. 18:20surface and you're going to have false
  510. 18:21kits which create own artifacts but uh
  511. 18:24what if we um use
  512. 18:27both I know it's weird but uh if you
  513. 18:30patch both the linear and and and Point
  514. 18:33sample data and then for the for the
  515. 18:35intersection test use the Fus of the dev
  516. 18:37values and for the thickness check you
  517. 18:39use a closest to the two values it just
  518. 18:41happens to
  519. 18:42work can really I can only hand waving
  520. 18:45explain it because I just I was messing
  521. 18:47with things and managed to stumble upon
  522. 18:48it and it just happen to to work too
  523. 18:50well I was kind of misbelieving so maybe
  524. 18:52there's a reason Works maybe it doesn't
  525. 18:54uh I don't have time to dig into it but
  526. 18:56the kind of handwave explanation is that
  527. 18:58the uh false HS the quantization or the
  528. 19:00third stepping are gone because you're
  529. 19:01essentially cutting up the corners by
  530. 19:02thinking the fusion of those two and
  531. 19:05then the discontin are gone as well
  532. 19:07because you're reintroducing the
  533. 19:08vertical lines as well in in the
  534. 19:10function you're intersecting and those
  535. 19:11vertical lines allow the ray marcher to
  536. 19:14detect misses uh which is further helped
  537. 19:16by using the uh the larger of the
  538. 19:18estimates for the U for the fix fix
  539. 19:21calculations but honestly I don't really
  540. 19:23get it so if you want to grab it we are
  541. 19:25sharing the source code on on gist so
  542. 19:26you can try it yourself we use it for a
  543. 19:28very Mar in the game for all sorts of
  544. 19:30effects uh one of the things we use it
  545. 19:32for is localizes as well uh we haven't
  546. 19:35implemented anything fence here just
  547. 19:36essentially for the same R marcher at
  548. 19:37them uh and so because it is quite
  549. 19:40flexible you can uh just do a classic
  550. 19:43thing of for Loop goes B and uh
  551. 19:46intersect all the local lights rain
  552. 19:48March towards them and we have uh
  553. 19:50Shadows from local lights uh and it's
  554. 19:52something so we're still investigating
  555. 19:54because of the ugc nature of the game we
  556. 19:55end up having thousands of lights or
  557. 19:57hundreds of thousands of Lights
  558. 19:58potentially so I'll need to look into
  559. 19:59restore di for for now it's kind of
  560. 20:01simplistic but uh but gives you idea
  561. 20:03that you can get local stuff as well uh
  562. 20:06the other most important light source
  563. 20:08that we have is the sky and we didn't go
  564. 20:10for any fancy atmospheric scattering
  565. 20:12model because we wanted to have all the
  566. 20:13control uh our game is not meant to be
  567. 20:15photo realistic so we just threw a bunch
  568. 20:17of lurs together uh handcrafted some
  569. 20:19timelines and for each of the uh levels
  570. 20:21that we have uh we made Skies that just
  571. 20:24look nice from artistic point of view
  572. 20:26and then our SP our clouds are just a
  573. 20:28bunch of Sprites scattered on a cylinder
  574. 20:30uh then we have fre Bas and lighting
  575. 20:31using a bunch of spheres together and
  576. 20:33then painted over a little bit uh does
  577. 20:35on in Houdini and then we blend on with
  578. 20:37the different textures depending on the
  579. 20:39some of the angles of the light
  580. 20:40depending how how it hits the the Sprite
  581. 20:42so I have a few versions for came from
  582. 20:44few different angles it's like a
  583. 20:45standard trick used in lighting of of
  584. 20:47particles in games uh but the cool thing
  585. 20:50about the sky is that it becomes a light
  586. 20:52source for our Global elimination so
  587. 20:54let's talk about that H sorry let's talk
  588. 20:56about global elimination
  589. 20:59uh when we started the tiny Glade was uh
  590. 21:01going to be quite tiny and uh flat uh so
  591. 21:04we didn't have any of the fany shaped
  592. 21:06layering we didn't really have buildings
  593. 21:08we just had some walls and the first
  594. 21:10implementation of of a GI was using
  595. 21:12technique from like 20 year one years
  596. 21:14ago now from Moto GP uh where you
  597. 21:17essentially render a top down map of
  598. 21:18lighting and then you uh sample that for
  599. 21:20every pixel and you have approximation
  600. 21:21to lighting uh we had a slighty fencer
  601. 21:23twist in that which was uh shooting Rays
  602. 21:26from a cone and kind of approximating
  603. 21:28where it would intersect that that the
  604. 21:30hype map and it was giving us something
  605. 21:32it was not completely terrible was a
  606. 21:34little bit of fill light I guess but um
  607. 21:38uh when we actually had a bit more
  608. 21:39layering of shapes uh it became clear I
  609. 21:42wasn't going to cut it it was kind of
  610. 21:43just making those cold scenes that
  611. 21:45didn't really make sense and it will be
  612. 21:46a while until we figure out exactly what
  613. 21:48was missing from it and so to do it well
  614. 21:51in general like in global Elation
  615. 21:53especially uh you have to start with
  616. 21:55reference mode uh because even if you
  617. 21:58cannot eventually match the reference
  618. 22:00mode it's very important to have it on
  619. 22:02hand and know whether when you're
  620. 22:03tweaking something whether you're
  621. 22:04actually making it better or making it
  622. 22:05worse like should we have more AO should
  623. 22:07we have less AO should we tweak this
  624. 22:09filter that way or this other way uh and
  625. 22:11sometimes very very hard to tell whether
  626. 22:13it's all fine or whether you're
  627. 22:15completely off with it just like you saw
  628. 22:16with the picture earlier so ideally you
  629. 22:19would just uh add a PA Tracer straight
  630. 22:21to the game uh and ideally then verified
  631. 22:24against something that well known and
  632. 22:25good like mitsuba and then Carry On from
  633. 22:27there
  634. 22:29uh and sometimes screen space is enough
  635. 22:31potentially on the game but sometimes it
  636. 22:33is not uh in our case it was not going
  637. 22:35to be sufficient because of the layering
  638. 22:37of shapes and some people doing indoors
  639. 22:39uh so we considered a few different
  640. 22:40options um sdfs or voxels might work but
  641. 22:43uh at the time we were actually already
  642. 22:45generating proxy geometry for collisions
  643. 22:48so we figured well why do just R trce
  644. 22:49those uh so we built uh some bves and we
  645. 22:52sh race uh against them uh there was a
  646. 22:55cool project by Yan F Burgen uh called
  647. 22:58cuda path Tracer which implements a wide
  648. 23:00bvh Tracer uh so I borrowed code from
  649. 23:04that one and to build the bvh I use
  650. 23:06Embry which was very simple uh we
  651. 23:08eventually switched to a rust crate that
  652. 23:11I uh C collaborate with a little bit
  653. 23:13with Griffin onto OB VHS great well all
  654. 23:16the building of the Fus Griffins I just
  655. 23:19helped a little bit but essentially we
  656. 23:20now have a rust native solution building
  657. 23:22building the BBH was which is pretty
  658. 23:24cool oh yeah and and and and and we of
  659. 23:27course we went for uh software R tracing
  660. 23:30because uh our Hardware is potato so we
  661. 23:32cannot support Hardware tracing and we
  662. 23:33want to have the same look on all
  663. 23:37platforms uh but uh this is the proy we
  664. 23:39actually have they don't even have roofs
  665. 23:41but it's kind of surprising that uh even
  666. 23:43with this you can get a pretty good-
  667. 23:45looking uh GI if you use it well enough
  668. 23:48if you combine that information with
  669. 23:49screen
  670. 23:50space but so now we have some tracing
  671. 23:53you can obviously just ship a b Tracer
  672. 23:54using that because it's going to be way
  673. 23:55too slow uh so we can try some
  674. 23:57approaches initially we tried DGI
  675. 24:00because that was kind of popular at the
  676. 24:02time and I was curious to try it uh
  677. 24:04where you have a regular grid of probes
  678. 24:06scattered around and then R Trace from
  679. 24:08them and try to apply that as kind of
  680. 24:10like a mini mini light source of the
  681. 24:11scene uh initially sounded like a pretty
  682. 24:13good idea it meant that so we could
  683. 24:15lazily update all those probes where
  684. 24:17geometry changed and they were stable in
  685. 24:19word space so you wouldn't have this
  686. 24:21typical repr projective trailing behind
  687. 24:23moving objects but it turned out that we
  688. 24:25just never got enough prob density and
  689. 24:27density out of it because GGI has a lot
  690. 24:29of uh uh angular distribution uh you
  691. 24:32cannot really have much spatial density
  692. 24:34between those probes and we also ran
  693. 24:36into essentially aliasing issues where
  694. 24:38if you had a small shape you just
  695. 24:40sometimes didn't end up with a probe
  696. 24:41inside it sometimes you did and then uh
  697. 24:43visibility between them was also
  698. 24:44probiotic where you have to really
  699. 24:46constrain that like I don't I don't want
  700. 24:47the light from the inside to to leak the
  701. 24:49outside and it turns out they were still
  702. 24:51ghosting anyway because uh if you had a
  703. 24:53a building and then you resize it
  704. 24:55shrinking for example turns out the part
  705. 24:57which was inside is now outside and it's
  706. 24:59darkening your outside for some reason
  707. 25:01because it's just lagging with the
  708. 25:02update and because of our time of day
  709. 25:04everything was updating anyway so the
  710. 25:05whole lazy updating went kind of out the
  711. 25:08window anyway so we look into another
  712. 25:11thing which was popular at the time
  713. 25:12which was moving the probes to screen
  714. 25:13space kind of like Lumen or GI 1.0 uh
  715. 25:17and the cool thing is that uh you end up
  716. 25:19with probes which are well always sort
  717. 25:20of well distributed in in in screen
  718. 25:22space and they allow really cheap
  719. 25:24spatial filters uh because of the low
  720. 25:26resolution appr in Spring space
  721. 25:28uh and you end up with very little noise
  722. 25:30in the output uh you can also use them
  723. 25:32for rough specular uh on the other hand
  724. 25:35they were actually very finicky too this
  725. 25:36approach was veryy to actually get to
  726. 25:38look good so the initial results were
  727. 25:40quite promising but to get it to
  728. 25:42shippable state would have been a bit
  729. 25:43work so this was the initial protype we
  730. 25:46did actually audio didn't expect that or
  731. 25:50something else never
  732. 25:51mind oh
  733. 25:53yeah so you can see it's kind of
  734. 25:56working and it's uh suff responsive
  735. 25:59even but if I spin around you can see
  736. 26:02that it's kind of flattish everywhere
  737. 26:04and that's uh again connected to the low
  738. 26:06spatial resolution just like we have the
  739. 26:08the GI uh we couldn't have quite as much
  740. 26:11resolution as as Lumen or GI 1 1.0 has
  741. 26:14uh so we had to rely on bit more
  742. 26:16aggressive filtering which meant that we
  743. 26:18would somehow need to synthesize
  744. 26:19addition detail on top of
  745. 26:21it and we still had a problem of probs
  746. 26:24getting stuck in strange places so if
  747. 26:25you look at the tower on the left side
  748. 26:26there's like this kind of strange dark
  749. 26:28fles and that happens when you actually
  750. 26:29spawn a probe in like a strange crease
  751. 26:31in between objects so you have to do
  752. 26:33some kind of adaptive placement or
  753. 26:35trying to figure out all this probe is
  754. 26:36in bad place Let's uh try to to get get
  755. 26:38it out of there uh there's also the
  756. 26:40issue of projection error into his H and
  757. 26:42the the estimate being uh blurry and
  758. 26:45potentially more blurry than you you
  759. 26:46would like to be and it might look like
  760. 26:48they're both fine uh but if you actually
  761. 26:50flip between them uh this is a reference
  762. 26:52and then this is the prob base solution
  763. 26:55it kind of looks odd like old lighting
  764. 26:57slightly different
  765. 26:58it should be and it kind of gets this
  766. 27:00strange metallic Sheen so I think if you
  767. 27:02spend enough time on this kind of
  768. 27:03solution it's going to be great but we
  769. 27:05didn't have time to uh to polish too
  770. 27:07much out of it and I had experience with
  771. 27:09different BR before called rester uh so
  772. 27:11I threw away the probes and tried rester
  773. 27:14instead in this case you instead of
  774. 27:16feeding probes you feed individual
  775. 27:17reservoirs in the screen and you get all
  776. 27:19the spatial resolution that you might
  777. 27:20potentially want and then it's just a
  778. 27:21matter of filtering it well and the REO
  779. 27:24algorithm gives you really good like
  780. 27:27very introduction and filtering via a
  781. 27:29complex chain of temporal and spatial
  782. 27:30filters and can be very reactive as well
  783. 27:32as you can see in the in the video here
  784. 27:35however it turned out to be complete
  785. 27:35overkill for us because it turns out
  786. 27:38that our mostly outdoor scenes are
  787. 27:40fairly low in variance and we actually
  788. 27:41when implementing that uh we could
  789. 27:43actually get away with just using the
  790. 27:44Temple part of rester uh and we didn't
  791. 27:47really need this fancy sample validation
  792. 27:48either because the lights in our game
  793. 27:50don't really flicker so they don't to
  794. 27:52reactive uh and turns out if you use rer
  795. 27:55without the the s for the spatial part
  796. 27:57is actually less sample efficient than
  797. 27:59using Brute Force because you end up
  798. 28:01generating some some samples then if
  799. 28:02they don't win the uh the reservoir
  800. 28:04battle they end up not contributing at
  801. 28:06all and therefore we went to just full
  802. 28:09potato GI mode where we just R trace a
  803. 28:12bunch of RS in the hemisphere and throw
  804. 28:14it at the spatial spatial temporal
  805. 28:15filter to clean up and it's a very round
  806. 28:17out by the way to arrive into something
  807. 28:19that's actually quite simple uh but it
  808. 28:20just wasn't very obvious from the start
  809. 28:22that the simple thing would work uh and
  810. 28:24so it it is there is some devil in the
  811. 28:27details in how the spatial temp actually
  812. 28:29has to work in order to extract all the
  813. 28:31all the detail and stability out of
  814. 28:33various par traces so in terms of what
  815. 28:35you actually do not just the journey to
  816. 28:38it uh We R Trace at uh one quarter the
  817. 28:40resolution so we have one Ray per 16
  818. 28:42pixels in the screen uh we start by Ray
  819. 28:44marching and only when that Ray March
  820. 28:46fails when it goes behind geometry or
  821. 28:48off screen we switch to Ray tracing and
  822. 28:50even at the end of that if it hits
  823. 28:52something on screen uh we use the
  824. 28:54radiance on the screen so we can kind of
  825. 28:55hide the the fact that we have very
  826. 28:57potato proxy
  827. 28:59geometry uh then once we have calculated
  828. 29:02that quas uh R data we project it to
  829. 29:06spal harmonics uh the the S2 s four
  830. 29:09component per Channel version of it uh
  831. 29:12and then uh we do that in a spatial
  832. 29:14filter which uses eight of the quot
  833. 29:16resolution Trace um outputs uh in a
  834. 29:19which already prefilter simple data and
  835. 29:20kind of reconstructed at the higher
  836. 29:22resolution ready then we do in spal
  837. 29:25harmonic space a little bit like Metro
  838. 29:27does uh and then uh we evaluated spical
  839. 29:30harmonics it's in screen spice by once
  840. 29:32again using a small spatial filter in a
  841. 29:34cross bilateral uh to sample the uh s s
  842. 29:37data and for that we use the
  843. 29:39hallucinated Zone harmonics uh to to
  844. 29:42actually calculate the the final
  845. 29:43Radiance given spe
  846. 29:47normals and the dooing uh is actually
  847. 29:51quite simple it's based on the fast
  848. 29:53denoising with st stabilizing recurrent
  849. 29:55blurs from demitry Jan done I'm not sure
  850. 29:58how to pronounce but uh uh essentially
  851. 30:01it's it's a filter which kind of feeds
  852. 30:04into itself and fine tunes itself to to
  853. 30:07use as little of a spatial filter as
  854. 30:09possible which is kind
  855. 30:11of uh similar to I for name uh the the
  856. 30:16whole pipeline is made of three passes
  857. 30:17in the first pass we uh generate new uh
  858. 30:20new R data new samples uh new radians
  859. 30:24sorry uh then in the second pass we uh
  860. 30:27combined New generat Radiance with uh
  861. 30:29previous generat Radiance in a
  862. 30:31reprojection pass uh if the reprojection
  863. 30:33fails we do a gap fill uh if the Gap
  864. 30:36full fails we actually embrace race
  865. 30:38conditions and sample from the same
  866. 30:39texture that we otherwise be outputting
  867. 30:41uh and doesn't really matter in this
  868. 30:42case and so after that we just do a
  869. 30:45small spatial filter on top of it uh
  870. 30:47which with actually very small kernel
  871. 30:49because then when you recurse the whole
  872. 30:51thing into itself uh that kernel grows
  873. 30:53in a kind of conical shape and still
  874. 30:54gives you very very good ding power and
  875. 30:56the uh the St style stab stabilizing
  876. 30:59part of the thing means that you
  877. 31:01actually count how many samples you have
  878. 31:02accumulated and then if you the sample
  879. 31:04count is low use a large spatial filter
  880. 31:06and if it increases you you decreas and
  881. 31:08therefore tightening that the GI uh and
  882. 31:11as an additional twist we also use SSO
  883. 31:13as a cross bilateral filter uh crossb
  884. 31:17filter weight in the D user and to
  885. 31:20illustrate that uh we start witho gener
  886. 31:22by Intel's a some x gtao uh
  887. 31:25kernel and this is what you get if you
  888. 31:27just Supply vanilla noising and if you
  889. 31:30use SSO as a as a kind of filter guide
  890. 31:33you can sharpen the the noising in in
  891. 31:35the corners where you kind of know that
  892. 31:37you don't want to to blend uh samples
  893. 31:39because they they would be rapidly
  894. 31:41changing and then we apply additional
  895. 31:44the SS on top as well and then we
  896. 31:46calculate the final
  897. 31:48image and in terms of why why do we
  898. 31:51combine this additionally with SSO uh
  899. 31:53well we found with with like comparing
  900. 31:55to reference kind of how I mentioned
  901. 31:56before uh you want to have a a reference
  902. 31:58mode that you can see whether you're
  903. 32:00what you're tweaking is is moving in the
  904. 32:01right direction and it turns out that's
  905. 32:03we are just missing a little bit of that
  906. 32:04additional detail but it's like SSO
  907. 32:06times like 0.2 or something so it's very
  908. 32:08tiny uh and in this case our reference
  909. 32:10mode is actually not really ground trof
  910. 32:12because it also just uses Ray marging in
  911. 32:14screen space we don't have like full RTX
  912. 32:16mode in the game uh but it is still uh
  913. 32:19better than nothing and quite sufficient
  914. 32:20for what we need because what we're
  915. 32:21after is creating the same kind of
  916. 32:23general impression in the lighting and
  917. 32:24not matching it bit by bit and I think a
  918. 32:26lot of the uh error is actually due to
  919. 32:28the S projection rather than other
  920. 32:30sources it's good enough for us at least
  921. 32:33uh but now that we have R tracing it'll
  922. 32:35be a shame to only use it for GI so
  923. 32:37let's do it for other stuff um but um
  924. 32:39sparingly uh one of the things we do is
  925. 32:42everyone's favorites which is uh
  926. 32:43Reflections Reflections on water uh and
  927. 32:46as a water uh the basic setup is that we
  928. 32:49uh run it after the F lighting so the F
  929. 32:51rendering the for lighting and then we
  930. 32:52apply water in a sort of forward lit way
  931. 32:55uh currently our water is fully Flatland
  932. 32:58but we have plans to Extended so we
  933. 32:59didn't go with something like plan
  934. 33:00Reflections because we don't have the
  935. 33:02flexibility therefore R marching and R
  936. 33:04tracing uh we have some waves which are
  937. 33:06normal only that are based on some uh
  938. 33:08pre-cal pre-calculated textures and
  939. 33:11ripples for our floaty creatures uh and
  940. 33:14then for water we have the major
  941. 33:15components which is reflection
  942. 33:17refraction and and Co stics and starting
  943. 33:20reflection uh we start with SSR U and as
  944. 33:24this is a r resolution image so we can
  945. 33:25see the artifacts uh but as everyone
  946. 33:27also SSR kind of fails quite often and
  947. 33:30gives you something ugly uh so we detect
  948. 33:32the ugly and in those cases we do a rate
  949. 33:35tracing
  950. 33:37instead and to do it fairly efficiently
  951. 33:40uh we start with a fairly cheap uh Ray
  952. 33:43march with just eight steps of linear
  953. 33:45marching com combined with three
  954. 33:47bisection steps and one second operation
  955. 33:50uh uh and then we can in theory just in
  956. 33:53that case if we have a Miss We R Trace
  957. 33:55in we could R Trace in the uh in the
  958. 33:56same Shader but that would throw all of
  959. 33:59the occupancy of the GPU out the window
  960. 34:00because you can end up with a random
  961. 34:02collection race which missed and which
  962. 34:04succeeded uh and we also want to R Trace
  963. 34:06at half resolution as opposed to the ray
  964. 34:08March which is full resolution so we
  965. 34:10write out the the misses separate buffer
  966. 34:12uh we essentially compact them and do a
  967. 34:15separate Dispatch over just those misses
  968. 34:16to to R Trace at half us and similar to
  969. 34:20GI was Sample the screen space if the
  970. 34:22hit from R tracing happens to be on the
  971. 34:24screen there's a little B bit of caveat
  972. 34:26with that is is that due to the random
  973. 34:29nature of Ray marching uh and the uh and
  974. 34:32the waves you end up with this kind of
  975. 34:33like random peppers and salt noise where
  976. 34:36uh the SSR has missed uh and it's kind
  977. 34:39of annoying because you you can kind of
  978. 34:40just guess that will be similar and
  979. 34:42that's we apply our little hack and we
  980. 34:46hallucinate additional hits by just uh
  981. 34:48looking at Neighbors in quads and if any
  982. 34:51at least at least one array in a quote
  983. 34:53has hit something we just assume I'm
  984. 34:55guessing like you're going to hit at the
  985. 34:56same distance so so we kind of
  986. 34:58synthesize the hit point uh using those
  987. 35:00which also gives a nice uh benefit in
  988. 35:02that whenever misses happen they
  989. 35:04actually happen for the entire quad
  990. 35:05which means that we can rate Trace at uh
  991. 35:07Health resolution which is what we
  992. 35:08wanted from the
  993. 35:10start and speaking of the rate tracing
  994. 35:12fallback uh as I shown before the rate
  995. 35:14tracing geometry is kind of potato and
  996. 35:17uh doesn't look very good uh and we
  997. 35:19found that actually if you uh use the
  998. 35:22the full lighting for it in that R
  999. 35:23tracing fallbacks it can look a little
  1000. 35:24bit jarring especially that the uh
  1001. 35:26Lighting on that for subsequent boun
  1002. 35:28bounces uh can look look a bit off
  1003. 35:31because we don't have the same kind of
  1004. 35:32uh uh feedback loop that we have for uh
  1005. 35:35for SSR which uh or screen space Gi
  1006. 35:37which um can kind of feed multiple
  1007. 35:39bounces just from the screen space uh so
  1008. 35:41the r tracing path has to kind of make
  1009. 35:43up something and some looks bit too
  1010. 35:45bright a little bit too dark and we
  1011. 35:46actually found it's better to just fall
  1012. 35:47back to Blackness because uh what you're
  1013. 35:50very often after is just blocking the
  1014. 35:52reflection as opposed to actually
  1015. 35:53generating like proper uh results out of
  1016. 35:55it maybe for a game was uh a theme park
  1017. 35:58it will be a different story but in our
  1018. 35:59case uh stuff can be dark and looks fine
  1019. 36:01and then the waves actually break up the
  1020. 36:03geometry sufficiently that you really
  1021. 36:04don't notice that everything is just
  1022. 36:05looks dup
  1023. 36:08land and then in terms of refraction uh
  1024. 36:10that's another area where we hack and
  1025. 36:12and cheat we actually tried like doing
  1026. 36:14proper real refraction by bending the
  1027. 36:16Rays but we actually just didn't like it
  1028. 36:18because the ray for shortening meant
  1029. 36:20that the pawns and and little streams
  1030. 36:22looked a bit too shallow uh and it also
  1031. 36:25was more expensive and meant that
  1032. 36:28sometimes you want to sample information
  1033. 36:29which was not on the screen because if
  1034. 36:30the ray bends a lot you may end up
  1035. 36:32sampling in places where you don't have
  1036. 36:33geometry so we uh cheat and we just
  1037. 36:36distort the ray slightly by the waves
  1038. 36:39and and ripples and uh just Remar the
  1039. 36:41distorted Ray which also means that we
  1040. 36:43can get away with like a very simple uh
  1041. 36:45rain march with just three St tabs and
  1042. 36:47two B section uh and we sample from a a
  1043. 36:50copy of the dep Target that contains
  1044. 36:52just the underwater stuff that we uh
  1045. 36:54captured during the uh early rendering
  1046. 36:58and we also have some cosics which are
  1047. 36:59complete fakery as well uh by just doing
  1048. 37:02some random thresholds on top of the uh
  1049. 37:04uh wave textures uh and then we project
  1050. 37:06those uh this strange thresholder thing
  1051. 37:08onto the water using the the sun angle
  1052. 37:11and just gives us something that looks
  1053. 37:12good
  1054. 37:14enough uh speaking of water let's talk
  1055. 37:17about solid part and that is our Ice uh
  1056. 37:21ice is a very similar setup to to the
  1057. 37:23liquid water also runs after all the
  1058. 37:26Deferred rendering uh but now it's a bit
  1059. 37:28chunkier a bit more involved because the
  1060. 37:30reflection and refraction need to be
  1061. 37:31rough now uh so the U uh the surface
  1062. 37:34path additionally also need to calculate
  1063. 37:37uh diffuse lighting and diffuse shadows
  1064. 37:40and we have seen before Shadows can
  1065. 37:41create this kind of Blocky uh temporal
  1066. 37:44aling uh so this pass also internally
  1067. 37:46calculates the shadow TAA which means
  1068. 37:48that like one of the outputs has to
  1069. 37:49actually be just the shadow map itself
  1070. 37:52uh and then in addition to that also
  1071. 37:54generates a bunch of data for uh the
  1072. 37:55deferral of uh reflection and for the
  1073. 37:58deferral of filtering of of refraction
  1074. 38:00and we try to defer all the things so we
  1075. 38:02can actually once again reuse all the
  1076. 38:03samples and synthesize detail from from
  1077. 38:06very few uh rays and then we follow the
  1078. 38:08whole thing of spal tempal noising the
  1079. 38:10reflections and refractions starting
  1080. 38:12with reflection uh so we uh rearch again
  1081. 38:16in the theer Pass Health resolution
  1082. 38:18against heal resolution dep depth uh we
  1083. 38:21using spherical cap ggx sampling with a
  1084. 38:23heavy bias of like 70% I think so we
  1085. 38:25kind of cut off the edges of the the G
  1086. 38:28GDX cone uh we use a fairly uh a bit
  1087. 38:32more detailed frame March this time
  1088. 38:33because we found out like we just want a
  1089. 38:35little bit of extra definition by like a
  1090. 38:37little read sticking out of the Ice uh
  1091. 38:39then once again we compact the misses we
  1092. 38:41dispatch a r Trace over just the misses
  1093. 38:43uh but then instead of just directly
  1094. 38:45outputting gradients we do this uh uh
  1095. 38:47dance kind of similar to the stochastic
  1096. 38:49SSR technique I presented previously
  1097. 38:51where we generate the uh we gather all
  1098. 38:53the hit data and then we uh kind of
  1099. 38:55synthesize how the the hit KS look like
  1100. 38:58if all the Rays uh if all the samples CH
  1101. 39:00multiple Rays um and we tried using uh
  1102. 39:03the the fancy ratio estimator but find
  1103. 39:06out in in this specific case a simple
  1104. 39:08cross bilateral over roughness and hit
  1105. 39:10distance was
  1106. 39:11sufficient and uh one thing which really
  1107. 39:13helps a lot is uh using the kernel
  1108. 39:15radius for this filter based on the
  1109. 39:17projection of the of the lob of the brdf
  1110. 39:19which means I can blur at adjust the
  1111. 39:20right scale that's the you would
  1112. 39:22actually get the kind of blurring you
  1113. 39:24get from the stochastic
  1114. 39:25process and a refraction we seem to
  1115. 39:27really hate the proper refraction so uh
  1116. 39:29we hack it here again we just take the
  1117. 39:32BR of lobe for reflection we flip that
  1118. 39:34and essentially do reflection upside
  1119. 39:36down uh which turned out to be good
  1120. 39:38enough for us again and once again it's
  1121. 39:40a very puny rain March which is very
  1122. 39:41cheap uh and then we throw that at the
  1123. 39:44deiser once again here the refraction is
  1124. 39:47at Full Resolution but we still want to
  1125. 39:48Denise spatially and this is also once
  1126. 39:51again using the projection of the BR
  1127. 39:53brdf lobe uh which is why it's helpful
  1128. 39:56to actually just use simple uh uh
  1129. 40:00reflected reflection because then the
  1130. 40:03that Lo is simpler than for
  1131. 40:05refraction and uh we throw that at a
  1132. 40:07temporal filter together with the
  1133. 40:09reflection data uh and that one's pretty
  1134. 40:12simple we actually uh get a bit of
  1135. 40:14ghosting here but doesn't really matter
  1136. 40:15because everything under the ice on top
  1137. 40:16of the eyes is a bit blurry and this one
  1138. 40:18specific case is fine so this also the
  1139. 40:21spatial resolve ends up serving as a
  1140. 40:22temporal filter of everything that's
  1141. 40:24mostly it for ice but we also have this
  1142. 40:26cool feature that's under the eyes
  1143. 40:28that's cracks and it looks more than
  1144. 40:30than actually is it's just a bunch of
  1145. 40:31meshes with uh some fakery in the
  1146. 40:33normals kind of Point them at the light
  1147. 40:35source make them all catch light always
  1148. 40:37and then if you throw that at our uh
  1149. 40:39blurry refraction they they look pretty
  1150. 40:41cool together especially with the uh
  1151. 40:43beber absorption that happens with
  1152. 40:46it and speaking of blurring things uh
  1153. 40:49depth of field so that's something we
  1154. 40:50have invested quite a lot of effort into
  1155. 40:53uh but we've started quite simple
  1156. 40:54actually we started with not really
  1157. 40:56knowing what we wanted with do and we
  1158. 40:58just plugged in this uh cool single pass
  1159. 41:00Shader from danis gustavson uh which is
  1160. 41:03awesome for its Simplicity uh but also
  1161. 41:05has this kind of PE artifact that
  1162. 41:06sometimes you get features that are a
  1163. 41:07little bit too sharp in the foreground
  1164. 41:09and uh it doesn't really make much sense
  1165. 41:11but we actually consider that to be a
  1166. 41:13bit of a feature initially because we
  1167. 41:15didn't really know whether we're going
  1168. 41:16for like Optical effects or kind of
  1169. 41:17painterly effects uh we generally tried
  1170. 41:20to treat the the frame as a as a
  1171. 41:22painting we we're not aiming for photo
  1172. 41:24realism and in this case we're kind of
  1173. 41:25inspired by uh Studio gibl and how an
  1174. 41:28artist might just use cor or brow
  1175. 41:30Strokes in the background and
  1176. 41:31essentially have this sameish amount of
  1177. 41:33detail in the forr background so we kind
  1178. 41:35of like this simplification it was doing
  1179. 41:38uh so for some time we stuck with that
  1180. 41:39but eventually like a proper Optical
  1181. 41:42depto field one over uh because of one
  1182. 41:44important feature that was tilt shift uh
  1183. 41:47because uh we use a little bit of a
  1184. 41:49called squeed driven development uh
  1185. 41:51where you try to maximize cute
  1186. 41:53aggression and in terms of if if you
  1187. 41:55have this like cute little diaram and
  1188. 41:57then you turn on a tilt shift off and
  1189. 42:00everything looks even tinier you just
  1190. 42:02have this like reaction and uh that just
  1191. 42:05was sufficient to conflict the win over
  1192. 42:07and move move to a proper Optical effect
  1193. 42:10but for that we need to fix the
  1194. 42:11artifacts and I have to admit that I I
  1195. 42:13don't really actually understand do at
  1196. 42:16least the way it's presented usually in
  1197. 42:17in graphics literature I kind of get the
  1198. 42:20the path Tracer of optical part of it
  1199. 42:22but this kind of diagram is what comes
  1200. 42:24to my mind when I think of do from uh
  1201. 42:26hor
  1202. 42:28uh and I just I like the diagram I think
  1203. 42:31it's cool and I can understand how each
  1204. 42:32point kind of increases into a little
  1205. 42:35dis based on its circular confusion but
  1206. 42:37I don't really understand how they
  1207. 42:38should be occluding each other or why
  1208. 42:40just like changing the slope slightly
  1209. 42:41means that they blend against each other
  1210. 42:42in different way uh and I I the the
  1211. 42:45original paper suggested that you can do
  1212. 42:47BR Force by sorting all the samples so I
  1213. 42:49tried kind of Trea it as an oit problem
  1214. 42:51throwing a bunch of O algorithms at it
  1215. 42:53but I couldn't really get anything cool
  1216. 42:55out of it and I still really don't don't
  1217. 42:57don't buy that it works but there's a
  1218. 42:59classic thing which does work and that
  1219. 43:01is you just jutter the image from
  1220. 43:04multiple viewpoints and you use an
  1221. 43:05accumulation buffer to uh to generate a
  1222. 43:08single picture out of like hundreds
  1223. 43:13potentially and now we can also do it uh
  1224. 43:16a bit quicker by synthesizing those
  1225. 43:18additional viewpoints by just um doing a
  1226. 43:20paralle distortion of M of the imag you
  1227. 43:22have generated and then filling in the
  1228. 43:24detail however we can only generate one
  1229. 43:27image so uh our options are limited we
  1230. 43:29have to do pretty fensive reconstruction
  1231. 43:31to to do that uh but I have tried a
  1232. 43:34whole lot of things I tried like I think
  1233. 43:35have a giant do hael file which had like
  1234. 43:3810 different algorithm implementations
  1235. 43:41and this one's specifically about trying
  1236. 43:42to synphase the Views I found the whole
  1237. 43:44feeling to be really difficult to
  1238. 43:45actually achieve and uh in general like
  1239. 43:47nothing really worked well and uh it
  1240. 43:49doesn't seem like there's any algor that
  1241. 43:51handle foreground defocus well and
  1242. 43:53actually run in real time so uh I kind
  1243. 43:56of came back came back to the drawing
  1244. 43:57board and I figure out like okay is it
  1245. 43:59even possible to extract something cool
  1246. 44:01out of screen space and so what would a
  1247. 44:04path Trace version of do look like but
  1248. 44:06using Ray marching instead because
  1249. 44:08that's how we solve all the problems
  1250. 44:09here
  1251. 44:11so uh I uh simply use the ray marer by
  1252. 44:15tracing tons and tons of rays in the
  1253. 44:16same way that's a path Tracer would so
  1254. 44:18you sample additional points on top of
  1255. 44:20your sensor aperture and then you kind
  1256. 44:22of mirror them around the focal point
  1257. 44:24and you can actually get an image like
  1258. 44:25this so it turns out that there is a lot
  1259. 44:27of information in screen space that you
  1260. 44:29could use to get pretty good forr
  1261. 44:31defocus however this was super slow was
  1262. 44:33freshing all the caches and costing like
  1263. 44:35a 100 milliseconds on a chunky GPU so I
  1264. 44:37need it to be spit up uh but if you if
  1265. 44:40we look at from it like from the front
  1266. 44:42and consider just the different arcs of
  1267. 44:45the radial uh Dove kernel and if you see
  1268. 44:48what kind of race we Trace within just
  1269. 44:50that one slice they all kind of Trace
  1270. 44:52similar
  1271. 44:53information they end up sampling the
  1272. 44:56same points over and over again which
  1273. 44:58means we can uh prefetch a bunch of data
  1274. 45:00and reuse information between
  1275. 45:03them so what we do in in the shter is
  1276. 45:06that we working those 1D radial slices
  1277. 45:08of the the kernel we prefet all of the
  1278. 45:10COC depth well it can pref deep depth
  1279. 45:14values if that's what you work with we
  1280. 45:15pref those CC values into local data
  1281. 45:17share uh and then uh we calculate all
  1282. 45:21the intersection so for each of the uh
  1283. 45:24Rays um and each of the slopes uh we
  1284. 45:27essentially find o n time M
  1285. 45:29intersections uh the math ends up being
  1286. 45:32very similar because the uh within a
  1287. 45:33single slice is just the slope of the
  1288. 45:35ray changing uh so it's just a little
  1289. 45:38bit of like extra division per
  1290. 45:40intersection uh and we store per each
  1291. 45:42Ray has it intersected with the surface
  1292. 45:44yet for each of the steps that we take
  1293. 45:46the Y Ray marching and we start as a Ray
  1294. 45:48mask uh as a bit mask for each of those
  1295. 45:51Ray slopes in vgps and then finding the
  1296. 45:53actual intersection points is just like
  1297. 45:56first bit first bit High uh and then you
  1298. 45:58can find out which is essentially the
  1299. 45:59first
  1300. 46:00intersection uh and then we can also
  1301. 46:02refine that using a second test so now
  1302. 46:04we have a way of do bulk rate
  1303. 46:07marching and it's essentially still the
  1304. 46:09full rate marcher just optimized so we
  1305. 46:11can do a fun thing of uh visualizing how
  1306. 46:13individual sub rays of that work so you
  1307. 46:15can actually see that this is quite
  1308. 46:16similar to the accumulation buffer
  1309. 46:18approach but all of those views are just
  1310. 46:20done by Ray marching and so we get
  1311. 46:22enough Precision out of that little uh
  1312. 46:24test and the second intersection so the
  1313. 46:26camera is is not moving here I'm just uh
  1314. 46:28nudging which Ray is being visualized
  1315. 46:30and if you combine them all you get Del
  1316. 46:33essentially so uh I guess we're done
  1317. 46:35here and uh this
  1318. 46:37works
  1319. 46:40right and then uh we get
  1320. 46:44this it's like what is even going on
  1321. 46:47here so I thought I had something cool
  1322. 46:49and it will work but then artifacts
  1323. 46:51appeared yet again U and this Edge case
  1324. 46:54was initially a bit difficult to find
  1325. 46:56but appears because that's that's a
  1326. 46:58pretty basic back background
  1327. 47:00reconstruction when Ray travels uh we uh
  1328. 47:03just use the last hit point that
  1329. 47:05actually s if it travels under the
  1330. 47:06surface and use that as the uh uh as the
  1331. 47:09color so on the left side you can see
  1332. 47:11that this essentially because it's kind
  1333. 47:12of trailing artifact behind objects
  1334. 47:14where you don't have information which
  1335. 47:15most of the time is actually fine uh but
  1336. 47:18uh in this specific Edge case when you
  1337. 47:19have multiple Rays coming at different
  1338. 47:21angle so different of those ond slices
  1339. 47:23going behind the surface they all end up
  1340. 47:25having the same point they as all use
  1341. 47:27the same fullback and that's you end up
  1342. 47:28just kind of sharpening just next to uh
  1343. 47:31to an edge and uh you can see it by just
  1344. 47:33showing different angles with ond slice
  1345. 47:36you can kind of see like something is
  1346. 47:37rotating around those the singular
  1347. 47:39points that previously were uh sticking
  1348. 47:41out and the sad thing is that I actually
  1349. 47:44don't know how to fix it yet properly at
  1350. 47:46least not in a way there will be
  1351. 47:47performance and we have a sort of hack
  1352. 47:49so what I found works sufficiently well
  1353. 47:51for us is that when you actually find
  1354. 47:53that intersection Point uh you can see
  1355. 47:55whether it's actually close to what we
  1356. 47:56trying to initially intersect so you're
  1357. 47:58trying to find intersection close to the
  1358. 48:00uh focal point and if that uh point you
  1359. 48:02have actually found is somewhere far
  1360. 48:04away from the focal point it means the
  1361. 48:05rate has traveled under the surface and
  1362. 48:06your intersection is actually not
  1363. 48:08accurate in that case I assume that well
  1364. 48:10it will be a blurry something uh
  1365. 48:13therefore I fall back to a uh just a
  1366. 48:15pre- blurred version of the background
  1367. 48:16that the Shader does uh just alongside
  1368. 48:19of all the calculations uh and I haven't
  1369. 48:21really had time to figure anything
  1370. 48:23smarter but this is sufficient at least
  1371. 48:25for us because this artifact is still
  1372. 48:26pretty rare
  1373. 48:27and you can still get pretty good
  1374. 48:28results out of it without any of the
  1375. 48:29typical uh like aliasing issues or like
  1376. 48:32seeing where each each layer of the do
  1377. 48:35splits up from the others and you can
  1378. 48:36get something quite
  1379. 48:42creamy and you can also throw typical
  1380. 48:45optimization sets such as analyzing
  1381. 48:47content of the image so we detect for
  1382. 48:49example which U of the tiles can be done
  1383. 48:52Health resolution because of the low U
  1384. 48:55Co variations within there uh which
  1385. 48:57parts we need to be doing with with full
  1386. 48:59detail and which uh can be simplified by
  1387. 49:01just doing a simple like background GA
  1388. 49:03kind of like the uh unreal five
  1389. 49:04presentation and we also going to use
  1390. 49:06myips to pre filter some of the data and
  1391. 49:07and get rid of some of the sharp like
  1392. 49:10hot spots and
  1393. 49:11noise uh but it still is not free it's
  1394. 49:13not as sample efficient as some of the
  1395. 49:15other approaches uh works for us because
  1396. 49:17um uh our dynamic range is fairly low so
  1397. 49:19we don't have any like super hot
  1398. 49:21highlights in the background like some
  1399. 49:22sci-fi games might have uh so for us is
  1400. 49:25fine uh but in practice if you try to
  1401. 49:28use it for a game with like very intense
  1402. 49:29HDR it might you might find it a bit
  1403. 49:31under sampled so it might be bit of a
  1404. 49:33Sit situational thing uh and in practice
  1405. 49:36for us we just throw the resulting noise
  1406. 49:37at tea and at least in our case it works
  1407. 49:40but uh in other cases it might give you
  1408. 49:42the typical uh ghosting uh and for us it
  1409. 49:44runs in roughly 1.3 to 1.5 milliseconds
  1410. 49:47on a 208 at 1440p so it's sufficient at
  1411. 49:51least and uh but in photo mode we also
  1412. 49:53like crank up the settings because when
  1413. 49:54you actually have the full tilt shift
  1414. 49:56you need to few more samples to properly
  1415. 49:58resolve
  1416. 49:59it uh and but to illustrate what we can
  1417. 50:01get out of that this is the the version
  1418. 50:03that was costing 100 milliseconds and
  1419. 50:04this is the version costing 1.3
  1420. 50:06milliseconds uh which actually looks
  1421. 50:08slightly better on some of the edge
  1422. 50:10cases because you can see the pinching
  1423. 50:11is gone but otherwise same
  1424. 50:14thing in terms of code uh I was going to
  1425. 50:17prefer like a nice version you can plug
  1426. 50:19in into your code and it might come soon
  1427. 50:21at some at some point but I just like
  1428. 50:23essentially copy pasted one of our shers
  1429. 50:24and dumped it into gist so if you grab
  1430. 50:27it you it will not work Straight Out of
  1431. 50:29the Box same you need to do some
  1432. 50:30massaging but at least like some of the
  1433. 50:31ideas are there you can just use it as a
  1434. 50:33Bas as a reference and doesn't have any
  1435. 50:35of the fancy multi resolution stuff so
  1436. 50:36it's going to be slower than the version
  1437. 50:37we have right now because that requires
  1438. 50:39quite a complex uh pipeline multiple
  1439. 50:41comput shaders analyzing all the
  1440. 50:44content uh and since we're moving down
  1441. 50:47the the graphics pipeline or to the end
  1442. 50:49of the graic pipeline uh let's talk
  1443. 50:51about image formation so you have
  1444. 50:53generated a bunch of RGS and Bs using
  1445. 50:55all fancy light lighting fancy post
  1446. 50:57processing and so on but how do they
  1447. 50:59actually form an image like there's a
  1448. 51:01bit of a discussion or debate about that
  1449. 51:04do you model human perception and try to
  1450. 51:06kind of synthesize something that human
  1451. 51:07would see when looking at the picture uh
  1452. 51:09do you try to use go after photography
  1453. 51:11and film uh but in practice it rendering
  1454. 51:14is its own art medium you can do
  1455. 51:16whatever the heck you want it's
  1456. 51:17eventually all about uh uh evoking some
  1457. 51:20kind of um U perception in in in a human
  1458. 51:23being uh just make sure to use conscious
  1459. 51:27choices and not fall into traditional
  1460. 51:28traps and one of the traps you may fall
  1461. 51:30into is this notorious six problem where
  1462. 51:34uh if you apply a pair Channel toil
  1463. 51:36mapping curve or display mapping curve
  1464. 51:38to your image uh you will most likely
  1465. 51:40see those six colors popping up
  1466. 51:42everywhere and uh at the bottom you can
  1467. 51:45see just clamping the colors you can
  1468. 51:46apply see applying Reinhard and the
  1469. 51:48typical acis curve and the right side of
  1470. 51:50it where exposure increases is always
  1471. 51:52the same and the only thing which is
  1472. 51:54special about the colors is they are
  1473. 51:55corners of the RGB Cube so if you send
  1474. 51:58see that in your pictures it's not
  1475. 52:00something you actually made as a choice
  1476. 52:02it's just something that is an
  1477. 52:03engineering choice of the color space
  1478. 52:05that you're
  1479. 52:06using to deal with that we use a display
  1480. 52:09mapper that's a this is a Shameless plug
  1481. 52:11but I I made this play M for kind of the
  1482. 52:14same timeos starting on Tiny Glades
  1483. 52:17called a tiny map map face and it design
  1484. 52:19specifically to avoid this uh this issue
  1485. 52:22so instead of kind of allowing the
  1486. 52:23current the the colors to saturate the
  1487. 52:25extremes of the SB Cube instead it
  1488. 52:27shifts towards White using a path uh to
  1489. 52:31White which I consider to be uh fairly
  1490. 52:33neutral but the whole thing is is
  1491. 52:34generally kind of opinionated and might
  1492. 52:37not work for you but in terms of how you
  1493. 52:40actually would plug that in it's
  1494. 52:40actually very simple 3D lot that you
  1495. 52:42apply after rainhard uh and it's just
  1496. 52:44kind of can fix your colors potentially
  1497. 52:47there are some caveats in that it only
  1498. 52:49works with srgb color it doesn't do HDR
  1499. 52:51output of the the boook uh and it is
  1500. 52:54subjective to tune to my specific
  1501. 52:56preferences uh but if you want something
  1502. 52:59bit more bit more neutral and with
  1503. 53:00similar characteristics you might try
  1504. 53:02want to try agx by choice bka which has
  1505. 53:05some of similar
  1506. 53:07characteristics and uh just to
  1507. 53:09illustrate some of the uh some of that
  1508. 53:11in pictures this is what happens if you
  1509. 53:13just take the H values the TR stimulus
  1510. 53:15and you clamp it you end up with this uh
  1511. 53:17lovely yellow color that has been uh dou
  1512. 53:20the rat piss
  1513. 53:23uh which shouldn't be there because if
  1514. 53:25you just reduce the the the radiance
  1515. 53:27values to the to levels where they don't
  1516. 53:29clamp it's actually doesn't have this
  1517. 53:31yellow but if you apply everyone's
  1518. 53:33favorite ases you have this yellow as
  1519. 53:35well and even if you use something
  1520. 53:37fairly gentle like the Reinhard uh
  1521. 53:40operator uh you still end up with this
  1522. 53:42kind of like shift towards this kind of
  1523. 53:44sickly unsaturated strange colors and if
  1524. 53:46you apply Tony mcmap face you actually
  1525. 53:49get something that's kind of resembles
  1526. 53:50those original colors at least to some
  1527. 53:53human perceptional
  1528. 53:54systems and uh that's would be it uh I
  1529. 53:57think we have like maybe three minutes
  1530. 53:59for questions and so thank you so
  1531. 54:11much thank you and and if we don't have
  1532. 54:15enough time for questions just catch me
  1533. 54:16afterwards and uh I I'll answer
  1534. 54:18everything okay please raise your hand
  1535. 54:21and I'll come
  1536. 54:24by thank you for the present was very
  1537. 54:27interesting um so you've worked with
  1538. 54:29rust right like so uh what made you
  1539. 54:31decide using rust over C++ and how was
  1540. 54:33your like experience working with it uh
  1541. 54:36so for our game I don't really imagine
  1542. 54:38using anything other than rust uh
  1543. 54:40because it is simple at the surface but
  1544. 54:42under the hood there's uh lots of very
  1545. 54:44complex chains of operations uh we
  1546. 54:46support things like infinite under read
  1547. 54:48with animations and all of those
  1548. 54:50generators uh have just dozens upon
  1549. 54:53dozens of systems that would be kind of
  1550. 54:55a nightmare to keep track of
  1551. 54:56all of the generat are also fully
  1552. 54:58deterministic which means that we need
  1553. 54:59to have this kind of precision that rust
  1554. 55:01is really famous for and so this kind of
  1555. 55:03harsh control so some people might see
  1556. 55:05using rust as an impediment iteration we
  1557. 55:07actually kind of see it as a
  1558. 55:08prerequisite and uh we haven't had a
  1559. 55:11single memory corruption related crash
  1560. 55:13in the entire development of the game
  1561. 55:15and that's not something I'm familiar
  1562. 55:17with uh from Plus+ uh so in our PR in
  1563. 55:20practice for us using R has been
  1564. 55:22absolute blast and we also found that so
  1565. 55:24you can get stuff rolling very very
  1566. 55:26quick quickly by using the the Cates
  1567. 55:28ecosystem for example uh we use the the
  1568. 55:30ECS from the bavy engine uh to like run
  1569. 55:33all over our uh gameplay logic and
  1570. 55:35there's a whole bunch of crates for all
  1571. 55:36of our pliance processing backgrounds
  1572. 55:39and window interactions and so on so uh
  1573. 55:42it's it's kind of really a superpower
  1574. 55:44like I'm used to just writing your from
  1575. 55:45scratch but from R you just like collect
  1576. 55:47crates quickly move on then rewrite
  1577. 55:48what's important and it's really a
  1578. 55:51refreshing
  1579. 55:52experience all right any other questions
  1580. 55:56please raise your
  1581. 56:02hand uh first off great presentation the
  1582. 56:05passion comes off immensely and you're
  1583. 56:07quite good at explaining Concepts um I
  1584. 56:10uh was kind of curious about your
  1585. 56:13experiences with reer you mentioned that
  1586. 56:14you felt that GI rester GI was a bit
  1587. 56:16overkill for your applications U first
  1588. 56:19I'm curious why that's the case second
  1589. 56:21you mentioned you were doing some
  1590. 56:22experimentation with restar di how's
  1591. 56:24that been going uh so research GI
  1592. 56:27specifically it's overkill for our case
  1593. 56:29because the game is still Mo mostly
  1594. 56:31Outdoors uh some people are trying to
  1595. 56:33kind of hack it to be indoors as well
  1596. 56:34but the simply because of the softness
  1597. 56:36of the of the sky and the Sun Well sun
  1598. 56:39is not very soft but because of the this
  1599. 56:41presence of plenty of light Outdoors if
  1600. 56:43you don't have lots of local lights your
  1601. 56:45variance on the on the input on the Mard
  1602. 56:47proc is actually just very low and you
  1603. 56:49don't need a lot of denoising Machinery
  1604. 56:51to to deal with that and when you're
  1605. 56:53doing Mont caros style GI calculations
  1606. 56:55uh what you're you're really doing is
  1607. 56:57just dealing with variant so you have
  1608. 56:59some kind of way to sample the the
  1609. 57:00radiance and some way to filter it and
  1610. 57:02rester was just too much for our needs
  1611. 57:04and so it comes with some uh fixed costs
  1612. 57:07that we need to run to to do the
  1613. 57:09reservoir exchanges and there those are
  1614. 57:11just like a little bit too much memory
  1615. 57:13traffic for the potato devices that we
  1616. 57:15try to run the game on so in the end
  1617. 57:17just wasn't a win it would have been
  1618. 57:18fine but but uh we didn't need it that's
  1619. 57:21that's it in terms of Resto di I really
  1620. 57:23only just started tinkering with it uh
  1621. 57:25because we Curr they have a silly limit
  1622. 57:26of like you only get 32 light sources if
  1623. 57:28you place additional ones they don't
  1624. 57:30cast light and that's a just a silly
  1625. 57:32hack that we had to have to actually sh
  1626. 57:34game uh but I'm looking into um using
  1627. 57:38something like a light tree to to
  1628. 57:39accelerate the sampling of the lights
  1629. 57:41and then to to throw that at rester di
  1630. 57:43to actually do the U allow pixels to
  1631. 57:46talk to figure out which samples
  1632. 57:48actually relevant to their uh lighting I
  1633. 57:50have done some early tasks this a little
  1634. 57:52bit too noisy for my taste uh so I'll
  1635. 57:54just be t with it it's a
  1636. 57:56mildly promising I suppose but still
  1637. 57:59still I end up having a little bit too
  1638. 58:01much variance from the initial test and
  1639. 58:03then was anticipating so it hasn't moved
  1640. 58:05on very quickly yet all right we have
  1641. 58:07time for one more
  1642. 58:17question uh first of all I just wanted
  1643. 58:20to say it's a really great game and a
  1644. 58:22really great presentation uh I'm just
  1645. 58:24curious when you're doing putt racing
  1646. 58:26how many uh bounces do you do and do you
  1647. 58:29also do maybe a Radiance cach so for uh
  1648. 58:33path tracing the only real path tracing
  1649. 58:34we use in the game is for the reference
  1650. 58:36mode and then we just have something
  1651. 58:38like three bounces because because again
  1652. 58:40once again because of the Alder nature
  1653. 58:41we don't need more don't need more uh
  1654. 58:44but for the game itself it's not path
  1655. 58:45tracing per se it's more like U I guess
  1656. 58:48single pass of final Gathering is that
  1657. 58:51we just sample we just should race out
  1658. 58:53sample radians and feed them back but by
  1659. 58:55the temporal compon which means that you
  1660. 58:57essentially get like infinite bounces
  1661. 58:59from it as well so that's that's that's
  1662. 59:01that's essentially that it's not really
  1663. 59:03the path
  1664. 59:05tracing all right thanks to much thank
  1665. 59:08you

About this transcript

This page contains the full transcript of Rendering Tiny Glades With Entirely Too Much Ray Marching by Graphics Programming Conference, generated from the public captions YouTube serves with the video. The transcript has 12,132 words across 1,665 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.