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.
  2. Dismiss Notice

How to create Pixie Dust

Discussion in 'General Graphics' started by StridingDragon, Apr 21, 2016.

  1. StridingDragon

    StridingDragon

    Joined:
    Jan 16, 2013
    Posts:
    78
    Does anyone have a suggestion how I could create proper Pixie Dust?
    I would need a trail renderer that leaves a trail of Disney-style pixie dust and flickers and fades. I can't seem to find information on anything like it anywhere.
     
  2. Zicandar

    Zicandar

    Joined:
    Feb 10, 2014
    Posts:
    388
    I suggest using a "Trail Renderer" but with a custom shader that handles the flickering.
    An idea to get you started on the shader:
    Use a noise texture with a resolution/areas large enough for you "dust", then if time%1 is close enough to the noise textures value, then you render it. (If you don't want harsh flickering simply blend the pixel based on how close the noise and time%1 is.)
     
  3. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    You could also do it with a particle system in world space.
     
  4. StridingDragon

    StridingDragon

    Joined:
    Jan 16, 2013
    Posts:
    78
    Thanks, Zicandar. I like the noise idea and I'll have to look into that. That might be a good way.

    Thanks, Karl, I understand that it would be a particle-based approach, but my question was meant more down the lines to see if anyone has suggestions regarding specific settings, materials, etc.
     
  5. Zicandar

    Zicandar

    Joined:
    Feb 10, 2014
    Posts:
    388
    Send me a pm if you want help with the actual shader! This seems like a fun small project.
     
  6. StridingDragon

    StridingDragon

    Joined:
    Jan 16, 2013
    Posts:
    78
    Thanks, Zicandar. I've actually started working on it yesterday and I've got it almost finished. I went with particle systems using world coordinates, which leaves exactly the kind of trail I was looking for. Been setting up the systems to flicker over time etc.
     
    richardkettlewell likes this.
  7. andrewrindf

    andrewrindf

    Joined:
    Feb 5, 2017
    Posts:
    2
    Hi StridingDragon, were you able to finish your shader? I'm looking for an animation exactly like this to include in my senior project for school. Would you be willing to share your work? If not, do you have any advice on where to start? I'd love to hear back from you. Thanks!
     
  8. StridingDragon

    StridingDragon

    Joined:
    Jan 16, 2013
    Posts:
    78
    Yes, I did. I ended up using three separate particle systems, layered on top of each other, creating flickering particles of different sizes and different spheres. The key is to switch them all to use world coordinates so they leave a trail as you move the emitter.
     
  9. andrewrindf

    andrewrindf

    Joined:
    Feb 5, 2017
    Posts:
    2
    Excellent! Thank you for the advice!