Handmade Hero»Episode Guide
Constructing a Camera Easing Function
?
?

Keyboard Navigation

Global Keys

[, < / ], > Jump to previous / next episode
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)

Menu toggling

q Quotes r References f Filter y Link c Credits

In-Menu Movement

a
w
s
d
h j k l


Quotes and References Menus

Enter Jump to timecode

Quotes, References and Credits Menus

o Open URL (in new tab)

Filter Menu

x, Space Toggle category and focus next
X, ShiftSpace Toggle category and focus previous
v Invert topics / media as per focus

Filter and Link Menus

z Toggle filter / linking mode

Credits Menu

Enter Open URL (in new tab)
0:00Set up to work on camera functionality
🏃
0:00Set up to work on camera functionality
🏃
0:00Set up to work on camera functionality
🏃
5:27Meaningful Fog and AlphaClip parameters
🗩
5:27Meaningful Fog and AlphaClip parameters
🗩
5:27Meaningful Fog and AlphaClip parameters
🗩
9:18Fading floors and moving the camera
🖌
9:18Fading floors and moving the camera
🖌
9:18Fading floors and moving the camera
🖌
11:52Return from OBS crash
🗹
11:52Return from OBS crash
🗹
11:52Return from OBS crash
🗹
13:15Defining our camera clipping boundaries
🖌
13:15Defining our camera clipping boundaries
🖌
13:15Defining our camera clipping boundaries
🖌
14:02Reacquaint ourselves with the fogging and alpha clipping code in CompileZBiasProgram()
📖
14:02Reacquaint ourselves with the fogging and alpha clipping code in CompileZBiasProgram()
📖
14:02Reacquaint ourselves with the fogging and alpha clipping code in CompileZBiasProgram()
📖
18:28Parameterising our fogging and alpha clipping
🖌
18:28Parameterising our fogging and alpha clipping
🖌
18:28Parameterising our fogging and alpha clipping
🖌
19:13Augment game_camera with ExpectedFloorAtZ on which to base our fog and alpha clip parameters
19:13Augment game_camera with ExpectedFloorAtZ on which to base our fog and alpha clip parameters
19:13Augment game_camera with ExpectedFloorAtZ on which to base our fog and alpha clip parameters
25:47Check out our heavily fogged orphanage
🏃
25:47Check out our heavily fogged orphanage
🏃
25:47Check out our heavily fogged orphanage
🏃
26:55Augment game_state with Alpha and Fog parameters for our in-game camera editor to use
26:55Augment game_state with Alpha and Fog parameters for our in-game camera editor to use
26:55Augment game_state with Alpha and Fog parameters for our in-game camera editor to use
35:20Try out our new fog and alpha controls
🏃
35:20Try out our new fog and alpha controls
🏃
35:20Try out our new fog and alpha controls
🏃
35:47Move the Alpha and Fog from game_state into game_mode_world, and add ExpectedFloorZ to our UI
35:47Move the Alpha and Fog from game_state into game_mode_world, and add ExpectedFloorZ to our UI
35:47Move the Alpha and Fog from game_state into game_mode_world, and add ExpectedFloorZ to our UI
41:49Try out our camera editor UI
🏃
41:49Try out our camera editor UI
🏃
41:49Try out our camera editor UI
🏃
43:41Swap AlphaMax and AlphaMin in UpdateAndRenderWorld()
43:41Swap AlphaMax and AlphaMin in UpdateAndRenderWorld()
43:41Swap AlphaMax and AlphaMin in UpdateAndRenderWorld()
44:10See that the alpha fade is being applied in camera space, not world space
🏃
44:10See that the alpha fade is being applied in camera space, not world space
🏃
44:10See that the alpha fade is being applied in camera space, not world space
🏃
44:42Rename FogMax and AlphaMax to FogSpan and AlphaSpan respectively
44:42Rename FogMax and AlphaMax to FogSpan and AlphaSpan respectively
44:42Rename FogMax and AlphaMax to FogSpan and AlphaSpan respectively
46:16Find that FogMin is not working as expected
🏃
46:16Find that FogMin is not working as expected
🏃
46:16Find that FogMin is not working as expected
🏃
47:17See how the Fog is computed in CompileZBiasProgram()
📖
47:17See how the Fog is computed in CompileZBiasProgram()
📖
47:17See how the Fog is computed in CompileZBiasProgram()
📖
49:26Remove the NearClipPlane from the Alpha computation in SetCameraTransform()
49:26Remove the NearClipPlane from the Alpha computation in SetCameraTransform()
49:26Remove the NearClipPlane from the Alpha computation in SetCameraTransform()
50:06Continue to investigate our Fog computation in CompileZBiasProgram()
📖
50:06Continue to investigate our Fog computation in CompileZBiasProgram()
📖
50:06Continue to investigate our Fog computation in CompileZBiasProgram()
📖
51:11Fog premultiplied alpha in CompileZBiasProgram()
📖
51:11Fog premultiplied alpha in CompileZBiasProgram()
📖
51:11Fog premultiplied alpha in CompileZBiasProgram()
📖
54:37Make CompileZBiasProgram() correctly blend the fog using premultipled alpha
54:37Make CompileZBiasProgram() correctly blend the fog using premultipled alpha
54:37Make CompileZBiasProgram() correctly blend the fog using premultipled alpha
55:08“That seems like the best plan to me; don't quote me on it.”α
🗩
55:08“That seems like the best plan to me; don't quote me on it.”α
🗩
55:08“That seems like the best plan to me; don't quote me on it.”α
🗩
55:16Hit our "Shader validation failed" assertion in OpenGLCreateProgram()
🏃
55:16Hit our "Shader validation failed" assertion in OpenGLCreateProgram()
🏃
55:16Hit our "Shader validation failed" assertion in OpenGLCreateProgram()
🏃
55:26Fix CompileZBiasProgram() to only multiply in the alpha in the Lerp() call
55:26Fix CompileZBiasProgram() to only multiply in the alpha in the Lerp() call
55:26Fix CompileZBiasProgram() to only multiply in the alpha in the Lerp() call
55:41Adjust our fogging parameters to try and make sense of them
🏃
55:41Adjust our fogging parameters to try and make sense of them
🏃
55:41Adjust our fogging parameters to try and make sense of them
🏃
59:06Bracketing the alpha clip and fogging to contain the player
🖌
59:06Bracketing the alpha clip and fogging to contain the player
🖌
59:06Bracketing the alpha clip and fogging to contain the player
🖌
59:44Expand our notion of camera focus in game_camera to represent a range, for UpdateCameraForEntityMovement() to set
59:44Expand our notion of camera focus in game_camera to represent a range, for UpdateCameraForEntityMovement() to set
59:44Expand our notion of camera focus in game_camera to represent a range, for UpdateCameraForEntityMovement() to set
1:06:08Find that our ExpectedFloorMinZ is not as expected
🏃
1:06:08Find that our ExpectedFloorMinZ is not as expected
🏃
1:06:08Find that our ExpectedFloorMinZ is not as expected
🏃
1:08:10Fix the EntityFocusZ computation in UpdateCameraForEntityMovement()
1:08:10Fix the EntityFocusZ computation in UpdateCameraForEntityMovement()
1:08:10Fix the EntityFocusZ computation in UpdateCameraForEntityMovement()
1:08:37Find that the bracket is set correctly, but the alpha is wrong
🏃
1:08:37Find that the bracket is set correctly, but the alpha is wrong
🏃
1:08:37Find that the bracket is set correctly, but the alpha is wrong
🏃
1:09:12Fix the FocusMinZ and FocusMaxZ computations in UpdateAndRenderWorld()
1:09:12Fix the FocusMinZ and FocusMaxZ computations in UpdateAndRenderWorld()
1:09:12Fix the FocusMinZ and FocusMaxZ computations in UpdateAndRenderWorld()
1:09:23Find that our AlphaClip and Fog bracket works beautifully
🏃
1:09:23Find that our AlphaClip and Fog bracket works beautifully
🏃
1:09:23Find that our AlphaClip and Fog bracket works beautifully
🏃
1:09:51Proactive camera interpolation
🗩
1:09:51Proactive camera interpolation
🗩
1:09:51Proactive camera interpolation
🗩
1:13:02Interpolation functions
🖌
1:13:02Interpolation functions
🖌
1:13:02Interpolation functions
🖌
1:15:16Position our hero in her bedroom
1:15:16Position our hero in her bedroom
1:15:16Position our hero in her bedroom
1:16:37Traverse the orphanage between rooms
🏃
1:16:37Traverse the orphanage between rooms
🏃
1:16:37Traverse the orphanage between rooms
🏃
1:16:59Change the camera only to interpolate positions when we change rooms
1:16:59Change the camera only to interpolate positions when we change rooms
1:16:59Change the camera only to interpolate positions when we change rooms
1:18:28Traverse the orphanage to trigger camera interpolation
🏃
1:18:28Traverse the orphanage to trigger camera interpolation
🏃
1:18:28Traverse the orphanage to trigger camera interpolation
🏃
1:19:32Make UpdateCameraForEntityMovement() trigger camera interpolation, keeping track of the FromP and TargetP, and using a tInterpolation value
1:19:32Make UpdateCameraForEntityMovement() trigger camera interpolation, keeping track of the FromP and TargetP, and using a tInterpolation value
1:19:32Make UpdateCameraForEntityMovement() trigger camera interpolation, keeping track of the FromP and TargetP, and using a tInterpolation value
1:22:22Find that our camera interpolation is linear
🏃
1:22:22Find that our camera interpolation is linear
🏃
1:22:22Find that our camera interpolation is linear
🏃
1:22:41Make UpdateCameraForEntityMovement() use the Square function to interpolate the camera
1:22:41Make UpdateCameraForEntityMovement() use the Square function to interpolate the camera
1:22:41Make UpdateCameraForEntityMovement() use the Square function to interpolate the camera
1:23:43Check out our Squared camera interpolation
🏃
1:23:43Check out our Squared camera interpolation
🏃
1:23:43Check out our Squared camera interpolation
🏃
1:23:53Make UpdateCameraForEntityMovement() use the SquareRoot function to interpolate the camera
1:23:53Make UpdateCameraForEntityMovement() use the SquareRoot function to interpolate the camera
1:23:53Make UpdateCameraForEntityMovement() use the SquareRoot function to interpolate the camera
1:24:02Check out our Square rooted camera interpolation
🏃
1:24:02Check out our Square rooted camera interpolation
🏃
1:24:02Check out our Square rooted camera interpolation
🏃
1:24:37Interpolation functions1
📖
1:24:37Interpolation functions1
📖
1:24:37Interpolation functions1
📖
1:30:00Understanding rates of change, and polynomials2
📖
1:30:00Understanding rates of change, and polynomials2
📖
1:30:00Understanding rates of change, and polynomials2
📖
1:37:39Shaping our desired interpolation curve3
📖
1:37:39Shaping our desired interpolation curve3
📖
1:37:39Shaping our desired interpolation curve3
📖
1:40:02Bézier curves
🖌
1:40:02Bézier curves
🖌
1:40:02Bézier curves
🖌
1:51:17Plug our derivatives into Desmos4
📖
1:51:17Plug our derivatives into Desmos4
📖
1:51:17Plug our derivatives into Desmos4
📖
1:54:35Make UpdateCameraForEntityMovement() interpolate the camera using our ease-in-ease-out function
1:54:35Make UpdateCameraForEntityMovement() interpolate the camera using our ease-in-ease-out function
1:54:35Make UpdateCameraForEntityMovement() interpolate the camera using our ease-in-ease-out function
1:55:43Check out our camera interpolation
🏃
1:55:43Check out our camera interpolation
🏃
1:55:43Check out our camera interpolation
🏃
1:56:32Q&A
🗩
1:56:32Q&A
🗩
1:56:32Q&A
🗩
1:57:13xxthebigfoxx Q: The site actually had support for variables. It was giving you a slider to edit the values
🗪
1:57:13xxthebigfoxx Q: The site actually had support for variables. It was giving you a slider to edit the values
🗪
1:57:13xxthebigfoxx Q: The site actually had support for variables. It was giving you a slider to edit the values
🗪
1:57:30Try to use variables in a Desmos function5
📖
1:57:30Try to use variables in a Desmos function5
📖
1:57:30Try to use variables in a Desmos function5
📖
2:01:09pythno Q: Could we also describe the easy-in / -out via a sine function?
🗪
2:01:09pythno Q: Could we also describe the easy-in / -out via a sine function?
🗪
2:01:09pythno Q: Could we also describe the easy-in / -out via a sine function?
🗪
2:01:46garethhubball Q: I noticed that you used t*t*t for t cubed. Does C have support for something like t**3 for exponents?
🗪
2:01:46garethhubball Q: I noticed that you used t*t*t for t cubed. Does C have support for something like t**3 for exponents?
🗪
2:01:46garethhubball Q: I noticed that you used t*t*t for t cubed. Does C have support for something like t**3 for exponents?
🗪
2:03:03areriff Q: Have you tested the new transition going up and down the stairs?
🗪
2:03:03areriff Q: Have you tested the new transition going up and down the stairs?
🗪
2:03:03areriff Q: Have you tested the new transition going up and down the stairs?
🗪
2:04:21abarishu Q: By setting the u and v values to negative, you can get things like "overshoot" where the camera goes over and then corrects back. I don't think it will be a good feel in Handmade Hero's case, but for some cases that is really good
🗪
2:04:21abarishu Q: By setting the u and v values to negative, you can get things like "overshoot" where the camera goes over and then corrects back. I don't think it will be a good feel in Handmade Hero's case, but for some cases that is really good
🗪
2:04:21abarishu Q: By setting the u and v values to negative, you can get things like "overshoot" where the camera goes over and then corrects back. I don't think it will be a good feel in Handmade Hero's case, but for some cases that is really good
🗪
2:04:29Try making UpdateCameraForEntityMovement() interpolate the camera using an overshooting function6
2:04:29Try making UpdateCameraForEntityMovement() interpolate the camera using an overshooting function6
2:04:29Try making UpdateCameraForEntityMovement() interpolate the camera using an overshooting function6
2:07:50Check out our overshooting camera
🏃
2:07:50Check out our overshooting camera
🏃
2:07:50Check out our overshooting camera
🏃
2:08:38Revert UpdateCameraForEntityMovement() to perform an ease-in-ease-out camera interpolation
2:08:38Revert UpdateCameraForEntityMovement() to perform an ease-in-ease-out camera interpolation
2:08:38Revert UpdateCameraForEntityMovement() to perform an ease-in-ease-out camera interpolation
2:09:17Save our Desmos curve7
📖
2:09:17Save our Desmos curve7
📖
2:09:17Save our Desmos curve7
📖
2:11:38It's been a pleasure
🗩
2:11:38It's been a pleasure
🗩
2:11:38It's been a pleasure
🗩