3D rendering in my UI for a Map

I’d like to have a 3D map similar to Metroid Prime.

I watched tutorial videos on creating an inventory menu with UMG so I’m ready for 2D interfaces. However I’m not entirely sure how to render meshes in the UI with its own camera separate from the world. I basically want to render static meshes with different colors and let the player pan around in the map using directional controls.


Here’s a screenshot of System Shock 2 and how it has its map open while the game is playing. I’m hoping to bring up a menu like this while the game is running and let it have its own 3D interface.

This would also be great for my inventory so I can just render an item’s mesh instead of trying to use a texture.

I suppose if this isn’t doable without a huge headache I’ll go for full screen maps and inventory instead like Deus Ex Human Revolution.

You can use a render target to take what a camera is seeing and make a 2d texture out of it. You can then use that as an image in UMG. So, you’d set up a part of your level that has its own camera and use that for your 3d elements. Then use the render target to place those elements in your HUD. Am I making sense? It’s late or I’d bang out an example… Let me know if you have any questions and I’ll try and answer them…


I was thinking about doing something like that.

When I had my own engine I’d render my scene. Then on top of that I’d set up a camera with a different 3D projection in ortho view and render some 3D objects in the HUD in a totally different coordinate space without those objects even being in my level.

I’ve seen some code related to setting up a 3D scene when the editor draws 3D thumbnails for things. Maybe I can set up a temporary scene separate from my level for my map and render some static meshes there into a render buffer. And it would be kind of cool to do the same for 3d objects in my inventory.

Separate camera would work fine, but I don’t think ortho view works for them yet.

Hopefully it’s not hard to change that. It’s just a matrix. It may be a matter of modifying the engine structure to let me customize the projection matrix of a camera.

Yeah, its not like you can’t get the source and do it yourself :slight_smile:
My how times have changed.

I might be able to create a second UWorld for rendering the map. I wonder how well this will go. Sounds really complicated. I might have to give up and settle for doing it in the same world heh.

Looking at WorldThumbnailRenderer.cpp for some examples.

There was a UMG widget that did just that - not sure if its in 4.7.
It allowed you to create a pocket world to render stuff in.
Have a look to see if there is a viewport widget or similar.

I wasn’t able to find such a widget yet, neither in Slate nor in UMG.

It should be possible to have a slate render target that renders from some world like in the editor. I can try waiting until the UMG widget is done, or just render the map geometry right in the world. I had some ideas like having the map actor move around by listening to WorldBoundsChange from the current UWorld’s persistent level. And make the map actor not contribute to world bounds.

There is something called UViewport (UMG/Public/Components/Viewport.h) that allows you to build and render a preview scene like the ones used in the editor. Unfortunately it’s marked as “experimental” and does not show up in the editor. I don’t think it completely works yet (hence the experimental tag) but you might be able to use the code as a base for your own 3D viewer.

I’ll probably just wait for that then. My game isn’t coming out any time soon and it’s easier to just wait for that.