Avatar Specification (September/5/1996)
Yasuaki Honda
Changes
1996/9/5 The method to determine enable/disable of 'Multiuser- Change Avatar
Color' menu is changed.
The followings are the avatar specification as of June 30, 1996.
1. The world author should set what kind of avatars users can use
in the world. (Followings describe how to do it.). There is no way for users
to have their own avatars and use it in a world.
2. Let's assume that WORLD to be a directory URL where world's
main VRML file is placed.
In the directory WORLD/avtimg, you need to have avatar image files:
avatar1.bmp
avatar2.bmp
...
imglist.txt
avatar1, avatar2 are names of avatars (such as boy and girl) and they must
be at most eight characters. For the moment we only support BMP file format.
The file imglist.txt in the same directory should contain all the
names of image files in this directory per line. In this case:
---imglist.txt---
avatar1.bmp
avatar2.bmp
...
---end of imglist.txt---
3. In the directory WORLD/avtwrl , you need to have avatar
model files:
avatar1.wrl
avatar2.wrl
...
wrllist.txt
avatar1, avatar2 are names of avatars and they must corresponds to names
apeeared in image directory. The file wrllist.txt in the same directory
should contain all the names of model files in this direcotry per line.
In this case:
---wrllist.txt---
avatar1.bmp
avatar2.bmp
...
---end of wrllist.txt---
The number and order of avatars in imglist.txt and wrllist.txt should match.
(If boy.bmp and girl.bmp appears in imglist.txt in this order, boy.wrl and
girl.wrl should appear in wrllist.txt in this order).
4. On loading a VRML world, Cyber Passage browser fetches WORLD/avtwrl/wrllist.txt
and WORLD/avtimg/imglist.txt, then fetches all bmp files in the image
directory.
5. "Select Avatar" menu item of "MultiUser" menu
is enabled in case there are one or more avatars for users' choice. On selecting
the menu item, bitmaps and filenames (URL) are listed in the menu and once
selected one of displayed avatars, the information is sent from the browser
to the sever (via changeURL message).
6. Here is how to support avatar color change.
6-1. When 'MultiUser-Change Avatar Color menu is selected, CP browser
tries to open WORLD/avtroom.wrl. You need to provide users a way to change
the color of the avatar that was used in WORLD/main.wrl. The result color
must be stored in Windows95 registry. To assist this process, following
three APIs are supported in Java.
- void Vscp.setAvtroomAvatarColor(String colorString);
This function stores the color value into the Windows95 registry. The color
value must be encoded into a string.
- String Vscp.getAvtroomAvatarColor(void);
This function obtains the current color value of the avatar in question.encoded
into a string.
- String Vscp.getAvtroomAvatarURL(void);
This function obtains the avatar URL.
- void Vscp.goFromAvtroomToOriginalWorld(void);
This function changes the displayed world from avatar room to the original
world.
6-2. Usually, there is an 'OK' buttom in the avtroom.wrl and when
clicked, the function invoked by the "OK" button store the new
color by calling the above function Vscp.setAvtroomAvatarColor(String colorString).
Then the user gets back to the original world.
6-3. Sony will provide a sample avtroom.wrl file.
6-4. Avatar models stored in WORLD/avtwrl folder must follow the
following conventions.
Because avatars are shared, top transform node of an avatar must be specified
in transformNode field of a Sony_BindSharedNode{} node. The script node
specified for scriptNode field of the Sony_BindSharedNode must be capable
of receiving an eventIn SFString sonyAvatarAttribute. The string value of
this event is a concatination of "sleep:0 " or "sleep: 1"
and the color value string you stored in the Windows95 registry. The additional
part of "sleep:0 " or "sleep:1 " means that the avatar
is in sleep mode (sleep:1) or not in sleep mode (sleep:0). If the avatar
supports sleeping posture, on recieving the eventIn, you can setup the sleep
posture of the avatar during the processing of the eventIn.
6-5. Whether 'Multiuser-Change Avatar Color' menu is disabled/enabled
is specified in WorldInfo node of the main VRML file of the world. If the
file contain:
WorldInfo { info [ "SonyAvatarRoom: TRUE"] }
the menu is enabled. If FALSE is specified instead of TRUE, or there
is no WorldInfo node that contains SonyAvatarRoom tag, the menu is disabled.
If more than one WorldInfo nodes are specified which contains the tag, the
first occurance of such a node in the file is effective and the rest are
ignored.
7. Here is how to support avatar actions.
7-1. On pressing one of action buttons provided by the CP browser,
an eventIn SFString sonyAvatarPosture is generated on the script node associated
with the avatar through Sony_BindSharedNode. The string value of the eventIn
specifies the next posture of the avatar, such as "hello", "smile",
"wow",,,.
7-2.ü@Avatar action buttons are implemented as separate multiuser
control panel in the CP browser. Pressing the buttons sends strings shown
above. Future CP browser will support costom avatar action and buttons for
them.
7-3. The actual actions triggered by the eventIn SFString sonyAvatarPosture
can be implemented in anyway. You can do anything you can implement in VRML2.0
procedure.
7-4. Sony will provide a sample avatar files.