VideoAvatar Library
written by Joseph A. Insley
There are two different services provided by the VideoAvatar library.
The first is supplying remote avatars, which represent and are
controlled by remote, networked users. The second is to allow the use
of local avatars, whose position and orientation are controlled by the
programmer. The two services may be used together or independently.
Network y NetworkAddress 224.2.242.117 NetworkPort 6302 NetworkAppPort 6303 NetworkTTL 4 NetworkUpdateInterval .05
Consult CAVE User's Guide or Dave Pape for further info on the Network
stuff.
#include "VidAv.h"In C++ files
#include "pfVidAv.h"
Multiple avatars can use the same pair of files. These files should be stored
together in a directory whose path is specified in va.config (see
Configuration File below. Until things are
set up a little better, it may be a bit difficult to capture your own
avatars, but I could certainly give you a hand if you're interested.
In the meantime, there are a variety of avatars located
/nfs/avatars/ and /nfs/insley/AVATARS/ that you should
feel free to use.)
Example:
VADirectory /nfs/avatars VABaseName toast VANumberOfImages 150 VAImageResX 256 VAimageResY 512
Currently the library is only implemented to be used between machines on the same local network.
void va_PreInit(void);
int va_RemoteAvatarsAreEnabled(void);
Try it out:
In VideoAvatarExamples/remote directory compile
by typing "make remote" (or "make pfremote" for Performer
version). To execute, type
"remote" (or "pfremote") from two or more different machines.
You can navigate before the images are loaded, but the avatars won't start drawing until all of their images are done loading. MIDDLE_BUTTON toggles the enable for remote avatars off and on. LEFT_BUTTON prints the enable state for the remote avatars. The "9" key decreases the scale of all Remote Avatars. The "0" key increases the scale of all Remote Avatars.
Here is a look at the OpenGL example code.
Here is a look at the Performer example code.
Try it out:
In VideoAvatarExamples/local directory compile
by typing "make local" (or "make pflocal" for Performer
version). To execute, type
"local" (or "pflocal").
You can navigate before the images are loaded, but the avatar won't start drawing until all of its images are done loading. MIDDLE_BUTTON toggles the enable for that local avatar off and on. LEFT_BUTTON prints the enable state of that avatar. RIGHT_BUTTON toggles the user-defined update off and on. The "-" key decreases the scale of the Local Avatar. The "=" key increases the scale of the Local Avatar. Note in the code that whenever the avatar is being drawn, va_UpdateLocalAvatar(); must be called. Because even if the avatar's position is not changing, the user's position might be.
Here is a look at the OpenGL example code.
Here is a look at the Performer example code.
Try it out:
In VideoAvatarExamples/both directory compile
by typing "make both" (or "make pfboth" for Performer
version). To execute, type
"both" (or "pfboth") from two or more different machines.
You can navigate before the images are loaded, but the avatars won't start drawing until all of their images are done loading. MIDDLE_BUTTON toggles the enable for that local avatar off and on. LEFT_BUTTON toggles the enable for remote avatars off and on. RIGHT_BUTTON toggles the user-defined update off and on. The "-" key decreases the scale of the Local Avatar. The "=" key increases the scale of the Local Avatar. The "9" key decreases the scale of all Remote Avatars. The "0" key increases the scale of all Remote Avatars. Note in the code that whenever the avatar is being drawn, va_UpdateLocalAvatar(); must be called. Because even if the avatar's position is not changing, the user's position might be.
Here is a look at the OpenGL example code.
Here is a look at the Performer example code.