Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Primitive Character Animation - Page 15

August 24, 2001

If you look at the animation swiftDuck.swf in the Examples folder, you will see a terse, basic character animation: a duck who takes two steps (waddles), sits down as the camera moves, and finally, puts his head down. This movie is included as an example of another potential application of the combination of tools we have covered in this chapter.

This animation was made following this pattern:

  1. Create the duck model in Strata using the techniques discussed in this chapter. The only primitives that were altered from their original shape were the body (lifted Bézier vertex on a sphere for the tail and tweaked one tangent handle for the chest) and the bill (tweaked one Bézier vertex of a pyramid for the upper lip and one on each side to round the top of the bill). The feet are extruded 2D paths drawing with the Bézier tool.

  2. Export the model in pieces. To do this, select everything you don't want to export and hide it (CTRL-3); then save as DXF. Repeat until you have exported all the parts.

  3. Paste all the DXF files into one 3DS file (if you have a modeling application that directly supports a 3DS), or into individual 3DS files otherwise.

  4. Import the 3DS scene or individual 3DS files into Swift 3D. Now you will be able to color the pieces individually.

  5. You have a few options for how to make the body parts move together. The most logical way would be to animate the points that are connected; then group them, animate the superset, and so on, until you are moving the entire duck. Or you could do it the lazy way, like I did — moving each part individually, more or less frame-by-frame.

While this particular animation definitely goes into the reject bin, I think this workflow has some potential to liven up the current spinning-logos-only world of Flash 3D. You could easily make some engaging character animation with a little talent, skill, and careful planning. For instance, when you are building the model in Strata, you could make the axis at which the legs intersect the pelvis (or whatever a duck has that is like a pelvis) the center of the model, so that the legs automatically rotate around the correct origin.

If you are interested in 3D character animation, there are a few subjects to dig deeper into. You will want to get Strata's powerModule1, which gives you two big requisites for high-quality character animation, IK and Mirror. (You typically construct just half of the model and mirror it across an axis.) You should also check out Tomas Landgreen, the undisputed heavyweight champion of Flash 3D character animation. His site, http://www.titoonic.dk/, contains a number of characters that are extremely entertaining and engaging, regardless of the medium.

At the time of writing, it seems that there are a lot of Flash developers who do character animation in 2D cartoon style; but when it comes to 3D, they do spinning logos and solid objects flying in and out. I hope this overview of 3D will spur you to explore at least some of the easier possibilities in 3D.

Faking Real-Time 3D with Scripting

There are several big, obvious drawbacks to the current state of Flash 3D, but many of these can be solved with the simple trick of using a series of photographs instead of going through the mess of modeling, converting, animating, and rendering to SWF. Some of these problems are as follows:

  • One of the Internet applications that is supposed to be a growing outlet for 3D art is e-commerce. The idea is that consumers like to look at products and touch them — somehow interact with them — before they buy anything. There are actually several problems with modeling a product for real-time 3D manipulation in a Web browser, including the cost of 3D production and plug-in compatibility.

  • Moving models in real time in 3D space requires processor power and a plug-in with native support for 3D.

  • A typical Flash 3D animation is not interactive in any way. It might as well be a QuickTime movie, or, more accurately, it would be much better off as a QuickTime movie.
  • A level of detail in 3D Flash vector animations that rivals raster rendering is much heavier and requires exponentially greater processing power than a bitmap equivalent. Clearly, this is not what Flash is meant for.

The example clothespin.fla on the CD illustrates one way you can do interactive 3D without the 3D. It addresses the issues above and provides an easy solution to both interactivity and photo-realism within Flash. The movie is nothing more than a series of photographs (composed with high-quality equipment) and a little logic to move between the photographs. The object that rotates in this example was bisected with a thumbtack on the bottom side, which in turn was run through a white piece of paper marked with the rotations. If you try this type of fake 3D, you will need some kind of similar system to measure the rotations and position of the object exactly. You don't have a prayer if you try to eyeball it.

You can also fake real-time 3D with scripting by merely adjusting the horizontal and vertical scale of the object as it moves across a static 3D backdrop.

Real 3D with Scripting

At present, there is widespread interest in building real-time 3D rendering engines within Flash ActionScript. This area is very interesting to anyone who might be into 3D gaming programming, or even those who are just interested in a challenge in ActionScript.

There seems to be a well-defined, very low limit on the complexity of the models you can manipulate within Flash (less than 100 polygons), so you will not see a Flash port of Quake 3 Arena any time soon. This is one of those areas that, while it may develop into something of far-reaching utility someday, is currently in a theoretical stage. Some of the most promising experiments I have seen in this area are by Brandon Williams and Ethan Kennedy. You can see their work at http://www.homepages.go.com/~ahab_flash/exper/index.htm.

If you are interested in building real-time 3D for a well- established platform, you might want to check out Macromedia Director. Besides being one of the defining tools in multimedia, with all kinds of support for audio, video, and necessities for CD-distributed projects, Director also supports real-time 3D. In fact, there are multiple Xtras (third-party extensions) for Director that each do a tidy job of real-time 3D.

Animation in Swift 3D - Page 14
Macromedia Flash 5 Developer's Guide
Amorphium Pro - A Different Approach - Page 16


Up to => Home / Authoring / Flash / Dev




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers