2
« on: 2022-04-29, 12:39:30 »
Hi,
the tone mapping operators are now stored as a separate nodes under Corona camera tag and Corona video post in render settings. This is because it is now possible to e.g. re-order these operators, add duplicate ones etc.
These operators are stored as standard C4D BaseList2D nodes, first operator node can be retrieved by something like following:
CORONA_TONEMAPPING_BRANCH_ID = 1057356
PLUGINID_CORONA_CAMERA_TAG = 1032177
PLUGINID_CORONA = 1030480
def GetFirstTonemappingOperator(node):
filtered = [b["head"] for b in node.GetBranchInfo() if b["id"] == CORONA_TONEMAPPING_BRANCH_ID]
if filtered:
return filtered[0].GetFirst()
For camera this would be used as
cameraTag = camera.GetTag(PLUGINID_CORONA_CAMERA_TAG)
firstOperator = GetFirstTonemappingOperator(cameraTag)
For render settings it could be used as:
vp = doc.GetActiveRenderData().GetFirstVideoPost()
while vp:
if vp.IsInstanceOf(PLUGINID_CORONA):
break
vp = vp.GetNext()
firstOperator = GetFirstTonemappingOperator(vp)
Each operator can then be examined using IDs you can find in plugin folder in res/description/postprocess_operator.h.
For example setting all exposure operators to 4.2 could be done using:
operator = firstOperator
while operator:
if operator[c4d.CORONA_POSTPROCESS_OPERATOR_TYPE_NAME] == "Chaos.SimpleExposureOperator.Data":
operator[c4d.CORONA_POSTPROCESS_OPERATOR_SIMPLE_EXPOSURE_VALUE] = 4.2
operator = operator.GetNext()
Now, is a little bit more complicated, but it is simply because tone mapping now does not have any predefined ordering and can be arbitrary modified. For all other parameters in camera tag and render settings the things should be as before, e.g setting ISO can be done as before using
cameraTag[c4d.CORONA_CAMERA_ISO] = 300
Unfortunatelly we currently don't have any unified documentation for this, but we will try to add it in the near future as there seems to be quite a need for it. We will also try to introduce some utilities for Python scripting that would simplify things... I'll write in this topic once we have some more information.
Finally, regarding CORONA_LIGHTMTL_EMISSION_COLOR_LEVEL/CORONA_LIGHT_MATERIAL_EMISSION_COLOR_LEVEL, we renamed few such parameters in v8 internally to make it more consistent with other parameters. We will add aliases for these in v8 hotfix.