
Technical reference > Installation
VRUT requires several other software package be installed first.
These are:
Python 1.5 for W9x/NT
(1.4 and lower no longer work with VRUT 2.2f and higher)
OpengGL for Windows (should come with recent releases of W9x/NT)
If the packages above are not already installed, you should do that
first by following the provided links
To install VRUT, follow these steps:
-
Unzip the vrut.zip installer placing the files in a tempory directory and
then run the installer program "setup.exe". Most likely you've already
done this step if you're able to read this document.
-
You must set an environment variable "VRUT_PATH" that points to the location
of the VRUT installation directory. For instance, if you installed
VRUT at c:\programs\vrut, then you must set VRUT_PATH equal to that path.
(W9x users need to modify the autoexec.bat file; NT users should use the
"system" control panel to setup environmental variables). The installer
asks permission to do this so this may have already been done for you.
-
You must next modify the default search path in Pythonwin. To do
this, launch Pythonwin and select the "Tools/Edit Python Path" menu item.
Expand the "Python Path" folder icon, click on the "Pythonwin" document
icon, and then in the right-hand pane double-click the [Default] label.
This will bring up a dialog box allowing you to modify the Python search
path. Add the following (without quotes) to the very beginning: ".;c:\programs\vrut;c:\programs\vrut\python;".
You will have to quit and restart Pythonwin for the changes to take effect.
-
If you're using VRUT on a networked machine, you can set two optional environment
variables that can point to the location of shared resources for VRML models
and textures. This feature will enable VRUT to access these resources
from any directory. To define the directory paths, you must use the
name of your computer and the shared name of the harddrive on which
VRUT is installed. This path convention requires networking be activated
(though not necessarily TCP) and that you know the both the network name
of your computer and the shared name of your drive. Be careful, these paths
must be separated by colons and not semicolons. For example, if you
installed VRUT at c:\programs\vrut on a drive that is shared as "system"
on your computer, and your computer is named "bongo", you would set the
three required variables to the following:
CS_DATAFILE_PATH \\bongo\system\programs\vrut\texture:bong\\system\programs\vrut\texture\temp
OP_DATAFILE_PATH \\bongo\system\programs\vrut\vrml
-
If you want to maintain backward compatibility with old 3DMF files
and textures, you'll need to modify the settings in the VRUT.INI file within
the main \vrut\bin directory.
To test installation, do the following:
-
Launch Pythonwin.
-
Type "import vrut".
-
Type "vrut.go()"
-
Type "vrut.version()". You should see the following versions:
WINVRUT
|
2.2g
|
VRUT |
2.2g |
IPC |
2.21 |
-
Type "vrut.addchild('eroom.wrl')
This should load a VRML world that consists of a room with several textures,
with the eyepoint starting in a hallway. The door to the left should
lead to a large room with a picture of Hong Kong at one end and in the
middle there should be a spinning globe.
Distribution contents:
-
vrut/
-
winvrut executables
-
dll - dlls to install in the system folder
-
models - old 3DMF and NFF geometries
-
python - python scripts, mostly old ones from the winvrut 1.0 era, some
new ones
-
texture - textures, obviously
-
vrml - VRML2.0/VRML97 files
-
www - help files, such as the one you're reading now
-
ipc.dll - accessed by Pythonwin so must be available in Pythonwin's path
-
vrut.py - main python libary module
-
vrut.ini - template for specifiying 3DMF and old texture paths
-
winvrut/ - These are all the project and source files. Keep in mind
that OGL/Optimizer and Winvrut2.0 require MSVC5.0.
Important Notes
There are a number of example and demo script. For fairly simple
things, try running all the script in the vrut/python folder. To
get a sample of more complex graphics and techiques, take a look at the
vrut/demos folder--each of the subfolders should have a .py file that should
work.
The VRML loader that's now part of winvrut2.0 does not read VRML1.0
files; you must first convert any such files to the VRML97/VRML2.0 standard.
Winvrut2.0 now has backface culling set as the default OpenGL state.
If old models look funny (missing facets), try turning off backface culling
with:
vrut.disable(vrut.CULL_FACE).
The vrut.py libary now has a flag to run the 1.0 version of winvrut.
To do this, pass vrut.OLD in the display parameter list:
vrut.go(vrut.OLD)
and the original winvrut binary will be launched instead of the new
one.
Most of the remarks regarding building VRML files is from my experience
with 3D Studio v2.5. There is also a decent shareware modeler called
ACD3
that exports handles textures and exports VRML2.0 that might be worth looking
at. It's a whole lot easier to start using than 3D Studio and seems
to work fine with VRUT.
I've notice that some PCs without any texture hardware acceleration
seem to do funny things with the texture mapping. If you're textures
are swimming around a lot, then that's the symptom. I've found the
problem but haven't had time to fix it yet. In the meantime, you're
best off buying a $100 OGL board.