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

Resolved Do decals work on skinned meshes with VFX graph?

Discussion in 'Visual Effect Graph' started by sacb0y, May 3, 2024.

  1. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    1,001


    This video shows a demo of projecting decals from particle collision.

    Is it possible for this to work with skinned meshes? Like for blood or bullet holes?
     
  2. Marie_G

    Marie_G

    Unity Technologies

    Joined:
    Mar 9, 2021
    Posts:
    79
    Hello,
    It should work as long as "Receive decals" is enabled on the skinned mesh's materials, and the decals are correctly enabled in the HDRP settings.
     
    sacb0y likes this.
  3. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    1,001
    Do they stick to the body?

    Also does this work in Unity 6 URP?
     
  4. Marie_G

    Marie_G

    Unity Technologies

    Joined:
    Mar 9, 2021
    Posts:
    79
    If the position of the decals particles is set using a skinned mesh sampling and binded to the desired skinned mesh vertices, then it will stick to the body. Otherwise the decal will be only visible on the objects that are at the same position than the particle, so if the skinned mesh moves but not the particles because it's not linked, the decal will not be on the skinned mesh anymore.

    Yes it works on unity 6 URP :)
     
    sacb0y likes this.
  5. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    1,001
    Awesome! Looking forward to trying this!
     
    Marie_G likes this.
  6. OrsonFavrel

    OrsonFavrel

    Unity Technologies

    Joined:
    Jul 25, 2022
    Posts:
    229
    I will add that you have a VFXGraph example with Particle Decals sticking to an animated SkinnedMesh in the new Learning Sample package in Unity 6.

    1. import the package
    2. open the scene (either the URP or HDRP scene depending on your project)
    3. Naviguate until you find the Decal Particles example.
    4. Press the Play Button.
    5. Don't hesitate to open the VFXGraph asset to see how it has been made and the comments/notes inside it.
    More instructions regarding this Learning sample package (how to install, how to use, etc..) can be found on this page
    Unity_23bIUytQfU.gif

    I hope this will help, and don't hesitate to share your results.
     
    pierre92nicot, sacb0y and Marie_G like this.