ClioSport.net

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

  • When you purchase through links on our site, we may earn an affiliate commission. Read more here.

Home Coding/Software Projects

I think this has so many potential applications.

I know this will probably change but I really like the paper map overlay:
View attachment 1806326

Add some route planning :love:

The paper map overlay is purely a "happy result" of fusing Ordnance Survey OpenMap - Local data with high-resolution terrain data. The map imagery is shaded dynamically in real-time by the sunlight, resulting in the effect.
 
I decided to completely rewrite Project OPFRAME's rendering engine. 🫣 That is basically what I have been doing over the last couple of weeks. Before I go into a bit more detail, here is another development video drop (the last one to use the "old" rendering tech)...



So yeah, I decided to modernise the renderer. I love this s**t. I wish someone would pay me to do it professionally.

Lengthy read incoming...

For most of its life so far (up until I decided to change it up), OPFRAME has drawn its 3D view with what's called a forward renderer. It's the straightforward way to do it. You draw each object, and as you draw it you work out exactly what colour every pixel of it should be. For the terrain, that means working out the sun, the light from the sky, the shadows and the haze between the camera and the ground all at once, then writing the finished colour to the screen. The buildings do the same, then the trees, and so on. It works, and it's easy to reason about, but it has two problems that got worse as the scene filled up.

The first is wasted effort. When a tree stands in front of a hillside, the hill's pixels behind it have already been fully lit and hazed, only for the tree to be drawn over the top. With thousands of trees, buildings and models layered over one another, a good share of the graphics card's time went on lighting pixels nobody would ever see. The second problem matters more, though it's less obvious. Once a forward pass has written its colour, everything it knew about the surface is thrown away: which way it faced, what colour it was before it was lit, how far away it was. Nothing later in the frame can go back and light it again. That rules out a lot of what modern renderers rely on. One example is ambient occlusion, the soft darkening in corners and where things meet the ground. Another is anti-aliasing that blends several frames together (temporal anti-aliasing). A third is upscalers like DLSS and FSR.

Deferred rendering splits the job in two. In the first step, objects don't work out their lighting at all. Each one just writes down the "facts" about its surface into a set of screen-sized images called the G-buffer (G for geometry). One image holds the plain colour, another which way the surface faces, another how rough or metallic it is (PBR textures/workflow), and the depth sits alongside them. If something is drawn over the top, its facts simply replace the ones underneath, which is cheap. Then a single pass runs once over the whole screen, reads those facts for each pixel and lights it. Every pixel is lit exactly once, however many things are stacked in front of one another. Expensive work like the haze is paid for once per pixel rather than once for every object that happened to cover it.

Because the surface information is still there after everything has been drawn, the other features I wanted followed quite quickly. Ambient occlusion now reads the depth and the facing of each surface and darkens whatever is tucked away from the sky. Temporal anti-aliasing (yup, implemented my own version of this too) nudges the camera by a fraction of a pixel each frame and blends the results, which smooths the jagged edges on rooftops and trees far better than before. It also opens the door to adding an upscaler later on (if I go down that route)...

Lights are where forward+ comes in. The sun is easy, but a town at night has hundreds of street lights, and checking every light against every pixel would be hopeless. So each frame the screen is cut into tiles, and the distance from the camera is cut into slices, which makes a grid of small boxes called clusters. Each light is listed only in the boxes it can actually reach, so when a pixel is lit it only has to look at the few lights in its own box. The weak spot of deferred rendering is anything you can see through, like glass or a vehicle's windows, because the G-buffer only holds one surface per pixel. Those are still drawn the old forward way, after everything else, but they read the same cluster lists, so a street lamp lights a window just as it lights the wall behind it. That mix of forward drawing and clustered lights is what's meant by forward+.

It isn't free! The G-buffer takes ~126 MB of video memory on a 3440×1440 screen (~206 MB at 4K), and a few things, like the map's overlays, need care while the image is being nudged around for the anti-aliasing. But it's the foundation nearly every modern engine is built on. It's let me add what would have been awkward or impossible before.

That was a lot of text so here are a few images.

This first image is what the G-buffer looks like. 15 screen-sized buffers are built each frame to capture the required information in order to calculate the final rendered image. A lot goes on behind the scenes before something gets presented on screen!

