This is most likely not a problem for most experiences but in the experience I am working on, displaying the correct colors is crucial. This is something that is preventing the release of my experience.
I can’t check the video (it’s not loading) but neon is supposed to be brighter than other materials.
If that’s what you mean, then it’s not a bug
thats weird the video loads for me, also it is not “brighter” than other materials but rather displays an inaccurate color. you can see this when bloom is turned off.
This is by design. Neon colors are modified when rendered to preserve the color as much as possible when they pass through bloom → they start to glow. This means that if you modify bloom to actually not do anything (disable the glow) you see those modified colors. We tried to make it so that these colors are still similar to the original colors set, but there is a balance. Neon is designed to show correct (maybe more like correct-ish to be honest) color when glowing primarily.
You can use neon with bloom threshold set to 4 if you want, but we cannot guarantee that it will preserve colors.
If you want exact unlit color could you use surface guis?
If you don’t want to use surface guis:
I wrote an inverse function that changes color in a way that it stays the same when processed using neon. Feel free to use it.
But be sure that this is a hack and I do not recommend using it as there is definitely no guarantee that this will work in the future
code:
function invertNeonTransform(color)
color = color * 0.25
color = math.sqrt(color)
color = math.sqrt(color)
color = color / 1.35
return color
end
--usage
part.Color = Color3.new(invertNeonTransform(part.Color.R), invertNeonTransform(part.Color.G), invertNeonTransform(part.Color.B))
Would be great if this behavior along with the tip about surfaceguis were documented on the Creator Docs. It’s very possible that many developers don’t and will never know about this behavior of neon
Thanks for the clarity, the thing is that with bloom on or off the colors are still not preserved. Some colors do display accurate colors and some others do not. Regardless I respect the design choice but it should definitely be documented.
EDIT:
sadly the color hack that you provided doesn’t work regardless of bloom
Right! I went through the shaders and forgot to do the srgb->linear conversion. Following code should work. I verified on couple colors.
It will not and cannot be exactly 1:1 because last pass of rendering is a tonemapping. Our tone mapping is designed to not to change colors much, but it still could shift colors slightly.
Still reminder. We do not guarantee that this code to translate color will work in the future and this kind of a hack. But if you want to use it, feel free
Good luck with your game!
function invertNeonTransform(color)
color = color * color
color = color * 0.25
color = math.sqrt(color)
color = math.sqrt(color)
color = color / 1.35
return color
end
--usage
part.Color = Color3.new(invertNeonTransform(part.Color.R), invertNeonTransform(part.Color.G), invertNeonTransform(part.Color.B))