Using Set Driven Keys & Xpresso
Sometimes it is necessary to allow an item in the scene to control an Octane attribute, such as the Diffuse color of a material. There are two ways to do this using some the Cinema 4D features Set Driven Keys and XPresso. From the Cinema 4D documentation, "a set driven key is a relationship where one parameter controls another," and XPresso is the expression-editing environment of Cinema 4D.
Set Driven Keys
To set up a Set Driven Keys relationship, select the desired attribute to use as the driver (for example, the rotation triplet in the Camera) via the Coord. tab of the driver object and then right-click and choose XPressions > Set Driver. This will create a reference to the selected attribute to use as the driver. Then, in the either the Octane Node Editor or the Octane Material's Attribute panel, select the value to be driven. Right-click and choose XPressions > Set Driven (Absolute). This will add an XPresso icon in place of the standard keyframe icon on both the Driver and Driven values of the expression. It will also create a new object in the Object manager called Expression.n, with an Xpresso tag and the actual expression node tree, which can be further edited as required.
Tip: To select a triplet value in C4D, you click on the heading of the axis label. So for all of the rotations, if you click on the R (for Rotation) that precedes the actual axis value, the entire triplet is selected. |
Sometimes, the only way to get things done is with a little XPresso. XPresso is the original node-based expression system in Cinema 4D. Since version R23, Maxon introduced a new Node Editor, but this environment is still under development and yet a replacement for the Xpresso system is at the time of this writing.
XPresso
Another method to use the XPresso editor in addition to the Set Driven relationship outlined above, is to directly drag in an Octane material into the XPresso editor. You can also drag any Octane attribute that is displayed in the Attributes panel by dragging the attribute name directly into the panel itself. In both of these cases, only the primary node container will appear; you will need to drag in the individual attributes themselves into the attribute container to the appropriate port (input or output).
You can also add additional attributes by left-clicking on the port area (red or blue) and choosing the attribute from the drop down menu that appears. Once you have done so, the appropriate attribute will appear in either the right or left side of the attribute node. Once you have the initial attribute node in the Xpresso editor, you can then add more operators and build an Xpresso nodegraph that suits your purpose. Note that evaluations of these nodegraphs will be slow for anything by the simplest constructions, as Xpresso is single-threaded.
Use at your own Risk!
Note that this method is not compatible with network rendering, The Render Network or even Octane Standalone, as it relies on the unique feature set of Cinema 4D. Instead, you will need to bake the driven animation and anything with the XPresso tag into frames.
Cinema 4D Nodes
As of this writing, the Nodes system of Cinema 4D (introduced in R23) is not able to match the functionality of XPresso. Further, the concept behind Cinema 4D Nodes is quite different than XPresso, which is expressions-based. As time goes on and the Cinema 4D Nodes environment achieves parity with XPresso, it is hoped that methods similar to above will also be possible with the Cinema 4D Nodes environment, but that work needs to be done by Maxon.