g-buffer.webp


As you can see from the G-buffer image, I have added 3D model loading (with PBR support of course). A few more examples...

OPFRAME 2026-11-30 02-26-45 5120x2878.webp

OPFRAME 2026-11-30 02-47-25 5120x2878.webp

OPFRAME 2026-11-30 02-58-41 5120x2878.webp


I have also been continuing the work on procedural content generation...

OPFRAME 2026-11-30 02-37-06 5120x2878.webp


Looking inland over Swansea (by day).

OPFRAME 2026-11-30 02-39-30 5120x2878.webp


Looking inland over Swansea (by night). Each light is a real-time/dynamic light which has been made possible with moving to deferred rendering with the G-buffer.

Shout up if you want to know more about the temporal anti-aliasing, or ambient occluison, or whatever. Fascinating stuff. LOL! :p:ROFLMAO:
 
App Store link

My brother and I (more so him tbh) made this, more as a marketing tool for selling the R129 bits. Need for speed underground 2 vibes through the Tokyo loop.

Started as a garage section to chose the various things we sell and showing how the air management works and then on ti to a full game. 5 levels, for Mac and iOS, can use your Xbox controller on either too. It’s taken us a silly amount of time.

100% the most fun project I’ve done in a while!

My favourite level is the two G wagons trying to get you at a standstill, they’re proper c***s.

Regular traffic is Figaros, supras, W124s 🤣

4minute 25sec is my quickest lap so far…


IMG_0948.webp
IMG_0851.webp
 
I was working on fixing the g-buffer rendering code for Project OPFRAME earlier and the atmospheric light scattering algorithm gave me an idea for a solution for a long-standing bug I have been trying to work through with my path tracing project. In short, I could never quite get subsurface scattering to work properly and would end up hacking something to approximate the effect I was after. However, finally, I have figured it out (and fixed a few mistakes) and my path tracer now has "random walk" subsurface scattering.

Subsurface scattering simulates the light phenomena where light rays penetrate a surface, bounce around under the surface for a while (to some depth) and then exit. It is the sort of thing you see when you shine a torch through your hand/fingers; you see the red glow of light where some of it is getting through after being bounced around under your skin for a while. Or light "through" someone's ears when they have a strong light source behind them. It can add a layer of realism to a rendered image (at computational cost, especially in real time).

Here's an example - three cylinders given a rough material and subsurface scattering properties, to simulate a wax-like material.

SIPT2_20261201_175313_3440x1440_s9416.webp


Here's another example. The left half of the image is without subsurface scattering and the right half is my new implementation (slightly exaggerated for effect).

SIPT2_20261201_sss_compare01.webp


It also works across material types, jade for example.

SIPT2_20261201_193922_1080x1350_s7451.webp


Another comparison - left without subsurface scattering and right with subsurface scattering.

SIPT2_20261201_sss_compare02.webp


Detail shot showing the effect more closely; it affects all skin surfaces but it more noticeable on the ears and nose where tissue density is thinner.

SIPT2_20261201_154941_3440x1440_s2333.webp
 
@SharkyUK I have a silly c++ question if you dont mind 😬

Is there any reason other than 'clarity' to explicitly declare a destructor noexcept?

C++:
~DocumentSession() noexcept;

It's not a silly question at all mate, but it is quite nuanced!!! :ROFLMAO:

Firstly, as far as I am aware, destructors are "noexcept" by default.

So...
C++:
~DocumentSession() noexcept;
and
C++:
~DocumentSession();
are equivalent.

How far down the rabbit hole do you want to go here? :ROFLMAO:

noexcept effectively promises that no exception will leave the function, and the compiler does not check this; so you can still call throwing code inside it. However, the difference is in what happens if the promise is broken. Should an exception try to leave a noexcept function (or this destructor), std::terminate() is called. The stack may or may not be unwound first, but it is implementation-defined - often it is not.

For a "regular" non-template class - whose members all have normal destructors - the keyword is redundant (other than documenting the intent). The actual value of using it here is that it forces nothrow destruction instead of letting the compiler deduce it from members. You would use it when you want that guarantee to hold (no matter what members or template arguments are involved).

I can go a bit deeper if needs be? I haven't said that for a while... :ROFLMAO:🫣
 
