stasia_title.gif, 520x117 resolution, 5KB.  Stasia McGehee - Avatars / Character Animation / RT3D Environments

Creating and Animating AVATARS in 3DMax for OnLive!'s Traveler 2.0
Stasia McGehee - Avatar Author and Designer, 3/11/97


I. 3D Creation
Create low poly heads or meshes: 200-300 polys. Make meshes free of holes, unless holes are part of the design. Since our engine does not render geometry 2-sided, holes show up as see-through gaps in the mesh. Eliminate duplicate vertices and faces. Note that the app uses a 90 fov, so set up a 90 degree camera to preview your work. Create meshes with the object of being animated, ie having extra vertices around the eyes and mouth. After creating the template head, load it into the app and check for missing faces, reversed normals, and choices for color regions.


II. Color Regions
Construct the mesh to account for the most creative uses of customizable color regions. Colors need only be assigned to the neutral head position, and can be updated, as long as vertices or faces are not altered. Each head can have up to 256 separate customizable color regions. These areas are differentiated by incremented naming conventions, defined in the material library: from A. Beige to A1. Beige, etc.

Before or after doing the animations, color regions may be assigned either in 3Dstudio, using the 24-color Onlive.mli or in 3DMax, using the newer 240-color OnLive palette that takes advantage of multi sub-object regions, but uses the same naming conventions for color regions. Originally only 24 colors in the Onlive.mli were available for avatar creation. But now it is possible to create custom colors, as long as they use the original naming conventions. These names are hard-coded for the purpose of providing the user with customizable color regions. However, since Traveler is still an 8-bit application, new colors will be a dithered approximation, calculated on the fly, so results may be unpredictable.

In 3DMax, the original 24-color material library has been expanded to a 240 Multi/sub-object material, using the same incremented naming conventions as the older Material Library. In 3DMax an object cannot contain more than one material, so a single multi/sub-object material must be used to contain all the colors in the form of sub-materials, assignable at the face level using Material ID’s. Each sub-material in a Multi/sub-object material corresponds to a different Material ID #, assigned at the Sub-object/Face level.

To assign colors:

1. Select Sub-object/ Face.
2. Select a group of faces you wish to color. (To recall this group later, assign a name to these faces by typing one into the "Named Selection Sets" field at the top of the menu bar).
3. Assign a color to that selection set by assigning a Material ID #, under Edit Surface.
4. Keep in mind that each Material ID # will correspond to a separate Color Region in the head shop. It may be helpful to keep track of what Material ID’s have been used, so that color regions will be unique.

The following table will help you assign Material ID numbers based on the Material Names. Note that you may edit the colors, but the naming conventions should be maintained so that users may customize color regions in the head shop.

Original RGB Value of Color Naming Convention Material ID # in 3DMax

1 ,RGB (198,140,106) (A.BEIGE DARK) 01-10
2 ,RGB (215,166,120) (B.BEIGE LIGHT) 11-20
3 ,RGB (181,112, 83) (C.BEIGE LTBRWN) 21-30
4 ,RGB (170, 99, 67) (D.BEIGEMEDBRN) 31-40
5 ,RGB ( 25, 0, 11) (E.BLACK JET) 41-50
6 ,RGB ( 11, 11, 28) (F.BLAK BLUE) 51-60
7 ,RGB ( 21, 11, 21) (G.BLAK PRPLMED) 61-70
8 ,RGB ( 54, 56,114) (H.BLUE DARK) 71-80
9 ,RGB (134,140,227) (I.BLUE LIGHT) 81-90
10 ,RGB ( 88, 52, 0) (J.BROWN GOLD) 91-100
11 ,RGB ( 94, 44, 28) (K.BROWN MED) 101-110
12 ,RGB ( 39, 73, 39) (L.GREEN DK) 111-120
13 ,RGB (143,189,128) (M.GREEN LT) 121-130
14 ,RGB (118,118,149) (N.GREY COOL) 131-140
15 ,RGB (152, 44, 52) (O.LIP-LT RED) 141-150
16 ,RGB (105, 31, 60) (P.LIP MED RED) 151-160
17 ,RGB (214,135, 60) (Q.ORANGE) 161-170
18 ,RGB ( 84, 28, 89) (R.PURPLE DARK) 171-180
19 ,RGB (143, 34, 34) (S.RED DARK) 181-190
20 ,RGB ( 44, 28, 11) (T.SKIN-BROWNDK) 191-200
21 ,RGB (115, 56, 34) (U.BROWNLIGHT) 201-210
22 ,RGB ( 74, 34, 25) (V.BRWNMED) 211-220
23 RGB (243,230,214) (W.WHITE WARM) 221-230
24 ,RGB (206,179, 76) (X.YELLOW) 231-240


