Cinema4D to After Effects and back again…

Posted in After Effects Compositing, After Effects Plug-ins, Cinema4D MoGraph, Cinema4D Rendering, Cinema4D Xpresso on March 30th, 2012 by Tim

C4D To AE Multipass Comp with Effects

C4D To AE Multipass Comp with Effects

In this collection of tutorials created for Maxon’s You Tube channel, I explore techniques you can use when working with Cinema4D Multipass rendering in combination with the After Effects exchange feature of Cinema4D.

C4D To AE Basic

C4D To AE Basic

Taking you step by step through the process, the tutorial starts by covering the basic principles of working with multipass rendering and exporting 3D information from your Cinema4D scene over to your After Effects projects.  Ensuring you use the correct colour management for outputting from Cinema4D and configuring your After Effects projects to make sure the files are composited in the right environment.

C4D To AE Advanced

C4D To AE Advanced

The second tutorial then moves on to some more advanced techniques including the use of Xpresso to export 3D information from specific clones and outputting lights as separate render passes.  This information is then imported into After Effects and the 3D data used in combination with third party effects such as Trapcode Particular and Video Copilot Optical Flares.

AE To C4D - Camera Tracker

AE To C4D - Camera Tracker

Finally I take you through the process of transferring your After Effects information over to Cinema4D.  Using The Foundry Camera Tracker, you will track and solve some footage, resulting in an After Effects camera and reference nulls being created.  This camera and null information will be exported from After Effects into Cinema4D and used to build some basic proxy geometry for catching shadows and reflecting the environment.  This is then output using Cinema4D multipass rendering and composited back over the original footage in After Effects.

AE To C4D - Camera Mapping

AE To C4D - Camera Mapping

The powerful multipass rendering and compositing exchange features of Cinema4D allow you to access the individual render passes such as reflections, shadows and lighting from your 3D scene directly in your After Effects compositions, allowing you to grade and enhance your renders with ultimate control.  Access to 3D data taken directly from your Cinema4D scene and imported into After Effects ensures precise fidelity between native After Effects 3D elements and rendered elements from your Cinema4D scene.

C4D To AE - Light Passes

C4D To AE - Light Passes

As well as discussing the exchange feature in-depth, I’ll demonstrate many useful techniques for working in Cinema4D and After Effects, including scene management, basic lighting, MoGraph Color shader, MoGraph Multishader, Cloner Object, Effectors, Rigid Body Dynamics and much more.

C4D To AE - Comp with Effects

C4D To AE - Comp with Effects

To download the assets required to complete these tutorials please follow these links…

Download the iPod model here…

Download the footage for tracking here…

Oh, I think I forgot to mention that all of this is free, thanks to the awesome team at Maxon.  The iPod model is something I made specifically for this tutorial, it isn’t the greatest example of modelling, however it is native C4d with lowpoly mesh, hyperNURBS and other generators, it has a UV map and best of all it’s free for use in any of your projects, commercial or otherwise.  It would be nice if you do use the model in any renders or on your site if you could please link back to helloluxx.  The model is not free to distribute in any form and I’d appreciate it if you sent people to this page instead, thanks.

 

C4D To AE Basic: Part 1 (~25mins)

In the first part of the tutorial Tim shows you how to install the Cinema4DAE plugin into After Effects.  Walks you through the setup for the free iPod model.  In Cinema4D, you will animate the iPod model and a scene camera, manipulate the animation curves in the F-Curve manager. Create some basic materials and use the Layer Browser for organising the scene.

 

C4D To AE Basic: Part 2 (~32mins)

Setting up some simple lighting for the scene.  Optimising the render settings for speedy preview rendering.  Working with multipass rendering and using colour management combined with Linear Workflow when outputting your renders.  Using the compositing tag to isolate reflections to specific objects and assign object buffers.  Flight check the render settings in the Picture Viewer to ensure there are no mistakes before committing to the high quality render.  External Compositing tag and AEC export for transferring 3D information from Cinema4D to After Effects.

 

