Custom Occlusion System For Control-Inspired Reality-Bending Game
A new neat demo for Psych Rift.
We've been watching the progress of Psych Rift by Ablaze Interactive, a solo-developed game where a telekinetic glove is your only tool for surviving reality-bending worlds and escaping a dangerous research lab. Sometimes the developer shares interesting behind-the-scenes details, like how the wall transformation works, with the latest being a custom occlusion system built to keep the game running smoothly.
Godot already has an occlusion culling feature that works well out of the box, but it comes with some limitations: it only hides meshes and doesn't affect lights. Psych Rift takes place mostly in indoor environments, and levels can contain a high number of meshes and lights. As the developer explained, every visible light source, like a lamp, has its own omni light, which quickly adds up to hundreds of lights alongside thousands of meshes.
To keep performance smooth and run the game at high settings on an RTX 3060 with native 1080p and 60 FPS, the developer's system can hide lights too.
"I build my levels from what I call 'blocks'. A block is a scene that represents one individual piece of a level, like a single room or a part of a corridor. These are all connected together to form the whole level.
Alongside regular occlusion culling, my system makes use of VisibleOnScreenNotifier3D nodes to detect when a block is not visible to the player and can be hidden, including lights. When a block is hidden, all rigid bodies in it are also disabled, to help the physics engine as it searches for collisions (floors and walls stay on, since monsters might still be moving in those areas).
It's not perfect (occlusion culling is not 'airtight' and usually leaks), and there is still room for improvement, but it gets the job done overall. You can tell when the lights are still on because they light up the fog when running in wireframe mode."
The demo video above is made using two overlaid recordings.
Scroll down for more Psych Rift development showcases:
You might also want to check out what worked and what didn't for Quad Head while making Pratfall, a Godot co-op game. Head over to our interviews section, where we regularly chat with game developers about their work.
Want to get started with game development in Godot? Check out The GameDev Tavern's tutorial series and the GodotGameLab content for helpful resources.
Also, subscribe to our Newsletter, join our 80 Level Talent platform, Discord, and follow us on Twitter, LinkedIn, Telegram, and Instagram, where we share breakdowns, the latest news, awesome artworks, and more.
Are you a fan of what we do here at 80 Level? Then make sure to set us as a Preferred Source on Google to see more of our content in your feed.
Subscribe to 80 Level Newsletters
Latest news, hand-picked articles, and updates