Search Unity

Dynamic color change in visual effects/particles

Discussion in 'Animation' started by mcredifine, Jun 19, 2017.

  1. mcredifine

    mcredifine

    Joined:
    Jun 19, 2017
    Posts:
    2
    Can anyone provide a short tutorial on how to develop those dynamic functionalities in the top left corner of the screen as seen in this video?


    Is that a script that lets you modify the color on the go or does Unity already has something like this implemented and that I don't know about?

    Thank you!
    -mike
     
  2. TommySKD

    TommySKD

    Joined:
    Jul 23, 2014
    Posts:
    25
    He uses a handmade custom script for this UI yes.

    Looking at his effects he uses Glow and Dissolve shaders a lot, so his script simply updates the effect color parameter of those shaders.
    You can see at 8:55 the lightning color starts purple and ends pink, and he doesn't tweak the color for some reason (which is very strange because if there is one thing that looks awesome in any color it is lightning). Thats because his shaders use a gradient map (purple => pink) instead of a single color for this effect. So his tool simply doesn't work on this effect, which is why he didn't show it in different colors.

    The recolor script has to adapted to the kind of effects you have, it is not a "1 solution for everything" kind of thing, for example he could have had an option to change the white of all those effects into black and it would have looked awesome too, really depends on what you have and what you want.
     
    Last edited: Jun 20, 2017