Community
Arnold General Rendering Forum
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Color mismatch when generating UserData from .ass

3 ANTWORTEN 3
GELÖST
Antworten
Nachricht 1 von 4
Shawn_Kearney1
468 Aufrufe, 3 Antworten

Color mismatch when generating UserData from .ass

I have a script that reads ass files and writes the user data nodes into an XML file such that UI can be easily and quickly generated. It seems to be working well, but the value from AiNodeGetRGB() does not seem to reflect the values in the shader network. When read back, the Color User Data generated reflects the values in the XML, not those in the shader. It seems that there is a gamma applied, maybe?

I've extracted the rgb values using:

default = AiNodeGetRGB( node, "default" )

default_r = str(default.r)
default_g = str(default.g)
default_b = str(default.b)

default = "{" + default_r + "," + default_g + "," + default_b + "}"

Tags (1)
Beschriftungen (1)
3 ANTWORTEN 3
Nachricht 2 von 4
Shawn_Kearney1
als Antwort auf: Shawn_Kearney1

I think it is a gamma correction judging by the values I remember. I'll give that a try tomorrow.... Is this a C4D thing??

Nachricht 3 von 4

The color widget in C4D is in sRGB color space by default, while Arnold needs them in linear color space. A simple gamma correction is a good approximation, or you can use the ColorProfileConverter class from the C4D SDK.

Nachricht 4 von 4

Cool thanks. That works just fine. I couldn't immediately figure out how to use ColorProfileConvert (still trying to wrap my head around the C4D API), but I was able to convert to sRGB using some code I found.

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report