Search Unity

Question Finding Particle local Transform Axis in Shader Graph

Discussion in 'Shader Graph' started by Ogham5tone, Feb 11, 2020.

  1. Ogham5tone

    Ogham5tone

    Joined:
    Jan 14, 2020
    Posts:
    4
    Hi all,

    I'm attempting to create an effect for flames blowing in the wind, based off the techniques in this grass tutorial.


    Right now, I have flames created by particles, and can deform them locally in the same way as the grass show in the tutorial. My problem now arises that I can't deform the flames in their local axis, only the world axis - I need to attach the flames to a moving object and skew them in the direction of movement, so the direction of deformation needs to follow the local axis.

    I can achieve this effect on a normal object - please see below for a simple graph constructing the effect, and a gif of a cube using this shader to deform along the Y, rotated around to demonstrate the local deformation.
    shader.jpg
    2020-02-11_ShaderObjectOffset_01.gif
    I can't get the same results with a particle though - when applied the particle always resorts to deforming along the world axis. I suspect Custom Vertex Streams may be an avenue to investigate, but I haven't been successful in getting positional information to come through to the shader graph - the documentation assumes scripted shaders only, not shader graph.

    Any help or advice greatly appreciated!

    Using Unity 2019.2.12
    HDRP 6.9.2
    Shader Graph 6.9.2
     
  2. syverapt

    syverapt

    Joined:
    Sep 28, 2020
    Posts:
    14
    Hey there, I'm having the same issue. I can't seem to be able to transform particles in their local space, only world space. Did you figure anything out?
     
  3. Danielsantalla

    Danielsantalla

    Joined:
    Jan 7, 2015
    Posts:
    75
    Any news on this?
     
  4. Ogham5tone

    Ogham5tone

    Joined:
    Jan 14, 2020
    Posts:
    4
    No luck here, I had to ditch that approach completely.

    sorry for not replying sooner, I never got any notification on this thread despite 'watching' it.