Issue: Volume: 23 Issue: 2 (Feb 2000)

Training Wheels

By Karen Moltenbrey

Neither rain, nor sleet, nor hail can keep cyclist Michael Abraham from taking to the road. Even when the snow begins to pile up along the streets near his home in Montreal, the Ironman competitor still hops on his bike and tackles the challenging hills and terrain along his favorite route. But he does so from the comfort of his own office, using an indoor bike trainer that employs interactive 3D graphics to simulate a real cycling environment. "When you pedal up a CG hill in the simulation, you can feel the stress. It really feels like you are pedaling up an actual hill," says Abraham.

By incorporating interactive 3D graphics into its cycling training system, RacerMate now offers bicyclists a realistic riding experience indoors.

The RacerMate (Seattle) CompuTrainer hardware system-comprising an electronic load generator, sensor system, and other equipment-attaches to any bicycle, while it also feeds into a PC, which displays the interactive 3D graphics. As a result, when a person traverses the hills and makes turns in the virtual terrain, the hardware system generates the corresponding resistance on the bicycle.

"It's quite a job to complete some of the courses," Abraham says. "And because you use your own bike instead of a traditional stationary Exercycle, your training is more authentic." With previous simulated trainers, he notes, a person could ride for hours without changing gears. "CompuTrainer forces you to work through all your gears because the simulation and interactivity put you on the road going up and down hills. It's like a cool video game, and it's interactive in the true sense."

Abraham began using the bicycle simulator early last year to train for Ironman events, physical endurance contests in which participants run, bike, and swim. However, living in a northern climate used to prohibit him from participating in early spring events because he was unable to properly train for the cycling portion. "Now, no matter what the weather is, you can always have a good ride," explains Abraham, a freelance technology writer who discovered the technology while reporting on the graphics industry.

One simulation feature of the equipment that Abraham finds especially useful is the ability to select courses to augment those shipped with the product by downloading them free from the manufacturer's Web site. Or, he creates a customized course using the equipment's software. This enables him to familiarize himself with certain courses and plan his riding strategies accordingly. For instance, he can now ride the 1996 Olympic road course in Atlanta, the Wildflower Tria thlon course in California, and the Zofingen World Championship Duathlon course in Switzerland, using software developed by freelance artist Jim Sachs of Lake Arrowhead, California.

Sach's cinematic backdrops are digitally scanned photos that are pasted into a 360-degree display. 2D billboards of trees and other objects are then added to the 3D scene.

Using a Pentium II platform, Sachs created the 3D scenery, course, and virtual riders-one representing the user and, optionally, another representing a competing cyclist, which can be either virtual or an actual companion hooked into the training system via the Web. The riders, male and female, were modeled and animated in NewTek's (San Antonio, TX) LightWave, with texturing in LightWave's Aura and Jasc Software's (Eden Prairie, MN) Paint Shop Pro. According to Sachs, he created a 3D model of a person and a bike, then created 10 different positions from which the riders can be viewed. For instance, if the rider drifts from the left side of the road to the right side, more of the left portion of the body is displayed. "It's not just the same picture over and over," he says.

Furthermore, there are 10 different tracks with 24 different pedal positions the rider can be in at any given time, which are synchronized to the action of the actual CompuTrainer rider. "Because the CompuTrainer tracks the rider's rpm [plus a host of other information such as speed, cadence, and heart rate], I animated the cycle based on that being a 24-frame movie. I know which angles the pedals will be at on each frame," says Sachs. "So the movie basically runs faster or slower." Depending on where the rider is on the screen, a certain animation track will play, then another will engage as the virtual rider moves from one side of the screen to the other.

By design, each movie or track "cel" is lit from a particular angle, with sunlight always coming from the upper right side, so any scenario would fit logically into the action. The lighting on the 3D course comes from the same direction, too, no matter if you turn 180 degrees. "No one ever notices, because you turn so slowly, but that's what made this simulation possible," Sachs says. "This is not a 3D world where the light source changes; these are canned sequences, so that's not possible. Instead, I try to make them as realistic as possible by using highly detailed shadows of the spokes on the rider's leg, for instance. That technique helps keep the polygon count low to where the simulation will run in real time."

Using Paint Shop Pro, a painting and image-manipulation program, Sachs temporarily inserted the models of the bicycle and riders into a 3D environment containing the various objects and the background, during the development process. To create a tree for the background, for instance, he photographed actual trees, enhanced (cleaned up) the images in Paint Shop Pro, added a transparent background, then glued it onto a billboard (a flat 2D object in a 3D world). In fact, most of the trees and other objects are billboards that always rotate to face the rider and camera.

The entire rendered scene of the 3D riders in the digital environment plays on a computer or television screen as a 24-frame movie. A particular animation track will play depending on the rider's position on the screen.

"The first trees I generated contained 6000 polygons each, which bogged down everything, so I be gan using single-poly gon billboards that always pivot to face the camera," ex plains Sachs. "You really can't tell because they're always in the distance, even when the camera pans upward to look down on the rider, like it does when the person is going over a hill." For more realism, the artist used cleverly placed shadows of the objects that blended into the backgrounds. Since the trees are glued into the terrain at their base, or at the center part of the square, they rotate on their shadows.

To produce the cinematic-like backgrounds, Sachs photo graphed panorams of the painted desert at Sedona, Arizona, and the rolling hills of San Luis Obispo, California, with a 1280-by-960-resolution digital camera. He then pasted the images end to end to produce a seamless 360-degree display using Paint Shop Pro, then glued that into the scene as backgrounds.

"I generated the hills and foreground objects, and they blended into the background colors, so most people don't realize that the backgrounds are static and not part of the 3D scene," explains Sachs.

Besides creating all the objects and backgrounds, Sachs also wrote the CompuTrainer 3D scripting program using OpenGVS from Quantum3D (Santa Clara, CA), which then constructed the scenes and composited the riders into them in real time.

Using NewTek's LightWave, Sachs created the 3D models of the cyclists, one representing the user and the other, a companion (below). He then modeled various pedal positions, which were synchronized to the motion of the actual cyclists'. With CompuTrainer's graphical user interface (right), cyclists have the option of building their own 3D courses.

Because OpenGVS is similar to OpenGL, "I could make just about any OpenGL call," Sachs says. However, the artist is in the process of migrating to Microsoft's (Redmond, WA) Direct 3D because of the licensing fees associated with OpenGVS.

While the simulator has been a critical training tool for Abraham, it cannot totally replace the actual experience for a competing athlete. "You still need some time on the road, but you can do a lot of effective, controlled training indoors." Alas, the biggest advantage of the cycle simulator-beginning and ending a ride at will-is also its biggest disadvantage. "It's really my problem, not the system's. If I get lazy, I can just stop."

LightWave, NewTek (