HNHacker News
TopNewBestAskShowJobs

ktstephano

212 karma · joined March 29, 2023

submissionscomments
ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
I think this part of the cascade shadow map generation could be improved. Luckily the stuff closest to the camera looks correct, but distant stuff does look off until you get closer and higher resolution pops in.

In the future I'll probably do something similar to what you mentioned and have the cascades use the LODs selected for the main view.

ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
I would say a big part was that I was very interested in the project so even when parts of it were difficult to figure out I kept wanting to come back to it.

The other was breaks. I didn't do this all in one stretch and instead did it in small chunks over time. I wasn't trying to ship a final game or finish as quickly as possible so the time scale was very relaxed.

Then the last was to make sure the process stayed as enjoyable as possible. If I was getting stuck on a problem or if a particular path really didn't seem to be working, I preferred to either take a break from the problem and come back later or find new sources that helped me see if in a different way (or both).

ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
I decided to add the video link to the readme after you brought this up. Maybe it's better to have it for anyone who prefers it.
ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
Thanks! It was pretty fun but also difficult and definitely a learning experience.
ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
The demo scenes were all from what is in the Examples/ folder. I am working on getting the 3D assets hosted somewhere (some people made some suggestions in this thread I am going to try) and once that is done people will be able to render all the demo scenes locally. All the assets are either from graphics research samples such as Sponza or Bistro or they were CC licensed on a different site such as Sketchfab. I would have tried Quixel Megascans too but I think you have to buy a subscription.

"Even if that’s the case, is there a huge amount of work to integrate existing models/scenes into your engine?"

It uses the Assimp library which allows it to support things like .obj, .fbx and .gltf. Usually what I do is export from Blender to gltf and ask it to export the textures separately rather than pack them into the binary. Most assets that were designed with metallic-roughness in mind either work immediately or with minimal changes. In my own testing the most frequent things I had to change were if normal maps were inverted (fix by flipping the green channel in photoshop) or if the model exporter set all the metallic values to maximum due to missing data (fix by loading the metallic or metallic-roughness maps in photoshop and flipping metallic channel from max to 0).

ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
Hey cool I'm surprised you found it. With the latest engine version I switched to using static images since it's a lot easier for people to quickly look through. Some improvements have been made since the video and I want to redo it once better image smoothing has been implemented.

