Week 38 :(


It’s hard to admit, but I’m postponing this project until I come back with better ideas on how to create simple and standard things in a non-simple environment.

Really. I’ve had the idea of a non-euclidean game for several years, and I set this project as a kick-start for the actual concept. Now I’m stuck because I can’t create very specific visuals. That’s the summary.

Long tech stuff goes here.

For a long time, rendering shadows has been an important part of visuals. There are plenty of algorithms, and any of them could do the job—except in non-euclidean space. You need to render the scene from the light source’s perspective into a depth map, then in the shading pass, compare each fragment’s distance to the light source with the values in the depth map—that’s the general approach. But! The test scene with a big hall inside a box reveals the issue. When an area in the inner hall intersects with the outer hall, how do you illuminate the same fragment in the outer hall and shade it in the inner hall? Or the reverse—depending on the light source’s position relative to the doorway portal. And what if the light propagates through multiple portals? I currently have no proper solution for all possible cases, but traditional shadow maps with their dozens of filtering techniques aren’t enough. I even tried making the shadow map multilayered, but the problem remains because the portal rendering technique requires complex buffer access to leverage stencil culling, which should efficiently speed up rendering by early discard. I can only hope for OpenGL 4.7 or some future version (if there will be one) to allow separate depth and stencil attachments… Another attempt involved rendering shadows using simple ray tracing with BVH. It didn’t go well—even after multiple optimizations—about 15 fps @ full HD. What a shame! PBR was turned off, and there was only a single light with a few samples per fragment. Granted, my current GPU is an integrated Intel, but I was aiming to deliver simple and elegant visuals, not Crysis-level graphics—more like Half-Life 2 or Doom 3. Now, I’m thinking about another algorithm: shadow volumes. But calculating shadow volumes for non-euclidean space and creating soft shadow edges is another huge challenge.

The last solution I can think of right now is to render multiple, completely separate shadow maps for each light source and each space cell, without relying on portals culling. But that still seems far from optimal. So, for now, I’m going to give my brain a rest and switch to something else.

Get S167

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.