From Russia with CAD
 
All articles     
Articles

16 Apr 2010

How To Make a 3D Cartoon in Rhino: A Practical Guide

Ilya Tatarnikov

Abstract

150,000 people around the globe use Rhinoceros (or Rhino for short) – a powerful software for 3D modeling. Having advanced tools for modeling freeform surfaces, Rhino is used in conjunction with dozens of plug-ins, created by McNeel&Associates (the developer of the main program), as well as by independent developers. In this practical guide we look into how to create your own animated film (a 3D cartoon) in Rhino similar to a well-known Pixar trailer. For this we will need:

  1. Rhino; a trial version can be downloaded here download.rhino3d.com/rhino/4.0/eval
  2. Flamingo plug-in for photorealistic rendering: download.rhino3d.com/eval/?p=8
  3. RhinoAssembly plug-in: DrivingDimensions.com/download
  4. Any free software for creating an MPEG-file from a series of rendered shots (for instance, ffmpeg: www.ffmpeg.org)
  5. Approximately 3 hours of your spare time (plus rendering)

The key role in creating an animated film is played by RhinoAssembly plug-in, by means of which we determine lamp kinematics: indirectly set possible trajectories of its parts relative to each other using geometric constraints and driving dimensions. Embedded capabilities of RhinoAssembly enable animation by varying one or several parameters of the mechanism. An important feature of RhinoAssembly is its ability to generate image frames, which makes animation easy. More about capabilities of RhinoAssembly plug-in in the paper ”How to Express Design Intent in Rhino 3D. Part I. Assembly Design and Kinematic Simulation” .

Step 1. Modeling of film characters

Initially we used the Pixar lamp Jr 3D model, which we found surfing the Internet. Its application had a disadvantage, or, to be more precise, a serious limitation because it was created in SketchUp, which means polygonal mesh structure and – as a consequence – it could not be used with Rhinoceros in conjunction with RhinoAssembly (which required geometry representation in the form of NURBS – Non-Uniform Rational B-Spline curves and surfaces).

To surmount this limitation, we decided to reproduce the model geometry directly in Rhinoceros. We made samplings in SketchUp and built similar components in Rhinoceros.

AS a result of the modeling we got 24 parts.

We recommend that those readers who have not yet properly mastered the 3D modeling technique in Rhino (description of which is not included in this practical guide) should download an out-of-the-box 3D lamp model at http://drivingdimensions.com/Rhino/samples.php and go directly to Step 2.

Step 2. Assembling the lamp mechanism

Using the RhinoAssembly plug-in we sequentially set geometric constraints for positioning components of the mechanism relative to each other and in space, as well as set dimension constraints for further animation. Overall we set around 80 constraints in the model, including: Rigidset – 3; Coincidence– 24; Concentricity – 31; Fixation– 5; Tangency – 1; Angle – 5; Distance – 1.

Let’s see, for example, how we can place the bulb under the lampshade using RhinoAssembly. To do this we create the following constraints: one coincidence and one concentricity (no constraints for bulb rotation in the holder).

To create a coincidence constraint, let’s select the coincidence tool on the RhinoAssembly tool panel Coincidence and click on matching faces of the model:

Upon a request, select the “first” and “second” objects to perform an operation (after clicking on the face, it is highlighted in the graphic region).

Now faces of applicable components match.

Next operation – setting concentricity of the lampshade holder and the lamp base. To do this let’s start the concentricity tool Concentric and cylindrical parts of components that should be concentric.

As a result we have the required relative position of components.

Also we set dimensional constraints for the model that determine changes of angles between jointed components:

For those who do not wish to create 80 constraints from scratch we recommend downloading an out-of-the-box model with constraints at http://drivingdimensions.com/Rhino/samples.php and go Step 3.

Step 3. Inserting a light

To achieve photorealistic animation it was also important to correctly position the sources of light and set their parameters:

As the sources of light, we used two spotlights, one gave off a light from the lamp, while another illuminated the lamp. We also had a directed light source to illuminate the whole scene. The material (polished silver) for the whole model was chosen from a standard kit supplied with Flamingo.

The file with inserted light and set materials can be downloaded at http://drivingdimensions.com/Rhino/samples.php.

