Solved Read Background Color from RS Camera

Hello!

It is possible to read somehow the Color parameter from the Background section of the RS Camera?

RSCamera[c4d.RSCAMERAOBJECT_BACKGROUND_COLOR]

If I try to read it directly, it returns an error, and I didn't find a secondary ID to passtrough the value like in the RS Dome Light:

RSDomeLight[c4d.REDSHIFT_LIGHT_DOME_TEX0, c4d.REDSHIFT_FILE_PATH]

This is on C4D 2023.2.1and RS 3.5.16.

Thanks!

Hey @cybor09,

Thank you for reaching out to us! You almost got it. Redshift uses a special 4-channel data type for its colors, we talked here about it. But the camera object parameter you are interested in is a bit weird, as returns a float for REDSHIFT_COLORALPHA_COLOR where it should be a vector.

Stuff seems to be laid out instead in the form 1000, 1001, 1002, 1003, i.e., VECTOR_X, VECTOR_Y, and VECTOR_Z for the alpha bit you cannot use the usual REDSHIFT_COLORALPHA_ALPHA which is already our y-component value. So, you must use the raw integer value here.

Cheers,
Ferdinand

cda137cd-13e8-40e3-8dc1-a8b908b84f28-image.png

MAXON SDK Specialist
developers.maxon.net

Hey @cybor09,

Thank you for reaching out to us! You almost got it. Redshift uses a special 4-channel data type for its colors, we talked here about it. But the camera object parameter you are interested in is a bit weird, as returns a float for REDSHIFT_COLORALPHA_COLOR where it should be a vector.

Stuff seems to be laid out instead in the form 1000, 1001, 1002, 1003, i.e., VECTOR_X, VECTOR_Y, and VECTOR_Z for the alpha bit you cannot use the usual REDSHIFT_COLORALPHA_ALPHA which is already our y-component value. So, you must use the raw integer value here.

Cheers,
Ferdinand

cda137cd-13e8-40e3-8dc1-a8b908b84f28-image.png

MAXON SDK Specialist
developers.maxon.net

Thanks a lot for the quick response @ferdinand ! I'll use the raw int values then, thanks :)