Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question How can I get volumetric lighting in a specific shape without using global fog?

Discussion in 'High Definition Render Pipeline' started by fureniku_unity, Aug 21, 2023.

  1. fureniku_unity

    fureniku_unity

    Joined:
    Jan 10, 2019
    Posts:
    1
    As per the title really!

    My game has gravity lifts to navigate around the map, and I want them to have a similar "glow" to the ones in Halo. I've got some other VFX working; a particle system and a shader to give some visual distortion, but I can't figure out a good way to get this glow effect. Image to show what I mean:

    upload_2023-8-21_11-35-12.png
    Halo Infinite. Ignore the particle lines! It's just the main glow I'm after

    So I'm not the best at VFX and I'm very much doing this as a spare time learning project. But to me, this looks like illuminated volumetric fog of some kind - it's got a density to it so its not just a cylinder but does follow a cylindrical shape.

    Within Unity the closest I've managed to get is using a square-shaped fog, with cone spotlights or circular point lights. On top of that, my entire scene is a space ship which can navigate around space, so I don't want any global fog as it'd make the outside views very odd.

    Does anyone have any ideas how I can achieve this kind of effect? I'm open to most ideas if another approach entirely might be better.
     
  2. cLick1338

    cLick1338

    Joined:
    Feb 23, 2017
    Posts:
    74
    You could use Local Volumetric Fog (Right click hierarchy -> Rendering). However I think it would be overkill (would need pretty high fog quality settings) and still tricky to achieve that exact look.

    You could also dip your toes into Shadergraph and replicate the exact technique they use in Halo, which I'm guessing is a relatively simple shader slapped onto a cylindrical mesh. You can poke around and piece together parts from shader graph (volumetric) fog tutorials etc, but before that try hooking up a fresnel node to the opacity.
     
    Last edited: Aug 22, 2023
  3. nehvaleem

    nehvaleem

    Joined:
    Dec 13, 2012
    Posts:
    390
    maybe this could help:
     
  4. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    543

    If you didn't want to go the VFX route but still see if you can use a global vol fog that doesn't change or add a perceived atmosphere to space, you might still be able to achieve it using it.

    You could still use a global fog with a max distance set to your camera clipping and your density set to something like 10,000, you'll likely clip before hitting the threshold so what remains is a much longer distance of extremely subtle global vol fog, which might not ever be perceived easily.

    You can then add a local fog volumes as a rectangle over your light source set the density of that as a lower value ( in meters) and you should get the local effect), then you just need to shape your lights and the local volume fog and set both their max distances and fades and you might have a pretty good reusable prefab going on.

    Otherwise you would indeed have to create some kind of fake mist/fog VFX and turn off Volumetrics all together for your project, for some added resources too.