Hi, I'm getting the following in 2018.3.0f2. My particle system shows my colour gradient as HDR but when trying to change the colour, the intensity option isn't there. Is it HDR or isn't it? The material used is "Lightweight Render Pipeline / Particles / Unlit". Thanks, Nick
Hi, This looks like a bug - the Color over Lifetime module does not support HDR colors and it should not be possible to get it into a state where it has HDR color content. Could you submit a bug report via the instructions on https://unity3d.com/unity/qa/bug-reporting please? Regarding HDR particle colors in general, it's only possible to do it via the Custom Data Module and a custom shader that reads the Custom Data and uses that for its colors. Unfortunately, all the built-in particle colors are LDR, for legacy reasons. (Only stored as 0-255 bytes).
On 2018.3.4.f1 i have this error when i try to set the colorOverLifetime with a Gradient object: Code (CSharp): var gradient = new Gradient(); var colorKeys = new List<GradientColorKey>(); var alphaKeys = new List<GradientAlphaKey>(); var colorOverLifeTimeVals = JsonHelper.FromJson<GradientColor[]>(value ?? "[]"); colorOverLifeTimeVals.ForEach(c => { //colorKeys.Add(new GradientColorKey(new Color(c.r, c.g, c.b), c.p)); alphaKeys.Add(new GradientAlphaKey(c.a, c.p)); }); gradient.SetKeys(colorKeys.ToArray(), alphaKeys.ToArray()); colorOverLifetimeModule.color = gradient; In this example colorKeys.Add is commented, the problem is that line, alphaKeys works fine, if colorKeys are set, the color over lifetime HDR becomes activated
Hi, has this been solved yet? Whenever I create a Gradient by Script (as seen above)it is generated in HDR (quite ramped up) and I cannot find a way to either switch HDR off or to adjust the intensity value.
I seem to recall that the user above did submit a bug report and the outcome was they were setting colors in the 0-255 range, which should be used with ColorRGBA32, but they were using the floating point ColorRGBAf type, which expects 0-1 range values. Maybe you made the same mistake? (Apologies if my memory has failed me)
This is highly suspect in an actual build so verify before using it BUT: It's kind of silly but it can actually use it if you copy paste the HDR Gradient there from elsewhere