Director 8.5: A First Look
June 6, 2001
by Brian Robbins
Macromedia has really shot for the moon with their newest addition to the Director product line: Director 8.5. The most obvious change is the incorporation of Intel's real-time 3D rendering technology. Finally, Director developers can create cross-platform 3D hardware-accelerated Shockwave movies and projectors without having to resort to a 3rd party extra.
This is not just a 3D model viewer either. Depending on who you ask, between 300 and 600 new Lingo commands have been added to give developers complete control of the 3D simulation. For the non-programmer, several behaviors have been included which will allow interaction with 3D scenes, without having to code any Lingo.
The 3D Paradigm
Creating and manipulating a 3D scene is much more difficult than the 2D content most of us have been creating for years. Macromedia has done a good job of simplifying the concepts as much as possible, but there is still a significant learning curve to understanding the 3D technology.
The first step to using Shockwave 3D is to create a Shockwave 3D member. This can be accomplished either by importing a Shockwave 3D (.w3d) file, or by inserting a Shockwave 3D member through the Insert > Media Element menu.
This will create an empty 3D member. If you have this selected in the cast, and look at the Property Inspector, you will notice a few things that you can change. One of the most important properties to note is Direct To Stage. Turning off Direct To Stage will cause a significant performance hit, but is the only way to have 2D sprites on top of a 3D member.
Your entire 3D scene will be in one member in one sprite on the stage. This is much different than other types of Director presentations where you would have many separate sprites on the stage to manipulate. To get used to this new method of dealing with things, you will need to learn some new vocabulary.
modelResource
These are the basic building blocks that are used to create a 3D world. While they themselves are not visible, they store the geometry which is shown when used in a model. All models in the scene need to have a model resource. Model resources can be shared across multiple models. i.e. you can have one box model resource, and create 10 boxes (each one a separate model) using that model resource.
model
These are what you will see and manipulate in a 3D scene. Each model needs to have a model resource. Models store the actual position, scaling, rotation, and shaders used to display geometry in a scene.
shader
These define the way geometry is displayed. They have numerous properties including but not limited to ambient and diffuse light, blend amount, render style (shader, wire, or point), and textures.
camera
Cameras are used to define what is actually visible in the 3D scene. A 3D member may have multiple cameras. The default camera will fill the entire rectangle of the sprite. Additional cameras may be used to fill all or a portion of the sprite's rectangle.
Basic 3D Creation
The most basic way to create 3D content is through the use of Director's built-in primitives. Using the primitives, we can create box, cylinder, mesh, particle, plane, and sphere model resources. With the exception of the mesh and particle primitives, each of these types are exactly what you would expect.
Using the mesh primitive type, a Lingo programmer can create an arbitrary shape by defining the vertices and faces for the mesh. While most people will not want to create complex geometry using this technique, it does allow much more freedom than creating objects using the previously mentioned primitives.
The particle primitive creates a particle system, with full access to its properties. You can modify almost everything in a particle system: the number of particles; their beginning and ending speed; their beginning and ending size; and whether or not drag, gravity, and wind affect them. You can even specify a line, region, or point for the particles to originate from, as well as a path for them to follow.
In addition to using the primitives, 3D models can be created in 3rd party applications, and exported out to the .w3d file format. Macromedia has a list of companies who are, or will be providing Shockwave 3D exporters for their programs here.
Modifiers
Director 8.5 has seven built-in modifiers which can be applied to models and provide various additional functionality.
lod (level of detail)
This is only available for models imported from other applications. It will reduce the geometry in a model dynamically based either on a target frame rate, or the model's distance from the camera. The settings for this require a lot of tweaking to get right, however it can significantly increase performance, especially for low-end computer systems.
sds (subdivision surfaces)
This is also only available for models imported from other applications. It performs the opposite of lod, increasing the geometry of a model, and essentially smoothing the model out. This works best for curved objects, and can be used to provide good-looking models with less geometry data, resulting in a smaller file size.
keyframePlayer and bonesPlayer
These provide the methods to play keyframed and bone-based animation created in third-party modeling applications. Director users should already be familiar with the concept of keyframe animation. Bones animation is an incredibly powerful technique that allows for easy character animation using a small file format. Essentially, an artist will set up a bone skeleton inside of a model, and then animate the bones to create desired movements. The keyframe player can then load in several bone animations, and play them for a model. Because the animation is linked to the bones, and not to the vertices making up the actual model geometry, the file size of the animation data is very small. The players also provide motion blending, which, assuming the motions are properly authored, eliminates, the need to generate any tweening animation such as moving from a run to a walk. By blending the run animation to a walk animation, the character will smoothly change without an annoying jump in their position.
meshDeform
This provides access to every vertex and face in a mesh. Not only giving detailed information about the geometry, but also allowing modifications to the geometry. The applications for this are practically limitless. One good demonstration involved a face which could be pulled and stretched like a rubber mask.
toon and inker
Applying these to a model will cause the model to be rendered non-photorealistic, or NPR. This is an emerging technique that has yet to be used widespread, but does offer some very interesting looks. This comes at the cost of a pretty significant performance penalty, but if the polygon count is kept low enough it can still be safely used.
collision
The collision modifier provides collision detection, and very rudimentary collision resolution. For simple projects, this is a very useful tool as collision detection in a 3D world is much more difficult than in 2D.
Havok physics Xtra
This is my favorite new feature, and the one which I believe is the most powerful. Havok has made their rigid body collision detection and resolution system available to Director. They have also included springs, and linear and angular dashpots. This is a full-scale, extremely solid physics solution, and it is available to Director developers completely free of charge. Physics properties can be assigned to objects through the Havok plugins to Max, or they can be assigned through Lingo. It is implemented through a Macromedia-signed Xtra, so it will require viewers to download the additional Xtra before viewing your Havok enabled content, however being a Macromedia signed Xtra, it will not open the Verisign dialog box. The Havok Xtra allows developers to quickly add physics to a simulation, and have it behave in a very realistic manner.
Other Changes
Macromedia Signed Xtras
This is something which has not been touted very much, but will make a huge difference to Director developers. Any Xtra which is provided by Macromedia, such as the XML Xtra, can be considered a Macromedia-signed Xtra. With all previous versions of Shockwave, these Xtras could be automatically downloaded, but would open a Verisign security dialog box. With Director 8.5 these Macromedia Xtras no longer show the dialog box. Visitors will see a status bar message stating that an Xtra is being downloaded, and once it is finished downloading will automatically begin playing the movie.
Multi-User Server
In addition to the new 3D technology, several changes have been made to the Shockwave Multi-User Server. You can now implement server-side Lingo scripts. Anyone who has created a MUS application can should be able to see how significant this is. By including server-side logic, not only can more complex applications be created, but other applications can be simplified. As a very basic example, when handling games, the server can now perform the game logic such as dealing the cards, instead of having to waste server bandwidth by determining which player will deal, and then having them deal.
The other big change for the MUS is the addition of UDP messaging. UDP messages are slightly smaller than TCP messaging, but do not have any confirmation or guarantee of being received. Most CD-ROM based multi-player games use UDP messaging because their speed is typically faster, and when sending location/speed updates, etc. it is not necessary to make sure that every message is received. While the MUS speed is still not up to being able to handle a Quake-type First Person Shooter, it is getting a lot closer.
Watcher Window
A big complaint for the watcher window has been the inability to display long variables with large amounts of information. In Director 8.5 a Tool-Tip or mouse over effect will appear in the watcher window whenever long variables are present.
Debug Playback
Another huge complaint from developers was the inclusion of the debug window with Shockwave 8.0. While this provided access to the Message window in Shockwave, tremendously aiding in the debug process, it also gave hackers easy access to hack Shockwave games. With Director 8.5 the Message window can still be opened, but not through the shockwave.ini file. Instead, the movie property: debugPlaybackEnabled is used. When set to true, the Message window will open when viewed in Shockwave. When set to false, the Message window will be closed, and cannot be re-opened. This feature alone may provide reason enough for some developers to upgrade to Director 8.5.
Flash 5 Compatibility
Last but not least is the ability to play back Flash 5 movies within Director 8.5 movies. This enables Director to leverage off of the strength of ActionScript in its most recent incarnation. Major additions to the methods available in Lingo for Flash cast members have been made, although the interface is still not as fluid as in JavaScript.
call has been added to make it possible to execute the actions in a specific frame of a movie. Strangely enough, this is a deprecated action in the current ActionScript model.
The print and printAsBitmap commands are now supported from Lingo. These commands actually worked in earlier versions of Director and Shockwave, but they're official now.
To send commands to a movie clip instance, you can use the tellTarget and endTellTarget commands with a Flash sprite. Commands sent to the sprite after a tellTarget are directed to a specific instance instead of the root timeline of the sprite. This, too, mimics a structure deprecated in Flash 5, but it means you don't need to create your own messaging system in the Flash movie.
XML data can be extracted from the sprite with the sendXML method.
The Flash Xtra included with Director 8.5 is not compatible with Director 8.
Final Thoughts
Macromedia has put a lot of development time and resources into Director 8.5. They have provided us with a very solidly performing, and full-featured 3D engine. Anyone who is looking to provide 3D content on the web should seriously consider Director 8.5. For developers who will not be creating 3D content, or do not do very much multi-user development, the Director 8.5 upgrade may not be worth it.
Copyright 1997-2024, Director Online. Article content copyright by respective authors.