Home Unreal Engine

Help! I need realistic lights, IN SPACE, from far away! [UE4]

polycounter lvl 3
Offline / Send Message
TheAxiom polycounter lvl 3
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

  • Vailias
    Options
    Offline / Send Message
    Vailias polycounter lvl 18
    hmm. Well bloom and lensflare are artifacts of the optics being used to observe the scene, so they'd still be a thing depending on what you're looking through. :)

    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. 
  • TheAxiom
    Options
    Offline / Send Message
    TheAxiom polycounter lvl 3
    Vailias said:
    hmm. Well bloom and lensflare are artifacts of the optics being used to observe the scene, so they'd still be a thing depending on what you're looking through. :)

    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. 
    Thanks I'll look in to this. Lens flare is an artefact created by cameras and in our future, 200 years from now, we're assuming cameras will have found ways of removing it. Bloom is more an atmospheric thing too, there's a reason stars don't glow or have bloom when you're floating around in space, there's no atmosphere in space. There is lens dirt though which could cause some artefacts.
  • Cay
    Options
    Offline / Send Message
    Cay polycounter lvl 5
    Be it realistic or not.. I'd certainly not ditch all the post processing. It can enhance the look quite a bit if used right. If you go for total realism.. things might be quite boring.
Sign In or Register to comment.