Traffic Lights

Posted in Cinema4D Misc on January 27th, 2012 by Tim

Here is a quick post to share a piece of python code that I use in nearly every C4D scene these days. It is really simple and all it does is take the current state of the objects “Visible in Editor” parameter and apply it to the same objects “Visible in Render” parameter.

I use this to hide objects that I don’t want to render. You can of course simply keyframe both parameters, but this means you only need to key the Visible in Editor parameter. Another option is to use a Display tag which will also allow you to keyframe the object visibility. So it is nothing revolutionary that I’m offering (sorry about that ;)

The reason I use this is simply because you have a visual indicator in the Object Manager of the current state of an objects visibility, you don’t get this with the Display Tag unfortunately. Would be kinda cool if the eyeball closed to indicate visibility, similar to PS layer switches.

Anyway here’s the code, simply copy and paste this into a Python Tag and then choose File > Save Tag Preset in the Object Manager. The tag will be there for you every time you need it.

Start copying here…

import c4d
#Welcome to the world of Python

def main():

# get object tag is attached to
obj = op.GetObject()

# get visibility from editor
visibility = obj[c4d.ID_BASEOBJECT_VISIBILITY_EDITOR]

# pass editor visibility to renderer visibility
obj[c4d.ID_BASEOBJECT_VISIBILITY_RENDER] = visibility

…Stop copying here

Thanks to Patrick Goski who actually wrote this little snippet of code.

By the way if you get errors when you copy and paste this, it may be because of the formatting, so make sure you don’t use tabs and that it looks like this..

pythontag

Python Tag

Tags: , , , , , ,

Jigsaw Puzzle Tutorial

Posted in Cinema4D Dynamics, Cinema4D MoGraph, Cinema4D Rendering on December 14th, 2011 by Tim

I recently completed a tutorial for the Maxon’s You Tube channel. It goes into quite a bit of detail, so for that reason it is split into 4 parts.

Something you might be interested in?

I’ve copied some of the blurb from the You Tube page here so you get an idea of what I cover in the tutorial. If you want to check it out then please visit the Maxon You Tube channel.

In this tutorial, Tim Clapham from Luxx takes you step by step through the process of creating a Motion Graphics animation with CINEMA 4D.

You will learn how to use MoGraph elements such as the Cloner Object and how various effectors can be used to control the generated clones.

Working with Release 13, Tim covers several of the newer features such as the XRef object and the new Physical Renderer. However, throughout the process, options are presented to enable users of versions prior to Release 13 to complete the tutorial.

You can view the first section here, but why not visit Maxon’s channel and you can watch the other sections and also check out some other great videos.

Tags: , , , , ,

Sub-Frame Emission with Thinking Particles

Posted in Cinema4D Thinking Particles, Cinema4D Xpresso on November 4th, 2011 by Tim

Here’s another little tip for working with Cinema4D, specifically Thinking Particles. I offer up a solution to what appears to be quite a common problem with TP and hopefully this small tutorial will stop a lot of head scratching.

This time around, I show you a simple technique you can use to stop the pulsing you sometimes see with Thinking Particles when your emitter is moving too fast and you get those big lumps of particles emitted on every frame rather than a nice smooth emission..  Yes – you guessed it, this is sub-frame particle emission.

Of course this tutorial doesn’t cover many of the different ways that you can emit particles using TP but hopefully it gives you some idea of a solution that you can adapt to your own TP scenes.

 

Check out the quick tip over on the helloluxx vimeo channel.

Tags: , , , , , , ,

99 frames project

Posted in Cinema4D Misc, News on October 18th, 2011 by Tim

David Drayton from Maxon Computer has started a new personal project called the 99 frames project, he asked if I’d give it a shout out here on helloluxx, so here it is David!

99frames

It looks like a really great idea and hopefully it will showcase some exciting new work as well as highlighting some of the awesome features of Cinema4D R13. Here is a little bit of info from David’s site.

