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
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
Duplicate that Torus object twice. Keep the Ring and Pipe segments values the same. Only change the radius for those properties as follows;
- Ring Radius: 235cm
- Pipe Radius: 40cm
- 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:
Set the orientation—rotation parameters—of the torus objects as shown below
Torus is the smallest and Torus.3 is the biggest one.
The result should look like this:
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.
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.
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.
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.
Now the layout will change and the timeline tab with its content will appear at the bottom
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.
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.
After all the keyframes are added, the timeline will look similar to this:
Narrow down the timeline bar slider to 40 and press the green play button.
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;
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.
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.
Also switch back to Standard layout.
Create a material for torus objects;
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.
Continue with Diffusion channel. Click the white arrow button next to Texture and add the Noise
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.
The last channel is the Glow channel.
Drag and drop this material over all three torus objects to assign the material.
It should look like this:
Next is the creation of a background object and a material for it.
Create a material and add a Gradient texture for the color channel.
Use the settings shown below:
Assign this material to background object we have created.
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;
Thickness of the cube objects does not affect the result.
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.
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:
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.
Check the Save option and select a directory to save the file and give it a name. Set the format to QuickTime Movie.
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;
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.
Photoshop: Conversion to GIF
At this stage, you'll have an animation as a video file in the file format of
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.
This will prompt a window. Ensure that Make frame animation option is checked. Then press OK.
In order to see those frames, we neee to open the Timeline. To do so, go to Window > Timeline.
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".
Save the animation as a GIF file. Go to File > Export > Save for web.
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
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.Update me weekly
Envato Tuts+ tutorials are translated into other languages by our community members—you can be involved too!Translate this post