C4D To AE Basic: Part 3 (~20mins)

Importing the AEC file into After Effects.  Correct colour management settings for working with Linear Workflow and multipass compositing.  Screen replacement on the iPod model.  Colour correction opportunities.  Compositing the rendered shadow and reflection over After Effects layers.

 

C4D To AE Advanced: Part 1 (~30mins)

Setting up a Cloner Object to create a flow of hundreds of objects along a spline.  Using the MoGraph Multishader and the MoGraph Color Shader to create multiple coloured versions of your clones with corresponding coloured screen graphics. Adding variation to the animation with the Random Effector.

 

C4D To AE Advanced: Part 2 (~17mins)

Animating a camera using nested null objects.  Basic lighting. Configuring multipass render settings to output various light passes.

 

C4D To AE Advanced: Part 3 (~24mins)

Using Xpresso and User Data to determine the index value of clones and then linking objects to the position of these specific clones. Baking object animation using the Bake Objects function. Exporting and then analysing the AEC exchange file.

 

C4D To AE Advanced: Part 4 (~30mins)

Importing the multipass renders and 3D information from Cinema4D into After Effects.  Using the imported lights with Trapcode Particular and VideoCopilot Optical Flares.  Adding After Effects 3D solids and effects to match the Cinema4D imported camera.  Returning to Cinema4D to explore a technique for isolating mattes from individual objects within a Cloner Object.

 

AE To C4d: Part 1 (~18mins)

Using The Foundry Camera Tracker to track some footage in After Effects.  Set up a ground plane and reference nulls.  Export the 3D information to Cinema4D.

AE To C4d: Part 2 (~28 mins)

Create some proxy geometry in Cinema4D for catching shadows and reflecting onto objects using the reference nulls and solids exported from After Effects.  Add a dynamic particle system of spheres which interact with the proxy geometry.  Output multipass renders and return to After Effects to composite the render over the original footage.

Tags: , , , , , , , , , , , , , , , ,

Linear Workflow in Cinema4D and After Effects

Posted in Cinema4D Rendering on February 3rd, 2011 by Tim

Linear Workflow is a relatively new feature for Cinema4D. Before the introduction of Linear Workflow in C4D Release12 it was only possible through the use of third party plugins such as DeGamma by The Third Party.

This article aims to explain the concept behind Linear Workflow (LWF) and in the process look at the correct techniques, file formats and procedures when using LWF in your studio pipeline.

The information in the following post comes from an extremely informative and helpful document which was written by Philip Losch. Philip is one of the mastermind geniuses responsible for Maxon’s Cinema4D.

I’d like to thank Philip for giving me permission to use his material here.

Why LWF?

Today’s monitors are not capable of showing colors how they really are. Let’s take a look at an example:

Gamma

Which of the two colors at the bottom resembles the top one the best?

The surprising answer is: not the right one. The left one should – depending on your monitor – be pretty close.
Why is this surprising? We’ll see that when we zoom into the image:

Gamma Large

The same image scaled up 600%

At the top is a regular pattern of black & white pixels. At the bottom left the grey has a value of 192 (= 75%) and at the bottom right of 128 (= 50%).

Now… shouldn’t an even mix of 0% black and 100% white pixels blend into something like the bottom right grey of 50%?
At least that’s what we were taught in math: (0% + 100%) * 1⁄2 = 50%.

Unfortunately monitors do not work that way. The do not show colors linearly. The center of 0% and 100% is not 50% on a monitor. Monitors display the incoming signal with a so called gamma curve (actually it is even more complicated, but we’ll stick with this easier idea for a moment).

Monitor Gamma Curve

Monitor Gamma Curve

From left to right is your input image color. From bottom to top the actually shown color. So if the image color is 50% gray the real color shown is only about 18%. And to have a 50% gray displayed, you need an image value of about 75% (you can see the red dotted line).

