The
DIVE FAQ Page
This is the DIVE frequently asked questions page. It is currently rather
limited but we intend to add to it as questions arise. If you have a question
like the ones below, or something you think would be useful in this FAQ,
send an email to dive-help@sics.se.
See also the online
DIVE manual.
Installation:
-
Why am I getting
erros of type 'file doesn't exist', or why don't I have complete scenes,
on NT DIVE?
Running DIVE:
-
How can I optimize
DIVE performance for my conditions?
Tcl/Tk programming:
-
DIVE seems to be rejecting my Tcl/Tk code to make Tk UI objects, why?
-
How can I switch
textures in a view with a keypress?
-
How can sounds be made to play without the delay caused
by sample download time?
Rendering:
-
Why can't
I see some textures when using Linux-Mesa-3DfxVoodoo1(Coming DIVE release)?
-
Why do I have to be root when using Linux-Mesa-3DfxVoodoo1(Coming DIVE release)?
Menu options:
-
Why can't I use
the stereo option on the render menu?
General Questions:
-
Why isn't there a win95/98 version of DIVE?
Installation:
1. Why am I getting errors of
type 'file doesn't exist', or why don't I have complete scenes, on NT DIVE?
The current NT realease needs
to be installed on the C drive. The reason for this is that Dive uses a
preprocessor to process the datafiles before parsing (so that you may use
preprosessor macros in the data files), but the current preprocessor is
taken from the Cygnus "win32unix" distribution and doesn't know anything
about Windows drive letters. If your datafiles contain an include-directive
(which tutorial does), the preprocessor assumes that the include files
are located on the C drive (which in your case they are not), therefore
the problem. Move your datafiles to the C drive and set your DIVEPATH variable
accordingly.
Running DIVE :
1. How can I optimize DIVE performance for
my conditions?
Copy the '.dive_configure' file
from your data directory to your HOME directory and change variables that
affect your performance (e.g. render_* variables) and delete the others.
The variable values in your new file override the default values. Try for
instance lowering 'render_interval'.
Tcl/Tk programming:
1. DIVE seems to be rejecting my Tcl/Tk code to make Tk UI objects, why?
The trick when using Tk commands in DIVE Tcl scripts is to make sure
that they are executed by a diva actor entity (since these entities are
the only ones who understand Tk). This means that if you want to create
a Tk window from a DIVE Tcl script in an arbitrary entity, you have to
use dive_send to "send" the Tk cmds to the appropriate actor entity.
Which actor to use depends of course on where you want the window to
appear, i.e., on what physical screen. Typically you find the actor you
are "looking for" via listening to events, for instance the interaction
event has an actor as one of its parameters.
Have a look at body_cartoon.vr and walkman.tcl, both files
contain Tcl scripts that create Tk UI objects.
2. How can I switch textures in a view
with a keypress?
object {
material "white"
nobackface on
texture "texture1.gif"
texture "texture2.gif"
view {
name "xyz"
texture_index 0
N_M_POLY 1 4 (T_PER_VERTEX)
N_POLY 4
t 0 0
v 19.2 3.0 -19.2
t 1 0
v -19.2 3.0 -19.2
t 1 1
v -19.2 3.0 19.2
t 0 1
v 19.2 3.0 19.2
}
begin.tcl
proc on_new {type id origin}
{
global textind
set textind 0
}
proc change_texture {event
type device key origin} {
global textind
if {$key != "Control_L"}
{
#
Left Ctrl triggers the texture switch
return
}
set vid [dive_find_entity_byname
"xyz"]
if {$textind ==
0} {
set
textind 1
} else {
set
textind 0
}
dive_texture_index
$vid $textind
}
dive_register INPUT_SIGNAL
KEYBOARD_KEY_DOWN [dive_self] "" change_texture
dive_register ENTITY_NEW_EVENT
NULL [dive_self] "" on_new
end.tcl
}
3. How can sounds be made to play without
the delay caused by sample download time?
Store the sound in a buffer when creating
the object you want the sound to play in, then use the (global) variables describing the sound with dive_readbuf_withMIME
to play the sound without delay.
begin.tcl
global sound1 len1 type1
set sound1 [dive_readURL_as_addr \
"http://www.sics.se/dive/data/songs/porsche.au"
len1 type1]
proc play_sound {} {
global sound1 len1 type1
dive_readbuf_withMIME [dive_self]
$sound1 $len1 $type1
}
}
Rendering:
1. Why can't I see some textures when
using Linux-Mesa-3DfxVoodoo1?
This might be because your textures are too large, 3DfxV1 based cards only support texture sizes up to 256x256 pixels.
2. Why do I have to be root when using Linux-Mesa-3DfxVoodoo1?
This is because you need root access to be able to get register access to video hardware.
Menu options:
1. Why can't I use the stereo option on the
render menu?
Stereo is currently (DIVE 3.3x) only supported on SGI machines (shutter glasses needed).
General Questions:
1. Why isn't there a win95/98 version of DIVE?
Unfortunately, DIVE cannot be used under Windows 95/98. The threads package that DIVE uses internally is incompatible with those versions of the operating system from Microsoft.
To get DIVE running on a PC, you will need to install Windows NT or Linux.
Up to FAQ list
Dive
contacts /
dive-help@sics.se