cinera_handmade.network/cmuratori/hero/code/code333.hmml

52 lines
4.5 KiB
Plaintext
Raw Normal View History

[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Floor-relative Perspective Transforms" vod_platform=youtube id=MplLlRJQ6tQ annotator=Miblo]
[0:08][Recap and set the stage for the day]
[5:02][Consult the issues list before jumping right into the Z stuff[ref
site="GitHub"
page="HandmadeHero/cpp Issues"
url="https://github.com/HandmadeHero/cpp/issues"]]
[7:07][handmade_render_group.cpp: Take a look at GetRenderEntityBasisP() and run the game to demo how the perspective transform is currently happening]
[9:10][handmade_render_group.cpp: Temporarily prevent GetRenderEntityBasisP() from applying the persepective transform to everything]
[10:34][Run the game and see how that looks]
[10:58][handmade_render_group.cpp: Prevent GetRenderEntityBasisP() only from transforming X]
[12:08][Run the game and see how things are now aligned]
[12:54][handmade_render_group.cpp: Temporarily enable GetRenderEntityBasisP() to preserve the UnscaledXY]
[14:01][Run the game and see how that looks]
[15:17][Consider how to transform the surrounding floors]
[19:14][Blackboard: Multiple Z's]
[24:38][handmade_render_group.cpp: Reset GetRenderEntityBasisP() and instead enable it to operate differently on multiple floors]
[29:08][Run the game, see how that looks and determine to set the scaling]
[30:00][Note a potential bug with the floor entities being considered upright]
[31:32][handmade_entity.cpp: Enable UpdateAndRenderEntities() to set the scaling]
[34:02][Run the game and see the scaling in action]
[35:23][handmade_entity.cpp: Consider a separate problem with UpdateAndRenderEntities() possibly marking every entity as upright]
[37:38]["Everyone can relax, and by "everyone", I mean "me""][quote 527]
[38:11][handmade_world_mode.cpp: Make AddStandardRoom() stagger the floor's terrain in Z, run the game and see what that looks like]
[40:25][handmade_world_mode.cpp: Make AddStandardRoom() create only two floors, with the bottom floor containing a stairwell up]
[43:18][handmade_platform.h: #define b32x]
[45:21][Run the game, traverse the stairs and demo the pop transform when jumping down the stairwell]
[46:14][Blackboard: A zone between floors in which we scale entities]
[47:57][handmade_render_group.cpp: Enable GetRenderEntityBasisP() to interpolate between floors]
[52:01][handmade_entity.cpp: Enable UpdateAndRenderEntities() to scale entities between floors]
[52:54][Run the game and see what that does]
[53:53][Consider what is currently happening and how to fix it]
[54:49][handmade_render_group.cpp: Prevent GetRenderEntityBasisP() from doing the perspective transform, run the game and see how boring that looks]
[56:43][Consider specifying a range in which the scaling doesn't occur]
[59:36][Q&A]
[1:01:07][@cyberpunkhobo][Are there any particular reasons not to prefer continuous scaling in Z besides easing sorting?]
[1:01:37][Blackboard: Avoiding perspective transform for the scenery]
[1:04:44][@soysaucethekid][I may have missed it, but what's the reasoning for typedef'ing a b32x as a b32 and not just use b32?]
[1:07:10][@thesizik][Thought: Have the floor above transform with the Y-displacement respective to the current floor, until you jump over to it, at which point the view cuts to be relative to the now-current floor]
[1:07:57][@dmitsuki][I just watched your Papers talk and I didn't get the Minkowski sum exactly. I don't get where you deduce the points to subtract from each other]
[1:08:54][@dmitsuki][Did you explain it on stream before? If so I can go to the archives[ref
site="Molly Rocket"
page="Implementing GKJ"
url="https://mollyrocket.com/849"]]
[1:09:39][@cynokron][For the stairs have you considered stairs on a particular floor go down instead of up, then you wouldn't have to worry about alpha?]
[1:10:50][@thesizik][So instead of the above floor perspective-transforming into place as you move up the stairs, it stays still and jump-cuts to the proper perspective once you hop to a tile in that floor]
[1:12:02][Amusing ancdote from the Papers We Love conference]
[1:13:11][@williambundy][Are you doing a whole layer transform at once, or per object?]
[1:13:24][@cynokron][Yes, but currently stairs are owned by the floor below them. If they are owned by the floor above them then you wouldn't see the stairs two floors above, since they would be two floors above (thus not blocking your way and not needing any alpha)]
[1:14:03][@pseudonym73][Now I'm curious if Casey speaks faster or slower than Buckminster Fuller did]
[1:14:29][Go ahead and close it down]
[/video]