Thursday, July 11, 2013

C4D Tips & Techniques #2


In part #1 of my C4D Tips & Techniques I covered the first stages of using Cinema 4D - settings, general use, the Object Manager, and modelling.

In this part I present you the things I've learned about the latter (or more advanced) stages in the production process - texturing, hair & fur, rigging, animation, and rendering. As with my previous tips, I can't take credit for all of these as many came from other great C4D users. I've included reference links in such cases, and urge you to visit those wonderful blogs and video channels.

I hope you find at least a few of these tips useful, and I'm always open to comments and suggestions (here or via Twitter), so please don't be shy.


MATERIALS & TEXTURING

Search for the shader effect you want

If you want to know what different shaders look like, simply open the Help and search for "Shader". The Noise shader includes detailed example images of each noise type.

ALT+Drag to merge materials

To merge multiple materials, simply ALT+Drag one material onto the other in the Materials Manager.

Quickly Replace/Re-Link missing textures

To replace or re-link a texture file, go to the Attributes panel and select Mode > Project Info >Textures, you can see all the linked textures and change them or their paths.

Drawing UV mesh alignment guides in BodyPaint 3D

It can be tricky to align fine details between sections of a UV mesh. To make this process easier - once you have your UVs unfolded - use the BodyPaint brush at 1 px solid width to draw lines where you want details (or the edges of details) to go, paying attention to where the mesh sections intersect. Save the texture, and when you bring it into your external program those lines will give you clear indicators of where each section of detail will fall across all the relevant UV sections.

Create a UV Mesh Layer for Photoshop texturing

For easier texture creation outside of Cinema 4D, it's helpful to embed the UV mesh as a layer in the texture file. To do this, toggle Create UV Mesh Layer (in the Layer menu of the Texture panel), then export the texture file.

Create textures in Adobe Illustrator

Textures can be easily created or modified in Adobe Illustrator. However Cinema 4D cannot use Illustrator files natively for textures, so you must export the file into a compatible format. Here are some things you must keep in mind when building textures in Illustrator:
  • ensure you're working in the proper colour space (usually RGB)
  • set your working units to Pixels
  • ensure the layer/object visibility is set properly
  • export to .PSD or .TIF at 72 ppi (might be worth key binding the Export command)

Reflective Materials

In the real world, reflective surfaces reflect more along parallel to the viewer that they do when looked at straight-on. This can be duplicated in Cinema 4D by applying a Fresnel effect to the Reflection channel.

Subsurface Scattering

To enable SSS, choose it in the material's Luminance channel under Effect > Subsurface Scattering. There you can choose several presets, but the most important option is Path Length, as this determines the depth  of the material to which light scatters.

Preventing texture slipping during deformation

If your texture's slip when you deform objects, use cloth, etc., use the Stick Texture tag to hold the texture in place




HAIR & FUR

Using Hair vs. using Fur

Fur is the far more basic of the two systems, and will allow quick (if limited) setup. With hair many additional options are offered, including the ability to manually manipulate each hair, and convert hair to polygons for further manipulation.

Clump, Curl, Frizz & more

There are a large variety of options (such as Clump, Curl, Frizz, Wave, etc.) available within the Hair Material that aren't enabled by default.

NOT Rendering Hair

If you wish for a hair object not to be rendered, it is better to deactivate the hair object (click the check mark in the Object Manager), rather than simply disabling the renderer for that object. With the renderer set to off, Cinema 4D will still take the object into it's effect calculation, which could greatly increase the render time. Oddly, this doesn't seem to be case when rendering in the viewport.

Settling Hair

To easily settle hair to a more natural state, enable Dynamics and adjust the Stiffness under Modifiers. Then simply play the timeline until the the dynamics have settled. Any brushing, combing or hair placement will be taken into effect before the dynamics play out.

UV maps with Hair

UV maps can be applied to Hair textures to drive colour or placement. When using a UV map to drive hair colour, ensure you apply it under Roots on the Color tab, as Color actually drives the gradient along a single hair.

Interpreting Hair as polygons

By default, hair is applied as a render effect. This can be problematic in a number of circumstances (such as when you wish to have hair included in object buffers or depth of field). To have hair interpreted as polygons, select the Hair object and then go to the Generate tab. Selecting anything other than None under Type will cause the hairs to be interpreted as solid objects. Do note:
  • displaying generated hair objects will significantly it slow down the viewport
  • polygon hair applied to hyperNURBS (or hyperNURBS converted to mesh) may render out in grid-like patches. To fix this, set Align to Random in the Generate tab.

Applying the Hair Material to polygon hair

Generated hairs will lack a material when rendered (as the hair shader doesn't apply it's colouring to them). To return the colour to generated hairs:
  • create a new material with the Polygon Hair texture in the Color channel
  • check From Hair Materials under Illumination
  • disable all other channels if you simply wish to inherit everything from the original hair material

Instancing objects onto Hair

