An attempt to fix lighting/brightness on an Orthographic projection. (Very circumstantial solution to using an Orthographic projection for a minimap.)

Hello, everyone!

I have never made a post to the Unreal Engine forums before, but I have visited this site many times in search of answers to all sorts of problems. As a forewarning, I heartily apologize if this post is misleading and does not harbor the solution to your problem, but I do hope that you read it, and maybe it will give you an idea of how you might go about fixing an issue with lighting or brightness in an Orthographic projection at runtime.

Before continuing, I must note that the issues with lighting and an Orthographic projection are long-running. This solution does not allow for the Orthographic projection to see lights, much less shadows. This is a rather circumstantial fix to a rather circumstantial problem. I hope this transparency will save some users some time, and perhaps it will help others with similar problems to mine.

I am a college student that has been working with a computer science professor on a game created using Unreal Engine 4. I have played plenty of games that use this engine, but I had never worked with it until just a few months ago. (I hope this manages to excuse quite a bit of ignorance on my part.)

In our game, which is a 3D third-person management game akin to Rimworld or The Sims, we have made a minimap that sees the entire map, rather than one that follows the player. We initially did have the map follow the player, but we wanted to allow players to click on the minimap and the game moves their view to the world location that corresponds to where on the minimap the clicked. This failed miserably when we had the map move along with the player. So, we had the map see the entire world (which isn’t tremendously big).

Briefly, I will share how the minimap works. It is, from what I can tell, pretty simple and conventional. There is a 2D Capture Component that sits above the world, centered perfectly (or as nearly perfect as can be) in the world. The camera saves what it sees to a Render Target, which is then put into a Material. This minimap Material is then inserted into the UI in a 256x256 Slate Unit box. As proud as I am of my endeavors to make the minimap click feature work, it is unnecessary to explain in this forum. I simply mentioned it for context.

The minimap was originally recorded in a Perspective view mode with a 90 degree FOV. This allowed for some really nice computations for centering the camera and determining how high up to put it. However, it caused some visual nastiness. If particular buildings were too tall, they would get in the way of things behind them that may have been important for the minimap to see. So, we switched the view mode to an Orthographic one. As I’m sure many of you know, Orthographic views have had lighting issues in UE4 for years. There is no clear-cut way to make them work with lighting; they simply don’t see Point Lights, and they are very awkward to deal with. As someone with only about a month-and-a-half’s worth of experience and comfort with UE4, this was extremely discouraging.

But, take heart! Based on what was mentioned by one of the comments here, if you are saving your Orthographic projection to a material, you can change the brightness of the material by simply multiplying its RGB values by some number. Of course, this solution isn’t nearly as nice as we would all like, but it works for my purposes, and it may work for yours.

Here are some screenshots of our minimap before and after changing the brightness. I apologize for the difference in quality. The darker screenshot was taken while the game was running at a higher resolution than the bright one. I promise that changing the brightness does not sacrifice quality; this is just a bad picture.
darkMinimapbrightMinimap

As I mentioned before, this solution is very circumstantial; it simply makes the map more visible, it doesn’t fix the problem of lights in an Orthographic projection, nor do shadows show. Ultimately, it is the closest thing to an unlit UI element that we have been able to achieve.

Thank you to those who read all of this, thank you. I hope some of you have found this post useful.

1 Like