Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

HDRP Density Volume Mask Texture?

Discussion in 'Graphics Experimental Previews' started by tryptic, Aug 3, 2019.

  1. tryptic

    tryptic

    Joined:
    Nov 13, 2012
    Posts:
    55
    I have volume lighting working in my scene and I'd like to break it up with some noise. The density mask texture for the volume seems like it was made for this, and I feel I've created the Texture3D asset correctly, but I'm not seeing any effect on the lighting. Has anyone been able to make this work? Thanks!
     
  2. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I've seen it working a long time ago, with much earlier versions of HDRP & Unity. Since then I hacked the system to use a live 3D rendertexture instead, so I am out of date as to the state of the default system.

    If you are happy to share the 3D texture you tried, along with saying what version of Unity & HDRP you are using, I would be happy to try. And I can then share a small test project with it working for you.
     
  3. tryptic

    tryptic

    Joined:
    Nov 13, 2012
    Posts:
    55
    Thank you for your reply. Attached is a texture3d asset I converted from a grayscale 1024x32 image using unity's Density Volume Texture Tool set to 32 slices. I'm using Unity 2019.1.11f1 and HDRP 5.7.2.
     

    Attached Files:

    Orrib likes this.
  4. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Hi,

    That texture is the problem. Here are import settings to use for the 2D texture, before generating the 3D texture, including Alpha Source set to 'From Gray Scale' which I believe is not mentioned in the HDRP docs.

    ImportSettings.PNG

    Also the final effect can be a bit hard to spot if not animated, so I recommend setting the Fog Distance to something very low like 1, and set one of the scroll speed values in the density volume to something so you can see movement when you find a texture that works.
     
    tryptic likes this.
  5. tryptic

    tryptic

    Joined:
    Nov 13, 2012
    Posts:
    55
    Thanks for that catch! I had set those before, but in all the different iterations & test images I missed it on that one. Much appreciated, -H
     
    elbows likes this.