Author Topic: How to expose an altered Color RGB not Texture?  (Read 2238 times)

Say we have a basic setup of Uniform Color hooked up to a HSL node, how do I get the RGB values of the color after it has been manipulated by the HSL?

I basically want to get the RGB values of the altered color so I can use them to set the color of Text in Unity 4.6

Last Edit: December 18, 2014, 02:39:03 am

There is currently no way to have numerical (non-texture) outputs in substances. However, you can probably still create a small uniform texture (e.g. 32x32) and read one pixel value in Unity. I suppose they have a ReadPixel function of some sort.

Just make sure, if we know , the starting uniform color AND the HSL offset,, we cannot mathematically compute it in an empty function ?

Not sure what you mean :
Of course, if you know the formula and the parameters, you can make a function in Unity to compute it without using using Substance.
You can also make a function to compute it inside the Substance engine, but you can't pass the result of that function from the Substance Engine to Unity in any other form than pixels in a texture.

Ha ok I didn't get the last part :-)
True that it would be awesome to be able to do that in the future :-)

Thanks for the replies, I figured it wasn't possible :/

I guess I could hue shift in PS and get some RGB values, make a dictionary with those and grab those based on the text (rather the number before being converted to string). That will work, just afraid of the RGB values being different based on different Hue shift algorithms, I suppose I could use the PS method to also set a Color input on the substance though to match everything up.