[video output=day547 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Starting the Move to Light Probes" vod_platform=youtube id=BxHuaLnVocE annotator=Miblo]
[0:00][Recap and set the stage for the day cleaning up the :lighting][:speech]
[0:57][Demo the state of our :lighting solution][:performance :rendering :run]
[3:37][Why is our :lighting slow?][:performance :rendering :run]
[3:37][:Lighting :performance: 1. :Threading][:rendering :run]
[5:00][:Lighting :performance: 2. GPU vs CPU][:hardware :rendering :run]
[8:06][:Lighting :performance: 3. Algorithmic approach][:rendering :run]
[11:47][Light Probes][:blackboard :lighting :performance :rendering]
[13:01][Light Probes: Ours][:blackboard :lighting :performance :rendering]
[16:24][Light Probes: Theirs, with "separation of reflectors and collectors"][:blackboard :lighting :performance :rendering]
[21:57][Light Probes: Why not separate the reflectors and collectors to begin with?][:blackboard :lighting :performance :rendering]
[27:37][Light Probes: Moving from our "fused" to their "separated" scheme][:blackboard :lighting :performance :rendering]
[31:08][Picking which probes to sample][:blackboard :lighting :performance :rendering]
[34:41][Naive probe sampling: 1. Grid lookup][:blackboard :lighting :performance :rendering]
[35:56][Naive probe sampling: 2. Linear search][:blackboard :lighting :performance :rendering]
[39:00][Plausible per-pixel probe sampling][:blackboard :lighting :performance :rendering]
[45:20][Eyeball our probe sampling requirements][:lighting :performance :rendering :run]
[47:24][Closest probe, voxel lookup][:blackboard :lighting :performance :rendering]
[49:07][Disable :lighting][:rendering]
[51:37][View our unlit world][:lighting :rendering :run]
[54:09][Make ComputeLightPropagation() build up :lighting statistics][:"debug system" :performance]
[56:31][Check out our :lighting statistics][:performance :run]
[57:31][Collect all :lighting statistics in ComputeLightPropagation()][:"debug system" :performance]
[58:59][Check out our :lighting statistics, and estimate our improvements][:performance :run]
[1:01:19][Introduce a light probe brain_type for GenerateRoom() to place on all non-wall tiles][:"entity system" :lighting]
[1:09:55][Introduce AddLightProbe()][:"entity system" :lighting]
[1:12:38][Do not see our light probes][:"entity system" :lighting :run]
[1:12:51][Enable UpdateAndRenderEntities() to draw our light probes, introducing IsLightProbe()][:"debug visualisation" :"entity system" :lighting]
[1:17:56][Check out our light probes][:"debug visualisation" :"entity system" :lighting :run]
[1:18:18][Make GenerateRoom() place the upper light probes slightly lower][:"entity system" :lighting]
[1:18:34][Check out our light probes][:"debug visualisation" :"entity system" :lighting :run]
[1:18:55][Let UpdateAndRenderEntities() ignore Z-biasing for the light probes][:"debug visualisation" :"entity system" :lighting]
[1:19:12][Check out our light probes down stairs][:"debug visualisation" :"entity system" :lighting :run]
[1:20:01][Fix GenerateRoom() to place light probes correctly on stairwells][:"entity system" :lighting]
[1:20:22][Check out our light probes down stairs][:"debug visualisation" :"entity system" :lighting :run]
[1:21:14][Make UpdateAndRenderEntities() count up the light probes][:"debug system" :lighting :performance]
[1:23:24][Check out our LightProbeCount, compared with the PointCount of our existing solution][:lighting :performance :run]
[1:26:30][Determine to build up our light probe voxel grid][:lighting :performance :speech]
[1:31:15][Create our voxel grid, introducing light_probe_spatial_index for the lighting_solution to contain][:lighting]
[1:38:03][Introduce AddProbeToSpatialIndex()][:lighting]
[1:39:48][Voxel :sampling resolution][:blackboard]
[1:42:21][Continue to sketch out AddProbeToSpatialIndex()][:lighting]
[1:48:25][Hierarchical :sampling][:blackboard]
[1:50:14][Q&A][:speech]
[1:50:44][@jmc516][Q: How far along in the game are we? What percentage would you say?]
[1:52:22][@longboolean][Q: Concerning picking :lighting probes, could you use some sort of proximity hash (for lack of a better term), if there is such a thing? Something like where the key would be the location you want to select from. Ideally collisions would be physically close to each other in space? Or is there a reason why doing something like this would not be feasible? Although now that I think about it, what I'm describing sounds a lot like a 2D array]
[1:54:15][@guybru5h_vi][Q: Have you thought about fully voxelizing the world and tracing rays in voxel space? Alternatively, what about selecting the probes using frustrum voxels like in Doom 2016?][:lighting]
[1:56:40][@mtb34][Q: Is it possible for you to share your theme color hex codes? I would like to use them on VSC]
[1:57:45][@mtsmox][Q: Will light probes only collect from hits to closest surfaces and as such would a three level setup per tile always leave the middle one never collecting any light? So now the two level is only for floor and ceiling?][:lighting]
[1:58:04][@metju][Q: Would you then consider handing the project over to a game designer to continue teaching the next parts?]
[1:59:57][@guybru5h_vi][Q: Have you read the recent Morgan Mcguire Diffuse GI probe paper? Could come in handy for this!][:lighting]
[2:00:20][@printf_armin][Q: Are entity component systems really a good way for an :"entity system"? [@naysayer88 Jon] has said that they are not really nice, but I wanted to know what you think about them, from an engine programmer's view. For me it looks like lots of wasted time]
[2:02:56][@alexkelbo][Q: Can we do some :AI programming for the NPCs, since you say we're almost done?]
[2:03:22][@nickito97][Q: Do you use ~4coder outside [~hero Handmade Hero]?]
[2:05:28][@pragmascrypt][Q: Could you share the paper you mentioned about light probes?[ref
    site="NVIDIA Developer Blog"
    page="RTX Global Illumination Part I"
    url=https://devblogs.nvidia.com/rtx-global-illumination-part-i/][ref
        title="Dynamic Diffuse Global Illumination with Ray-Traced Irradiance Fields"
        author="Jean-Philippe Guertin, Derek Nowrouzezahrai, Morgan McGuire"
        url=http://jcgt.org/published/0008/02/01/]][:lighting]
[2:06:43][@alexkelbo][Q: Did you talk about Harvey Potter during pre-stream? [@naysayer88 Jon] asked us to ask you about it…]
[2:06:55][@mtsmox][Q: You said that at a hit you will store the result in the closest probe. Would this not leave any probe that has no surface close completely black. Like a 3x3 probe grid per tile, the middle probe would never get picked. And in your two level system, the upper probes will only be picked for the ceiling and the lower ones for the floor (without considering walls)][:lighting]
[2:07:29][@mtsmox][Q: Might you need extra reflectors for the sprites to get better collection around those areas?][:lighting]
[2:07:36][@alexkelbo][Q: Are ~4coder source licenses available to the general public?]
[2:11:19][@guybru5h_vi][Q: More Jeff and Casey Show[ref
    site="Jeff and Casey Show"
    url=https://jeffandcaseyshow.com/] episodes soon?]
[2:11:55][@ragaw11][Why only PayPal and credit card payment methods for [~hero Handmade Hero]]
[2:12:05][@lucid_frost][Q: What do you think about a purpose built editor, as opposed to a general purpose text editor. Could work directly with a binary format similar to any other content creation tool]
[2:12:22][@mallesbixie][Bitcoin, of course]
[2:13:08][@hexadecimalinteger][Apple Pay]
[2:14:17][@guybru5h_vi][Q: Why are you listed as rewind evangelist in Braid?]
[2:19:01][@quickshift_][Q: What mailing list?]
[2:19:12][@maliusarth][Q: That sounds like you wouldn't been a fan of the current Souls-like trend]
[2:22:03][Wrap it up][:speech]
[/video]
