1. 3D & Motion Graphics

Creating Loop GIFs in Cinema 4D

Scroll to top
Final product imageFinal product imageFinal product image
What You'll Be Creating

In this tutorial I'll show you how to animate and render simple geometries to create seamless looping GIF animations. I'll cover animation, object based lighting, depth of field and how to convert the outputted video file into a GIF animation in Photoshop.

Cinema 4D: Modeling, Animating, Rendering

Step 1

Begin by creating the geometries that will be animated. Add a new Torus object to scene and change its object properties as

  • Ring Radius: 90cm
  • Ring Segments: 3
  • Pipe Radius: 25cm
  • Pipe Segments: 3
First Torus object

Step 2

Duplicate that Torus object twice. Keep the Ring and Pipe segments values the same. Only change the radius for those properties as follows;

First instance

  • Ring Radius: 235cm
  • Pipe Radius: 40cm

Second instance

  • Ring Radius: 570cm
  • Pipe Radius: 70cm

Those are the values I've chosen. You define the values as you wish.

If you follow my values, you should get pretty much the same result shown below:

All three Torus objectsAll three Torus objectsAll three Torus objects
All three Torus objects

Step 3

Set the orientation—rotation parameters—of the torus objects as shown below

Torus is the smallest and Torus.3 is the biggest one.

Orientation parameters of the Torus objects

The result should look like this:

Final result after rotation

Step 4

Add a Camera object to scene and place it the way you wish. Ensure that the focus point of the camera is on the smallest Torus.

Placement of the cameraPlacement of the cameraPlacement of the camera
Placement of the camera

Step 5

Under the Details tab of the Camera object, turn on the DOF Map Front Blur and DOF Map Rear Blur options. Adjust the end points of the DOF Maps accordingly as shown below.

DOF enabled on the cameraDOF enabled on the cameraDOF enabled on the camera
DOF enabled on the camera

This setting will enable the camera's depth of field (DOF) feature, so that we can get the blur effect for a certain portion of the view of the camera.

Step 6

How to animate those objects. Switch the layout to Animation for a versatile interface to conduct animation. To do this, select Animation from the layout menu appearing on the top right corner.

Animation layout selectionAnimation layout selectionAnimation layout selection
Animation layout selection

Now the layout will change and the timeline tab with its content will appear at the bottom

Timeline tabTimeline tabTimeline tab
Timeline tab
Step 7

How to animate the torus objects separately. This will relatively be an easy animation with only one parameter animated. Select one of the toruses, I selected the Torus.3

Go to the Coord. tab and R.B parameter, this stands for Rotation Bank. Click the gray dot next to R.B parameter, it will turn into red, meaning that you added a keyframe. This will also be visible in the timeline.

First keyframeFirst keyframeFirst keyframe
First keyframe

Move the cursor of the timeline to last frame, in this case frame 40. You'll notice that the red dot turns into a hollow red dot. That means that no you can add another keyframe for this parameter. 

I want a full rotation of the torus object. If I'd started with 0 Degrees at frame 0 I'd need to set the last frame, in this case frame 40, to 359 Degrees, since 0 and 360 Degrees are the same thing. 

In this case R.B is set to 23 Degrees already. So, I'd need to go from 23 Degrees to -336 Degrees to make a full rotation. You could also go from 23 Degrees to 359 + 23 = 382 Degrees, that would just reverse the rotation direction.

If you already moved the cursor to the last frame, set the R.B parameter to -336 Degrees and press the hollow red button to add another keyframe for frame 40.

Second keyframeSecond keyframeSecond keyframe
Second keyframe
Repeat the exact same steps for Torus.2 object. Be careful, however, with the smallest torus object, which is the last one called Torus. Due to its orientation, instead of its R.B parameter, you'll need to add keyframes for its R.P parameter, which stands for Rotation Pitch.
Keyframe of the smallest torusKeyframe of the smallest torusKeyframe of the smallest torus
Keyframe of the smallest torus

After all the keyframes are added, the timeline will look similar to this:

Final state of the timelineFinal state of the timelineFinal state of the timeline
Final state of the timeline

Step 8

Narrow down the timeline bar slider to 40 and press the green play button.

Narrowing down the timelineNarrowing down the timelineNarrowing down the timeline
Narrowing down the timeline

You'll see the animation starts, slowly speeds up and then slows down. So, it does not feel continuous or seamless. This is because of the ease-in ease-out behaviour provided by the spline key type.

You need to set the animation keys to linear interpolation. To do so, select all the models inside the timeline and then select the Linear option from the menu. It is shown below;

Changing keys to linear interpolationChanging keys to linear interpolationChanging keys to linear interpolation
Changing keys to linear interpolation