Step 4. Animation and rendering

According to a chosen scenario, in the final animation the lamp should perform three actions: tracing the ball, following-up the ball and “joy”. It was decided to achieve three separate animations and then “fuse” them together.

Another aspect of animation is that in output we have a consequential set of shots, drawn up by Flamingo render, which we got by starting the rendering process with the “render” button from the Assembly Animation window.

Before the render can be started, it is necessary to specify the folder for saving finished images. Images can be saved in files with a proper prefix.

Animation sequence:

  1. Tracing. This stage of animation was created by setting initial and final angle values of the joints that were of interest to us. Then the shots were played over in reverse order to return the mechanism to the original position.
  2. Following-up. At this stage we set an additional constraint, which enabled matching the ball centre with the lamp axis. The angle constraints from the first stage were left out, and the whole construct was controlled by moving the ball.
  3. “Joy”. The concluding stage. Apart from leaving out the angle constraints from the first stage we also left out fixing constraint for the lamp base and created an additional constraint for the distance between the lamp base and the faceplate. It is this constraint that was animated within specified limits and started in the reverse order under the developed scheme.

As a result of the above manipulations we got three sets of rendered images (for each of them we used different name prefixes). Now we only need to combine them in a single set and create an AVI or MPEG file.

Step 5. Creating a trailer using a series of static images

There are multiple free programs solving this problem; we would prefer to use ffmpeg. To do this it is enough to go to the folder with rendered images (containing files with the names Render1_0001.bmp, Render1_0002.bmp, etc.) and execute the command

ffmpeg -f image2 -i Render1_%04d.bmp Episode1.mpg

The three trailers can be concatenated by executing the following command:

copy /B Episode1.mpg+Episode2.mpg+Episode3.mpg Movie.mpg


That’s what we came up with:


Conclusion

In this Practical Guide we look into how to create our own animation film using a 3D model of a mechanism with components in motion. Similarly, using the RhinoAssembly plug-in and any rendering – plug-in it is possible to create high-quality trailers demonstrating objects in motion (a car with opening doors and folding-out roof, convertible furniture, industrial robots, etc.) Some of such trailers can be found at http://drivingdimensions.com/Rhino/videos.php

Developers of the RhinoAssembly plug-in will be happy to answer all your questions regarding the terms of purchase and use, and will be grateful for any advice and recommendations on possible improvement and development of our product. Please write to Rhino@DrivingDimensions.com or take part in the on-line forum of the users of Driving Dimensions plug-ins: http://drivingdimensions.com/forum/

About the author

Ilya Tatarnikov

Ilya Tatarnikov has 8-year experience of CAD-designing of industrial products and CAD software testing.

He graduated from Novosibirsk State Technical University specializing in “Means of Destructions and Ammunition”.

In 2006- 2008 Ilya worked for ProPro Group, where he was responsible for customer technical support, personnel training, and development of educational and demonstration materials. He worked on software quality assurance of software.

Ilya Tatarnikov joined LEDAS in 2008 as a manager for engineering consulting and software quality. Ilya addresses the issues of customer relations, works on software quality assurance, designs scenarios for industrial application of our software, and prepares demonstration materials.

Professional knowledge of 3D modeling tools: SolidWorks, SketchUp, Rhino, bCAD.

About LEDAS

LEDAS Ltd. is an independent software development company founded in 1999. It is based in the Novosibirsk Scientific Centre in Akademgorodok, Russia at the Siberian Branch of the Russian Academy of Science. A leader in constraint-based technologies, LEDAS is a well-known provider of computational software components for PLM (Product Lifecycle Management) solutions. Its solutions include geometric constraint solvers for CAD/CAM/CAE, optimization engines for project management, work scheduling and meeting planning software, and interval technologies for knowledge-based engineering and collaborative design. The company also provides services for PLM markets, including software development, consulting, reselling, and education and training

More information about LEDAS is available at www.ledas.com.


RhinoAssembly is a trademars of LEDAS Ltd. All other trademarks are the property of their respective owners.



Permanent link :: http://isicad.net/articles.php?article_num=13697


CAD development Russia
19th of March, 2024

News

All news


Articles

All articles

© 2004-2024 LEDAS Ltd. All rights reserved.