III. Animating Heads
Scale - use one of the OnLive heads as a template for scaling the head, so that it is compatible with existing avatars and environments. Copy the next morphed position into the exact location, hiding the original using Display/hide/object. To minimize extraneous deltas, it is helpful to hide all vertices and faces except for those you intend to alter.

Registration Issues for Traveler
All heads should roughly correspond in size and eye position. Position the head over (0,0,0) before saving out. This will correspond to the Pivot Point in Traveler’s head shop, as well as the Camera position in Traveler. Keep in mind that if you have an animal with a long snout, you may need to position the pivot point forward so that the end of your nose is not visible in Traveler. If in doubt, use one of the OnLive! snouted creatures like Sebek or Whitefang as reference.

Registration Issues between 3D Studio and 3D Studio Max
Whereas the (000) position in the 3D Editor defines the avatar’s pivot point in the Head Shop, it is the (000) position in the 3Dstudio’s Keyframer [f4] that defines the object’s origin if the .3ds file is imported into 3D Studio Max. (This is why the heads do not always register between the 2 programs.) So if you are using 3DStudio, you can circumvent potential problems by pre-defining the Pivot Points in the Keyframer: Type S for Snap, and go into the Keyframer [f4] to define the origin for (000) in front and side views using Hierarchy/Place Pivot. Other anomolies between the 3D Editor and the Keyframer, such as a tilted or skewed bounding box, often occur if the .3ds object was exported from Max. This may be corrected in the 3D Editor by the command: "Modify/Object/Reset Xform."

From the Keyframer it is easy to test the validity of your animations by using the Morph function in the Keyframer. Hide all meshes but the neutral one using Display/Hide All and Unhide/By Name/(choose the neutral position). To Morph use Object/Morph/Assign and every few frames choose a new position. If all is well, the heads will animate smoothly from position to position. But the heads will jump around if they were not properly registered, and will actually appear to be mangled if the vertices have gotten out of sequence. (This can occur if you inadvertently altered the topology of the mesh by adding or deleting faces or vertices.) If this happens, delete the mangled position and start anew.

Use the Hierarchy Module of 3DMax to reposition the pivot point Once in Max, the object’s pivot point may be centered to its own bounding box instead of (0,0,0) in world coordinates. To align it to (0,0,0) go into the hierarchy module and select the button: "Affect Pivot Only". Right click on the Transform or Move button and make sure all values are set to 0. Also, if there are anomolies in rotation or scale, right click on those buttons and make sure the values are set to 0 degrees rotation or 100% scale. Similarly, you can move only the object, and not its pivot point by selecting Affect Object Only.

Saving Files from 3DStudio
Although it is convenient to save out a single .3ds file using the Select/Object/Save Selected option, files that have been saved using the 3D Studio R4 "Save Selected" command do not import correctly into 3D Studio Max. Thus, it is recommended that, after deleting all other objects in the file, you save out objects individually using the "Save" command.

Exporting .3ds files from 3D Max
The export command in 3DMax will not allow you to do a save selected. Every object in the scene will get exported, including hidden or frozen objects, so you must delete everything in the scene, even lights and cameras, except for the object being exported. (After saving out the files, the Undo command can be used to restore the Scene). After exporting the .3ds object, import it back into the scene to make sure it works. If you get an error, "invalid .3ds file" do an unhide all, and make sure all extraneous objects have been deleted.

Naming Conventions
Use the following 8-letter naming convention when saving out head_1rn.3ds: the first 5 fields, which may be anything, usually refer to the avatar’s name, followed by the number 1, followed by a two-letter suffix that refers to its delta model, defined below. In addition, it is helpful to correctly name each object within 3Dstudio or 3DMax.

Speech Positions
The last 2 letters designate the variance of the RN (registration neutral) position. The R_ suffix refers to the extreme lip positions used for speech and eyeblinks. The Onlive! speech engine interpolates between these extremes:

RN - The Template head has the suffix rn, registration neutral.
RR - Retina, or Closed Eyes, right and left.
RB - Bottom - lowest extreme of Lip and Jaw.
RT - Top, or highest extreme of upper lip position.
RW - Widest Lip position.
RU - For an ooo sound, (to be implemented).

Emotion Positions
The E_ suffix refers to the emotional palette. These interpolations modulate the positions generated by the speech engine. Keep in mind that some extremes may conflict with speech or eyeblinks. Right now we have designated a palette of 4 basic emotions that are implemented simultaneously with speech. Others may be created for future integration.

E0 - happy
E1 - sad
E2 - angry
E3 - surprise

Maintaining the Basic Topology
Commonly when animating a head you realize that, although the avatar looks good while static, there aren’t enough vertices to do the animation justice. Even though you may have completed most of the animations, if you alter the topology of the model in any way, (add or delete faces or vertices), you must completely redo all of the morphed positions. For morphing to work, each morphed position must have an analogous vertice count and ordering sequence. Often the most difficult position to establish is the eyeblinks - it helps to scale pupils in and extend lids outward, to prevent them from shearing through the lids. Generally, if your base head can accommodate eyeblinks, Happy, and Sad, then it is adequate for speech, so it is helpful to start with these positions first, to minimize redo.


IV. Generating .olh and .olx Files Using the Licensed Traveler

The Licensed Traveler
This is simply a special build of Traveler that contains an import function unavailable to regular users, and is enabled by adding a line to the Onlive.ini file: OnliveArtStudioImport=1. The specialized Licensed version has the ability to import all of your .3ds files, compressing it into one .olh file, which also includes display information, such as the avatar’s URL, Theme, Subtheme, and Copyright information.

What is the .olh file?
The .olh (OnLive head) file contains the neutral topology (head_1rn.3ds) and all of the Delta information defining the extreme speech and emotion positions, as well as display information specified by the developer. Although this single file is all that is ultimately placed on the server, it is essential to archive all the original source .3ds files, since constant revision requires one to regenerate the .olh files. It is possible to extract the neutral .3ds file from the .olh file, but since the morphed variants are stored as deltas of the neutral position they are not retrievable. Every time you update your animations or Color Regions you must regenerate the .olh file by using the Import button in the Licensed Traveler.

Generating the .olh file
To generate the .olh file: open the Licensed Traveler and click "edit" when the "choose an avatar" box appears. This brings up a series of folders. Click on the Import button at the bottom, then Browse through your directories until you locate the folder containing the heads you wish to import. Double clicking on any one of the files will allow you to view the head with all of its emotional states (although at this time you cannot view speech in the head shop). Even though you can see your avatar emoting, the .olh file is not generated until you hit the Save button. The .olh file should automatically save into the same folder as your source files.

What if My Head Doesn’t Load In?
If you have constructed your models correctly and saved them out one by one, the .olh file should generate. If it does not, look at your source files. Are all heads the same size? The neutral head will take up more memory if it is the only one containing color data; otherwise they will all be the same size. If not, save them out again, object by object. If you load all the heads in the 3DS4 Keyframer, and morph them from one position to another, do they morph seamlessly? If they jump around it is because your heads are not registered to your neutral head. If the meshes get mangled, then it is because the vertice positions have gotten out of order. Once you define the neutral position, the topology must remain the same, else the positions will not morph. Also, your head may not appear in the head shop if it is not registered to (000), or if it is not to scale with the existing avatars because it may be outside of the Headshop’s field of view. Pan back and rotate, to see if your avatar is off scale or positioned incorrectly.

Defining the Fields of the .olh file
The Import tab will not allow you to save out the .olh file unless certain fields are specified. The easiest way to fill in these fields is to open an existing .olh file as a template. When you then import the desired head, the fields will still contain the information provided by the template, which you can easily edit before saving out the new.olh. Make sure the new URL specifies the location of the new .olh file, and that the Index URL contains the correct .olx file.

These URL’s for the .olh and .olx files can either refer to art in your cache directory, for example: http://calx.onlive.com/lib2a/avatars/llama.olh
http://calx.onlive.com/lib2a/avatars/olanimal.olx
or they can refer to art stored elsewhere on your hard drive, using the following http convention: file://c:/path/filename.ext.
For more information on URL protocols, refer to: http://www.netspace.org/users/dwb/url-guide.html#general

