Thanks Nick, was hoping you’d see this thread.
The second idea of faking everything is what I was leaning towards. While it’s probably more computationally expensive, it’s definitely more flexible and portable, since I don’t have to set up a second level and render targets etc, which could also be more pricey. A self-containing system is more what I’m looking for. I’d much rather be able to drop myself into a blank map and have the Radar working regardless of the mas setup.
This is a screenshot of the Radar I’m trying to emulate below. The wireframe part is a map of the surrounding terrain, which is easy enough to fake, since I can probe the local terrain, create a list of points that use the same faked 3D transform system and use the Line Batcher to draw lines between them. (Much easier to write that than do it of course). It’s all ‘procedural’ so I can generate and transform it as I like, that works fine.
The white ‘lines’ you can see are either the objects height from the terrain beneath it, with the two angled lines representing the players field of view (so they can tell what’s behind/in front of them etc.)
The same is true to the Sprites. I currently have a UWidget* class, which is a sub-class of the UImage, but it ticks. All it’s doing is constantly reducing it’s opacity, updating it’s location and checking what colour it should be and whether it’s visible or not (based on Team / allegiance etc). No idea how this will hold up with several hundred objects in the world, but I’ll just have to wait and find out. Transforming those however should again be easy.
Not the foggiest idea how to handle the arrows at the edge of the radar yet. That’ll have to come later…
The tricky part is the mesh that acts as the compass and forms the base of the radar. In the original game, that is literally a mesh rendered on screen with a specific transform, and what is essentially an ‘emissive’ material. There’s no lighting or anything, it’s just a mesh with a texture applied. Looking through Slate, I can’t find anything that would allow me to load a mesh, then tilt it and re-project the pixels or vertices into screen space and still draw it as a mesh. There’s a ‘Viewport’ class and a couple of others that look interesting, even some stuff on projection matrices, but I’m not sure if that’s what I’m looking for.
The mesh itself rotates (yaws) to stay aligned like a compass, along with all objects on the Radar. Would it perhaps be possible to create a texture, then distort that texture via UV’s, to make it ‘look’ at if it’s a 3D object that spins on one axis? If so, all of that could be done in the material and the rotation driven by a single parameter. That’s probably a question more for Ryan or Daniel… Just wondering if that might be a possibility.