Loading video...

Video Failed to Load

Go Home

Retro Game Engine Update 🔥 Exploring a Spatial Compression system in my game engine. Instead of changing object scale, the renderer subtly compresses distant depth in the vertex shader before projection. The goal is to make far-away spaces feel more scenic and theatrical, like a matte painting or miniature...

102,234 views • 5 months ago •via X (Twitter)

47 Comments

CamManx's profile picture
CamManx5 months ago

Slay would it be possible to do the opposite? Making smaller world feel like they have more space in between them

Analog Dream Dev's profile picture
Analog Dream Dev5 months ago

100%, will have to try and record a video of that now lol

Valentino Giudice's profile picture
Valentino Giudice5 months ago

This looks in some way similar to the AI-slopped meme of a few seconds of walking that became very popular at one point. I know this one is real, though, good job.

BLUE NILE 3D's profile picture
BLUE NILE 3D5 months ago

Sorry if this is a dumb question 🤓 how does this method differ from using longer camera focal length? Looks great! Just trying to wrap my head around it since I do 3D but never work in game engines.

Analog Dream Dev's profile picture
Analog Dream Dev5 months ago

Not dumb at all. The main difference is the camera focal length would uniformly be applied to the entire scene. This method Im using is not uniform. So things near the camera are not getting the effect.

BLUE NILE 3D's profile picture
BLUE NILE 3D5 months ago

Oooh got it now! So it’s proportionate to distance - cool! I tried this one with actual mesh deformation which wasn’t friendly to my computer at all - this looks way better!

Darek Gusto's profile picture
Darek Gusto5 months ago

Oh this looks real nice. Glad to see your project is going in a good direction.

Analog Dream Dev's profile picture
Analog Dream Dev5 months ago

Thank you! 🍻

nama's profile picture
nama5 months ago

try integrating Panini projection, that should accomplish this more naturally

Analog Dream Dev's profile picture
Analog Dream Dev5 months ago

Ill consider it. I used that in unreal engine years ago before nDisplay. Dont think it would work for my needs but ill look into it, thanks!

bingle bongle's profile picture
bingle bongle5 months ago

This is what Red Dead Redemption 2 did for things in the far distance. Great work.

Analog Dream Dev's profile picture
Analog Dream Dev5 months ago

@Dustykkometso Did not know that, thats cool!

based ADHD's profile picture
based ADHD5 months ago

I feel like this would lead to bizarre visuals while turning.

EpicNNG's profile picture
EpicNNG5 months ago

I'd love to make something in this in the future! Will you be releasing it? I'm out of the loop on this so far.

Analog Dream Dev's profile picture
Analog Dream Dev5 months ago

Yes, I plan to share with others.

namaissur's profile picture
namaissur5 months ago

at first I dont get the idea.. after watching vodeos.. but your comment make it completely sense! How did you come up with this idea? Is there any games which used simlar effect ? btw, it reminds me the trick we used in stereography when we decouple depth cues and play with them

Analog Dream Dev's profile picture
Analog Dream Dev5 months ago

Yeah i was thinking of things id seen in animation, old arcade games, movies that used matte paintings, even a school play with the almost illustrated, overimposing set. I want an artistic crank to emphasize things in the distance. Very cool hearing about your experiences!

Gran Idea Games's profile picture
Gran Idea Games5 months ago

Very interesting.

Bruce Dean Robinson's profile picture
Bruce Dean Robinson5 months ago

Nice

Maldito's profile picture
Maldito5 months ago

This looks cool! How does turning look like?

Analog Dream Dev's profile picture
Analog Dream Dev5 months ago

Will record more video, but so far it holds up well as long as I fine tune the values.

Studio Laaya / Foghorns Drown's profile picture
Studio Laaya / Foghorns Drown5 months ago

this is so trippy, cool shit

Chris | asciiart.club - online generator's profile picture
Chris | asciiart.club - online generator5 months ago

I feel like my brain has to fight for a sense of scale there, just to be let down the the actual size of the thing when you eventually get there. Kinda like disneyland's castles and streets built to vanishing point scale, fascinating illusion, but only from the right spot.

Toilet Tweeting™'s profile picture
Toilet Tweeting™5 months ago

Same FOV? How does it work?

Analog Dream Dev's profile picture
Analog Dream Dev5 months ago

Same FOV in both shots. It works by applying modifications before camera projection to compress the depth of far away things.

Toilet Tweeting™'s profile picture
Toilet Tweeting™5 months ago

My mind is kinda blown; this looks great. In, say, a long hallway, or some scene with long straight lines toward the vanishing point, would there be a noticeable warping effect?

Analog Dream Dev's profile picture
Analog Dream Dev5 months ago

I shared another post inside a hallway with the effect inverted. Certainly a lot to explore/test here

Mvq's profile picture
Mvq5 months ago

