Okay recently we discussed how to create an efficient escalator geometry, but what about animating it?

Of course you can always just send a bunch of stairs along a spine, but I didn't like that. First of all: a bunch of objects running on a loop seems like a bit of a hassle and also a waste of draw-calls.

So as I was expecting to do a lot of math anyways, I wanted to just do it properly.

https://mastodon.gamedev.place/@FrameOfMind/114059253644027389

#godot #techart #gamedev

Frame of Mind (@[email protected])

Attached: 1 image One thing that can escalate really quickly with #gamedev is #optimization: I am debating whether or not I should make this railing an asset with dedicated baked textures or use multiple materials and tiling textures. A big advantage of the separate materials is: Tiling Materials can be re-used and because they tile they need smaller textures for the same sharpness. A baked texture would save on geometry (thanks to normal maps) and draw-calls, when everything has the same material. #rendering

Gamedev Mastodon

Our shader uses two vectors: the total amount of sloped movement and the total amount of horizontal movement our staircase must do to cross a given distance and height.

We then gradually increase both values to one as the stair moves up.

Using a lot of cosine, we also interpolate transitions where stairs will slide across each other to transition from a surface to a staircase.

Visualized is the difference in horizontal and sloped movement with pink and green.

@FrameOfMind I need to show that to my students in my 6 billionth attempt to convince them to pay attention to math class