Alrighty, so I'm working on a hard science space sim in UE4 and we're trying to figure out how to create super realistic, small and tight lights that can be seen from up close AND far away. Now, we don't want any fancy bloom or lens flare. We don't expect that will be much of a thing in 200 years.
Firstly, we tried using emissives but they vanish after a few meters or so because there are no longer pixels to render them, and in space there's nothing blocking light for miles.
Secondly, we tried scalable sprites that get bigger over time, but our tech artist told me this is a problem, especially when you have thousands of them rendering at once all having to scale individually, even on moving objects. It was insanely difficult to get a consistent size with this too.
So, any ideas? We want thin, tight lights that can be seen from miles away that do not have bloom or lens flare. Though we do want a little bloom in our scene.
Replies
Also, remember the visibility of a lightsource does diminish with distance, even without any blocking medium. The whole inverse square distance energy distribution thing. So you're going to eventually get invisible lights at distance, even in space, unless they're incredibly bright.
However if this is a specific aesthetic you're wanting to pursue, I think you might actually be on to something with the sprite approach. GTA 5 did something like that for all the distant headlights and whatnot: http://www.adriancourreges.com/blog/2015/11/02/gta-v-graphics-study-part-2/
What you might do is attach a number of sprites, to the ship models at their light emitting areas via blueprint. ideally you'll only have a few separate textures for the light emitters (like round, square, long and thin)
Fade the sprites in with distance from the ship. don't scale them, but set up your textures to have a large built in blur or bloom in them. Set up the shader to use more of that bloom range the further you go.
For a grey scale texture you can do this by:
Clamp(lowEndValue+(original*(1-lowEndValue))
This way you'll always have the white value be white, but you can remap the range of values in the image to include more or less grey. If you tie lowEndvalue in the above equation to a shader parameter and adjust that value via blueprint you should get some window sprites that can scale fairly efficiently even in large numbers. Particularly if you add them as instanced geometry.