The 99frames project is designed to encourage people to try out the new CINEMA 4D R13 features. Since CINEMA 4D R13 is such a huge upgrade in terms of rendering, character animation and workflow, it’s almost a must in my opinion to get this project started. I really do invite everybody to this very first neosushi68 project, no matter which skill level you have. It simply doesn’t matter. It’s about having fun, learning and sharing your work with the world.

Please head on over and take a look. Could be the inspiration you are looking for?

 

Trapcode Form 2 Released

Posted in After Effects Plug-ins, News on August 24th, 2011 by Tim

Well first of all apologies for the tardy upkeep of this blog.  The posts are becoming quite rare lately.  I’ve been incredibly busy on some really exciting projects and had no time to eat sleep or post on helloluxx.  Let’s hope I can remedy this as soon as possible.  I’ve got lots of new ideas for tutorials and tips that I expect you’re all keen to see.

Form 2

Luxx created with Form 2 and an obj from C4D

I recently had the privilege of beta testing the latest incarnation of Trapcode Form 2. This is a fantastic upgrade and well worth looking into if you are an After Effects user.  The biggest new feature for me is that Form now allows you to import OBJ models.  If you use a 3D program that means you can bring your models into After Effects and then use the mesh to place particles.  Of course all of this is already possible (probably) within your 3D application, but the joy of working with Form 2 is that it offers a much faster feedback.  You have real time results (well almost, depends on how quick your machine is!?).  We all know that rendering in After Effects is generally a hell of a lot quicker than rendering from a 3D application.

Form 2 UI

Form 2 UI

I always thought of Trapcode Form as a similar beast to MoGraph in Cinema4D. Especially similar to using the Shader Effector.  You can create layer maps and use those to control all sorts of aspects of your particles.  So the luminance or colour of a layer can be used to control the postion, orientation, scale, displacement, colour, etc of your Form particles.

In fact Form is the perfect partner for your Cinema4D animations.  Using the C4D to AE export, you can export your camera move to After Effects.  Export the obj too and use that with Form.  So the camera will match your 3D render, you can use Form to add new elements on top.    Think of the possibilities!  Imagine you have a landscape that you need to populate with trees.  You can export a mesh of the landscape and the camera move, then add the trees in post.  Use random particle sampling to have a variety of trees, you could even have the trees animated too.  Of course this is a boring and simple example, but the possibilities are endless.

Form 2 Maps

Form 2 Layer Maps

If you work with animations then Form 2 offers a feature which allows you to import obj sequences.  This is an incredibly awesome new feature.  Not only can you import an obj sequence, you can also adjust the speed of the playback and also animate the offset parameter to retime the sequence. So this makes it easy to create basic speed ramps and bullet time effects right within After Effects.

The obj is referenced in After Effects just as any other footage is, so you can update the 3D files and then refresh or relink to another version with a couple of clicks.

For those of you out there working with Cinema4D who are looking to invest in the Form upgrade, I’d recommend taking a look at Riptide Pro. To be honest the native obj import and export with Cinema4D is about as basic as it gets.  However Riptide Pro is a fully featured obj import and export plugin.  It works great.   This will allow you to export your animations as obj sequences, which can then be loaded into AE and used with Form.  I’m sure you can imagine how useful this can be.  Not only can you export the camera from C4D to AE for matching your cameras, but you can export animated mesh too.  Total freedom to add loads more particle effects right onto your models.

Anyway, enough already.  If you want to read all about the full feature set of Trapcode Form then head on over to Red Giant Software. You can download a demo and try it out for yourself.  If you are using C4D, then the Riptide Pro plugin can be downloaded and tried for 30 days with no restrictions, although beware …  once you’ve tasted this sweet concoction, there’s no going back.

Oh, and there’s also an old Form tutorial on helloluxx if you are new to the plugin and want some pointers.

Tags: , , , ,

What’s your favourite AE Script?

Posted in After Effects General on July 12th, 2011 by Tim

I’m not sure if you use scripts in your day to day workflow, whether in After Effects, Cinema4D, or what ever application you choose to abuse. I recently asked a question on Twitter to find out which After Effects scripts were the favourites of my followers.  I use a few scripts all the time and knew that my selection was limited.  Rather than spend hours searching online for possible gems, I thought it would be far more prudent to ask for recommendations.  I also thought that it would make an interesting and informative post for everyone who visits helloluxx.

 

