Issue: Volume: 23 Issue: 11 (November 2000)

Gone Fishing



Virtual reality developers get their Web feet wet with an on-line extension of a popular museum exhibit

By Diana Phillips Mahoney

A couple of years ago, an interactive exhibit made a big splash at Boston's Museum of Science and has been riding a wave of popularity ever since. Called the Virtual Fishtank, the permanent exhibit is a 2200-foot digital undersea world in which museum visitors can build, release, and interact with virtual fish to gain a better understanding of how complex living systems work. Recently, the exhibit's developers, Nearlife Inc., in collaboration with the museum, began testing the Internet waters by creating www.VirtualFishtank.com, a first-of-its-kind online extension of a museum exhibit. From the site, users can create fish in a manner similar to that employed by museum visitors, and can either release the fish directly into the museum tank or save and tag the fish for later retrieval and release at the museum.

Whether created online or on-hand at the museum, Virtual Fishtank fish are driven by simple, user-specified behavioral rules regulating, for example, how the fish react to other fish, human beings, food, bubbles, water depth, and so forth. These behavioral choices affect the shape and shade of various body parts. The fish activity is defined by perception and force-based models. For example, each fish can "see" other fish within a certain cone in front of it. If it sees a fish it's attracted to-for example, a fish like itself for schooling-one of its rules would apply incremental force to move it toward that fish.
The fish are biting in the Virtual Fishtank at the Boston Museum of Science. An influx of new fish are populating the display thanks to a Web-based enhancement that lets users build and track fish from home.




By building fish, then tagging and launching their creations into the tank, users can visually experience how the behavioral rules guiding their fish can lead to complex behaviors and patterns for groups of fish. At the museum, visitors can feed the fish by cranking a wheel, and at designated schooling stations they can interact with groups of fish, such as predators, friendly species, and deep-sea fish, to gain an understanding of how local interactions impact group behavior.

At the museum, the Virtual Fishtank is driven by 22 RAM-laden PCs connected over a high-speed fiber-optic network and equipped with top-of-the-line graphics boards and network cards. The simulation code was written using advanced Java 3D capabilities. The fish inhabit a 400-square-foot central tank comprising 12 large-projection screens. Given the technological sophistication of the installed exhibit, creating and keeping a Web version afloat required more than just a few tweaks to the existing application. It meant rewriting the simulation code to make sure it would run on standard home computers.

"When we do exhibits, we can control the hardware. We buy the best 3D graphics boards on the market, put in a lot of RAM, and so forth," says Henry Kaufmann, Nearlife engineering director. "Obviously, we can't guarantee the same setup in everyone's home, so we had to decide how to port the Java code that was written in a network system to run in a Web browser." The team's first thought was to write something in Java that would render in 2D; however, they were dissuaded by the fact that Java was notoriously inconsistent across Web browsers.
Homegrown fish and their attributes are piped into the permanent Virtual Fishtank via a Web-client database that connects to the exhibit's Java database server.




Consequently, the designers decided to port the Java simulation to Macromedia's (San Francisco) Shockwave Studio 8. "We knew that Shockwave was getting good performance for 2D sprites [independent graphical objects whose movement and behavior is separate from the animation environment]. So we ported the Java code to Lingo [the Macromedia scripting language]. This lets us run the simulation in 3D in a browser and render the fish as separate 2D sprites," says Kaufmann. By doing so, he notes, the visual appearance of the fish did not have to be compromised to compensate for bandwidth or RAM deficiencies. "A big part of what we do is make things look nice, so we didn't want to make triangle-looking fish. By doing the fish in 2D, we didn't have to. The fish look good They can get bigger and smaller, turn around, and swim in front and behind each other." The only thing they can't do compared to the 3D fish is swim toward and away from the viewer.

The next challenge the researchers faced was building an infrastructure that would let online users release their custom fish from their home browsers to the exhibit, and to connect to the server and retrieve their fish at a later time. To accomplish this, they built a database that serves as a repository for online account information, fish data, and various (fish) life-history information. "Each time a fish is released, we gather and store data about what happens during its life, such as how many pieces of food it ate, how many times it tried to run away from the sharks, and how deep it swam," says Kaufmann. The Web-client data base then delivers this information to and retrieves information from the exhibit's Java database server via the Shockwave Multi-user plug-in. "Multi-user queries the database with commands like, 'This is user number 77, verify the password and retrieve the fish for this user.' " Once retrieved, the information is relayed back to the online client.

To prevent an overpopulation of fish, the database server manages a fish queue. "If you have 1000 people releasing fish at once, the tank will get overrun. To prevent this, the server keeps track of the queue, and as people from the Web release a fish, it gets added to the queue," says Kauf mann. Every 30 seconds, the fish that's been on queue the longest is taken off and released into the tank.

One potential problem the developers had to contend with was the possibility of Web activity compromising the performance of the museum exhibit. To avoid that, they built a firewall for the exhibit to isolate network traffic. "There's another computer that connects out to the Web server and receives messages from it and acts as a relay station," says Kaufmann. "It protects the performance of the internal network of the simulation."

The Nearlife team's original plans for the online fish tank were more ambitious than the current state of technology would reasonably allow. "Initially, we wanted online users to be able to see the tank as it exists in the museum, either using a Webcam or actually sending all the fish data to the Web client. But that was prohibitive from a network bandwidth point of view," says Kaufmann.

They also thought about sending the parameter adjustments being made at the schooling stations to the Web client as well, so the desktop simulation would mimic that of the installed exhibit. "If the shark was very hungry at the museum, it would be very hungry for you online; if it were slow, it would be slow for you. But since you wouldn't be able to watch people at the exhibit changing those parameters, you wouldn't be able to understand why those changes were happening," says Kaufmann. "It wouldn't be a very educational message." Rather than struggle to incorporate features that would add little value to the experience, he notes, "we concentrated on the core things people would understand and enjoy. So when you release a fish online, it disappears and you can't access it until it comes back. When it comes back, you see its life story based on what it did in the museum."

Although the online Fishtank is not as full-featured as the installed exhibit, it meets the designers' primary objective: to offer a firsthand look at undersea life. "It's really about building a fish, seeing how long it will live, what things affect its life span, what behavior parameters change the patterns of things it does."

Future enhancements are on the horizon for the Virtual Fishtank. One possibility is a 3D application that online users could download in order to have a visual experience closer to that of the museum. Another is the addition of more fish parts and behaviors.

Because Nearlife owns the intellectual property and the artwork for the application, the company intends to create a network of similar exhibits. Toward this end, it recently sold a version of the application to the Museum of Science in St. Louis. "Now we have the capability to connect various exhibits using the Web server," says Kaufmann. "So, for example, we can add a pipe from the museum in St. Louis. If a fish swims into that, it will pop out in St. Louis. Conceivably, online users could get a report of all of the places their fish have been." The goal for such an endeavor, he stresses, would not be to diminish the original exhibit, but to enhance it by making it more global.

Shockwave Studio 8, Macromedia (www.macromedia.com)