Debugging Voxel Interpolation
?
?
W, K, P / S, J, N Jump to previous / next marker
t / T Toggle theatre / SUPERtheatre mode
V Revert filter to original state Y Select link (requires manual Ctrl-c)
X, ShiftSpace Toggle category and focus previous
v Invert topics / media as per focus
Keyboard Navigation
Global Keys
[, < / ], > Jump to previous / next episodeW, K, P / S, J, N Jump to previous / next marker
t / T Toggle theatre / SUPERtheatre mode
V Revert filter to original state Y Select link (requires manual Ctrl-c)
Menu toggling
q Quotes r References f Filter y Link c CreditsIn-Menu Movement
a
w
s
s
d
h
j
k
l
←
↑
↓
↓
→
Quotes and References Menus
Enter Jump to timecodeQuotes, References and Credits Menus
o Open URL (in new tab)Filter Menu
x, Space Toggle category and focus nextX, ShiftSpace Toggle category and focus previous
v Invert topics / media as per focus
Filter and Link Menus
z Toggle filter / linking modeCredits Menu
Enter Open URL (in new tab)⏫
Previous: 'Switching to Rectangular Lighting Elements'
⏫
0:07Recap and set the stage for the day
🗩
0:07Recap and set the stage for the day
🗩
0:07Recap and set the stage for the day
🗩
2:01Run the game to see our current lighting situation
🏃
2:01Run the game to see our current lighting situation
🏃
2:01Run the game to see our current lighting situation
🏃
5:42Consider the current problems in the lighting
🏃
5:42Consider the current problems in the lighting
🏃
5:42Consider the current problems in the lighting
🏃
9:14Determine to validate RayCast()
🗩
9:14Determine to validate RayCast()
🗩
9:14Determine to validate RayCast()
🗩
12:44Make RayCast() tint the light grey
12:44Make RayCast() tint the light grey
12:44Make RayCast() tint the light grey
14:13Run the game to see less light in the scene
🏃
14:13Run the game to see less light in the scene
🏃
14:13Run the game to see less light in the scene
🏃
14:41Investigate the possibility that we are wrapping
14:41Investigate the possibility that we are wrapping
14:41Investigate the possibility that we are wrapping
16:46Make GatherFinalLighting() set the IncidentLight to pure red
16:46Make GatherFinalLighting() set the IncidentLight to pure red
16:46Make GatherFinalLighting() set the IncidentLight to pure red
17:21Run the game and do not see a red scene
🏃
17:21Run the game and do not see a red scene
🏃
17:21Run the game and do not see a red scene
🏃
18:20Run the game and switch away from the "just emitters" debug visualisation
🏃
18:20Run the game and switch away from the "just emitters" debug visualisation
🏃
18:20Run the game and switch away from the "just emitters" debug visualisation
🏃
19:04Scrutinise the lighting code
📖
19:04Scrutinise the lighting code
📖
19:04Scrutinise the lighting code
📖
22:46Make CompileZBiasProgram() multiply the DirFalloff in to the final result
22:46Make CompileZBiasProgram() multiply the DirFalloff in to the final result
22:46Make CompileZBiasProgram() multiply the DirFalloff in to the final result
27:20Run the game to see a little difference, but still no ambient lighting
🏃
27:20Run the game to see a little difference, but still no ambient lighting
🏃
27:20Run the game to see a little difference, but still no ambient lighting
🏃
28:27Read through GatherFinalLighting() and OutputLightingTextures()
📖
28:27Read through GatherFinalLighting() and OutputLightingTextures()
📖
28:27Read through GatherFinalLighting() and OutputLightingTextures()
📖
30:17Step in to OutputLightingTextures() and inspect the IncidentLight, Colour and Directional values
30:17Step in to OutputLightingTextures() and inspect the IncidentLight, Colour and Directional values
30:17Step in to OutputLightingTextures() and inspect the IncidentLight, Colour and Directional values
32:15Note that we don't have a way to directly visualise lighting quads
🏃
32:15Note that we don't have a way to directly visualise lighting quads
🏃
32:15Note that we don't have a way to directly visualise lighting quads
🏃
35:05Make CompileZBiasProgram() renormalise the contribution colour if the alpha is greater than 0
35:05Make CompileZBiasProgram() renormalise the contribution colour if the alpha is greater than 0
35:05Make CompileZBiasProgram() renormalise the contribution colour if the alpha is greater than 0
36:04Run the game to see still nonsense results
🏃
36:04Run the game to see still nonsense results
🏃
36:04Run the game to see still nonsense results
🏃
36:40Hard set the lighting colour to green in CompileZBiasProgram()
36:40Hard set the lighting colour to green in CompileZBiasProgram()
36:40Hard set the lighting colour to green in CompileZBiasProgram()
36:59Run the game to see pure green, except on the blue surface
🏃
36:59Run the game to see pure green, except on the blue surface
🏃
36:59Run the game to see pure green, except on the blue surface
🏃
37:37Verify that all pure colours hard set by CompileZBiasProgram() produce the expected results
37:37Verify that all pure colours hard set by CompileZBiasProgram() produce the expected results
37:37Verify that all pure colours hard set by CompileZBiasProgram() produce the expected results
38:56Run to see pure white and note that the voxel interpolation isn't totally busted
🏃
38:56Run to see pure white and note that the voxel interpolation isn't totally busted
🏃
38:56Run to see pure white and note that the voxel interpolation isn't totally busted
🏃
39:27Hard set the LightC to white and the DirFalloff to 1.0f in CompileZBiasProgram()
39:27Hard set the LightC to white and the DirFalloff to 1.0f in CompileZBiasProgram()
39:27Hard set the LightC to white and the DirFalloff to 1.0f in CompileZBiasProgram()
41:06Run the game to see white light, but some incorrectly dark spots
🏃
41:06Run the game to see white light, but some incorrectly dark spots
🏃
41:06Run the game to see white light, but some incorrectly dark spots
🏃
43:14Try to make CompileZBiasProgram() set the colour to pure yellow where there is no light sample
43:14Try to make CompileZBiasProgram() set the colour to pure yellow where there is no light sample
43:14Try to make CompileZBiasProgram() set the colour to pure yellow where there is no light sample
44:25Run the game to see spots of yellow in unexpected places
🏃
44:25Run the game to see spots of yellow in unexpected places
🏃
44:25Run the game to see spots of yellow in unexpected places
🏃
44:51Temporarily prevent CompileZBiasProgram() from setting the colour to yellow, and instead set the SurfaceReflect directly to the light colour, rather than multiplying it in
44:51Temporarily prevent CompileZBiasProgram() from setting the colour to yellow, and instead set the SurfaceReflect directly to the light colour, rather than multiplying it in
44:51Temporarily prevent CompileZBiasProgram() from setting the colour to yellow, and instead set the SurfaceReflect directly to the light colour, rather than multiplying it in
45:45Run the game to see the incoming light colour
🏃
45:45Run the game to see the incoming light colour
🏃
45:45Run the game to see the incoming light colour
🏃
46:04Make CompileZBiasProgram() set the colour to pure yellow where there is no light sample
46:04Make CompileZBiasProgram() set the colour to pure yellow where there is no light sample
46:04Make CompileZBiasProgram() set the colour to pure yellow where there is no light sample
46:20Run the game to see yellow where we cannot compute lighting results
🏃
46:20Run the game to see yellow where we cannot compute lighting results
🏃
46:20Run the game to see yellow where we cannot compute lighting results
🏃
47:09Try to make CompileZBiasProgram() set the colour to red
47:09Try to make CompileZBiasProgram() set the colour to red
47:09Try to make CompileZBiasProgram() set the colour to red
47:18Run the game to see some red places
🏃
47:18Run the game to see some red places
🏃
47:18Run the game to see some red places
🏃
47:39Make CompileZBiasProgram() track the Contrib value all the way down the pipeline and introduce VoxLerp() to use this value
47:39Make CompileZBiasProgram() track the Contrib value all the way down the pipeline and introduce VoxLerp() to use this value
47:39Make CompileZBiasProgram() track the Contrib value all the way down the pipeline and introduce VoxLerp() to use this value
50:56Run the game to see that it already looks better
🏃
50:56Run the game to see that it already looks better
🏃
50:56Run the game to see that it already looks better
🏃
51:34Begin to enable VoxLerp() to handle the case when the lighting contribution is 0
51:34Begin to enable VoxLerp() to handle the case when the lighting contribution is 0
51:34Begin to enable VoxLerp() to handle the case when the lighting contribution is 0
53:01Consider how better to handle voxels that have no lighting contribution
🗩
53:01Consider how better to handle voxels that have no lighting contribution
🗩
53:01Consider how better to handle voxels that have no lighting contribution
🗩
53:38Revert the passing of Contrib() all down the pipe in CompileZBiasProgram()
53:38Revert the passing of Contrib() all down the pipe in CompileZBiasProgram()
53:38Revert the passing of Contrib() all down the pipe in CompileZBiasProgram()
54:17Take a quick break
🗹
54:17Take a quick break
🗹
54:17Take a quick break
🗹
55:03Run the game to see our current red-tinted lighting situation
🏃
55:03Run the game to see our current red-tinted lighting situation
🏃
55:03Run the game to see our current red-tinted lighting situation
🏃
55:44Make OutputLightingTextures() gather the colour of voxels whose lighting contribution is 0 from their neighbour
55:44Make OutputLightingTextures() gather the colour of voxels whose lighting contribution is 0 from their neighbour
55:44Make OutputLightingTextures() gather the colour of voxels whose lighting contribution is 0 from their neighbour
1:00:48Run the game to see no difference
🏃
1:00:48Run the game to see no difference
🏃
1:00:48Run the game to see no difference
🏃
1:01:27Make OutputLightingTextures() zero-initialise the Neighbour
1:01:27Make OutputLightingTextures() zero-initialise the Neighbour
1:01:27Make OutputLightingTextures() zero-initialise the Neighbour
1:01:36Run the game and consider that the artifacts may only be occurring on voxels at the edge of the scene
🏃
1:01:36Run the game and consider that the artifacts may only be occurring on voxels at the edge of the scene
🏃
1:01:36Run the game and consider that the artifacts may only be occurring on voxels at the edge of the scene
🏃
1:04:47Temporarily assert in OutputLightingTextures() that Neighbor != 0
1:04:47Temporarily assert in OutputLightingTextures() that Neighbor != 0
1:04:47Temporarily assert in OutputLightingTextures() that Neighbor != 0
1:05:10Run the game to determine that we are doing some filling
🏃
1:05:10Run the game to determine that we are doing some filling
🏃
1:05:10Run the game to determine that we are doing some filling
🏃
1:07:44Make CompileZBiasProgram() colour the voxels by their location
1:07:44Make CompileZBiasProgram() colour the voxels by their location
1:07:44Make CompileZBiasProgram() colour the voxels by their location
1:09:10Run the game to see this debug visualisation confirming that the voxel interpolation is fine
🏃
1:09:10Run the game to see this debug visualisation confirming that the voxel interpolation is fine
🏃
1:09:10Run the game to see this debug visualisation confirming that the voxel interpolation is fine
🏃
1:10:02Make CompileZBiasProgram() colour the voxels green / red to indicate the presence / absence of lighting samples
1:10:02Make CompileZBiasProgram() colour the voxels green / red to indicate the presence / absence of lighting samples
1:10:02Make CompileZBiasProgram() colour the voxels green / red to indicate the presence / absence of lighting samples
1:10:49Run the game to see this debug visualisation
🏃
1:10:49Run the game to see this debug visualisation
🏃
1:10:49Run the game to see this debug visualisation
🏃
1:12:14Toggle OutputLighting() on
1:12:14Toggle OutputLighting() on
1:12:14Toggle OutputLighting() on
1:12:27Run the game to see the lighting solution visualised in voxel form
🏃
1:12:27Run the game to see the lighting solution visualised in voxel form
🏃
1:12:27Run the game to see the lighting solution visualised in voxel form
🏃
1:14:06Change OutputLightingTextures() to perform the Neighbor filling in a for() loop expanded to the whole voxel
1:14:06Change OutputLightingTextures() to perform the Neighbor filling in a for() loop expanded to the whole voxel
1:14:06Change OutputLightingTextures() to perform the Neighbor filling in a for() loop expanded to the whole voxel
1:17:36Run the game to see that we are filling nearly everything
🏃
1:17:36Run the game to see that we are filling nearly everything
🏃
1:17:36Run the game to see that we are filling nearly everything
🏃
1:17:55Introduce ClampVox() to clamp the voxel lookups only to the neighbouring voxels that are in the scene
1:17:55Introduce ClampVox() to clamp the voxel lookups only to the neighbouring voxels that are in the scene
1:17:55Introduce ClampVox() to clamp the voxel lookups only to the neighbouring voxels that are in the scene
1:20:17Run the game to see that the red patches are gone
🏃
1:20:17Run the game to see that the red patches are gone
🏃
1:20:17Run the game to see that the red patches are gone
🏃
1:20:55Make CompileZBiasProgram() take the LIGHT_LOOKUP positions to enable easy tweaking of the clamp
1:20:55Make CompileZBiasProgram() take the LIGHT_LOOKUP positions to enable easy tweaking of the clamp
1:20:55Make CompileZBiasProgram() take the LIGHT_LOOKUP positions to enable easy tweaking of the clamp
1:23:37Run the game to see the same debug visualisation
🏃
1:23:37Run the game to see the same debug visualisation
🏃
1:23:37Run the game to see the same debug visualisation
🏃
1:23:50Remove the red / green debug visualisation from CompileZBiasProgram()
1:23:50Remove the red / green debug visualisation from CompileZBiasProgram()
1:23:50Remove the red / green debug visualisation from CompileZBiasProgram()
1:24:17Run the game to see spherical weirdness
🏃
1:24:17Run the game to see spherical weirdness
🏃
1:24:17Run the game to see spherical weirdness
🏃
1:24:50Consider how CompileZBiasProgram() should compute the Contrib value
🗩
1:24:50Consider how CompileZBiasProgram() should compute the Contrib value
🗩
1:24:50Consider how CompileZBiasProgram() should compute the Contrib value
🗩
1:29:36Make CompileZBiasProgram() multiply in the VoxInvCelDim to the Contrib value
1:29:36Make CompileZBiasProgram() multiply in the VoxInvCelDim to the Contrib value
1:29:36Make CompileZBiasProgram() multiply in the VoxInvCelDim to the Contrib value
1:32:30Run the game and still see the weird gradient falloff patterns
🏃
1:32:30Run the game and still see the weird gradient falloff patterns
🏃
1:32:30Run the game and still see the weird gradient falloff patterns
🏃
1:33:12Temporarily make CompileZBiasProgram() hard code the Contrib to 1
1:33:12Temporarily make CompileZBiasProgram() hard code the Contrib to 1
1:33:12Temporarily make CompileZBiasProgram() hard code the Contrib to 1
1:34:27Run the game to see no gradient falloff pattern
🏃
1:34:27Run the game to see no gradient falloff pattern
🏃
1:34:27Run the game to see no gradient falloff pattern
🏃
1:34:35Try to make CompileZBiasProgram() factor in the dimensions of all neighbouring voxels to the Contrib value
1:34:35Try to make CompileZBiasProgram() factor in the dimensions of all neighbouring voxels to the Contrib value
1:34:35Try to make CompileZBiasProgram() factor in the dimensions of all neighbouring voxels to the Contrib value
1:36:09Run the game to see that it's a little better
🏃
1:36:09Run the game to see that it's a little better
🏃
1:36:09Run the game to see that it's a little better
🏃
1:36:29Make CompileZBiasProgram() factor in to the Contrib value merely the lighting sample distance
1:36:29Make CompileZBiasProgram() factor in to the Contrib value merely the lighting sample distance
1:36:29Make CompileZBiasProgram() factor in to the Contrib value merely the lighting sample distance
1:37:12Run the game to see no gradient falloff
🏃
1:37:12Run the game to see no gradient falloff
🏃
1:37:12Run the game to see no gradient falloff
🏃
1:37:36Prevent CompileZBiasProgram() from stomping on the LightC
1:37:36Prevent CompileZBiasProgram() from stomping on the LightC
1:37:36Prevent CompileZBiasProgram() from stomping on the LightC
1:38:02Run the game to see fewer artifacts
🏃
1:38:02Run the game to see fewer artifacts
🏃
1:38:02Run the game to see fewer artifacts
🏃
1:38:24Make CompileZBiasProgram() hard set the DirFalloff to 1.0f
1:38:24Make CompileZBiasProgram() hard set the DirFalloff to 1.0f
1:38:24Make CompileZBiasProgram() hard set the DirFalloff to 1.0f
1:39:18Run the game to see pure red everywhere
🏃
1:39:18Run the game to see pure red everywhere
🏃
1:39:18Run the game to see pure red everywhere
🏃
1:39:58Make CompileZBiasProgram() set the LightC to the LightD
1:39:58Make CompileZBiasProgram() set the LightC to the LightD
1:39:58Make CompileZBiasProgram() set the LightC to the LightD
1:41:00Run the game to see this debug visualisation
🏃
1:41:00Run the game to see this debug visualisation
🏃
1:41:00Run the game to see this debug visualisation
🏃
1:45:00Read through the lighting code to consider which routines we could verify
📖
1:45:00Read through the lighting code to consider which routines we could verify
📖
1:45:00Read through the lighting code to consider which routines we could verify
📖
1:48:44Make CompileZBiasProgram() set the LightC to WorldN
1:48:44Make CompileZBiasProgram() set the LightC to WorldN
1:48:44Make CompileZBiasProgram() set the LightC to WorldN
1:48:56Run the game to see that the world normals look reasonable
🏃
1:48:56Run the game to see that the world normals look reasonable
🏃
1:48:56Run the game to see that the world normals look reasonable
🏃
1:49:56Prevent CompileZBiasProgram() from stomping on the LightC
1:49:56Prevent CompileZBiasProgram() from stomping on the LightC
1:49:56Prevent CompileZBiasProgram() from stomping on the LightC
1:50:02Run the game and consider what may be causing the artifacts
🏃
1:50:02Run the game and consider what may be causing the artifacts
🏃
1:50:02Run the game and consider what may be causing the artifacts
🏃
1:53:00Prevent GatherFinalLighting() from stomping on the IncidentLight and AverageDirectionToLight
1:53:00Prevent GatherFinalLighting() from stomping on the IncidentLight and AverageDirectionToLight
1:53:00Prevent GatherFinalLighting() from stomping on the IncidentLight and AverageDirectionToLight
1:53:11Run the game to see the lighting solution
🏃
1:53:11Run the game to see the lighting solution
🏃
1:53:11Run the game to see the lighting solution
🏃
1:53:53Prevent RayCast() from tinting the light grey
1:53:53Prevent RayCast() from tinting the light grey
1:53:53Prevent RayCast() from tinting the light grey
1:54:17Run the game and note that we're getting closer to sane
🏃
1:54:17Run the game and note that we're getting closer to sane
🏃
1:54:17Run the game and note that we're getting closer to sane
🏃
1:54:48Make CompileZBiasProgram() attenuate the SurfaceReflect by the Light
1:54:48Make CompileZBiasProgram() attenuate the SurfaceReflect by the Light
1:54:48Make CompileZBiasProgram() attenuate the SurfaceReflect by the Light
1:55:15Run the game to see that it's getting a lot better
🏃
1:55:15Run the game to see that it's getting a lot better
🏃
1:55:15Run the game to see that it's getting a lot better
🏃
1:58:33Consider the next steps
🏃
1:58:33Consider the next steps
🏃
1:58:33Consider the next steps
🏃
1:59:48Re-enable RayCast() to tint the light grey
1:59:48Re-enable RayCast() to tint the light grey
1:59:48Re-enable RayCast() to tint the light grey
2:00:08Run the game to see the brighter scene
🏃
2:00:08Run the game to see the brighter scene
🏃
2:00:08Run the game to see the brighter scene
🏃
2:00:44Make GatherFinalLighting() divide the RayCount in to the IncidentLight
2:00:44Make GatherFinalLighting() divide the RayCount in to the IncidentLight
2:00:44Make GatherFinalLighting() divide the RayCount in to the IncidentLight
2:01:57Run the game to see the ambient grey light
🏃
2:01:57Run the game to see the ambient grey light
🏃
2:01:57Run the game to see the ambient grey light
🏃
2:03:15Q&A
🗩
2:03:15Q&A
🗩
2:03:15Q&A
🗩
2:20:40Close everything down
🗩
2:20:40Close everything down
🗩
2:20:40Close everything down
🗩
⏬
Next: 'Encoding Light Values'
⏬