As mentioned above the reality unfortunately is even more complicated. Monitors have so called ‘color profiles’. A color profile is such a curve definition – however with a possible interaction of Red, Green and Blue components. A color profile can do anything – e.g. it can substitue red for 50% green, it can add red and green and assign it blue… As an image looks widely different on devices with different color profiles many image formats allow to embed a colorprofile that ‘records’ under which conditions an image was created.

Most images nowadays are created with a so called sRGB color profile. sRGB roughly looks like the above curve and affects Red, Green and Blue components independently.

But isn’t it a dumb idea to build monitors that don’t show colors linearly and not “how they really are”? The answer is yes and no – unfortunately our human eye sees light intensities in a nonlinear way too and is more susceptible to certain ranges of intensities.

This would not matter as much if we had displays with unlimited color resolution (floating point or ‘HDR’ displays), but monitor technology for the most part is still stuck at 8 bit color depth per channel (or sometimes 10 bit for medical displays).

So now that we know we have to make do with this existing technology, we have to look for a better solution. Actually, there is the possibility to correct this with software – this is where Linear Workflow comes in.

The main problem of renderings created without LWF: lights are overblown and colours mix badly (‘unnaturally’). While the artist can compensate for parts of it by adjusting lights, falloffs, colours etc., this is only possible to a certain extent.

How LWF works

CINEMA 4D is clever enough to offer you a “one button” solution – and by default LWF is automatically activated in new scenes.  If you are wondering where abouts you find this one button solution.  Open the project settings (Control-D or via the Edit Menu).

Project Settings

Look for Linear Workflow in project Settings

It helps to understand how this works internally, especially when you need to use your rendered images in other applications later. Let’s focus on the upper path in the following image (LWF on):

LWF vs Non-LWF

LWF vs Non-LWF

LWF works in three steps:

Step 1: Before rendering all so called ‘assets’ (which are any colors, bitmaps or external references) are transformed from their colorspace (or sRGB colorspace, if they do not have a colorspace assigned) into linear colorspace.

Step 2: The render engine does all its calculations in linear colorspace.

Step 3: The rendered image is transformed from linear colorspace into the colorspace that the user chose for image output. The colorspace –if the image format permits- is embedded into the image.

There is no rule without exception: if your texture or colour is in a bump channel, alpha channel, normal channel or displacement channel the ‘raw’ image data is used (so step 1 is omitted). The reason for this, is that other applications like Z-Brush expect their images to work a certain way and contain direct height information (so e.g. black equals 0m height, white equals 100m and 50% gray equals 50m). You can also think of it this way: all material channels that don’t have anything to do with direct material colors (bump and normal channels change lighting only, alpha cuts out parts of the material and displacement changes the elevation) do not undergo this first conversion step.

Here’s a concrete example of this process:

Step 1: A sphere’s texture is an 8-bit image with no color profile embedded.

As the image has no color profile C4D assumes it is using sRGB (the the most commonly used profile).

Let’s also assume the sphere’s texture is 75% blue.

C4D now transforms this color from sRGB colorspace into linear colorspace. So the value of 75% becomes 50%.

Step 2: C4D does all lighting calculations linearly (and this is why the images will be so much superior – there is no color ‘distortion’ happening anymore).

Let’s assume a pixel is 50% illuminated. So we get 50% * 50% = 25% blue.

Step 3: The calculated image is converted into output color space, which in this example shall be sRGB again.

Our 25% become roughly 56% blue after transformation by applying the sRGB curve.

So the end result for our pixel is 56%, while in traditional rendering it would have been 75% * 50% = 37%.

And so they used LWF and lived happily ever after..

Not so fast! If you thought we only had to deal with !%§!$ hardware I have to disappoint you – as we’re also unfortunately living with !%§!$ software! It will take years and years until most software can properly handle colour profiles, linear workflow etc.

Fortunately Cinema4D, AfterEffects and Photoshop (and several modern compositing applications, for example Nuke) can play nice together – as long as you choose the right settings.