After 24 hours of replies, I compiled all the answers and have posted the list below.  I’m sure this is far from complete, so please add your own recommendations in the comments.  There are a few places that offer expressions, scripts and the like, for After Effects.

Here are a few to get you going…..

http://www.aenhancers.com/

http://www.redefinery.com/

http://aescripts.com/

http://www.nabscripts.com

http://www.motionscript.com/

http://www.crgreen.com/aescripts/

 

For those of you that would like to get your hands dirty and learn the art of scripting.  Lloyd Alvarez offers a course over at FXPHD which is an introduction to scripting.  They also have a Python for Compositors course which looks great, especially for those of you that use Nuke.

 

Anyway enough of all this chatter, on with the AE Scripts.  I’ve literally copied and pasted the description for these scripts from the relevant sites.  So it is not my review, but merely a reference for you all to use (in no particular order).

 

KindaSorta

Kinda Sorta

rd: Kinda Sorta

This script displays a palette with controls for sorting layers based on specific criteria.

If using only the Selected Layers in Comp (i.e., not all layers), the selected layers are moved to the top of the comp as part of the sorting process. If sorting by Layer Name, layers that have not been renamed (i.e., their names appear enclosed in brackets), the brackets will sort those layers before renamed layers.

 

 

BG Renderer Post Actions

BG Renderer Post Render Actions

BG Renderer

BG Renderer is a script that allows you to render your Render Queue items in the background while you can continue working in After Effects. It runs as a dockable panel that is saved as part of your workspace.

BG Renderer now comes in 2 flavors: Basic and Pro.

  • With the all new basic version you can just render your queue in the background. We completely re-programmed how it works so that it is simple and easy and works every time.
  • If you need options, then the Pro version is what you want.  Besides being able to set prefs for the render, the pro version offer the very powerful post render actions which allow you to get growl notifications, send email (with log), send sms and even iPhone push notifications when your renders are done or you have an error.  You can also send a terminal command to be executed after each item in the queue is done rendering and put the machine to sleep or shut it down. If you are using CS3 or CS4 and have CS5 installed, you can send your CS3 or CS4 render to the CS5 render engine to take advantage of the new 64-bit goodness while keeping your work project in the older version. Finally there is a new portable app/folder feature that makes it easy to create an ad-hoc render farm quickly by simply copying this portable app to all the machines on your network and just double-clicking it to launch the render on that machine.
BG Render Pro

BG Renderer Pro

Due to the huge amount of work that was required to bring version 2.0 to life we made the tough decision to make this version a licensed only version.  However, we feel strongly that you get a whole lot of value for the price. You can upgrade from the basic to the pro version at any time by purchasing a basic to pro upgrade license.  We also have not forgotten about all of you who were generous with the “Name Your Own Price” concept so please read the following upgrade notice.

Upgrade notice: For users who purchased BG Renderer between Jan 1, 2010 & Jan 11, 2011 when it was ‘Name Your Own Price’ we will give you a discount code equal to 100% of the amount you spent (if you bought it more than once, the values will add up). For all other users, no matter when you bought it, we will give you a discount code worth 50% of what you spent. To request a discount code please submit the email address you used for your original purchase here.  (If you purchased a Basic license after Jan 11, 2011 and want to upgrade, then buy a Basic to Pro upgrade license above.)

 

3D Extruder
3D Extruder

3D Extruder

3D Extruder is a script that makes light work of creating high-quality 3D extrusions in After Effects, using the time-honored method of stacking 2.5D layers (all automatically of course). The benefit of this is your 3D extrusions are part of your real After Effects 3D space so they interact properly with other 3D layers.

The script has several aims:

Familiarity:

To build 3D extrudes using a standard After Effects precomposition structure, making it familiar and intuitive for After Effects users to go into and customize.

Speed:

Traditionally, extrudes created by stacking 2.5D layers have been rather cumbersome to work with. 3D Extruder deals with this by having a built in “edit mode” which temporarily simplifies the structure at the flick of a switch. Used in combination with draft 3D it means that you can often scrub back and forth on the time-line in real-time or near real-time, leaving you free to worry about getting that animation just perfect.

Quality:

3D Extruder makes a highly convincing 3D extrude, emulating specular highlights, shading and reflection that respond dynamically to a controller light and reflector. Move or rotate your extrude and the shading and reflection change appropriately. Similarly, moving the light or reflector will cause the shading, specular highlights and reflection to respond too.

Ease:

3D Extruder has 10 presets that create great results at the click of a switch. With a bit of extra customization, you can create results that it’s hard to believe came out of After Effects.

Usability:

3D Extruder is not just for creating one 3D extrude. It also contains tools to make your life easier while working on projects. You can save and manage your own presets using the pop up preset box and the Current to UI tool. “Duplicate” allows you to make new versions of your extruder and even copy extrusions to other comps. “Center Reflection” will save you lots of time lining up camera, reflector and extrude and “Fix Expressions” is there to put things right if something goes awry in the engine room.
All told, 3D Extruder makes 3D extrusion quick to set up and easy to work with, while adding a level of detail that takes 3D extrusion to a whole new level.

 

 

Reposition Anchor Point

Reposition Anchor Point

RepositionAnchorPoint

This script allows you to reposition the anchor point of the selected layers around the layer edges while keeping the layers at the same position in the comp window.

Note: The download includes two archives. Version 2.5 is compatible with CS3 and version 3.1 which is compatible with CS4 and above.

 

Masks To Layers

Masks To Layers

MasksToLayers

This script places the masks of the selected layer on individual layers. For each mask the script will duplicate the selected layer and keep only one mask. For each new layer, you can specify the blending mode, and you can choose to move the anchor point to the mask center.

 

Copy Mask 2 Layer

Copy Mask 2 Layer

CopyMask2Layer

When you copy a mask from one layer to another it often changes its position. With CopyMask2Layer you can copy masks while keeping them perfectly in place – even if the layers are moving and if the mask path is keyframed.

 

ft-Toolbar

ft-Toolbar

ft-Toolbar

This script gives the ability to make your own custom toolbar with Effects, presets or any commands you use the most often.

Toolbar’s features :

* Edit UI : add, delete, order, config buttons of your toolbar.

* 5 kind of buttons:

  • EFFECT : set the name of the effect you want to use (See usage details below).
  • ANIMATION PRESET : select an animation preset file (ffx) to apply.
  • SCRIPT LAUNCHER : select an script file (.jsx or .jsxbin) to launch.
  • MENU : set the exact name of any menu item you want to call. For example : Time-Reverse Keyframes.
  • JAVASCRIPT : type any javascript that AE understands. More advanced, but you can do some crazy macro command with it.  You can find javascript snippets here: http://www.smipple.net/tag/ft-toolbar (feel free to add your own, simply tag it: ft-Toolbar)
  • OS : Any Operating System command you can run into your terminal can be set here. For example calc (on Windows) or open -a Calculator (on Mac) would start the calculator.

Get Effect Name : The EFFECT mode requires the effect matchname. If you don’t know or are not sure about the effect matchname, apply the effect on a layer, select it, and click on this button. It will set the ‘MatchName’ for you. Matchname ares unique name that AE uses to identify specific effects even if they have the same name.

* Buttons Icon : You can assign a custom image icon to each button. You can create your own icons or download a free icon pack below. All icons will be downloaded and saved into the config file. When you export the config file (xml) for use on another machine all the icons will be included so no need to keep the .png files.  The buttons size can be set to any size you like, but it is a good idea for it to match the size of your icons.

* Import/Export : you can import and export the config file to set the same configuration on several computer or for making backups

* Configuration file path (xml) : you can set the path of the saved config file (xml) anywhere you want. (ie. to a dropbox folder to keep all your computer sync with the same config). The config file will include encoded versions of any custom icons.

 

 

