Chaos Corona Forum
Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: James Vella on 2024-10-28, 17:39:43
-
Is there any way to access the "Result Color Preview" color as RGB?
My current workaround to access HDR, HEX etc is by using separate functions to do the inverse calculations, but it would be just much cleaner if I could just run the .color through (similar to vray).
(Apologies I posted this in the wrong section)
-
Can any devs chime in on this one? I have a feeling this is not exposed to maxscript...
-
Hi James, the answer from our dev team is that it is not possible to get these values via maxscript, sorry. If this is crucial for you, you can request it through the ideas portal: https://chaoscorona.ideas.aha.io/
-
Thanks Maru, I may do that.
As I said above I currently have functions for all the color formulas, the only one I cant work out is the HDR Rendering Color Space formula. Any tips/math on how this is being calculated?
-
the only one I cant work out is the HDR Rendering Color Space formula. Any tips/math on how this is being calculated?
Can you explain what exactly you mean by "HDR Rendering Color Space formula"? What exactly would you like to calculate based on what?
-
Based on the "Result Color Preview". I want access to the "Result Color Preview" RGB values. For example in vray when changing the type to temperature or hex etc, you can just grab the #color since it gets updated when those values change. In Corona the #color is only related to "Solid color", thus I need a different formula to inverse each one back to RGB values. But I cant work out what formula for "Rendering".
For example for "Solid HDR color".
-- RGB Primaries: sRGB
colorRed = pow colorRed 2.2 * 255.0
colorGreen = pow colorGreen 2.2 * 255.0
colorBlue = pow colorBlue 2.2 * 255.0
-- RGB Primaries: Linear
colorRed = colorRed * 255.0
colorGreen = colorGreen * 255.0
colorBlue = colorBlue * 255.0
-- RGB Primaries: Rendering
?
-
Hi, I will try to get the answers and share them here, but it may take some time. Please stay tuned.
-
Great thanks!
-
Here is what I got so far:
First the value is converted to sRGB, then it is clamped, and then gamma 2.2 is applied.
If it's not enough, please let me know and I will try to dig deeper.
-
Just curious as to what youre doing with these values James. Something script related?
-
Here is what I got so far:
First the value is converted to sRGB, then it is clamped, and then gamma 2.2 is applied.
If it's not enough, please let me know and I will try to dig deeper.
Thanks maru! I'll take another look when I get some time.
Just curious as to what youre doing with these values James. Something script related?
Yes this is one of the components missing for the Corona to GLB (https://forum.corona-renderer.com/index.php?topic=43502.0) script. Basically if you are using colors instead of textures it will put the color into the correct locations (including corona/vray color nodes).
-
Ah brilliant!