Houdini Engine Plug-In Documentation
Transcription
Houdini Engine Plug-In Documentation
Houdini Engine Plug-In Documentation Introduction The Houdini Engine is a software technology created by Side Effects software that allows artists to use Houdini Digital Assets files created using the Houdini application inside Cinema 4D. The C4D Houdini Engine integration allows artists to leverage the capabilities of Houdini Digital Assets using the standard Cinema 4D workflow that makes it so easy and powerful to use. Installing the Houdini Engine Each version of the Houdini Engine Plugin for Cinema 4D is “linked” to a specific build of the Houdini Engine. Therefore it is very important to have the correct Houdini Engine installed. For this reason, MAXON has included a “Get Houdini Installer” command in the Pipeline -> Houdini Engine menu. That command will always download the correct build of the Houdini Engine for you. Once the correct build is downloaded, installed and licensed, Cinema 4D will automatically use it, without requiring any further action from the user. You can have multiple builds of Houdini and the Houdini Engine installed on your system without them interfering with each other, so feel free to always download the correct one. For licensing inquiries, please refer to the chart below and contact Side Effects software. Houdini Licensing and Asset Levels There are 3 levels of assets, which depend on the Houdini licensing type that was used to create them: Commercial (.hda and .otl), limited commercial (.hdalc), or non-commercial (.hdanc). The following chart shows which assets can be used with which Houdini license type: -1- Get Assets From Orbolt The Orbolt.com web site is a Houdini Assets marketplace where users can find a large number of free and commercial assets. Users can publish their assets on the Orbolt Smart 3D Asset Store. The C4D Houdini plug-in has a “Get Assets From Orbolt” command in the Pipeline -> Houdini Engine menu, where you can find assets that are certified as being compatibl2001e with C4D. Notice The Houdini Engine Pipeline integration plugin relies on the Houdini Engine by Side Effects Software. Unless you have a licensed version of the Houdini Engine, the plugin WILL NOT WORK. For Houdini Engine installation information and support, please contact Side Effects Software directly. MAXON does not provide support or information for the Houdini Engine. Houdini Assets in C4D Introduction A Houdini asset in Cinema 4D is made up of of two object types. The Asset Generator and the Output Generator. The Output Generator can be a mesh object or a Thinking Particle Generator object. Loading a Houdini Digital Asset inside Cinema 4D A Houdini asset can be loaded by using the Pipeline -> Houdini Engine -> Load Asset or File -> Open commands, or by dragging and dropping a Houdini asset file onto Cinema 4D. -2- Asset Generators In the Asset Generator’s attributes you will see the following Default attributes and Commands (buttons): Scale, Commands, Priority and Infos. Also, you may find more attributes and inputs depending on the design of the asset since it is the creator of the asset that defines precisely which parameters and inputs are available. Scale A Houdini unit is 1 meter by default, whereas in Cinema 4D we can define our scale using real-world units. For that reason, we need to be able to define how a Houdini Unit maps to a Cinema 4D document unit. Hence, the Scale attribute. The scale attribute represents the number of Houdini units that are equal 1 Cinema 4D unit. This way a user can adapt the scale of a digital asset to fit the project. Commands (buttons) Select Generators: selects all the output generators for this asset. Update Generators: updates output generators by removing obsolete ones and adding missing ones, if any. This button is ghosted if there is nothing to update. Update Materials: updates materials and texture images for all output generators. This button is ghosted if there is nothing to update. Reset Simulation: resets the simulation cache of the asset. Priority The Priority controls allow the user to control the execution priority of the asset manually. By default, when Priority is set to Automatic, the Houdini Digital Asset executes at Animation level if the asset doesn’t have any inputs but switches to Generators level if an input is present. By setting the priority to Manual we can change the execution priority to suit our individual setup, and this also allows us to “daisy chain” more than one asset without having priority conflicts. -3- Infos The Path to Houdini File indicates the absolute or relative location of the Houdini Digital Asset file. The Asset Identifier is the name of the asset inside the .hda file. The Asset Information parameter indicates the asset instance ID inside the Asset Generator (used mostly for troubleshooting). Interface The Asset Generator icon in the Object Manager indicates the state of the Asset after it’s loaded and evaluated. If it’s green, then everything was evaluated correctly and the Asset has completed its tasks. If it’s red, then the Asset has NOT been able to complete its tasks, either because of a missing input (some assets rely on inputs to generate outputs), a bad parameter, or a user interruption (pressing Esc while the asset was cooking) that didn’t allow the Asset to complete the “Cook” (a “Cook” is an en evaluation cycle in Houdini terminology). Finally, if it’s a question mark, either the Asset wasn’t found in the search path or the Houdini Engine installation failed. You should receive a message accordingly. Output Generators The Output Generator can be either a mesh object or a Thinking Particle geometry generator and each output represents an “Object Part” (in Houdini terminology). By default, the Output Generator is a Child of the Asset Generator but we can move it anywhere in our Object Manager without affecting its relationship with the Asset Generator. This allows us to use the Output Generator object as any other standard Cinema 4D object. Also, we can make any number of copies of an Output Generator while retaining the connection to the Asset Generator. Output Generators have their own set of attributes and controls. Select Asset will select the Asset Generator. This helps identify the correct Asset Generator if we have moved the Output Generator outside its original hierarchy. The Asset Identifier is the same as the Asset Generator’s. Object identifier indicates the “part” name. Object information shows various information about the particular part (used mostly for troubleshooting). -4- Streaming Output generators also have a section for Streaming control: Update PSR: Output Generator is transformed by Houdini if enabled Update Geometry: Output Generator is recomputed Normals: shading normals are created if enabled, otherwise only a Phong tag is used UVs: UV texture tags are created, if enabled Textures: Textures are created, if enabled Update Image File On Parameter Change (Only available if Textures is enabled): Determines if texture images should be extracted to disk when a parameter is modified interactively by the user. You can enable this option to make sure textures will be updated during playback and rendering. Please note that since textures are ALWAYS cached to disk, activating Update Image File On Parameter Change may significantly slow down your playback speed. Optional Parameters Asset Inputs The Inputs group is present if the asset has input parameters. This is where you may connect Cinema 4D objects to be used as inputs to Houdini assets. -5- Asset Parameters The Parameters group contains the Asset parameters. These correspond to the custom parameters that were exposed when the Asset was created in Houdini. Modifying parameter values will update the Asset and the output parameters will produce the updated geometry. Parameters can be keyframed, just like any Cinema 4D parameter. Other Attribute Tabs An Asset can be designed in Houdini to generate outputs with various attributes assigned to them. These attributes are by default “hidden” in the Object Manager, but visible as tabs in the Output Generator’s Attribute Manager. As long as they are invisible in the Object Manager, they are also NOT EDITABLE in the Attributes Manager. To edit them, you first need to expose them in the Object Manager (see Exposing Attributes on in the Object Manager). These attributes can be: Phong: a Phong tag set to 22.5° Normal: a Normal tag that stores the normal direction generated by the asset Material (by name): a Texture tag Component groups (by name): any point or polygon groups generated by the Asset UVs: UV sets generated by the Asset Vertex Weights (for arbitrary attributes): Houdini can assign any attribute to points or polygons. In order to be able to read these attributes inside Cinema 4D, each Output Generator is assigned one or more Vertex Map tags per attribute, depending on the attribute variable type. These attributes can only be numbers and are transferred as follows: If an attribute created in Houdini is a vector (for example, position is a vector with 3 components, X, Y and Z) then each component will come into Cinema 4D as one vertex map. The naming convention is based on the Houdini attribute name, plus an identifier for the component. For example, if we are transferring an attribute called “myPointPosition” and it’s a Vector 3 (three components, X, Y and Z), the Output Generator will have 3 Vertex Weight tags, one for each component X, Y and Z, and the names will be “myPointPosition_1”, “myPointPosition_2” and “myPointPosition_3”, for X, Y and Z, respectively. The rule is that the original attribute name will have an underscore “_” and a number that correlates to the component number added to it. The only exception is when the attribute transferred is the point Color (“Cd” inside Houdini). In that case the Vertex Weight tag naming is as follows: pointColorR, pointColorG and pointColorB, for Red, Green and Blue, respectively. -6- Exposing Attributes on in the Object Manager Since the aforementioned attributes are not visible in the Object Manager and only in the Attributes Manager, we need to follow a specific procedure to make them visible. It’s fairly simple: Select the Output Generator in the Object Manager and make a copy by Cmd/Ctrl + dragging it. Make this copy editable. You will now see all the available tags on this object. All you have to do is drag as many as you need on the original Output Generator. As long as the names of the tags are intact, the Output Generator will assign the correct values to them and you can use them or edit them as you wish. Particle Outputs A Particle Output Generator assigns one TP group per particle part (a particle part in Houdini is the equivalent of a Particle Group in Cinema 4D). The default Houdini Particle attributes that are available inside Cinema 4D are: P (position) Cd (color) v (velocity) mass age life id global index in the current document’s TP master NOTES A default Life value of 100 seconds is assigned to particles, as in Houdini. This value will be used if a Life attribute is not provided. A new Color attribute has been added to particles in Cinema 4D. Also, a new Display Color shader has been added in Cinema 4D to allow for rendering of geometries instanced on particles using the particle colors. Any object generated by the PShape TP node on particles that have a Color attribute will inherit each particle color, only if a material using the Display Color shader has been assigned to the cloned (attached to the PShape) object, or the particle generator. The Display Color shader works with render instances as well. WARNING In order for particles to be successfully generated inside Cinema 4D, the id parameter in Houdini must be used. Most particle-based fluids in Houdini don’t have an id set by default so you either have to activate the id attribute, or assign it manually. If this is not done, no particles will be generated inside Cinema 4D. -7- Inputs An Asset may or may not have inputs, depending on the design. When we input objects in an Input field, we call that marshalling in Houdini terminology. We can marshall mesh objects, particle groups (from the Simulate -> Thinking Particles -> Thinking Particles settings menu), Particle Geometry Generators, or even an output of another Asset. The mesh object can be any object in Cinema 4D, including primitives, generated objects, polygon objects, MoGraph objects or even whole hierarchies of objects, etc. You don’t need to make an object editable to use it as an input. The input name is defined by the creator of the Asset and allows for inputting hierarchies as well as individual objects. Whether all the objects of the hierarchy will be used or not depends on the Include Children and Include Particle Sub-groups checkbox activation switch. This allows Cinema 4D users to keep their setups procedural for optimal workflow. Marshaling mesh object attributes When marshaling a mesh object, many of its attributes will be included. Material tags, Point and Polygon Group tags, Vertex Weight tags, etc. If we want to transfer numerical attributes we can use the reverse technique of reading attributes. We create a Vertex Weight tag containing one numerical component with each tag, and the naming convention defines how this attribute will be transferred to the Houdini Engine. For Example, if we want to transfer the Position of each point, X, Y and Z, using a variable called “myC4DPointPosition” we need three Vertex Weight tags named, “myC4DPointPosition_1”, “myC4DPointPosition_2” and “myC4DPointPosition_3” for X, Y and Z respectively. WARNING: Please use ASCII characters for naming all attributes in Cinema 4D. Non-ASCII characters will be changed to underscore “_” before transferring. Houdini can’t use attribute names with Unicode characters. The exception to the naming rule is for attributes for point color. In this case the respective Vertex Weight tags should be named “pointColorR”, pointColorG” and “pointColorB”, and will be assigned to the color Cd variable on the Houdini side. There’s a limit of 16 components for each vector you can marshal. Any components with a number greater than 16 (e.g., “myPointVariable_17”) will be ignored. Marshaling materials with groups When marshaling mesh objects that have materials assigned to polygon groups, there are a few conventions you need to be aware of. When an object has just one material assigned to it without any Polygon Selection tag restrictions, then no polygon selections will be created. If an object has more than one material assigned to it, with at least one material restricted to a polygon selection, then two or more polygon groups will be generated on the output. All Polygon Selection tags will be generated on the output generator plus one more named “all_prims_XX” (XX will be replaced by an object index) and contains all the polygons for each object in the marshalled hierarchy. The reason this happens is that an Asset can create copies of a marshaled hierarchy of objects and generate a single output generator (single object) and the only way to restrict the main material to all clones is to use a polygon group that contains all polygons for each object. Although it may sound quite complex, the fact of the matter is that it just works and you will get the expected results. Marshaling Thinking Particles As far as Houdini is concerned, Particles are nothing more than points with attributes. The default attributes marshalled for each particle group are the following (the quotes contains the Houdini Attribute name): Position as P Color as Cd Velocity as v Mass as mass Age as age Life as life Particle Global Identification as id -8- General Generator Activation You may use the activation widget of Output Generators to disable the produced geometry, even for Particle Generators. In addition, the activation widget on Asset Generators can be used to control the activation of all Output Generators, acting as an “asset-level” activation override. XPRESSO All parameters in a Houdini Asset are available inside XPresso to allow for complex rigs and setups depending on your project’s needs. Simply drag the Asset Generator or Output Generator into an XPresso window and start connecting the parameters. Press ESC to Interrupt Some Assets can be very complex and take a while to cook (e.g., large fluid simulations, complex soft body dynamics, dynamic fracturing of large geometries, etc.), so MAXON has implemented a way to cancel the current cook by pressing the Esc key. In this case, the Asset will be incomplete for that frame and the Asset Generator icon will be red. In this case, if you wish to re-cook the Asset at that frame, simply select the Asset Generator, go to the Attributes Manager, and in the Assettab click on the Cook Asset button on the far right of the manager. While the Asset is cooking, a message and progress bar will be shown in the Global Status Bar (on the bottom left of your screen) that shows the progress feedback from the Houdini Engine. Asset file paths By default, when loading an Asset inside a Cinema 4D Project, the path that links to it is Absolute, EVEN IF THE ASSET IS IN THE ROOT FOLDER OF THE DOCUMENT. In order to make the path relative to the document, you can do one of the following actions: 1. Save Project With Assets, will create a new Project Directory (Folder), copy all Assets and make all links relative. 2. If a Cinema 4D document with an Asset linked with an absolute path is loaded and the link can’t be resolved (the Asset is missing), then the plugin will look for it in the root folder (where the Cinema 4D document is saved), and if it still can’t find it, then it will look into the known Texture paths, set in the Cinema 4D preferences, Files group. If the Asset is in the document root folder, the path will be converted to a relative path. However, if it’s inside a known Texture path, it will load the Asset, update the path but keep it as Absolute. -9- Houdini Engine in Cinema 4D Preferences In the Cinema 4D Preferences menu there’s a new Houdini Engine group available. In that group you will find some information about the Houdini Engine version your current Cinema 4D version has found, the license type, and other useful information you can access when seeking technical support. You can also click on the Get Houdini Installer to download the correct Houdini Engine build. It’s exactly the same as the menu entry mentioned in the installation instructions. © 2015 MAXON Computer GmbH • All rights reserved Max-Planck-Str. 20 • 61381 Friedrichsdorf • Germany • Tel. +49-(0)6172-5906-0 • Fax +49-(0)6172-5906-30 maxon.net - 10 -