Let’s go through the limitations and problems step by step.

1.) Windows and Mac OS X

The operating systems now have some support for colour profiles. While OS X does a pretty good job evaluating image profiles, Windows 7 works for some image formats, older versions of Windows do not evaluate colour profiles. To view images, it is best use C4D’s Picture Viewer – as it always supports colour profiles.  If you check the View menu, you will see there is an option to view the image with the Colour Profile or without.  Select the Information Tab, and you can see the Colour Profile assigned to the image currently being viewed.

Picture Viewer

Cinema4D Picture Viewer

2.) Image formats

Lots of image formats do not support embedding of color profiles. While this is no problem when you render images to sRGB colourspace (as most applications naturally assume this) it becomes a big problem especially in combination with Multipass renderings and linear workflow where the image colour profiles must be linear.

You can choose your desired output Colour Profile in the Cinema4D Render Settings – Save options.

C4D Save Options

Choose your output Colour Profile in Cinema4D Render - Save dialogue

Always try to choose a format that supports colourspace information, unless

• You render a regular image to sRGB colorspace

• You render Multipasses, but don’t have LWF activated

• You render Multipasses, but know how to adjust the settings in your compositing application

The following image formats do not support colourspace information:

BMP
DPX (8- and 16-bit)
OpenEXR (8- and 16-bit)
IFF
RLA
RPF
TGA
Quicktime xxx (xxx = any format)
AVI Movies
Quicktime Movies

3.) 32-bit images

A specialty applies when you use 32-bit images for in- or output. By definition a 32-bit image is always saved in linear colourspace.  C4D takes care of this for you automatically. If you choose 32-bit output the colour space option for the saved image is automatically disabled and linear colourspace is used.

4.) Photoshop CS 4 and higher

Photoshop reads and writes regular images without any problems. Single-File Multipass images are also handled correctly with one exception: if you render without LWF and output to 32-bit Photoshop can no longer composite the image properly. This comes from the above mentioned limitation that 32-bit image formats do not contain any colour profiles.

5.) AfterEffects CS 4 and higher

The most important setting in AfterEffects that needs to be adjusted is “Linearize Working space” in your project settings.

AE Project Settings

Linearize Working Space - After Effects Project Settings

If you render with LWF in C4D this option needs to be enabled; if you render without LWF in C4D it needs to be disabled.

The reason for this is: Multipasses ‘outsource’ calculations to a compositing application. This only works though if the compositing application does the same mathematical calculations as the render engine, which means the colourspace they’re operating in needs to be identical.

Once you have Colour Management enabled in your After Effects projects, when you select a footage item, it will show you the Colour Profile in the top of the Project Window next to the thumbnail.  You can check here to ensure the profile is being read correctly.

After Effects Project Window

The interpreted Colour Profile visible at the top of AE's Project Window

Try to use 16-bit colour depth or higher to avoid the occurrence of banding – as multipasses sum up multiple layers and then have the result transformed into monitor colourspace 8-bit usually isn’t enough.

For special passes like UVW data, Normals maps etc. activate the setting “Preserve RGB” in the “Interpret Footage” dialog to use the “raw” uncorrected data (not influenced by any color profile).

Interpret Footage

Colour Management inside the AE Interpret Footage dialogue

So there you have it. Linear Workflow with Cinema4D and After Effects in a nutshell. Hopefully this article helps to clear up any questions you may have had regarding LWF and C4D. Once again, huge thanks to Philip Losch for originally preparing this information and allowing me to post it up on helloluxx.

Tags: , , , , , , , , , , , ,

Cinema4D R12

Posted in Cinema4D Misc, News on August 31st, 2010 by Tim
R12 Splash Screen

R12 Splash Screen

Well it’s that time of year again. The new release of Cinema4D has been announced. What an amazing release it is too. I have been fortunate enough to be part of the beta team and have been testing the new features for a while now. It is difficult to know where to start, but the most important update for me has to be the new dynamics module.

Dynamics Menu