Instancing objects onto a hair system is quite simple and incredibly useful. This technique is great for any object that you want placed or to animate similarly to hair (such as adding wind to have it gently blow around, brush or push it with collider objects, etc). Anything you can do with hair you can do with an object instanced onto it.




XPRESSO

Referencing input values in formulas

When dealing with formulas, you can reference the input values in two ways:
  • Direct Reference: using the exact name of the port (case insensitive)
  • Variables: designating the input port number with a "$" (ie: "$1" for the first port, "$2" for the second port, etc.)

Convert values with the Range Mapper node

The Range Mapper node allows you to convert input values to a different set of output values. This is ideal when converting between data types like percent and degrees, or simply for having one range of values represent another (ex: 0 to 100 represents -30 to 162.5).

Invert number with Negate node

To invert a number (between positive and negative values), use the Negate node.




RIGGING

Setting group displays

To ease in setting up animations, Group objects can be configured with a visible representation in the editor. Simply select the group object, and then go to the Object tab. There you can select a display shape as well as a visible orientation, while the colour of the shape can be set in the Basic tab. 

Create your own controllers in Cinema 4D using the User Data Manager and Xpresso, allowing you to control multiple items, objects, or attributes with a single slider.

Two-axis controller

Joystick controllers

To setup a two-axis (joystick-style) controller to drive a rig, create user data with the Vector data type, and set the interface to 2D Vector Field. This allows you to control two sets of data with a single interface (great for facial rigging or complex mechanical movements).

Converting a Spline to Joints

To convert a spline to a chain of joints, simply select the spline and select Character > Conversion > Spline to Joint. Do note that a joint will be created between each point in the spline, so the spline may have to be subdivided to ensure proper joint size.

Using IK Tags

  • Ensure IK Solver is set to "3D" (on Tag tab) if your IK chain isn't moving as you expect
  • Reduce Max Iterations (on Advanced tab) if you notice viewport lag when moving your chain. Increase back to "9999" for rendering.




ANIMATION

Tweaking animations without changing the original

If you need to tweak an established animation, an easy way to do so is to add a Motion System (Cinema 4D) tag to the animated object you want to tweak. This tag allows you to create multiple layers of animations, which can be combined to varying degrees. For instance, you can create a motion layer with an additional rotation, and apply it to the original animation without making any changes to the original animation itself.

Use the Constraint tag instead of the Target tag

When you want an object (such as a light or camera) to remain pointing to another object, you have more capabilities if you use the Aim element of the Constraint tag rather than the more traditional (and basic) Target tag.

Sometimes - such as when capturing movement with Cappucino - motion will write to every keyframe, which can be very messy when you want to make changes. To clean this up, you can re-create the motion curve using this quick snapshot technique.




RENDERING

Deleting Render Setting presets

To access or delete render setting presets, go to Content Browser > Presets > User > Render Settings.

Object buffer of bunny

Object Buffers

Object buffers allow you to create masks within your renderings for objects in your scene. They can be applied by adding a Compositing tag to the chosen object, and then enabling an Object Buffer ID number. You then simply need to enable Multi-Pass within the Render Settings and add the associated Object Buffer ID from the Multi-Pass button.

NOTE: In image files (such as PSDs and TIFFs), the object buffers will be found in Channels (not Layers).

Global Illumination

One of the most realistic ways to present a model in Cinema 4D is through the use of global illumination, which Cinema 4D uses describe its Radiosity solution. Radiosity takes into account direct illumination of each surface, and adds to that secondary illumination — light bounced off other nearby surfaces. The result can be spectacularly realistic, but incredibly time consuming.

Objects transparency without internal polygon structure

When you animate transparency in 3D, you may reveal parts of the 3D model that you do not wish to. EJ takes a look at the issue with an example using type and then provides a quick solution for avoiding it and make 3D objects fade properly as if it were more like a 2D object.

Using the Matte object when forgetting to render an Object Buffer

In this Cinema 4D quick tip, I’ll be going over the Matte Object.  This feature is crucial for when you realize you accidentally forgot to set an Object Buffer in your scene after you rendered everything.  We’ve all been there, right?  I’ll show you why using the Matte Object beats the other mainstream way of “faking” an object buffer with creating materials with black and white luminance channels and, of course, why it’s not smart at all resorting to re-rendering the entire animation just because you forgot to set an Object Buffer.

Exporting to Adobe Illustrator using Sketch and Toon

You can export a render (or even a full animation) to Adobe Illustrator by using the Sketch and Toon module.

Depth pass

DoF using Cinema 4D and After Effects

A very quick and easy way to set up your depth passes correctly so you can do your DOF in After Effects. This workflow will make it much easier, faster and more flexible to work with depth of field. I'll show you two ways to use your depth pass, the free Camera Lens Blur and a plugin called Frischluft Lenscare.




I will often post quick tips to my Twitter feed, so if you found these to be helpful you may want to follow me to get them fresh.