Topographic Radar... Render local Landscape Wireframe in a Widget.

It is time to take on this mighty challenge. I’m hoping I can get some help from engine folk on the best way to do this. I want to create a 3D wireframe radar of the surrounding environment, and display it on the users HUD. It’s probably just as complicated as it sounds, but to give you some idea of what I’m aiming for, just check out the bottom-left of the screen in this video.

The main component of the radar is the local-terrain wireframe. My game uses landscape, and I know there’s probably a way to easily access the vertices of the terrain (if anybody knows how to do so and can save me that time, I’d appreciate it!). There are however, several issues with doing that:

  • Landscapes can have varying vertex density (I want each ‘grid’ section to measure a 10 * 10 meter space in the real-world)
  • Landscapes LOD over time, so vertices will basically vanish if the radar range is too large (might look cool, probably won’t).
  • Multiple Landscape actors can cover the same local area (overlapping landscapes, rotated landscapes would cause problems etc).

So the first and largest problem is, how do I manage to access and store a bunch of points in space, that I can use to draw lines between? The line drawing itself should be fairly simple - I can either use the Line Batcher or I can override OnPaint in a UserWidget to draw the lines. The main issue is how to draw the wireframe, and how to ensure it remains at an even density? I really want to keep this as self-contained as possible, so no off-screen render target setups or rubbish like that, it’s too convoluted.

My current idea is to make the level designer create a box or plane volume around the level that encompasses all the playable terrain. It will then (at the start of a game or when the level is opened), perform a huge amount of line-traces downward, get the position of impact and store that somewhere for the radar system to access. Problem with that approach is, it’s not very realtime-friendly and depending on level size, could have HUGE performance / loading time implications. It also won’t work if I ever want to have tunnels or caves of some kind.

So, I’m back to using Landscape vertices…

This is a pretty tough problem to be honest, so I’m looking for any kind of pointers or feedback I can get. (RyanB - where u at!).