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

SharkyUK

ClioSport Club Member
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.
 
Very nice! Sun cast shadows and atmosphere look amazing.

What do you think will take up most of the frame time with further development?

Thank you mate. (y)

I think it's more a case of the underlying hardware. I am developing and running this on my RTX 5090 (ROG Astral OC) with 128GB of quad channel RAM, which is not going to be typical of the target hardware upon which it would likely to be deployed. This is largely theoretical at present, of course, I don't have a client or project lined up for this!

I have various features planned that can become pretty heavy at scale, and would easily cause the 5090 to exceed the 8ms frame time for sure! For example, some of the features require line-of-sight and sensor range sweeps, real-time generation of areas of influence or effect, that sort of thing. Or real-time visualisation of sensor range of radio nets and optimising Tx/Rx stations for best coverage, based on whether or not they can see each other. I would like to try and offload as much as I can to the GPU but, at some point, there will be CPU <-> GPU transfer of data that will need keeping in check. I have various ideas to explore here so it will be fun experimenting if nothing else.

For rendering, the current symbols are quite cheap as they are instanced geometry. As are the glyphs and text rendering. They scale comfortably into the thousands and tens of thousands. Or hundreds of thousands and 1 million plus on my 5090! 🫣 However, the symbols are only one of the possible representations of an entity or unit (or aggregation of entities). I have preliminary support for full 3D objects (non-animated at present, no need to make this a game engine just yet!) which can be rendered at real-world scale if needed, and accurately geo-located.

I just have to be careful to stop myself from turning this into another heavily-focused rendering project! 🫣:ROFLMAO:
 
Back
Top