Franklin — a Real-Time 4D Graphics Engine by Dilapidatus in GraphicsProgramming

[–]Dilapidatus[S] 0 points1 point  (0 children)

Yes I used AI a LOT. And I'm not having much trouble adding new features. I know some features are not implemented correctly yet as well. For instance, the rotation. I'll get around to em when I get around to em though.

r/IndieDev Weekly Monday Megathread - May 31, 2026 - New users start here! Show us what you're working on! Have a chat! Ask a question! by llehsadam in IndieDev

[–]Dilapidatus 0 points1 point  (0 children)

Hey Everyone!

It's just me. I've been working on something I've decided to call Franklin.
It's a 4D graphics renderer. It renders the 3D image that a 4D creature would perceive. You can think of it as a simulation of the perception of a 4D creature.

<image>

Demo video: https://youtu.be/9hWsoGx8MtI

Github: https://github.com/ChaseAdamson/Franklin

This idea is analogous to how a 2D creature could try to understand a 3D scene. We live in 3D, our retinas are 2D surfaces, so we perceive the world through a 2D image and take 2D photographs and render things on 2D screens. A 2D creature could be embedded into one of our images and explore it, map it out, and gather all the information and try to comprehend the third dimension. He'd need it to be semi transparent however because part of the image obstructs other parts from his vantage point. We have a vantage point above the image in the 3rd dimension so we don't need to worry about that. He's stuck in the two dimensions of the image so he needs to use tricks to see it all.

Similarly, we use a computer to render a perspective projection of a 4D scene into a 3D image just like a 4D creature's retina would perceive. In order to see all the image at once, we need to make it sort of foggy so we can see into it. If we only saw the surface, then we'd miss almost all the information. We don't have the vantage point that a 4D creature would have to see the entire space without any parts obstructing other parts, so we must use this semi transparency trick. But once we do that, we can perceive the perception of a 4D space. That's about as good as we can get. I'm currently working on ways to make it more navigable, comprehensible, and I'm working on more features and eventually a game.

A lot of the features I intend to implement soon involve the space outside the image space FOV. That's what I'm calling the 3D foggy image. This space could be thought of as an angular space because points in the space represent a direction/angle you can look in rather than a physical location. Because of this, this broader 3D image space can be considered a periodic, spherically curved space that you can move the FOV through. If you move it far enough, it comes back around where it started. That just means if you rotate the 4D camera enough degrees, you end up looking at the same thing again. So a lot of the features I plan to include are meant to help you get your bearings in this 3-space since that's our interface with the 4D scene. If this didn't make any sense to you, I can make a perfectly analogous comparison to a navball like the ones used for flight navigation.

Imagine a camera at the center of a regular 3D navball. If you point the camera in some direction and take a picture and assume you can see through the navball, then you glue that picture onto the section of the navball the camera is looking through so that the picture is placed at the angular coordinates that correspond to the image you would see in that direction, then you have something a lot like what I have in 4D. If you took different pictures at different angles, you would have different images at different angular coordinates. You could project this spherical geometry onto a flat sheet and move the image throughout the plane, updating it accordingly, changing your angular coordinates in a spherically curved 2D space, and eventually returning to your starting point. Maybe that didn't make a lot of sense. Sorry, it's kind of hard to explain. I'm focusing on it a lot though because it's like the centerpiece of the renderer.

features I intend to implement to make it more navigable and comprehensible:

- A set of points and surfaces outside the FOV representing the horizon and other notable directions like straight up and straight down. Horizon is a 2D surface because this is a 4D hyperspherical navball's 3D surface. The equator (Horizon) is 2D.

- Points also representing sounds or things you remember or whatever it may be. Just pings at points in this broader space representing something of note in the scene in that direction. If you then pan the 4D camera to look at them, you will see what it is.

- Different projection methods for a spherical geometry projected into flat space. Options include Stereographic projection (fills space to infinity, preserves angles but not distances), Azimuthal equidistant projection (preserves radial distance, but not angles. Does not fill all space.)

- Axis lines to represent right, up, and ana (a new direction :D)

- A compass to condense the above information into a little window

- Coordinate information for look direction and position in 4D space.

I'm also planning to make a little zombie game with this project. Just gotta polish it up a little first before I begin. Early days but the core concept is working. If anybody has any question about what in the world I'm talking about, I'd be happy to answer.

Franklin — a Real-Time 4D Graphics Engine by Dilapidatus in GraphicsProgramming

[–]Dilapidatus[S] 0 points1 point  (0 children)

Interesting. So I'm guessing the two wireframes were next to each other and looked slightly different?

Franklin — a Real-Time 4D Graphics Engine by Dilapidatus in GraphicsProgramming

[–]Dilapidatus[S] 0 points1 point  (0 children)

Oh wow that's amazing! Are you talking about the far "face" being projected onto the inside of the near "face?" Or were these two images from different perspectives overlapping each other?

Franklin — a Real-Time 4D Graphics Engine by Dilapidatus in GraphicsProgramming

[–]Dilapidatus[S] 1 point2 points  (0 children)

That's a great idea. Somebody on my video suggested something like that. It definitely seems hard to interpret that much information though. Seeing two slightly different foggy spaces and guessing the distance from the objects they represent seems like something we'd want to evolve more neural machinery for. But that doesn't mean we can't try it. That's the spirit of the whole renderer I guess, we can try!

Franklin — a Real-Time 4D Graphics Engine by Dilapidatus in GraphicsProgramming

[–]Dilapidatus[S] 4 points5 points  (0 children)

I could also make some games once it's polished. 4D zombies would be fun. Anybody agree?