3D Sound
This is a fairly untested feature but one which hopefully one which
will be fine tuned. The current implementation is using the Aureal
A3D SDK version 2.0 for doing realtime HRTF. As of 9/99, this hardware
only seems to work under W9x. If the hardware is not present or active,
then the software does some sort of software emulation which probably just
change the sound levels between the left and right speakers.
INIT dialog box
A new flag, vrut.PROMPT, has been added to the flags available to vrut.go().
Passing PROMPT causes a dialog box to appear allowing the user to make
several selections. The HMD and STEREO options have builtin behaviors
but the other fields strictly provide information that can then be accessed
from within the script.
Class event handling
The beginnings of object-oriented event handling is now functioning.
In this first trial, timer events can now be embedded inside a class object.
This main utiltity of this is to allow graphical objects to contain their
own behaviors and not depend on being controlled soley by the main script's
event handler. This is so undocumented but for an example of how
to use this, see the "pointingandy" demo folder.
CSB files
A VRUT command now supports exporting .CSB files. This is an
efficient binary format that can be useful when using complex geometry
and when you want to have your models load much faster. It does not
affect texture loading, however.
Collision detection
There is now support for collision detect with bounding boxes.
To use this feature, you load a model and then use the object method "collision(vrut.START)"
to activate collision detection. When VRUT detects that the eye point
has entered any of the child's bounding boxes, a new event type "COLLISION_EVENT"
is triggered, so if you've registered events of that type that function
will get called. That function will get passed to it the id# of the
child which the collision occurred. You can start collision detection
on any number of simultaneous child objects.
Bounding box display
To see the internal bounding boxes of models in the scene, press F8.
This is sometimes handy for debugging, such as seeing invisible objects
that may have been otherwise culled.
Hierarchical structures / getchild
You can now build a hierarchical model (such as a robot arm) within
a modeler (eg., 3D Studio) and then access the different parts from VRUT.
To do this, you must name the object in your modeler and then after loading
the main model, you can use the object method "getchild" to return sub-child
objects of the different parts. You can also use "getchild" to extract
previously independent children from a .CSB file.
Screen capture
The "screencapture()" command has been implemented to allow you to
easily take a snapshot of the VRUT left window. You pass the function
a string that represents the desired filename, and depending on what suffix
you use in the file name the image will be created according (see list
of supported texture formats).
Mouse changed to return both H and V values
Mouse movement callback functions have been changed so that both the
horizontal and vertical components are returned. As before, the vertical
component is relative but the horizontal component is absolute. Sorry
about the different methods...
Changes in 2.2d
Mutliple scenes
It is now possible to load VRML objects into one of two scenes (see
"addchild" command extras). This allows you to setup a second scene
that you can swap to by simply issuing the "setscene" command. A
special form of the "setscene" command allows you to display different
scenes to the LEFT and RIGHT eye channels. This is useful for many
perceptual tricks. Be careful, some of the advanced lighting and
texture features are only implemented for scene 1 at present so odd results
may be found. Most standard stuff should work, though.
Sensor hotspots
Sensor hotspots now work using the sensor child method "starthotspot".
When a sensor-type hotspot is triggered, you still get back head position
data not the sensor data passed through the function arguments (just like
normal hotspots do). Also, both head position and sensor hotspot
can now be used simultaneously.
Object Statistics
Some object statistics are now available with the object method "statistics."
This is useful to check a model and see if it chewing up more than its
fair share of geometry rendering.
BUG FIXES:
Swapping textures: VRML object method "texture" now works. The
texture object method also works, but it quits after changing a texture
on the first object found in the scene graph. This is still a bug--it
should continue to traverse the tree and do a global swap.
Objects attached to the head now appear with an origin that's located at the eyepoint not down at the feet. The 2.2 release seemed to stick them at the feet but I'm not 100% sure about this.
Body orientation transformation handling has been correctly implmented
to accept true Euler angles. Transformations to the body orientation
state will now function as expected even when head orienation tracking
is turned on.
Sensor functionality
The new format has enabled the following 3 improvements: 1) the user
can now access all of a plug-in's data from within the Python interface,
2) a plug-in can be connected to a VRML object to automatically move it
around, and 3) an optional function can be built into the sensor plug-in
that allows the user to send it a signal or data that can make sensor use
much more general. For instance, a motion generator can be built
in C that controls an VRML object along a complex trajectory.
Mouse handling
Support for reading data from a standard serial mouse has been added.
One benefit of this is that it makes for a cheap and easy way to get subject
input for an experiment. For instance, a user can wear a trackball around
the waist and then have two buttons and a variable control input interface
to affect the the simulated environment.
Improved environment variable method
A new method using the W95/NT shared-drive convention makes it now
possible to work across multiple drives when using VRUT (see the new installation
instructions). In addition, it is now possible to keep all user files,
including Python, VRML, and texture, all in a local user directory. You
can also double click on VRUT/Python script and run all of them without
entering Pythonwin (but to do this, you must replace __name__ inside the
script with the actual name)..
VRUT networking
Some really simple methods have been setup for sending data back and
forth between VRUT sessions running on different computers. The method
lets you broadcast an arbitrary string to all system in the domain.
Other computers can choose to listen or not, and then to filter based on
who's sending. By parsing the string, data such as the current user's
eye position can be known by another session to render the user from another
person's point of view or just to monitor their trial-by-trial data.
Updated support software
Latest versions of the support software has been combined with this
release of VRUT: Python 1.5.1, OpenGL Optimizer 1.2, and Image Format Library
1.3.1.
Corrected texture and light handling
A default DECAL mode now functions so that textures can be applied
without concern for lighting and achieve maximum performance. Texture
can also be set to be transparent using both modulation mode and alpha
thresholding (the tutorial talks about how to do all this). Finally,
lights work exactly as expected (again, tutorial describe the proper usage).
VRML filter
A C-based VRML filter is available that can convert lines of VRML file
automatically during the import process with "addchild". If activated,
it will build a filtered version and use that; and on subsequent imports
if the filtered version remains and has the newest creation date, only
it will be used to improve import performance. To activate, the source
must be recompiled after uncommenting the appropriate line in "optAddChild".
VRML head anchoring
You can now add an additional parameter vrut.HEAD when adding a child
VRML object to the environment that tell VRUT to lock the object to head
coordinates. Body anchoring is not yet supported.
New callback method
It is no longer necessary to split main and callback scripts into separate
files. The tutorial (Topic 8
- Embedding user interaction) now discusses only the new way of doing
this and the old way may not be supported in future versions.
Coordinate system
The 3D coordinate system for rotations and translations in previous
releases has inconsistencies across different commands. These have
hopefully all been cleaned up.
ShowMessage is back
You can show simple text string now pinned either to the world, body,
or head.
Playing wave files
Standard Windows WAVE (.wav) files can now be played through the VRUT
programming interface. The playsound command plays the sounds asynchronously
which allows the graphic rendering to continue while the sound file plays.
As an option, the sound file can loop so that one file can play over and
over.
Screen modes support (vrut.FULLSCREEN and vrut.ORTHOGRAPHIC)
These two screen modes have been ported to the windows environment
(see vrut.go for details).
VRUT_PATH environment variable
A new environment variable, VRUT_PATH, controls the location of vrut
support files (winvrut.exe, vrut.ini, plug-in directory, etc). Also,
the vrutpaths file has been renamed vrut.ini starting in version 2.1.
Node appearance control
The child method .appearance has been added to allow on-the-fly control
of appearance properties. Currently, the only properties that can
be modified are texture filtering and texture transparency. Filtering
allows the activation of linear and mipmap filtering for texture magnification
and minification. Transparency makes it possible to use texture formats
that support alpha-layer transparency (TIFF, PNG, and RGBA) to create the
effect of transparent surfaces.
Text display and menu handling (pushscroll)
The command pushscroll and MENU_EVENTs are now
functional. In addition, there is default support mouse support allowing
the user to select menus using the mouse for debugging before using the
immersive VR system.
Display list / 3DMF bug fix
A bug in the orginal vrut code didn't rear its ugly head until we started
using RIVA/TNT boards. This bug has been fixed and all old 3DMF files
should now load without any problems. In addition, support for building
dynamic geometries through the python interface is also functional (see
startlayer).
Plug-in interface
A new interface for connecting trackers has been created. Using
this method, winvrut itself does not contrain tracker support for any particular
hardware. Instead, when it's launched, it scans its plug-in directory
and makes available any tracker plug-ins that have been placed there.
This should make it much easier to maintain a primary rendering engine
while also making it easier to keep machine-specific hardware configurations.
Starting with version 2.1, you must first add a sensor (vrut.addsensor)
before head-tracking will work. Look here
for skeleton code for building you own plug-in.
Hierarchical objects
An addchild method has been added to the child class allowing hierarchically
structured VRML nodes. Any operation applied to the parent will carry
through and automatically be applied to all its children while the children
under the parent can still be modified as it they were orphans.
Framerate counter options
Two framerate counters are now available: one outputs the statistics
to the console window with negligible performance decrement, and another
which displays statistics in the graphics window with a noticable performance
decrement.
Object oriented nodes
The concept of "layers" has been changed to "children". Instead
of pushing and popping geometry layers, all VRML files are loaded by "addchild".
The addchild command returns a "child" object that can then be manipulated.
The major advantage of this technique is that you no longer have to keep
track of the order of pushing layers. An example of this new method
is the following:
sph = vrut.addchild('sphere.wrl')
gnd = vrut.addchild('ground.wrl')
gnd.curtain(vrut.CLOSE)
sph.translate(0,1,0)
In this example, two children are loaded into VRUT, then the first (ground) is turned off with a call to curtain. Finally, the sphere is translated 1 m in the Y axis. The only catch with this object oriented technique is that if you want to reference children in a callback script, the child must have been load from within the callback script; otherwise the child's value would not be defined and you couldn't apply transformations. Some of the old vrut style commands can still be used, such as vrut.translate(sph, 0, 1, 0), but notice that you pass the sphere object instead of the layer #.
You should be able to combine vrut.pushlayer and vrut.addchild commands in a single script. This hasn't been tested much yet.
Lights
Lights can now be fully specified in VRML files. This means that
if you use a good modeler, like 3D Studio, you can now add lights (directional,
spot, or point) to your models. The vrut.light commands are essentially
obsolete now.
Console window
The console window that is created along with the VRUT rendering window
now supports feedback from both the Pythonwin scripts and the callback
scripts. This makes debugging much easier now as you can include
"print" statements anywhere to check on things. To make this window
really useful, change it system wide settings so that it buffers about
10 screens full allowing you to scroll back and read all error messages.
Framerate monitor
The framerate function has been improved to show the frame rate superimposed
on the rendering window in realtime, with some nifty looking graphics and
a few other statistics that might be useful.
Mouse navigation
The mouse control has been largely changed. The original left-button
mode is identical to winvrut1.0 enabling you to fly through models.
The right button now allows you to move up and down or left and right.
The problem with movement in world coordinates has been fixed so this feature
works as expected. Hold both buttons down at the same time allows
pitch and roll changes (these features don't work too well yet).
View frustrum culling
This culling technique removes any geomoetries that aren't in the current
view (view frustrum) from the current scene graph. This can greatly
improve performance if when you design your environment models, you parse
your environment into spatial sections. Then, only those sections
that are in view will be rendered. Note that eventually this will
be an option so that children are not culled in this manner.