Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Question Sprite sheet/flipbook ao masking or similar

Discussion in 'Universal Render Pipeline' started by skuli_unity, Jun 1, 2023.

  1. skuli_unity

    skuli_unity

    Joined:
    Jun 1, 2023
    Posts:
    1
    Hello!

    I'm looking for ways to blend or fade-out the alpha channel of a sprite-sheet as it comes into close proximity of 3D objects.

    I've created this situation in Blender to illustrate what I mean:

    I've created this flipbook/spritesheet of a soft cloud loop.
    When a 3D object goes through the sprite it hard clips it creating this hard line, as one would expect.

    upload_2023-6-1_10-58-9.png

    In Blender I go into the Shader nodes for the sprite-sheet and add an Ambient Occlusion node which I blend with the original alpha layer of the sprite-sheet. This ambient occlusion node then takes into account the proximity of other objects in the scene and adds a gradient value (black for transparent) where they intersect. This small gradient fade-out results in the 2D sprite cloud not clipping and looking so much better.

    upload_2023-6-1_11-0-27.png

    My project is based in URP and has a few restrictions that I hope won't hinder this.
    So I ask, what are the options here to achieve this effect in URP?