But .. this is just changing the FOV with extra steps 💀

Daniel's making a game : ASSIAH's profile picture
Daniel's making a game : ASSIAH5 months ago

That looks kind of amazing. I love how it makes the space seems smaller, gives the buildings a better sense of scale next to the players perspective.

SightlessThoughts's profile picture
SightlessThoughts5 months ago

On looks more realistic to me

Mike Moss's profile picture
Mike Moss5 months ago

That’s a cool feature! It definitely accomplished the goal. I would like to see more running around to really get the feeling of it

Giuseppe Navarria's profile picture
Giuseppe Navarria5 months ago

this is awesome, very nice trick

newtdis's profile picture
newtdis5 months ago

It looks otherworldly with the feature on. Is the time between distances the same in gameplay? In this case to the door of the tower?

Analog Dream Dev's profile picture
Analog Dream Dev5 months ago

Yeahs nothing physically changes at all so you would reach the door in the same amount of time in both cases. Its just a way to change how things are perceived, but they maintain their original state.

Ben Brooks's profile picture
Ben Brooks5 months ago

Oh this is a nice trick!

smugdev's profile picture
smugdev5 months ago

That's very interesting. 👀 Would you mind showing this without the post processing effects, too? I'd love to see the effect on its own. Your post setup hides small details and Twitter's video compression adds noise on top of that.

WallAce's profile picture
WallAce5 months ago

I really like this. It feels like this is closer to what our eyes see, rather than what a camera sees.

ⴽoⵜoBiⵛhi🪻🌼's profile picture
ⴽoⵜoBiⵛhi🪻🌼5 months ago

brilliant! i like it! :)

Martin Van Nostrand's profile picture
Martin Van Nostrand5 months ago

What does this look like when rotating the camera?

crystallize | SA3FB20112021 | games must b#'s profile picture
crystallize | SA3FB20112021 | games must b#5 months ago

Would it be the same as increased fov with decreased frame size?

Crogon's profile picture
Crogon5 months ago

idk. what would it look like if you did the oposite? make far away objects look even further away?

SM Usama Shah's profile picture
SM Usama Shah5 months ago

This looks awesome. Reminds of elden ring immediately. Can this be seen like a better alternative of very high FoV? Games on high fov look like more exaggerated version of the right video. Can you do high fov while maintaining similar look?

Klod Online's profile picture
Klod Online5 months ago

I love it. Seriously top tiers effect. may be needed in a lot of game as a mod 😅

Ɗ̩͙̀͊ǝ̲͚̊͋ƞ̛̮̫̔ꝩ̩͖̈̅ ͉͕̈́͂Ɱ͓̤̌̂ꝣ̗̳̊̈́ȵ̘̳̂̏ꝅ̨̬̔̅ⱺ̦́͐͜'s profile picture
Ɗ̩͙̀͊ǝ̲͚̊͋ƞ̛̮̫̔ꝩ̩͖̈̅ ͉͕̈́͂Ɱ͓̤̌̂ꝣ̗̳̊̈́ȵ̘̳̂̏ꝅ̨̬̔̅ⱺ̦́͐͜5 months ago

It feels like mixing high FOV (close-up) with low FOV (far)

yellowpaper's profile picture
yellowpaper5 months ago

Looks really good! Such a nice idea. Could have used a prettier sample scene perhaps though to demonstrate "scenic" a bit better

Jacobers_COM's profile picture
Jacobers_COM5 months ago

Off topic but I did noticed you were able to get moving quickly with your engine! I’m curious of what your work flow is like?

NeZvers's profile picture
NeZvers5 months ago

This instantly made me think about Elden Ring.

Related Videos

Everything far away in a game engine can feel small, flat, and washed out. That is correct perspective, but it can make for some poor scenery sometimes. Two features I've added to my engine try to fight against that: Spatial Recession magnifies the distance. After a vertex is projected I push its screen position outward from center. Near geometry is untouched. It only moves x and y, never depth, so nothing sorts differently and nothing z-fights. The result is a long lens bolted onto the far half of a wide one: the tower and the ridgeline loom instead of receding, while I keep the wide field of view I actually play in (FOV is identical in both of these examples). Dimensional Falloff is four distance ramps on the surface itself. Lighting contrast flattens so distant hills stop having a hard lit side and a hard dark side, which is what haze does in real life. Color then desaturates toward its own brightness to fake more distance. Then that desaturated color is pushed, and that is the one doing most of the visible work here. Last is texture detail, with a custom MIP value based on distances. All of it keys off real radial distance from the camera rather than depth This is so it stays put when you turn your head. Performance cost is next to nothing. The recession is two lines in the vertex shader. The falloff is a few lerps at the end of the pixel shader, which was already computing that distance for the mip bias anyway. Quite happy with the results, what do you think? #gamedev

Analog Dream Dev

88,586 views • 1 month ago