Page 1 of 1
How to convert CinemaRGB to Octane Float colour with Xpresso
Posted: Sat Dec 14, 2013 4:09 pm
by sphericall
I have an material which is composed of 3 mix materials one Glossy and thw Diffuse materials.
All of them are using the same three source colours.
I made and Xpress setup with UserData to easy control source colours in one place.
But I found the problem, how to convert Cinema RGB (1-255 range) to Octane float colour (0-1 range)
I used Range Mapper node like this:
So the Cinema colour is:
RGB 121/141/163 and in Xpresso it gives value accordingly 47.654% 58.433% 64.118%
And for use in octane it should be 0.193 0.301 0.361
Please, help how to convert this weird numbers

I know there shoud be Gamma applied somehow...
I'd like to control all colours in one place!!
Re: How to convert CinemaRGB to Octane Float colour with Xpr
Posted: Sat Dec 14, 2013 4:21 pm
by bepeg4d
hi, what about changing the RGB range in the c4d preferences to 0-100%?
in theory you need only to add a math-divide node for getting the correct result
ciao beppe
Re: How to convert CinemaRGB to Octane Float colour with Xpr
Posted: Sat Dec 14, 2013 4:30 pm
by sphericall
Anyway it doesn't help. Cinema colours must be Gamma correctet to get the Octane values.
Look at this cinema values are 1-100% (lower window) and it is still not the same

Re: How to convert CinemaRGB to Octane Float colour with Xpr
Posted: Sat Dec 14, 2013 4:57 pm
by aoktar
plugin converts this colors to linear (SRGB -> LINEAR)
Vector clr = TransformColor(Vector(r,g,b), COLORSPACETRANSFORMATION_SRGB_TO_LINEAR);
Re: How to convert CinemaRGB to Octane Float colour with Xpr
Posted: Sat Dec 14, 2013 5:50 pm
by bepeg4d
are you sure that you need to convert the rgb value?
maybe i have misunderstand but, here is a simple scene without conversion and it seems to work, change the color in the c4d standard material and the three octane materials takes the same color:
ciao beppe
Re: How to convert CinemaRGB to Octane Float colour with Xpr
Posted: Sat Dec 14, 2013 5:54 pm
by sphericall
I'm some kind of happy now
Suppose it is C++, now need to find the way use it in Xpresso by COFFEE or Python script.
Re: How to convert CinemaRGB to Octane Float colour with Xpr
Posted: Sat Dec 14, 2013 6:06 pm
by sphericall
bepeg4d wrote:are you sure that you need to convert the rgb value?
maybe i have misunderstand but, here is a simple scene without conversion and it seems to work, change the color in the c4d standard material and the three octane materials takes the same color:
color-reference.rar
ciao beppe
Finally I did it the same way, but as I need to change 3 colors I made nice Setup with UserData and Xpresso, like this:
And my goal was not to generate new Materials. Now one material definition looks like that.
And my COLOR CONTROL Diffuse channel looks like that:
It is not the best setup in terms of usability. But it works

Thanks.
Here is my setup. Look into the Xpresso tag.
color-control.zip