Search Unity

HDR Gradient Editor

Discussion in 'General Graphics' started by chrismarch, Apr 21, 2017.

  1. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    472
    Hi @richardkettlewell,

    I'd like to use the HDR Gradient Editor you mentioned in this thread, is there a build available with this, or any concrete plans to release it? If you've moved on, what is the best way to set HDR color changes over the lifetime of particles in an inspector, so that I can resimulate and see the results as I edit the colors?

    I see the release note for 5.6.0b1 "Particles: Gradient Editor now supports HDR colors when used in the Custom Data streams," but with editor 5.6.0f3 (Windows 64-bit), I only see the Color and Vector modes for the Custom Data inspectors.

    I am comfortable editing shaders and scripts, but I don't see a way to get immediate visual feedback about what the color keys look like, or what the particles would look like if only using shaders and (C#) scripts.
     
  2. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Hey!

    Yeah it's all in 5.6.

    Set the custom data module to Color, and the color picker will be HDR. Or switch to Gradient, and that editor will be HDR too. Use the Current Brightness slider to specify a HDR color.

    Then add the custom stream in the Renderer Module, and make your shader use it however you like :)
     
    theANMATOR2b and karl_jones like this.
  3. StarcMade

    StarcMade

    Joined:
    Apr 15, 2015
    Posts:
    5
    Hi Richard, is this currently working? I set the custom data module to Color and added it to my custom stream (I think, it already has color set in there..) What are the steps to add this using the Shader Graph? I have a color module set in my shader and it's using that as my particle color instead of the gradient in my custom color stream.
     
    Last edited: Mar 26, 2019
  4. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Yes it works :)

    In the particle system renderer module, check the Custom Vertex Streams option. Add your custom stream to the list. The UI will then tell you which texcoord it is using (uv stream). In shsdergraph simply use that stream to load the colors.
     
    StarcMade likes this.
  5. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    There is an example here:


    It uses shader forge but the principle is the same.