Restructured GUI - Dynamics Menu

Dynamics is incredible! The old dynamics module was slow, unreliable and quite honestly an unpleasant experience to work with. The new dynamics is an absolute joy to work with. In fact work can quite easily become play!

Those of you familiar with MoDynamics, introduced with r11, will be pleased to hear that the new dynamics is a huge extension beyond this. Maxon have taken Dynamics to a whole new level. Instead of being restricted to rigid bodies that only will work with MoGraph objects, we now have have the addition of Soft Bodies, Springs, Joints (hinges, etc) and Motors. They all work together, and even better they all work with or without the MoGraph module. If you want a stand alone dynamics simulation you can easily create this, but if you want to then duplicate it 500 times, drop it in a Cloner and away you go.

Umbrella

Rigid and Soft Bodies working together - click for movie

Dynamics will function as a fantastic feature in it’s own right, it will also work with MoGraph if you desire. For instance you can create a Soft Body, but you can also create a Soft Body of clones. Imagine virtual springs between all your cloned objects. You can link Soft and Rigid bodies together with the huge number of connector objects, these allow you to create hinges, cardon joints, ragdoll, sliders, the list goes on. Springs can be linear, radial or both, expect to see a lot of bouncing around in your scenes when you get hold of this.

Deckchair

Rigid Bodies, Soft Bodies and Hinges in action - click for movie

All you Xpresso heads will be pleased to hear that Dynamics comes with some new Xpresso nodes, so you can link Dynamics to other elements in your scene, such as Thinking Particles, allowing you to create particles upon collision and plenty more besides.

All in all Dynamics has finally received the upgrade we have all been waiting for. To be honest, I’ve just touched upon the features, you should really check out the Maxon webpage for full details of the new featureset.

Alongside Dynamics there are plenty of other improvements to be in awe of. We have now got a bundle of new deformers and a new morphing system. The new Pose Morph is a hybrid of Pose to Pose and Morph. So you can mix and match between position, scale, rotation and point level morphing. On top of the obvious morph parameters, Pose Morph supports UVs, Maps, Hierarchy, Parameters and User Data. Yes! I did say UVs, now you can morph your UV maps as well as geometry.  How awesome is that?

Deformer Menu

New Deformers

The Camera Deformer allows you to deform objects from the Camera viewpoint, some crazy stuff is going to come from this deformer alone. You set the grid resolution and then you can drag and keyframe points on the grid looking straight out onto your scene (and it has falloff built in too). If you link Pose Morph up to Camera Deformer with some Displacement and Cloth in between, then you can start to understand the power that can be harnessed.

Mesh Deformer is another new deformer. Take a low poly cage and use it control a high poly version. Something I know a lot of users have been asking for. You can even set your low poly mesh deformer work as a Dynamic Soft Body and as the low poly cage deforms, it then passes that deformation on to the high poly mesh.

I cannot finish this without mentioning Linear Workflow. Cinema4D now has the option to include Linear Workflow in your projects. Those of you who have been using DeGamma will be glad to see LWF as part of the core application. The new openGL (which is a fantastic improvement) supports Linear Workflow, so you see an accurate preview of your lighting and materials in the editor. We can use Colour Profiles for input and output now. This means we finally have the ability to work in Linear, and use Colour Management.

MoSpline L-System

An alternative use for the new MoSpline L-System - click for movie

Well I really have only touched on the new features. I haven’t mentioned the new Render Queue, Smoothing Deformer, Correction Deformer, Surface Deformer, GUI enhancements, Freeze Transformations, IES lighting, Weight Manager, L-System (OMG!), Python…

I love this release, it is huge and I am sure you will all love it too. Check out the Maxon website for the full details and visit Cineversity for all the video highlights.

As for learning those new features. Watch this space, helloluxx will soon be updating our tutorials, to offer you an intensive and comprehensive collection of training that will cover many of the new features in depth. Something you definitely won’t want to miss out on.

Tags: , , , ,