1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443
|
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="GENERATOR" CONTENT="Mozilla/4.03 [en] (X11; I; Linux 2.0.30 i486) [Netscape]">
<TITLE>Graphics Muse
</TITLE>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FA" VLINK="#FA3333" ALINK="#33CC33">
<!-- =============================================================
This Page Designed by Michael J. Hammel.
Permission to use all graphics and other content for private,
non-commerical use is granted provided you give me (or the
original authors/artists) credit for the work.
CD-ROM distributors and commercial ventures interested in
providing the Graphics Muse for a fee must contact me,
Michael J. Hammel (mjhammel@csn.net), for permission.
============================================================= !--><A NAME="musings"></A>
<TABLE BORDER=0 NOSAVE >
<TR NOSAVE>
<TD NOSAVE>
<H2>
More...</H2>
<IMG SRC="../gx/hammel/musings.gif" ALT="Musings" HEIGHT=52 WIDTH=247 ALIGN=LEFT> </TD>
</TR>
</TABLE>
<TABLE>
<TR>
<TD></TD>
</TR>
</TABLE>
<IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" VSPACE=5 HEIGHT=1 WIDTH=1 ALIGN=LEFT>
<TABLE BORDER=0 WIDTH="100%" NOSAVE >
<TR NOSAVE>
<TD ALIGN=RIGHT WIDTH="100%" NOSAVE><FONT SIZE=-2>© 1998 <A HREF="mailto:mjhammel@csn.net">Michael
J. Hammel</A> </FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP BGCOLOR="#000000" cellpadding="0" cellspacing="0"><IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" ALIGN=LEFT></TD>
</TR>
</TABLE>
<H2>
VRWave 0.9</H2>
Quite some time ago a reader, a fellow named Paulo, had sent me email asking
if I had taken a look at <B><FONT COLOR="#CC6600">VRWave</FONT></B> yet.
This is a VRML 2.0 browser available from the Institute for Information
Processing and Computer Supported New Media (IICM), GrazUniversity of Technology,
Austria. The program is freely available for private use and includes
source code. The current version, 0.9, includes a Java-based port
of the code, although all rendering code is still in C using either OpenGL
or Mesa.
<P>Looking through my backlog of things to do for the Muse, I decided to
take a look at VRWave. At a minimum I wanted to see if I could simply
get it to run. Hopefully, I would be able to say something intelligent
about the source code and build environment as well. I jumped on
the Internet and went off to grab a copy of the package from a US mirror
of the VRWave Home Page (<A HREF="http://www.iicm.edu/vrwave">http://www.iicm.edu/vrwave</A>).
The first thing I noticed was that there were both source and binary distributions
available. The binary distributions cover a few flavors of Unix,
including ports for Linux 2.0. There are actually two versions of
the binary distribution - a Java 1.1.3 based version and a Mesa version
which uses Java 1.0.2. These are actually the platform specific libraries
needed by VRWave. I grabbed both along with the gzipped Common tar
file which must accompany any binary version that is downloaded.
The Mesa version is not compiled with any of the hardware accelerated drivers
available for Mesa. If you want to use those drivers you need to
recompile the source with the Mesa package properly built with the drivers
of interest. Also, the Mesa code is statically linked into the platform
specific libraries, so you shouldn't need any other libraries or files
outside of those contained in the Common tar file and the platform
specific tar file.
<P>The directions say to unpack the Common file first, then cd into the
vrwave-0.9 directory this process creates and unpack the platform specific
files. The first time I did this I didn't do it in the right order
and got myself confused. So I redid the unpacking, following the
directions. Its true - men never read the directions. The instructructions
in the INSTALLATION file for running VRWave are quite complete so I won't
rehash them here. Just be sure you actually read the file!
In my environment I use Java 1.0.2, the default installation of Java on
Red Hat 4.2, so I set my CPU environment variable to LINUX_ELF. You
may need to set it to LINUX_J113 if you have the Java 1.1.3 package installed
on your system.
<P>Once you set up a couple of environment variables you're ready to start
vrwave. Since VRWave uses your Java runtime environment, be sure
your CLASSPATH is set correctly first. On my Red Hat 4.2 system
I have it set as follows:
<UL><B><FONT SIZE=-1>CLASSPATH=/usr/lib/java/lib:/usr/lib/java/lib/classes:/home/mjhammel/src/graphics/vrwave-0.9/classes</FONT></B></UL>
Type <B>vrwave </B>and the interface opens a window. On my system
I got messages like the following:
<P><B>java.lang.InternalError: unsupported screen depth</B>
<BR><B>VRwave: could not load icons at /home/mjhammel/src/graphics/vrwave2/vrwave-0.9/icons.gif</B>
<BR><B>VRwave: could not load logo at /home/mjhammel/src/graphics/vrwave2/vrwave-0.9/logo.gif</B>
<BR><B>java.lang.InternalError: unsupported screen depth</B>
<BR><B> at sun.awt.image.ImageRepresentation.setPixels(ImageRepresentation.java:170)</B>
<BR><B> at sun.awt.image.InputStreamImageSource.setPixels(InputStreamImageSource.java:459)</B>
<BR><B> at sun.awt.image.GifImageDecoder.sendPixels(GifImageDecoder.java:243)</B>
<BR><B> at sun.awt.image.GifImageDecoder.readImage(GifImageDecoder.java:295)</B>
<BR><B> at sun.awt.image.GifImageDecoder.produceImage(GifImageDecoder.java:155)</B>
<BR><B> at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:215)</B>
<BR><B> at sun.awt.image.ImageFetcher.run(ImageFetcher.java:98)</B>
<BR><B> at sun.awt.image.ImageRepresentation.setPixels(ImageRepresentation.java:170)</B>
<BR><B> at sun.awt.image.InputStreamImageSource.setPixels(InputStreamImageSource.java:459)</B>
<BR><B> at sun.awt.image.GifImageDecoder.sendPixels(GifImageDecoder.java:243)</B>
<BR><B> at sun.awt.image.GifImageDecoder.readImage(GifImageDecoder.java:295)</B>
<BR><B> at sun.awt.image.GifImageDecoder.produceImage(GifImageDecoder.java:155)</B>
<BR><B> at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:215)</B>
<BR><B> at sun.awt.image.ImageFetcher.run(ImageFetcher.java:98)</B><B></B>
<P>These may be due to either an incorrect Java configuration on my system
or because the Java 1.0.2 libraries do not support the TrueColor (24 bit
depth) visual I'm running with my X server. In either case it didn't
seem to matter, as the window opened and I was able to begin playing with
VRWave. Also, during all my experimentation I had no display
or color problems at all.
<P>The first thing I should say at this point is that I know very little
about VRML other than its a language for describing navigable 3D worlds.
VRML 2.0 includes features such as spatial sound, where the sound of an
object in the distance can grow louder as the object is moved closer.
To my knowledge VRWave does not yet support sounds, but I didn't test any
VRML worlds in which sound was availalble. In any case, what I'll
describe here is what an casual user might encounter, what someone who
is just beginning to explore VRML might find interesting and useful.
Also please note that the slight blur in the images is due to reducing
them from the screen captures in order to fit the image in a 640 pixel
wide Web browser.
<H4>
The interface</H4>
<CENTER>
<H4>
<IMG SRC="./gx/hammel/vrwave-1.jpg" HSPACE=10 VSPACE=10 HEIGHT=370 WIDTH=459></H4></CENTER>
<P>The image above show the initial window if no input file is provided
on the command line. You can specify any VRML file as an input file.
These carry the .<B>wrl </B>extension in the file name and you can find
numerous example in the <B><FONT SIZE=-1>examples</FONT></B> directory
in the distribution. Scene files are ordinary text files, not
unlike the POV-Ray programming language in a sense. The look like
the sample code below, which is the code for the convexify.wrl example:
<UL>#VRML V2.0 utf8
<P># sample for applying perface materials onto non-convex shape
<BR># kwagen/mpichler
<P>Viewpoint
<BR>{
<BR> position 5 5.25 10
<BR> orientation -0.6 0.8 0.1 0.5
<BR>}
<BR>Shape
<BR>{
<BR> geometry IndexedFaceSet
<BR> {
<BR> coord Coordinate
<BR> {
<BR> point [ 0 0 1, 1 0 1, 3 4 1, 2 4 1,
1 2 1, 1 4 1, 0 4 1,
<BR>
0 0 0, 1 0 0, 3 4 0, 2 4 0, 1 2 0, 1 4 0, 0 4 0 ]
<BR> }
<BR> coordIndex
<BR> [
<BR> 0 1 2 3 4 5 6 -1 # front,
lt. green
<BR> 0 7 8 1 -1
# red
<BR> 1 8 9 2 -1
# blue
<BR> 2 9 10 3 -1
# yellow
<BR> 3 10 11 4 -1
# cyan
<BR> 4 11 12 5 -1
# magenta
<BR> 5 12 13 6 -1
# dk. cyan
<BR> 6 13 7 0 -1
# dk. magenta
<BR> 13 12 11 10 9 8 7 # back, dk.
green
<BR> ]
<BR> color Color { color [ 0 1 0, 1 0 0, 0 0 1, 1 1 0,
0 1 1, 1 0 1, 0 0.5 0.5, 0.5 0 0.5, 0 0.5 0 ] }
<BR># colorIndex [ 8 7 6 5 4 3 2 1 0 ] # reverse color
binding
<BR> colorPerVertex FALSE
<BR> convex FALSE
<BR> }
<BR>}</UL>
<P>The following table summarizes most of the features in the VRWave main
window:
<BR>
<CENTER><TABLE BORDER COLS=2 WIDTH="100%" NOSAVE >
<TR BGCOLOR="#FFCC00" NOSAVE>
<TD WIDTH="20%" NOSAVE><B><FONT SIZE=+1>Window Feature</FONT></B></TD>
<TD><B><FONT SIZE=+1>Description</FONT></B></TD>
</TR>
<TR NOSAVE>
<TD BGCOLOR="#33CCFF" NOSAVE>File </TD>
<TD>Basic file input/output functions, plus camera information.</TD>
</TR>
<TR NOSAVE>
<TD BGCOLOR="#33CCFF" NOSAVE>Navigate </TD>
<TD>Set mode for movement through VRML world; reset and align functions
for current view.</TD>
</TR>
<TR NOSAVE>
<TD BGCOLOR="#33CCFF" NOSAVE>Display </TD>
<TD>Lighting, rendering (static and interative) methods, colors, background,
transparency, etc.</TD>
</TR>
<TR NOSAVE>
<TD BGCOLOR="#33CCFF" NOSAVE>Help </TD>
<TD>HTML based help system that relies on Netscape. Netscape must
be in your path for this to function properly.</TD>
</TR>
<TR NOSAVE>
<TD BGCOLOR="#33CCFF" NOSAVE>Flip</TD>
<TD>Navigation mode; Scene translation around origin and zoom.</TD>
</TR>
<TR NOSAVE>
<TD BGCOLOR="#33CCFF" NOSAVE>Walk</TD>
<TD>Navigation mode; move forward, backwards, sideways pan and move
"eyes".</TD>
</TR>
<TR NOSAVE>
<TD BGCOLOR="#33CCFF" NOSAVE>Fly To</TD>
<TD>Navigation mode; sets a Point of Interest from which all other
movements in this mode are relative.</TD>
</TR>
<TR NOSAVE>
<TD BGCOLOR="#33CCFF" NOSAVE>Heads Up</TD>
<TD>Places a "heads up display" in the center of the viewing area;
3 navigation types in display: eyes, body and pan. These correspond
to the same types of movements that Walk provides but gives visual cues
to movement settings.</TD>
</TR>
<TR NOSAVE>
<TD BGCOLOR="#33CCFF" NOSAVE>Behaviour</TD>
<TD>Purpose unknown</TD>
</TR>
<TR NOSAVE>
<TD BGCOLOR="#33CCFF" NOSAVE>Interaction</TD>
<TD>Purpose unknown</TD>
</TR>
</TABLE></CENTER>
<H4>
Navigation</H4>
In the following example, the sample scene <B><FONT SIZE=-1>examples/office2.wrl</FONT></B>
was opened (File->Open) into the default window (ie the window was not
resized or adjusted in any way). To move around this scene you can
use the mouse or keyboard. Keyboard bindings are described in the
<B><FONT SIZE=-1>help/mouse.html </FONT></B>file, which will also give
you a little more information about what kind of movements within a scene
are available.
<P>An example of movement through this scene would be to hold down the
middle mouse button (with the Flip button pressed as it is in the example
image below) and drag it around the viewing area. This would rotate
the entire room and its contents around the origin, which is positioned,
but not visible, in the middle of the viewing area. When this movement
is started the image will change to a wireframe view to speed processing.
The use of wireframe, flat shaded, smooth shaded and textured objects during
navigation and static display (when you aren't moving the scene around)
can be controlled from the <B>Display</B> option in the menu bar.
<BR>
<CENTER><IMG SRC="./gx/hammel/vrwave-3.jpg" HSPACE=10 VSPACE=10 HEIGHT=416 WIDTH=516><BR clear="both"></CENTER>
<CENTER><B>examples/office2.wrl example scene</B></CENTER>
<CENTER><IMG SRC="./gx/hammel/vrwave-4.jpg" HSPACE=10 VSPACE=10 HEIGHT=412 WIDTH=510><BR clear="both"></CENTER>
<CENTER><B>examples/office2.wrl example scene in wireframe mode</B></CENTER>
<P>This scene is probably the nicest image, asthetically speaking, of all
the examples. The image fills the viewable area and is a complete
room. If you navigate around the room you quickly learn that the
walls to the room disappear if you're viewing area would be blocked by
those walls For example, tilt the room down, then rotate it to the
left. You're view of the room is now outside of the right wall, but
in order to view the inside of the room the right wall is not drawn.
You can change this behaviour by using the <B><FONT SIZE=-1>Display->Two-sided
Polygons</FONT></B> option and setting this option <I>"On"</I>. The
default setting, <I>Auto</I>, will not display the wall if it gets in your
way. Turning this option on causes the back sides of the walls to
become visible, and so your view inside the room is blocked.
<CENTER><IMG SRC="./gx/hammel/vrwave-2.jpg" HSPACE=10 VSPACE=10 HEIGHT=412 WIDTH=510><BR clear="both"></CENTER>
<CENTER><B>examples/sensors/touchsensor.wrl, with the Display->Background</B></CENTER>
<CENTER><B>set to gray and the Heads Up Navigation button set.</B></CENTER>
<P>In this next example the Heads Up option is selected and you can see
the three view functions displayed in the middle of the viewing area.
These small boxes don't move with the rest of the scene as you drag it
around the viewing window. They stay centered in that window.
A red line is drawn from the center of one of these boxes to the current
cursor location showing direction and speed (longer lines give faster speed).
<P>The movement of the small sphere in this image is managed through the
use of the left mouse button, but only when the cursor is over the large
green box. Moving the cursor, left mouse button held down, moves
the sphere around the viewing area. If the mouse leaves the area
of the box then the sphere stops moving. Note that the area of the
box does not mean just a side of the box - it means what ever region of
the box is actually visible to the user.
<BR>
<BR>If you have a fast enough computer and enough memory you can turn on
interactive texturing. This allows you to view the the objects in
the scene with their full textures displayed while you move the scenes
and objects around the viewing area. Although I can't show this
feature here, I can show you another example scene which has a texture
map applied to the sides of a cube. The first example shows the texturing
on a cube with Two-sided Polygons turned off. The next example, which
is a full sized capture so you can see the details a little better, shows
the same image with Two-sided Polygons turned on.
<CENTER><IMG SRC="./gx/hammel/vrwave-5.jpg" HSPACE=10 VSPACE=10 NOSAVE HEIGHT=416 WIDTH=516><BR clear="both"></CENTER>
<CENTER><B>examples/isub/cube.wrl, with static texturing turned on</B></CENTER>
<CENTER>
<H4>
<IMG SRC="./gx/hammel/vrwave-6.jpg" HSPACE=10 VSPACE=10 HEIGHT=330 WIDTH=348><BR clear="both"></H4></CENTER>
<CENTER><B>Same image, but with two sided polygons turned on so</B></CENTER>
<CENTER><B>you can see the transparent parts of the image better.</B></CENTER>
<H4>
Visiting VRML 2.0 URLs</H4>
VRWave's beta Netscape plug-in does not work with Netscape 4.0 due to changes
from 3.0 to 4.0 in Netscapes security code. Since I use the
4.03 release at home I was not able to test the plug-in. Also, since
all of the VRML sites I visited used VRML embedded in HTML, and
since those pages caused my 4.03 version of Netscape to crash when I tried
to load them, I wasn't able to test the mime/type installation that would
launch VRWave as an external viewer. I also tried to download a newer
version of Netscape, but my connection kept timing out during the download
(its about 10Mb now). This is what I get for waiting till the last
few days before my deadline for this column before trying to get this all
working. Its my fault - not VRWaves.
<H4>
Getting Help and other information</H4>
There is a Help option in the menu bar at the top of the interface.
This requires that Netscape be in your path so that VRWave can launch it.
If Netscape is already running, it won't matter, since VRWave still needs
to try to run Netscape first, so it still must be in your PATH before
running VRWave. I'm not sure if I prefer this or would rather see
them use the NetHelp inteface for Netscape. I think I prefer
the latter, although NetHelp may not be accessible from Java (I use
an Xlib based API for it).
<P>The README file that comes with the binary distribution states that
an online users guide for VRWeb (VRWave's predecessor) is available from
http://www.iicm.edu/vrweb/help. However, this link doesn't seem to
work any more. I browsed the main VRWave web site and found
a link to <A HREF="http://www.iicm.edu/vrwave/release">http://www.iicm.edu/vrwave/release</A>,
which contains various online documentation. Unfortunately, I didn't
find a users guide per se. The best printed help available
will be the help/install.html and help/mouse.html files in the runtime
directories from the binary distribution. In particular, the mouse.html
file contains detailed information about mouse and keyboard bindings for
scene navigation.
<H4>
Compiling from source</H4>
The bad news here is that my Java development environment just doesn't
seem to be working and so I can't talk intelligently about building VRWave
from the source distribution. I had my Java environment marginally
working in Denver, but when I moved to Dallas I must have changed something
because neither javac nor Vibe seem to be working any more. It may
be time to upgrade to Red Hat 5.0 anyway, so maybe I'll fix it then.
<BR>
<H4>
To Wave or not to Wave</H4>
The question remains: is VRWave a good tool for viewing and learning
about VRML? Yes, absolutely. Its still early in its development
but the tool is very stable, it didn't crash at all on any test files I
loaded (although I was only able to use the example files in the distribution).
Some things I'd like to see is a little better help system or at least
one that can allow me to configure where Netscape is (since I used to upgrade
often I didn't have it in my path, I have a script that knows
how to find it). The URL feature is handy but it would be nice
to be able to select from a list of URLs. Such a feature is more
the realm of a browser than a VRML viewer. I suppose it depends
on which VRWave wants to be in the long run.
<P>If you are just getting started with VRML and would just like to
look at a few examples, this is a good place to start. You will need
to have a working Java environment - one that can run Java applets if not
compile Java code. Other than that, installation is a breeze and
there are enough example files to keep you at least midly entertained until
you can write your own VRML worlds.
<BR>
<TABLE WIDTH="100%" >
<TR>
<TD VALIGN=TOP COLSPAN="4" BGCOLOR="#000000" cellpadding="0" cellspacing="0"><IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" ALIGN=LEFT></TD>
</TR>
</TABLE>
<TABLE WIDTH="100%" >
<TR>
<TD ALIGN=RIGHT><FONT SIZE=-2>© 1998 by <A HREF="mailto:mjhammel@csn.net">Michael
J. Hammel</A> </FONT></TD>
</TR>
</TABLE>
</BODY>
</HTML>
|