Please excuse for bumping this thread - however we tried to follow up with maxon technical support but where quickly redirected to the forums.
We are currently also running into issues, where in Cinema4D 2025.1.x the color profile for rendering seems to be "wrong" when the rendering is triggered via the python sdk.
In your projects, we use the following settings:
When rendering via CLI (Commandline.exe
) or the Desktop Application this works without problem. However when using the python SDK the images come out as the "default profile" which is unfortunately un-tone mapped
The code for rendering is from AWS DEADLINE CLOUD - a render farm manager - excerpt
bm = bitmaps.MultipassBitmap(
int(self.render_data[c4d.RDATA_XRES]),
int(self.render_data[c4d.RDATA_YRES]),
c4d.COLORMODE_RGB,
)
rd = self.render_data.GetDataInstance()
result = c4d.documents.RenderDocument(
self.doc,
rd,
bm,
c4d.RENDERFLAGS_EXTERNAL | c4d.RENDERFLAGS_SHOWERRORS,
prog=progress_callback,
)
Full function available here: https://github.com/aws-deadline/deadline-cloud-for-cinema-4d/blob/mainline/src/deadline/cinema4d_adaptor/Cinema4DClient/cinema4d_handler.py#L69-L110
It's a bit frustrating - as right now there seems to be no way of ensuring that the custom ACEScg space can be used via python.
I've also been toying around to reproduce this without Deadline cloud - and the following code showcases the problem as well:
import c4d
from c4d import bitmaps
def main() -> None:
doc = c4d.documents.GetActiveDocument()
render_data = doc.GetActiveRenderData()
render_data[c4d.RDATA_FRAMESEQUENCE] = c4d.RDATA_FRAMESEQUENCE_MANUAL
frame = 61
fps = doc.GetFps()
render_data[c4d.RDATA_FRAMEFROM] = c4d.BaseTime(frame, fps)
render_data[c4d.RDATA_FRAMETO] = c4d.BaseTime(frame, fps)
render_data[c4d.RDATA_FRAMESTEP] = 1
bm = bitmaps.MultipassBitmap(
int(render_data[c4d.RDATA_XRES]),
int(render_data[c4d.RDATA_YRES]),
c4d.COLORMODE_RGB,
)
bm.SetColorProfile(render_data[c4d.RDATA_IMAGECOLORPROFILE])
rd = render_data.GetDataInstance()
res: int = c4d.documents.RenderDocument(doc, rd, bm, c4d.RENDERFLAGS_EXTERNAL)
print("rendering")
if res == c4d.RENDERRESULT_OK:
print("done")
bm.Save("test.png", c4d.FILTER_PNG, None,)
c4d.bitmaps.ShowBitmap(bm)
if __name__ == '__main__':
main()
The image that is shown via ShowBitmap has the correct color profiles. The saved one is missing the display pipeline. Saving the image from the picture viewer misses the transform - only when explicitly embedding it, it is correct
Can you provide any information when this can/will be addressed ? Thank you