Once the .olh and .olx files have been saved to your cache directory, these avatars should appear as selections under the Avatar Models tab, but you may wish to initially drag and drop the new .olh file directly into the browser.

International Text
The top fields are reserved only for the first 126 standard ascii characters (upper and lower case letters, numbers, and standard punctuation found on an English keyboard). Note that if you use non-standard characters, you will not get an error message, but such characters may not be available to other clients.

The bottom region includes 5 fields for International Text. All characters are valid here. Since we can always assume that any system can recognize English characters, the top fields serve as a backup display if the language under International Text is unrecognizable.

What is the .olx file?
The .olx file is an index file, or a catalogue of all the avatars within a given subtheme. When a user first encounters a new avatar, the accompanying .olx file also informs the system of the rest of the avatars within that subtheme, so that they can be viewed and selected from the Head Shop. In this way, whole groups of avatars can be propagated easily.

Generating the .olx file

1) Place your avatar.olh files into subdirectories, based on Subthemes.
2) Launch Traveler.
3) When "Choose an Avatar" box pops up, select the Edit button.
4) Open the Avatar Index tab. Select Open to browse for the .olx file you wish to update, or select New.
5) Highlight the Theme in the window display (Avatars by default). Hit the Insert key on your keyboard, usually near the upper right. An open dialogue box appears. From here, select the desired file, and select the Open button, or hit return. Your file has been Indexed.
6) Once you select an .olh file, the new avatar’s subtheme will automatically appear under the main Avatars theme. You will get an error message if you try to Index two avatar.olh files having different subthemes into the same .olx file. That is why it is convenient to organize your .olh files based on their subthemes.
7) Continue by hitting the Insert key again, and choosing the next avatar within that subtheme’s directory. Other than a delete key, there is no sorting mechanism. Avatars will be displayed in the order in which they were inserted. But by placing all your files together in one subdirectory, you can insert them alphabetically.

Your system may use an avatar that has not been indexed, but for others to view and pick the avatar from the Head Shop, the avatar must be included in the index file. The .olx file is placed on the server in the avatars directory.

The creation of System Avatars using the .olx file
OnLive! uses 3 system avatars, not selectable from within the head shop. This is possible because, although they are assigned a theme and a subtheme (thus, the system knows about them when it encounters any other avatar belonging to its family) they were not included in the .olx file, and therefore are not available from the head shop:

Guest (Sylvia) - This is your default avatar, until you decide to choose one.
Unknown (Lori) - Someone enters, but you haven’t cached their avatar yet. In order to preserve voice quality, we opt to give them this avatar instead of incurring a delay by caching it on the fly. Default (Obelisk) - We tried to download the avatar from the server, but ran into a problem, and failed.


V. Single-User Mode/Local Mode Testing

Unfortunately the Art_Traveler only allows you to see emotions and eyeblinks, so to test speech use the regular version of the app in Single-User Mode. You can enable Traveler to work in Single-User Mode to obviate the need to connect to OnLive!’s Access Manager when you simply want to preview work in progress on your hard drive. While in Single-User Mode you can a) be connected to the Internet - accessing files stored on a server, using Internet protocols, or b) work in Local Mode - maintaining your files on your Local Hard Drive. Instructions below assume you will be working in Local Mode.

Your Cache Directory and Traveler’s Cache settings
Traveler uses the URL addresses to locate the avatars and their Index files, but then it will cache a duplicate copy into a cache folder onto your local hard drive. So you can test art locally, that is not yet up on the server, by placing it into your Cache directory (Usually C:\Program Files\OnLive\cache…). But remember, since the cache is temporary and may be overwritten during a subsequent Traveler session, working copies of all your avatars, as well as the .olx files and a backup of your Onlive.ini file, should be kept elsewhere on your hard drive.