I don't know if there are many coders/programmers/software engineers on here but I thought I'd stick up a thread where said people might be interested in sharing stuff they are working on at home. I have seen similar threads on other forums and thought I'd try it here.

Anyone? Anything interesting to share? Any tech stack goes, projects big or small. (y)





I'll kick things off with a project I started on a month or two ago. With time currently on my hands I decided to make a prototype framework and application for command and control, tactical/mission planning, wargaming, modelling & simulation, situational awareness, and some other bits. It's a very early prototype and - naturally - I started on the fun bit (the renderer) once I had laid down the architecture for the core system.

It's a Windows desktop application and the application framework is C# (.NET10) and the UI uses WinUI3 (WindowsAppSDK). Everything else (rendering, streaming, geo-processing, entity processing, etc.) is C++ for optimal performance.

The 3D (and 2D) map views are fully and accurately geo-located, support various projects/datums and ellipsoid model conversions, and render on a dedicated render thread (so as not to block the UI and/or worker threads). It runs a DirectX12 renderer at present, although the system will be renderer agnostic. I have a Vulkan renderer in the pipeline but that will take a little while because Vulkan is a pain in the ass. The renderer supports map data layering and elevation data layering. I also implemented atmospheric scattering and aerial perspective to model atmosphere/particulate interaction; basically to make things look pretty. As the sun moves through the sky, it creates nice sunsets and sunrises as we see courtesy of real-world phenomena.

55561858746_d07b460f7e_o.jpg


55562258610_aaededafc4_o.jpg


I inadvertently ended up with a full planet renderer! :ROFLMAO: I can fly from outer space down to the ground with millimetre accuracy (although the rendered view fidelity very much depends on the resolution of the layered map and elevation data available). Map data (elevation and imagery) is streamed on demand and intelligently cached. The streaming, loading, and conversion of data is handled by separate worker threads that do not impact on the renderer or UI threads. Once the workers have prepared the data, they make it available for consumption by the renderer/GPU. All this is done with balancing and level-of-detail taken into account.

55562019969_e80c8027a0_o.jpg


55562258600_45f6d19628_o.jpg


I have a coarse worldwide data set in use for elevation data and imagery, but higher fidelity data sets for the UK. At present, I am using ~1m per pixel resolution LIDAR derived elevation data across the UK, and various imagery sets of different resolutions draped over the terrain (down to 1m street level in some cases). I am limited to what is freely available in the public domain.

The renderer can happily handle hundreds of thousands of entities displayed on the map, although that many is overkill in terms of real world use.

55560838707_6a6ae1936e_o.jpg


55561961603_058a0542bc_o.jpg


More recently, I have started to add the text/glyph rendering. A vector font is rendered into a high-resolution bitmap mask and a distance field computed. I can then render text/glyphs using a signed distance field texture on the GPU.

55565482753_3850257587_o.jpg


55565783835_8c022ce39a_o.jpg


Performance is solid and the technique keeps vector-like edges nice and crisp and text anti-aliased at arbitrary scales.

The prototype is designed so as not to be reliant on an Internet connection, and needs to be quickly deployable, scalable and flexible. Right now I am keeping everything running within an ~8ms frame time (120 FPS) but don't expect that to remain the case.

EDIT: All the APP-6 symbols are correctly built and rendered based on NATO Joint Military Symbology standards.
Put this on LinkedIn mate - reckon you could get some interested eyeballs on it for sure.
 
Put this on LinkedIn mate - reckon you could get some interested eyeballs on it for sure.

It has been on there for months buddy (development video drops). About 8 useful comments, and 27 (yep, twenty-seven) scam connections. :cry: The problem is, my security clearance has now lapsed and defence roles seemingly want active clearance. It's a catch-22. I'm basically f**ked.
 
Building somethings the easy part unfortunately you need to be really good at sales/networking to make it go anywhere especially in defence where it's all about greasing palms and who you know.

Its a saturated industry tho everyone seems to have they're own "3D platform" at the minute, most of them terrible.
 
@SharkyUK Thank you mate that's plenty helpful!
I'm currently working on the architecture for my b-rep kernel and starting with a simplified document system, a 'KernelContext' is first created then a part document is created associated with the context. It's the assembly and occurrences (both part and assembly) to work out now.
 
Back
Top