Expression Toolbox

Expression Toolbox

Expression Toolbox

The Expression Toolbox was created to help take the pain out of using and locating expressions. At some point you’ve probably come across an expression that you find yourself using on every other project you work on. The question is where do you store this expression? I noticed that a lot of people were storing their expressions in text files, without documentation of how they were used or where it could be found. Without knowing who created the expression or how to use it, you’re left waiting on an answer from a mailing list or web forum on how to properly apply it.

Enter the Expression Toolbox :

The Toolbox is a centralized location for you to store commonly used expressions, as well as making it easy to apply and retrofit to the comp you’re currently working on. You can group expressions that require multiple properties and controls to be enabled.

A Few Features :

  • Grouping (assign a group ‘name’ – or select an existing one at any time to view all of expressions in the group only at the same time)
  • Retrofitting ( this will pull layer names out of the expression, and allow you to select from a list generated from the current comp, which layer SHOULD be referenced)
  • Auto generation of layer effects ( based on expression code; Sliders, radio buttons, angles, points, etc.. will be generated automatically if they are referenced in the expression you are using, this is optional of course )
  • Sort by expression name, author and date ( these are created as expressions are entered into the library )
  • Expression Editing ( go back and edit author name, expression name, description – usage information, or the expression itself at any time )
  • Ability to apply current expression to the currently selected property of any layer.
  • Distributable ( the library file names and content is entirely up to you, and they are lightweight and transferable to others)
  • Merging of libraries ( you are able to import libraries from others and consolidate them into one “main” library if you wish )

So go ahead and give the Expression Toolbox a try, and see how easy it can be to organize your expression collection without having to dig through text files or forum posts to find your expressions.

Sharing expressions on a global scale :

The next step for the Expression Toolbox will be an online entry system that will allow you to enter your expressions to a global web driven database that anybody can access. You will then be able to download the most recent version of this database directly from the script. This will be in the next big release of the Toolbox.

For user support or feature requests for the Toolbox, please visit: http://support.croedesign.com

 

Get Sh*t Done

Get Sh*t Done

Get-Sh*t-Done

The “Get-Sh*t-Done” Palette helps speeding up the workflow and lets you work more intuitive with Adobe After Effects. The basic idea is to compress a sequence of frequently performed steps into one single step.

For example:

If you want to add trapcode particular to a composition you usually right click to add a new solid. Then right click on the new layer, go to effects, go to trapcode and finally select particular.  Plus, if you feel tidy you rename the solid to particular.  With the “Get Sh*t Done” Palette you just select particular from the trapcode dropdown menu and all is set up and good to go.

 

MochaImport

MochaImport allows to import Mocha tracking data in After Effects and use it in whatever way you want.

  • With the script the following tasks can be done as one click operations:
  • create corner pin
  • create CC power pin
  • create Red Giant Warp corner pin (Red Giant Warp plugin required)
  • create AE trackpoints from Mocha track
  • stabilize footage
  • move layers according to track
  • create a precomp in which the footage is stabilized (and even undistorted) while maintaining the movement in the original composition. All changes you make in the precomp occur automatically also in the original composition (appropriately moved)

MochaImport works with all versions of Mocha including MochaPro.

 

ft Cubic Lens Distortion

ft Cubic Lens Distortion

ft-Cubic Lens Distortion

This is a Pixel Bender plugin that allows for quick and easy lens distortion correction or effects including chromatic aberration.

When working on tracking or composition CG elements with shot footage, you usually have to deal with lens distortion. At first you would undistort your footage in your matchmove or compositing package, then track it, render your CG and make sure to apply the same distortion to your CG so it will look and match perfectly! While this methos workd, it makes you go back and forth with your different applications to undistort, distort again and so on!
ft-Cubic Lens Distortion let you manage all those distortion steps in one place: After Effects. It is based on the Syntheyes cubic lens distortion algorithm! You will be able to un-distort your live footage, and distort your CG renders without going back to Syntheyes (or any other app you are using for lens distortion)!
On top of that, you will be able to apply finishing effects like chromatic aberration to your final composition.