Press the green play button again and you should see a smooth and seamless animation.

At this point we I've finished modeling and animating. I'll continue with lighting and rendering.

Step 9

At this point, before proceeding, switch to the view of the camera we have already created. To do so, click the small icon next to the camera object.

Set the view to camera viewSet the view to camera viewSet the view to camera view
Set the view to camera view

Also switch back to Standard layout.

Create a material for torus objects;

Create materialCreate materialCreate material
Create material

Double-click on the material you created. Set some parameters for several channels, as follows.

Start with Color channel. In order to add the Ambient Occlusion click the arrow button next to Texture and follow the Effects menu, there you will find the Ambient Occlusion.

Color channelColor channelColor channel
Color channel

Continue with Diffusion channel. Click the white arrow button next to Texture and add the Noise

Diffuse channelDiffuse channelDiffuse channel
Diffuse channel

Add the Reflectance channel. Add reflection as shown below and then by selecting the reflection layer, named as Layer 1, you need to set the parameters given in the below image accordingly.

Reflection channelReflection channelReflection channel
Reflection channel

The last channel is the Glow channel.

Glow channelGlow channelGlow channel
Glow channel

Drag and drop this material over all three torus objects to assign the material.

It should look like this:

Final result with materialsFinal result with materialsFinal result with materials
Final result with materials

Step 10

Next is the creation of a background object and a material for it.

Adding backgroundAdding backgroundAdding background
Adding background

Create a material and add a Gradient texture for the color channel.

Use the settings shown below:

Background materialBackground materialBackground material
Background material

Assign this material to background object we have created.

Step 11

Lighting. I prefer using object-based lighting for such scenes.

Begin with exiting the camera view by clicking the little icon next to camera object and then in the default perspective view, create two cube objects and place them on the left and right hand sides of our torus models. 

The scene is shown below;

Lighting setupLighting setupLighting setup
Lighting setup

Thickness of the cube objects does not affect the result.

Step 12

Now we will create two different materials to use as light source for our cube objects.

Create two materials and only add Luminance channel, leave other channel settings as they are.

Light source materialsLight source materialsLight source materials
Light source materials

Assign those materials to cube objects. I assigned bluish one to left cube and yellowish one to right cube. It is up to you.

The scene is as follows:

Final result of the sceneFinal result of the sceneFinal result of the scene
Final result of the scene

Step 13

Setting the render parameters.

Start with the output section. Set the size of the output file as you wish.

480x360px preset. Don't forget to set the frame range From: 0 To:  40, since I animated in between this range.

Output settingsOutput settingsOutput settings
Output settings

Check the Save option and select a directory to save the file and give it a name. Set the format to QuickTime Movie. 

Save settingsSave settingsSave settings
Save settings

Add Global Illumination by clicking the Effects... button. Leave it as it is, you don't really need to play with its parameters for this example.

Add Depth of Field and use the settings given below;

Depth of field settingsDepth of field settingsDepth of field settings
Depth of field settings

And last thing is to add the Object Glow and we are done.

Press the Render to Picture Viewer button to render each frame and generate the video output.

Render to picture viewerRender to picture viewerRender to picture viewer
Render to picture viewer

Photoshop: Conversion to GIF

Step 1

At this stage, you'll have an animation as a video file in the file format of .mov.

In order to be able to convert this .mov file into a GIF file, I'lll be using Photoshop.

Run Photoshop, go to Run > Import > Video Frames to Layers and select the .mov file you created.

Importing layers from video fileImporting layers from video fileImporting layers from video file
Importing layers from video file

This will prompt a window. Ensure that Make frame animation option is checked. Then press OK.

Import settingsImport settingsImport settings
Import settings

Step 2

In order to see those frames, we neee to open the Timeline. To do so, go to Window > Timeline.


Step 3

Once you open the Timeline, you will see every single frame on it. Select all those frames and then hit one of the texts of 0.03 to change it to "no delay". This value shows the delay time between each frame when it is animated. So, we want no delay, hence the setting of "no delay".

No delay settingNo delay settingNo delay setting
No delay setting

Step 4

Save the animation as a GIF file. Go to File > Export > Save for web.

Saving the animationSaving the animationSaving the animation
Saving the animation

This will prompt a new window where you'll see the specifications of the GIF file to be saved. You can change the quality settings to reduce the file size or you can scale the output, which will also reduce the file size. 

Once you are happy with the quality and the file size, click save and you have just created a GIF animation.

Snapshot From Final Result


Did you find this post useful?
Want a weekly email summary?
Subscribe below and we’ll send you a weekly email summary of all new 3D & Motion Graphics tutorials. Never miss out on learning about the next big thing.
Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.