Index hero/code562

This commit is contained in:
Matt Mascarenhas 2019-10-20 23:48:01 +01:00
parent b4502aa792
commit b34fe81b7b
1 changed files with 100 additions and 0 deletions

View File

@ -0,0 +1,100 @@
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Testing Voxel Light Sampling" vod_platform=youtube id=SV0L6cm1Ugo annotator=Miblo]
[0:00][Recap and set the stage for the day][:speech]
[0:35][Demo the current test state of our :lighting :sampling, planning to stuff predictable values into our light probes][:run]
[5:05][Split out and explain our :lighting equation in CompileZBiasProgram()]
[10:40][Does anyone know if ~Milton has been fixed][:speech]
[10:51][Light Occlusion via Normal][:blackboard :lighting]
[12:31][Bug with light being transmitted through surfaces][:blackboard :lighting]
[16:45][Split out the light direction coefficient of our :lighting equation, used to prevent light transmission through the backs of surfaces]
[19:34][Cosine falloff light collection at angles][:blackboard :lighting]
[22:33][Radiating light at angles][:blackboard :lighting]
[25:01][:Research "Phong Lighting and Specular Highlights"[ref
author="TimJ/Vertigo"
title="Phong Lighting and Specular Highlights"
publisher="University of Oxford: Department of Engineering Science"
url=http://www.robots.ox.ac.uk/~att/index.html]][:lighting]
[28:34][Determine to look into light emittance at angles][:lighting :speech]
[29:46][Make our :lighting equation ignore light obscured by surfaces]
[31:38][See our possibly more correct :lighting][:run]
[33:13][The problem :sampling from a light probe perpendicular to the surface][:blackboard :lighting]
[34:50][Light Probe Spreads][:blackboard :lighting :sampling]
[36:06][Let our :lighting equation in gather some light from perpendicular sources][:lighting :sampling]
[36:38][See our more lit world][:lighting :run]
[37:21][Spread our light :sampling by 45°][:lighting :sampling]
[38:47][Light Direction Coefficient Spread][:blackboard :lighting]
[42:11][Scale our spread light to the range 0 to 1][:lighting :sampling]
[42:33][Consider our spread light :sampling to be sane enough for now][:lighting :run]
[43:03][Factor diffuse light into our :lighting equation]
[46:13][Check out our diffuse and reflective :lighting][:run]
[46:49][Blank out the Down light in EndLightingComputation()][:lighting]
[47:27][Check out our diffuse and reflective :lighting][:run]
[48:13][Material reflectance][:lighting :speech]
[50:44][Introduce a speculardiffuse coefficient in our :lighting equation]
[52:03][Check out our 50/50 reflectance][:lighting :run]
[52:15][Make our materials perfectly specular][:lighting]
[52:27][Check out our specular reflectance][:lighting :run]
[52:41][Make our materials pure diffuse][:lighting]
[52:53][Check out our diffuse reflectance][:lighting :run]
[53:01][Leave our surface materials as 50/50 speculardiffuse][:lighting]
[53:48][Determine to stuff predictable values into our light probes][:lighting :speech]
[54:15][Make our Up light white in EndLightingComputation()][:lighting]
[54:29][Check out our plain lit scene][:lighting :run]
[55:40][Let OpenGLEndFrame() continue to send :lighting to the GPU]
[56:21][Briefly traverse our lit world][:lighting :run]
[56:41][Prepare EndLightingComputation() to handle distant light sources, of varying intensities][:lighting]
[1:05:45][See our brightly lit world][:lighting :run]
[1:05:57][Factor in the light intensity in EndLightingComputation()][:lighting]
[1:07:25][See our still brightly lit world][:lighting :run]
[1:07:36][Scrutinise our light falloff, and increase our light ratio coefficient from 0.5 to 3][:lighting]
[1:08:24][Check out our distance-based :lighting, light a spotlight][:run]
[1:09:27][Enable OpenGLInit() to apply linear blending][:rendering]
[1:09:52][Check out our more smooth-faded :lighting][:run]
[1:11:48][Prepare EndLightingComputation() to handle moving light sources][:lighting]
[1:13:48][See our spotlight jump between :camera positions][:lighting :run]
[1:14:27][Make EndLightingComputation() lock the light source to player's position, augmenting lighting_solution with a DebugLightP][:lighting]
[1:16:03][Check out our moving spotlight, lamenting the hard-line artifacts where the light falls to black][:lighting :run :sampling]
[1:18:54][Calculating a smoother falloff function[ref
site=Desmos
page="Graphic Calculator"
url=https://www.desmos.com/calculator]][:mathematics :research]
[1:21:21][Produce a smoother falloff in EndLightingComputation()][:lighting]
[1:22:01][Check out our spotlight's smoother falloff][:lighting :run]
[1:22:15][Try to further smooth our falloff in EndLightingComputation()][:lighting]
[1:22:28][Find that our falloff is less smooth][:lighting :run]
[1:22:48][Try producing a harsher falloff in EndLightingComputation()][:lighting]
[1:23:26][Check out our blocky falloff][:lighting :run]
[1:23:38][Reduce the light intensity from 0.1 to 0.025 of the max in EndLightingComputation()][:lighting]
[1:23:45][Check out our less intense light][:lighting :run]
[1:23:57][Revert to linear falloff, with the lower intensity in EndLightingComputation()][:lighting]
[1:24:04][Check out our linear falloff, and lower intensity spotlight][:lighting :run]
[1:24:51][Consider how to proceed with our :lighting][:speech]
[1:27:01][Consider our falloff edge artifact to not need solving][:lighting :run]
[1:29:09][Make EndLightingComputation() collect appropriate amounts of light from the six directions][:lighting]
[1:34:56][See our unlit world][:lighting :run]
[1:35:02][Temporarily hard set the UpA to 1.0 in EndLightingComputation()][:lighting]
[1:35:50][See our still until world][:lighting :run]
[1:35:53][Fix EndLightingComputation() to multiply our light colours by 255][:lighting]
[1:36:16][Check out our brightly lit world][:lighting :run]
[1:36:19][Make EndLightingComputation() correctly normalise the inverse total light][:lighting]
[1:36:55][Check out our directionally lit world, with the sprites incorrectly lit][:lighting :run]
[1:39:27][Adjust the ground cover's normal in FillUnpackedEntity()][:"entity system"]
[1:40:51][Check out our directionally lit ground cover][:lighting :run]
[1:41:17][Further adjust the ground cover's normal in FillUnpackedEntity()][:"entity system"]
[1:41:35][Check out our directionally lit ground cover and monstar sprite][:lighting :run]
[1:42:20][Q&A][:speech]
[1:44:18][@devsigner][Q: Could you give sort of a brief high-level explanation of how the :lighting works?]
[1:44:40][@somebody_took_my_name][Q: Are the cube artifacts a result of the view vector reflection instead of the light vector reflections?][:lighting]
[1:45:03][Make our materials pure diffuse in CompileZBiasProgram()][:lighting]
[1:45:27][Continue to see our spotlight falloff edge artifact][:lighting :run]
[1:45:40][Consider our voxel trilinear interpolation to be the problem][:lighting :speech]
[1:47:58][:Lighting][:blackboard]
[1:48:57][:Lighting at Startup: 1) Light Probe Distribution][:blackboard]
[1:49:55][:Lighting during Run-time: 2) Light Probe Table Index Assignment][:blackboard]
[1:53:41][:Lighting during Run-time: 3) Light Injection][:blackboard]
[1:54:45][:Lighting during Run-time: 4) Light Transmission][:blackboard]
[1:55:21][:Lighting during Run-time: 5) Smoothing (Hysteresis)][:blackboard]
[1:57:00][:Lighting on the GPU: 6) Voxelisation of Light Probes][:blackboard]
[1:58:59][@culdevu][Q: (Responding to why there's not two cosine terms) Two things: The BRDF is defined to be the derivative of the outgoing radiance with respect the irradiance, so whatever extra terms you think you need are already folded into the BRDF. Also, remember that the next bounce of light will have another cosine, so the other cosine is accounted for. Does that clear it up, or am I misunderstanding?][:lighting]
[1:59:54][@0lpbm][Q: Regarding ~Milton, aren't you using an "unofficial" version that has the grid tool patched in? If so, maybe switch back to the official version]
[2:01:24][Wrap it up, with homework to figure out better, non-trilinear light probe :sampling][:speech]
[/video]