True Comp Duplicator

True Comp Duplicator

True Comp Duplicator

Creates a complete duplicate of a comp hierarchy including sub-comps.  If a comp is used multiple times, the comp only gets duplicated once and all remaining references point to the first duplicate.  If the comps are arranged in a special folder hierarchy in the project panel, that folder hierarchy is preserved or duplicated (depending on user preference) for the duplicated comps.

New in version 2.0:

  • Added dockable UI.
  • Added suffix or search and replace new comp name.
  • Maintain hierarchy and arrange into new folder option.
  • Non-english AE support.
  • Blessed for CS5.

 

TrackerViz
TrackerViz

TrackerViz

This script provides a tool box for visualizing positional data. Initially it was designed for manipulating tracking data, like averaging multiple trackers to get a better one, or visualizing trackers as little solids for better control. Now the script offers many more features. They are detailed in the user interface (via tool tips or help buttons). You can work with path, and (for instance) can create a new tracker from path vertices, and reversely you can create a new path based on an analyzed track. What works with trackers also works with layers, by considering layers position instead of trackers attach points.Data can come from layers position data, from tracking data or from path data.

Details on each function are given below. Note that some tool tips also provide information.

Average Position:
Creates a new solid layer at the center of the selected layers (or track points).

Position & Rotation:
Creates a new solid layer at the first selected layer (or track point) position, and rotates it towards the second selected layer (or track point).

Position & Scale:
Creates a new solid layer at the first selected layer (or track point) position, and scales it so that its size matches the distance between the two selected layers (or track points).

Position & Rotation & Scale:
Creates a new solid layer at the first selected layer (or track point) position, rotates it towards the second selected layer (or track point) and scales it so that its size matches the distance between the two selected layers (or track points).

Track Combine:
Creates a new layer that combines the selected layer (or track point) position with the position of its parent layer.

Corner Pin:
Creates a new comp-sized solid with the Corner Pin effect applied to it. The four corners are linked to the position of the four selected layers (or track points) (in the following order: UpperLeft-UpperRight-LowerLeft-LowerRight).

CC Power Pin:
Same as above except that the CC Power Pin effect is used instead of the Corner Pin effect.

Shape To Tracker:
Associates each vertex of the selected mask path with a new track point.

Shape To Layers:
Creates a new solid at each vertex of the selected mask path (the mask path can be animated).

Track Points To Shape:
Transforms the selected track points into an animated mask path.

Layers To Shape:
Creates a new mask path for which the vertices are linked to the position of the selected layers.

 

sParticular
sParticular

sParticular

sParticular is a script for After Effects that helps you with 3D integration when using Trapcode Particular.

If you apply particular on a layer, you will see that the particles are 3D aware if you have a camera. But if you have layers in your 3D space, the particles won’t intersect with them. Particles are always “in front of” the 3D layers that are below the particules layer in the layer stack.

Particular has a visibility option, where you can set a range where your particules are visible or not, let’s say from 0px to 200px in Z space from the camera.

What the script does is sort your layers in your comp so that the 3D layers stack on the composition regarding to their Z position, and then duplicates your particle layer between every 3D layers. All thoses instances have their visibility option expressioned to fill the Z range between the front and behind 3D object. Like that your particles are intersecting properly with your layers.

It’s not a true intersection, it rather an automation of a workaround, but it works great. Plus there are some options if you want to update your particle layer so that every instance get updated too.

Supports Particular from v1.5 and above (including Particular 64bit update for CS5), and works fine with multiple Particular effects on the same layer.

 

Immigration
Immigration

Immigration

Immigration turns the pain usually associated with importing and batch replacing files in After Effects a joy. While browsing for import, it shows file sequences as one line item instead of a long list of files. Immigration uses a custom algorithm to scan the file system at speeds dramatically faster than even the OS can. In our testing a server folder with 30,000 files that takes over 5 minutes to open in the finder opens in 12 seconds in Immigration (and that includes file-sequence detection!). If you frequently find yourself waiting for the OS to open folders then you will love Immigration.

