Cinema 4D Techniques: XPresso
Page 3 of 3

Now we can get into the interesting part...

[an error occurred while processing this directive]To bring up the XP GUI, double click the XP icon (boxy tree icon on your NULL).

Simply drag the Extrude NURBS object in to the dark grey window called "XGroup." Then drag the XP icon there as well. You should now have two dialog boxes, each with a blue (in) box and a red (out) box at the top of their respective windows.
[008.jpg]

Click on the XPresso red (out) box, and you'll see that User Data is one of the options. There is only one parameter of User Data set, DEPTH. Select it, and it will show up in the connection area with a red (out) linking dot.

Click on the Extrude NURBS blue (in) box. Here you'll find all of the parameters available to this object, including position and movement (amount of extrusion). Add both Coordinate > Position > Position.Z and Object Property > Movement.Z



Now connect the dots by dragging out from the red dot and connecting the string to the blue dots, one at a time. This makes the object's extrusion equal to its position.



We want the position to be negative one-half of the value of the extrusion. Maxon has built in a little calculator so we don't need to write any operators.

Under the XPresso Editor's menus, Custom->X-Pool (already tabbed in default). Open up the System Operator options in this window. Yeah, there are a bunch, but we just need to CALCULATE something involving Math. Easy. Twirl down System Operators->XPresso->Calculate->Math:Add. It's addition for default. Drag the operator to the XGroup window and click it.



Once you've clicked it, Attributes show up for it. Click on Node. We want to change the function to "Multiply". Click on Parameter. The first input will be the DEPTH value, so we can leave that alone. The second value will be our offset. Our offset needs to be -0.5 of the extrusion. Drag a connection from DEPTH to Input1. Drag the Output (the solution from the equation) to Position.Z of the Extrude NURBS.





In the OBJECT manager, select the XP tag. The DEPTH slider will show up in the Attributes with a Float value. You can either drag the slider or input a value and XPresso will calculate your offset around Z=0. Sure, the slider can be animated!



If you want to leave your axis at zero, you can use an additional Null parent, or create an offset for the Object Axis with a separate Math operator.

Now get a pot of water set to boil; you have a ton of XPresso to go through. If you want to download the project you can request files from the Cinema4D Forum.


Ko Maruyama is a C4D animator who indulges in high octane XPresso whenever possible. You can find him answering questions in the After Effects forum. If you have questions about Cinema4D, you can find answers in the Cinema4D Forum.




Prev 1 2 3

Related sites: • Animation ArtistAV VideoCreative MacDigital AnimatorsDigital Game DeveloperDigital Media DesignerDigital Post ProductionDigital ProducerFilm and Video MagazineThe WWUG
Related forums:
[an error occurred while processing this directive]