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.

Question Skinned Mesh Sampling

Discussion in 'Visual Effect Graph' started by SniperED007, Mar 29, 2021.

  1. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    268
    So it's supposedly released as part of 2021.1, but I can't find any samples or documentation on it.

    @VladVNeykov can you assist.
     
  2. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    523
    Hey @SniperED007 ,

    We don't have any official samples for it yet, but I've attached something to this post to help get you started. As for the documentation, you are right, even though it landed a while ago, it doesn't look accessible from within the VFX manual page. This is the page you are probably looking for.

    Here's the small sample I mentioned, made in 2021.1.0f1.

    A few potential things to watch out for:
    - You need to set your mesh to read/write enabled (in the inspector, when you select it in the project folder)

    - If your vfx is not aligning with the mesh, it's because it's simply sampling the Skinned Mesh Renderer (SMR) data itself, and not its transform. To make it align, expose a transform in blackboard, link it to the relevant bone transform (typically the root, sometimes hips, in this robot example it was the chest because, well, who knows). Then you'll 1) spawn on the skinned mesh and 2) transform the particle positions after you've set them so they'll match the position/rotation/scale of the SMR transform:


    Hope this helps!
     

    Attached Files:

    Last edited: Mar 30, 2021
    valarus, PutridEx, Marie_G and 8 others like this.
  3. A_Gamgie

    A_Gamgie

    Joined:
    Mar 30, 2013
    Posts:
    4
    Hello !

    Thanks for this awesome feature !

    Is it possible to emit from skinmesh volume instead of surface ?
     
  4. Marie_G

    Marie_G

    Unity Technologies

    Joined:
    Mar 9, 2021
    Posts:
    15
    Hello,
    At the moment, only surface, edges and vertex are available to spawn particles with skinned mesh nodes. A volume option is not planned as we actually use mesh datas and not volumes.

    You can also find a bit about VFX Skinned mesh in this blog post, showcasing the upcoming sample: https://blog.unity.com/technology/new-possibilities-with-vfx-graph-in-2020-lts-and-beyond

    I hope this samples will help you when released :)

    Have a great day!
     
    PutridEx likes this.
  5. Kimproductions

    Kimproductions

    Joined:
    Feb 28, 2018
    Posts:
    6
    Hello, I know this is an outdated post but I've been looking everywhere and can't find the answer. I need the VFX to be a child of the robot gameobject so I can spawn it around the world, destroy it, etc.
    upload_2022-5-9_17-21-10.png
    However, whenever I move it into the robot's hierarchy, the position is offset in a strange way.
    upload_2022-5-9_17-21-10.png
    I assume this is because the VFX graph is also using it's own position when using the setposition node so it's kind of doubling the position.
    upload_2022-5-9_17-21-10.png
    upload_2022-5-9_17-21-10.png
    Is there any way to parent the VFX graph to the robot without causing this behavior? I have tried to subtract the object's position right before the setposition node, which works, except the rotation doesn't follow, but I don't know how to subtract rotation.

    Thank you,

    Isaac
     
unityunity