by Stephen Pietrowicz

Book Review: Late Night VRML 2.0 with Java

news
Nov 1, 19975 mins

A book for the Java programmer who is looking for advanced VRML topics

About the same time I first started learning Java, I read the book Snow Crash by Neal Stephenson. In that book, Stephenson described the Metaverse, a multi-user virtual reality world in which people could interact with each other. The main character in the book was one of the original programmers of that world, and throughout the book he would use his programming skills to interact with his virtual environment.

There’s nothing as sophisticated as the Metaverse in our own world, but we do have virtual reality environments that we can work (and play) in. As you may know, the predominate standard for VR work is the Virtual Reality Modeling Language, or VRML. You can build your own virtual environments, tools, and games with VRML. The book Late Night VRML 2.0 with Java, by Bernie Roehl, et al. (Ziff-Davis Press), shows how you can use Java to interact with VRML browsers and how to build tools in Java to assist you in creating VRML scenes.

A wide variety of topics

The book is divided into seven parts and 24 chapters. Chapters in the book were written by five different authors, each with a particular expertise in VRML. This book is not a book for novice Java programmers, nor is it a book for learning the basics of VRML. If you’re just learning Java or VRML, you could be overwhelmed quickly by the terms and concepts the book presents.

The first few chapters give a brief overview of VRML, and the rest of the book concentrates on more advanced topics, giving numerous examples in both VRML and in Java.

The author of JVerge and VermelGen, Justin Couch, explains both of these projects in some detail. Both projects are written entirely in Java. JVerge is a set of Java classes that implement the VRML nodes. VermelGen is a VRML source generator. If you’ve looked at either of those projects and have considered working with the code Couch provides, you’ll want to get this book. It gives a good overview of the code and the design decisions that Justin made when writing that code.

Justin also discusses scripting within VRML, both inline with JavaScript, and through the External Authoring Interface (EAI) with Java. Both of these chapters are rather brief, giving a few short examples, but provide a good explanation of the topics. More complex examples of how Java can be used with EAI are given in other chapters.

There are several chapters throughout the book which discuss various aspects of multiuser VRML. The working group proposal for Living Worlds and the underlying standards Open Community and Cyber-Sockets are presented and compared. Later chapters show how to build a multi-user client and server in Java.

The rest of the book covers a variety of topics, including spatial sound and using native methods to interface with input devices. Some interesting 3D file format conversion programs to convert Quake model format (Quake MDL) and Animation Master segment (SEG) files to VRML also are presented. I suspect that most people will find the MDL file converter more interesting simply because there are many Quake files available on the Internet, and not so many SEG files.

I was pleasantly surprised that L-systems (used to create convincing-looking computer-generated plants), a particular interest of mine, also are briefly discussed. By using a relatively small string of characters, and some simple rules that govern how the characters are interpreted, you can generate complex patterns and 3D objects. The example shows how to build a simple extruded maze, but I’ve seen L-systems used to create very convincing-looking trees and flowers.

The CD-ROM that comes with the book has a nice sampling of software that will get you started creating and working with VRML scenes. JDK 1.0.2, JDK 1.1, Cosmo Player (the Silicon Graphics VRML browser), 3D objects and several 3D modeling programs are among its contents. All of the code from the book also is included, archived in both tar and zip formats. The disc is readable on both Unix and Windows systems, but the commercial programs are usable only under Windows.

The bottom line

As I said before, this book is not for the novice VRML hacker or starting Java programmer. The book covers many advanced topics, which should be a welcome relief to experienced programmers who keep seeing introductory books on the store shelf. I usually have to go to three or four different books to have access to this many subjects, so I consider

Late Night VRML 2.0 with Java

a welcome addition to my programming library.

Stephen Pietrowicz has been working at the National Center for Supercomputing Applications since 1995, where he was hired to work on the NCSA Mosaic web browser. Soon after joining NCSA, he began programming in Java. He has worked on the NCSA Habanero project during the last two years, and is currently the manager of the High Performance Java group at NCSA. Prior to working at NCSA, Pietrowicz spent ten years in industry on various projects, including real-time Unix, secure Unix, and Unix networking.