You can then select more than one file or sequence and either import them all at once or batch replace files already in your project. You can easily assign a frame rate to all imported files at once. Immigrations’ Auto-Match Replace™ algorithm will automatically match files with similar names so you don’t have to. It shows you a preview so you can make sure the matches are what you want. It color codes the match depending on how close it is. This is convenient if you name your revised files with a new version number or date.

If your files are already neatly organized in folders, Immigration will duplicate and maintain the folder hierarchy within the After Effects project.

You can customize Immigration to only search for certain file extensions, and file age. So for example you can tell Immigration to only display .exr files that are less than an hour old. You can also tell it to include or ignore folder by name so if you would like it to ignore a folder in your hierarchy (an archives folder for example) you can do that easily.

 

AE to C4D 01
AE to C4D – Project in AE
AE to C4D 02

AE to C4D - Exported to C4D

pt_AEtoC4D

These scripts export data from After Effects to Cinema 4D. AEtoC4D exports AE cameras, nulls with the position and rotation of other layers, the comp frame rate, duration and start frame. Requires AE 7.0 and C4D R9.6, or greater.

 

Ease and Wizz

Announcing Ease and Wizz 2.0 — now with Curvaceous!

This new version lets you apply the expressions to curved motion paths and mask shapes.

Introduction

Ease and Wizz is a set of expressions for After Effects that give you more ways to interpolate between values. The obvious use is in motion, but they can be used on animated properties of any kind. They’re applied with an After Effects-ish palette that can be docked, so it’s very easy to use.

A while back, Flash guru Robert Penner created a suite of extremely useful easing equations that have been used to build thousands of websites worldwide. I’ve adapted these equations to work as expressions in After Effects (for an introduction to After Effects expressions, check out Dan Ebberts’ excellent site).

One advantage of using an expression for easing is that the keyframes are editable. You can drag objects in the comp viewer, or move keyframes in the timeline, and the easing will be updated immediately.

 

 

Tags: , , , ,

Creating Proxies using Instances

Posted in Cinema4D Misc, Cinema4D MoGraph, Cinema4D Xpresso on May 9th, 2011 by Tim

If you ever wanted to work with high and low resolution models in Cinema4D then this tip should come in handy.

Using the Instance Object combined with a simple Xpresso setup, this shows you how to create an object that allows you to work with a low polygon model and then swap this out for a high polygon version whenever you need to render or preview the final result.

This technique will keep your workflow streamlined, and allow you to perform tasks such as dynamics simulation and caching without the overhead of polygon heavy scenes. Once the caching is complete, you can switch out the object for the detailed version and render away.

Once created, this simple object will become a vital part of your Cinema4D library. You’ll never know how you worked without it!

Kudos to Kai Pederson who originally showed me this trick.

For more in depth and detailed tutorials, check out the Learn Dynamics for Cinema4D training collection. Over 10 hours of intensive training for working with Cinema4D and Dynamics. Available to purchase online here

Tags: , , , , , , ,

Multiple Object Particle Emission

Posted in Cinema4D Thinking Particles on March 21st, 2011 by Tim
Emit into multiple

Emit into multiple objects

Here is a setup that you can use when working with Thinking Particles and emitting into objects. This setup allows you to emit particles from multiple objects but only using one emitter. The principle is as follows…

You basically iterate through a list of objects. Then pass these objects into the volume position node, the result being that the particles are then placed into each object from the list. There is also included a simple method of enabling or disabling the objects from being included. Therefore you can control which objects have particles inside or not on a per object basis.

The great thing about a setup like this is that it is fairly simple to use and expand. It is easy to adjust the particle emitter as you are only using one emitter, yet it is quite powerful because it allows you to emit particles into an infinite number of objects. Well ok, perhaps not infinite, but you can certainly emit into hundreds if not thousands of objects with relative ease.

If you look at the screenshot above it may look like the particles are all in the same mesh, but each letter of the logo is an independent object. This means each letter can be transformed, textured and animated individually. Yet all the particles are generated with one emitter.