Either in Traveler, under the View/options/cache menu, or by resetting the onlive.ini settings (see below) you can specify how often you wish to have new art cached onto your hard drive. By default, this setting is set to "once per session," allowing the latest art on the server to be dumped into your cache directory at the beginning of each session. But once you begin a session, if a person enters the room with an avatar that is not in your cache directory, you will see them as the default Guest avatar, unless you leave the room and re-enter. The other option is to set cache to "always;" as soon as you encounter a new avatar, it gets immediately downloaded into your cache directory. This may have the undesirable effect of disrupting voice quality every time an unrecognized avatar enters the room. While working in Local Mode it is usually convenient to set Caching to "Never," so as to prevent work in development from being inadvertently overwritten by server art having the same name. Also, if you are not connected to the Internet, and leave caching On, your system may freeze for a minute or so as it goes through a searching cycle, giving the impression that the system has crashed.

The Onlive.ini file
To work in Local Mode, using the Art License version of Traveler, you will need to make 3 changes to your C:\Windows\Onlive.ini file.

1) Under the [Browser] heading, enable the Art License’s Import features: OnliveArtStudioImport=1

2) Create a new Indirect heading and add the command that tells it not to connect to OnLive!’s Access Manager. But you can still be connected to the Internet, using Internet protocols. (For testing new avatars, it may be desirable to redirect the server to an internal host, inaccessible to the OnLive! community .) [Indirect] all_servers=NO_CONNECT

3) Under the [cache] heading, you should add the following line for Local Mode testing, (where the art resides exclusively on your hard drive.) DefaultFrequency=-3 This tells Traveler not to look for a server.

Other Cache options include:

DefaultFrequency=0 means always check the server.
DefaultFrequency=-1 means cache once per session.
DefaultFrequency=-2 means set cache to Never. But if the needed art is not in your cache locally, it will look for it up on the server, which could prompt it to generate unneeded error messages.
DefaultFrequency=-3 means Traveler does not acknowledge the existence of a server. This will minimize the amount of waiting time, and possible error messages.

4) This line will take you straight to Traveler’s 3D Browser, without launching the Home Page. Similarly, you can specify different starting points for different personas, under the Settings tab, however these may conflict with the below setting: BypassSelectAnAvatar=-1

Here is an excerpt from the onlive.ini file with local mode enabled on your left (the local mode commands are in bold). The excerpt of the onlive.ini file on the right has these lines commented out using the comment character ";". To change Traveler from local mode and then back to networked mode you need only comment or uncomment the two local mode lines.

-----------------------------------------------------------------------------
<onlive.ini file excerpt in local mode>

[Browser]
BrowserID=ETVBase=C:\Program Files\OnLive
SrcDir=C:\PROGRA~1\ONLIVE

OnliveArtStudioImport=1
;This line above adds the import tab, allowing developers to generate .olh and .olx files.

[VDMS]
LogDetailLevel=0

[cache]
DefaultFrequency=-3
;caching is set to never.

[Indirect]
all_servers=NO_CONNECT
--------------------------------------------------------

<onlive.ini file excerpt in standard mode>

[Browser]
BrowserID=ETVBase=C:\Program Files\OnLive
SrcDir=C:\PROGRA~1\ONLIVE

[VDMS]
LogDetailLevel=0

[cache]
;DefaultFrequency=-2

[Indirect]
;all_servers=NO_CONNECT

The regular version of Traveler does not contain the import function.

-----------------------------------------------------------------------------

Testing Speech in Local Mode
Since you can not preview speech in the head shop, you may wish to preview your avatar in a 3D space. To view your latest avatar in a Traveler space, that .olh file must be in your cache, and that avatar must be selected. Note that by importing an avatar into the head shop, you have not necessarily selected it. You can select an avatar in two ways. The first is to select it from the Models tab in the Head Shop. But this presumes that the avatar has been indexed into an .olx file, which resides in your cache. An easier way is to drag and drop the .olh file directly into the Traveler window. This will launch the head shop, with your latest avatar displayed in the window. (If you see the default system avatar instead, it’s because you have forgotten to include that .olh file in your cache.) Minimize the headshop to view yourself in the Browser.

Moving the Camera out of the Head to View Yourself
Once you are in the 3D space, use Ctrl-I to view yourself. Normally the camera is mounted on your 3rd eye, (the pivot point defined by the artist in 3D Studio). However, by toggling through Ctrl-I you can view yourself from various positions while you talk and emote.

Stasia McGehee - 3/97


This page last updated on November 2nd, 1997.
Copyright © 1997 Stasia McGehee.