Asset Construction
Here you will find special Nodes that can be used as a basis for creating your own Assets. These Nodes function like a group and therefore do not represent a function on their own. Asset Construction-Groups must be filled with Nodes to describe the function of an Asset.
The advantage of these Nodes is that they can be dragged directly from the Asset Browser into the Object Manager. For example, if Nodes Selection or Nodes Modifier are directly grouped to an object in the Object Manager, the Node graphs in these Asset Construction Groups can directly influence the selection of the object or cause various modeling commands to act on the geometry of the object.
When selecting one of the Asset Construction groups in the Object Manager, the Node Editor automatically switches to Capsule mode and thus automatically displays the contents of the group (see entries in the Mode menu of the Node Editor). This allows you to focus directly on creating the Node network within the Asset Construction group. You can also find more information about the different modes of the Node Editor here.
Quick access:
- An example of creating an Asset Capsule
- Test circuits by section
- Add User Data
- Using the Resource Editor
An example of creating an Asset Capsule
Below is a simple example of what is possible with just a few Nodes within an Asset Construction group. First, a simple Cube primitive object was created and a Nodes Modifier group was grouped as a child to it directly from the Asset Browser. In this, among other things, you can use any Geo Selection and Geo Modifier Nodes to modify the geometry. If you only want to create a selection on the object, using the Nodes Selection group is also sufficient.
Subordination in the Object Manager automatically switches the Node Editor to Capsule mode and activates the Geometry input of the Asset Construction group. This can be read out and modified directly within the Node network. As the following figure shows, in our example the geometry of the cube is changed to create a bulge in its center. However, the same effect would also occur if we had used, for example, a Cylinder or a Tube instead of the Cube. Once created, Assets can usually be used in a variety of ways, extending the generators and tools that already exist by default.
The result documented in the figure above can be achieved with just a few Nodes that need to be connected to the Geometry input within the Nodes Modifier group. First, we use Selection Nodes to select only the perpendicular polygons on the geometry. In the second half of the network, Inset and Polygon Bevel are used to shrink the selected surfaces and eventually curve them outward. The Geometryresult of all these calculations is connected to the Geometry output of the group and thus becomes visible at the object in the Object Manager.
The colored highlights and comments in the figure above were created with Scaffolds and Notes and are provided here only for clarity and commentary on the Node graph. You can also have this example loaded by clicking on the file icon below.
Another advantage of the Asset Construction groups is that they can be saved directly in the Asset Browser under their own name by calling Convert To Asset... in the Assets menu of the Node Editor. This way, you can access this new feature in the Asset Browser at any time and use it in other projects in a flash.
Test circuits by section
Testing sections of the circuit can be particularly helpful when using the asset construction groups, through which new geometry will be created, changed or, for example, supplemented by selections. Imagine, for example, that several selection and modeling steps are carried out one after the other. If the result of the circuit does not meet your expectations, you would normally start troubleshooting which Node may be producing the wrong results. This troubleshooting can be dramatically accelerated if the Geometry output after each Node can be displayed. This is possible with all Nodes that provide a Geometry output. These Nodes offer the Geometry output command in their context menu (this appears after right-clicking on the Node). This causes the Geometry output of this Node to be connected directly to the Geometry output of the asset construction group. Any existing connections to this output will automatically be removed.
As can be seen in the image above, to test the first Nodes, the geometry result of the Extrude Immer Node was forwarded directly to the Geometry output of the group by calling the Geometry output command. If the asset has already been assigned to a polygon object in the Object Manager, the result can be viewed directly in the Viewport. Calling up Geometry output again, this time for the Polygon Bevel Node, will automatically remove the connection to the Extrude Inner Node and reactivate the calculation of the entire circuit for the geometry calculation. Since Geometry output can also be called up via the Q shortcut for a selected Node with Geometry output, the connection and removal of geometry links to the Geometry output of the group can be switched very quickly.
Please note that Geometry output is only available if you are within an asset construction group or even a simple Node group that has a Geometry output and if a Node is selected that provides a Geometry output. It is only possible to process a single Node at a time. Therefore, make sure that only one Node with Geometry output is selected when using the Q shortcut.
Add User Data
As the above example shows, Assets can be used to very quickly create functions that can be used to individually expand the repertoire of modeling functions, for example. However, it may be somewhat inconvenient that the Node Editor must always be opened first in order to change parameters. To do this, double-click the Asset group in the Object Manager. This opens the Node Editor even if you are working only in Cinema 4D's default layout, for example. In the Node Editor, the value for Inset or for the Offset of the Polygon Bevel Node, for example, can then be changed directly at the corresponding Nodes. However, if you want to make certain values available as a dialog on the Asset, this is also possible with a few simple steps. This means that there is no need to open the Node Editor and the corresponding settings can be made directly after selecting the Asset in the Object Manager via the normal Attribute Manager, just as you are used to doing with other objects. To do this, proceed as follows:
As shown in red in the upper half of the figure above, small circle icons are displayed behind all Node parameters that can be operated via the Attribute Manager. By Ctrl-clicking on such a circle, an input matching the parameter is applied to the Node. As you can see in the lower half of the figure, we have created an input for Inset at the Inset Node here as an example. This parameter is useful for operating from outside the Node Editor to control the width of the bulge on the object. Using the same principle, you can also create parameter inputs at the Polygon Bevel Node, for example, which you also want to make available for external operation.
The following figure shows how we can now actually turn these parameter inputs into User Data. To do this, inputs must be created for these parameters at the Asset Construction group. As noted in the top half of the image, to do this, drag a connection from the Inset input to an empty area of the Node Editor and release the left mouse button there. A context menu appears where you select the Add New Input command.
The result of this action is that an input matching the Node input is created at the Asset group and a connection is automatically created between the Asset input and the input at the Node (see lower half of the figure above). Since this connection inevitably runs through other Nodes, the clarity of the graph can be improved by inserting Wire Rerouters (see the following figure). To do this, perform Shift+Ctrl clicks on a connection. The resulting Rerouters can be moved with the mouse as desired and are thus suitable for shaping the course of the connection.
As can be seen in the figure above, the Wire Rerouters provide more clarity in the Node network. Unnecessary Rerouters can be removed at any time by clicking on them and using the Del key, without removing the connecting line that runs through them at the same time.
Since in our case it is a connection to an input on the Asset group, however, there is another option to optimize the clarity of the Node graph. To do this, remove the Rerouters you created at this connection again and then drag the name Inset from the left Asset group's input side directly into the Node Editor. This creates a so-called Floating IO Node, which now makes this group input directly available at its output side. As shown in the following figure, this allows us to provide the Inset value right next to the Inset Node, saving us the long connection to the left input side of the group.
If you now click on the Nodes Modifier Asset in the Object Manager, you should get the Inset value in the Attribute Manager, which you can now also operate there normally (see the following figure).
Another option for creating your own operating dialog is via the entries in the User Interface group in the Asset Browser. All information is summarized on this page in the documentation. You will also find further examples of how to create individual control elements.
In the User Interface group, you will find all common data types and control elements, such as sliders or option boxes, and can drag them directly from there into the left-hand column of a group or, for example, a Node modifier. This has the advantage that you can also create input options for data without the corresponding ports already being available on the Nodes of your circuit. For example, you can add options, numerical values or menus to the dialog of your asset, which can then be evaluated within the circuit or used for pre-calculations. Some of these operating elements, such as drop-down menus, allow the use of a variable number of entries. In these cases, further settings can be found in the Resource Editor (see the following section).
Using the Resource Editor
As explained in the previous section, User Data for the parameters that are directly available as inputs to Nodes can very easily be created as group inputs and thus made available to a user for operation. In some cases, however, it can also be helpful to offer the user your own values for operation, which are then to be processed within the Node network. In such cases, use the Resource Editor, which can be opened by right-clicking in the grid of the Node Editor and selecting Edit Resource... (see the following figure)
As you can see in the figure above, the Resource Editor offers four areas, which we will briefly explain here in terms of their function:
- Here you can see all inputs and outputs of the group. If you have already created several inputs according to the method described above, you can rearrange their order within the Inputs group here as you wish. This also affects the order of the parameters as they appear in the Attribute Manager. Here you can also create new, own inputs by dragging the desired data type from the area at number 2 into the Inputs group.
- Here you will find a list of typical data types, such as Color for a color input field, Integer for drop-down menus or integer value inputs, and Float for floating point values. Dragging the desired data type into the Inputs group at digit 1 automatically adds a corresponding input to the group and thus also generates a new parameter for input in the Attribute Manager. By double-clicking on the name of a data type in the list at number 1, its name can also be changed, which is then also used as the name for the corresponding parameter. All settings regarding units, user interface or e.g., value limits of a parameter are made in the settings area at number 3.
You will also find entries for a Separator or a Group in the list at number 2, which you can also drag into the Inputs area at number 1, in order to also be able to structure the display of many parameters in the Attribute Manager. - If an input is selected in the list at number 1, you will find all settings for it here. For example, the permissible value range for inputs can be limited here, a unit for numerical values can be activated, or a preset value can be specified.
- This area is intended only as a preview and shows you the representation of the Input values as a user would see them in the Attribute Manager. This can be used, for example, to check the user interfaces or the unit used for a numerical value.
After you have made additions or changes to the entries of the Inputs group in the Resource Editor, you can simply close it again. Change will be applied automatically and you can proceed with dragging new connections from these inputs directly in the Node Editor.
Detailed descriptions of all possible data types that are suitable as user data and further examples for using the Resource Editor can be found on this page.