Anyway enough of this banter, how does it actually work?

Xpresso Setup

Xpresso Setup

Here is a screenshot of the Xpresso setup. The first node is the Object List node. You can find this by right clicking in the Xpresso window and choosing
New Node > Xpresso > Iterator > ObjectList

Object List Node

Object List Node

This node is really handy as it allows you to drag any objects from your scene into the Iteration List field and it will then iterate through the list. In other words it will output the object for every object in the list. It doesn’t matter where in the object manager hierarchy these objects are, so they don’t all need to exist in the same hierarchy. If you do want to add multiple objects by shift or control clicking to select your objects, remember to lock the attribute manager with the ObjectList parameters visible before you start clicking in the object manager to select your objects. If you don’t, you’ll lose the Iteration List field and will have to go back and select the ObjectList node in your Xpresso window again.

Iteration List

Iteration List

The next node along is a simple object node. Link the Instance output into the object node Object input port. If you drag one of your objects into the Xpresso window it will automatically add the Object node for you. You can see I dragged the ‘L’ object into my setup.

To emit particles we will use the most basic of all the TP generators. We would like to create particles and we are not really bothered about speed, position etc at this point in the setup. ThePBorn node is found under…
New Node > Thinking Particles > TP Generators > PBorn

PBorn

Add the PBorn node

Next we need to place our particles into each of the objects. To do this we can use the PVolumePosition node.
New Node > Thinking Particles > TP Helper > PVolumePosition

PVolumePosition

Add the PVolumePosition node

The PVolumePosition node allows us to specify an object volume that we would like to use with our particles. So you could link an object node output port into the PVolumePosition Object input port. However we want to iterate through our list, so we will link the ObjectList Instance output into this port instead. This in itself will not place the particles into the objects. We need to explicitly define the particles we would like to affect and what we would like to do to them. We use the PSetData node for this, which can be found under
New Node > Thinking Particles > TP Standard > PSetData

PSetData

Add the PSetData node


First of all you drag the Particle Birth from the PBorn node into the PSetData Particle input port. This tells the node that these are the particles we would like to affect. We then drag the PVolumePosition Position output and link it into the PSetData Position input port. Basically saying that we would like to place our particles into the positions that are defined by the PVolumePosition node.

So in a setup where you use one object, this would all work fine now. If you have been building the setup as you read through this, then press play and you will probably see all your particles being created in the first object that you placed into the ObjectList. It seems that it isn’t iterating through the list. So at this point we can employ a new trick which offers another benefit as well. We need to force the PBorn node to refresh on each frame. By default the PBorn node is on. If we link our iteration through the On port of the node it will check this port for every frame as the ObjectList iterates through each object. The trick I chose to use for this was to link the Xray checkbox into the PBorn On port. By doing this we have the added benefit of including or excluding objects from the setup depending on the state of the Xray checkbox. Of course you don’t need to use the Xray checkbox, you could add some userdata and link that to the On port.

XRay

The Xray checkbox

In my setup the Object from the ObjectList is passed through the Xpresso, the Xray checkbox is evaluated, the particles are created and the same object is passed into the PVolumePosition and the particles are placed there. The objects are of course iterated through, so this happens for all the objects in the list. This is then repeated.

Xpresso Setup

Xpresso Setup

So as you can see a nice simple setup with a great workflow and lots of potential. Certainly saves creating an emitter for every object you’d like to place particle into. Now what you do with those particles is entirely up to you.

If you’d like to download the sample scene I created which demonstrates this then click here. It was made in 11.5, but should be fine in r11 and r12 too. Have fun!

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: , , , , , , , , , , , ,

Sticky Dynamics

Posted in Cinema4D Dynamics, Cinema4D MoGraph on February 1st, 2011 by Tim

In this tutorial I demonstrate a technique that allows you to create a sticky type effect with your dynamic simulations in Cinema4D.

By using the Force object in combination with Step Falloff you can create a setup where the objects stick together depending on the force applied.

Check out the tutorial below, or watch it on Vimeo.

You can download the scene file here.

Tags: , , , , , ,