And yes! The video was captured in real time on an Nvidia GTX 1060.

ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
I only recently learned about the MPL and I'm a fan. It seems to be a really nice alternative to GPLv3 and LGPL and offers a lot of convenience while still being copyleft.
ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
Ah ok that's interesting. I'll need to convert the current images to another format and reupload.
ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
You know it actually might be. Three big things it requires are Multi-Draw Indirect (looks to be available in 4.3), shader storage buffers (looks like it's also available in 4.3) and compute shaders which 4.3 should have too.

I don't know much about WebGL2 - do you happen to know if dropping the requirement to GL 4.3 would be enough to make it compatible with WebGL2?

ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
Thanks! For resources the most helpful were the OpenGL Superbible, learnopengl.com, Foundations of Game Engine Development Volumes 1&2 and the 3D Graphics Rendering Cookbook. Then there were also a lot of web sources that were very helpful such as the Google Filament PBR paper and some realtime rendering presentations from other developers.
ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
Thanks! I've been thinking about contributing to either Godot or Blender. I'm a big fan of both.
ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
Hopefully it helps! More engine documents are something I need to add to my todo list so that they can help the code be more understandable.
ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
Thanks!
ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
Thanks!
ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
Yeah most of that comes from the current implementation of basic transparency which just uses a sort of punch through method without any smoothing. Even though it's basic it allows for surfaces to be blended together in a deferred pipeline (Intel Sponza has a surprising amount of this) but it adds to the dithered look you mentioned. In future versions I'm going to remove it in favor of true order independent transparency. And you're right that it does add to visual instability with its current form. I think there are a few things I can do to help it before just switching over to order independent so I'll mess around with that.

Right now it's using fast-approximate anti aliasing for its AA method but overall even though it's better than nothing it's definitely not good enough especially in motion. I'm going to keep FXAA as a togglable option but I want to add in TAA/TSSAA which look like they handle AA in motion much better.

ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
Yeah I think as far as the future goes, removing the dependency on OpenGL 4.6 and adopting Vulkan is the best way to go and needs to be near the top of the priority list (maybe even very top). It would allow MacOS, Linux and Windows to all have a similar experience.

Then for the performance on weaker hardware... yeah this is something I've mostly neglected for now. All my testing has been on a desktop Nvidia GTX 1060 where performance is currently pretty good there.

One option would be for me to add fallbacks that remove reliance on certain realtime features (such as realtime GI) and allow for baked solutions. My initial goal was to avoid all baked solutions and only target realtime everything, but now I feel I need to cycle back and add in other options on top of what's there.

ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
I don't really know what to feel about the current wave of AI/machine learning. It's been moving very fast and I don't think we've seen the end of the story as far as copyright concerns go.

For this project I felt like weak copyleft MPL 2.0 was a nice balance sitting in between strong copyleft GPLv3 and no restriction MIT.

ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
Thanks!
ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
Thanks!
ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
Glad you like it!
ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
Currently all GI is handled using virtual point lights but SSGI is something I would like to add as a complementary method. I want to say that Godot does something like that where they have a heavyweight solution and couple it with SSGI to enhance it.
ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
I'll look into both of those. I've been trying to figure out a way to move away from using GitHub as storage for images and 3D assets and one of those might be the answer.
ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
Thanks! In most of the demo scenes it can get 60+ fps at 900p and 1080p on an Nvidia GTX 1060. That's currently the only hardware I can test it on. On more difficult scenes from the demos I can generally get 30-45 fps.

Its backend only supports OpenGL right now. I think for a long term goal migrating to Vulkan would be a great option since it would unlock MacOS while still allowing Windows and Linux to run it.

ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
That's something I'm trying to figure out. I had an earlier version of the readme that had one, but I ran into an old issue where GitHub complains that the repo is over its storage quota. Even after downscaling the image to less than 1mb it still complained so I think I have an issue leftover from an older version of the codebase (I used to store demo assets in the repo).
ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
That's a good idea. Later today I'll draft up a new readme with this information. I think it would also be good to reiterate it in the posts I have about the engine so I'll add it there too.
ktstephano··on Show HN: StratusGFX, my open-source real-time 3D rendering engine
Hi, thanks! I've been interested in the low level tech behind engines for a while and liked experimenting with things I watched or read about. For some reason a couple years ago my focus kind of narrowed in on realtime 3D graphics as an area I really liked but didn't know much about. It was amazing to see what people were accomplishing in games year after year (still amazing to me). Eventually this interest became strong enough that I decided to try and see if I could learn how to emulate some of the modern techniques that the games were using. This morphed into the StratusGFX project over time.

It's been fun but slow and also very difficult. Global illumination was especially hard and had a few false starts.

ktstephano··on StratusGFX: An open source 3D rendering engine I wrote with C++17 and OpenGL 4.6
Today I was able to open source StratusGFX. I have been working on it for a while as a hobby research project to learn about modern engine and graphics programming.

It is built using C++17 and OpenGL 4.6. You can find a feature reel here:

https://ktstephano.github.io/rendering/stratusgfx/feature_re...

Here are some of its current graphics and engine features:

-> Physically based metallic-roughness pipeline

-> Realtime global illumination

-> Raymarched volumetric lighting and shadowing

-> Cascaded shadow mapping

-> Deferred lighting

-> Mesh LOD generation and selection

-> GPU Frustum Culling

-> Screen Space Ambient Occlusion (SSAO)

-> Filmic tonemapping

-> Fog

-> Bloom

-> Fast Approximate Anti-Aliasing (FXAA)

-> Pool allocators

-> Multi threaded utilities

-> Concurrent hash map

-> Entity-Component System (ECS)

-> Logging