Search Unity

Question Volumetric light shafts from box using built-in pipeline only

Discussion in 'General Graphics' started by eco_bach, Apr 12, 2021.

  1. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
  2. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,664
    You could fake it with transparent planes that have a light beam texture on them.

    Alternatively, there are various Assets on the Asset Store that do actual volumetric lighting.
    A popular one might be Aura 2.
     
  3. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    A good approximation could be writing your own "sunshafts" effect but controlling it, and setting the "sun" (AKA the source of the shafts) to be the box, in that case.

    But honestly, the easiest way to achieve a similar effect would just be a layer of emissive material on the boxes' 'floor', and a good HDR bloom effect.
     
  4. Feral_Pug

    Feral_Pug

    Joined:
    Sep 29, 2019
    Posts:
    49
    Check out sebastian lague video on youtube about making clouds. He uses a cube mesh with some 3D noise and ray marching in the shader to create volumetric clouds. I imagine the same could be done but for a shaft of light
     
  5. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,876
    If you are using standard pipeline, you can use it's standard particle shader and proper shaft texture:


    Tutorial :