VRML and Games?

Following on from the last couple of posts I have a general question: How useful is VRML for games writing, and in what areas?

I don’t have any preconceptions here as I am not really sure what VRML is supposed to be good for - people usually talk about 3d web content, but can’t really imagine a web site where the content is more useful displayed in 3d than in 2d. So that just sounds like poor useability. What are it’s advantages?

VRML is nice because it is supported by many modeling apps and 3D APIs, because its specification is open and because it is a text format that allows easy adjustments through manual editing or simple scripts. Personally I just use it to get data out of Maya into an application that optimizes and saves the models using Java3D’s ScenegraphIO package for use in my “game engine”.

One example of where I use the fact that VRML files are human-readable text files is when I have to adjust the URLs in the files. Maya does not write the “file://” protocol information before the URL address for paths to textures that are located on the local computer. This causes the Xj3D loader to fail when trying to load those textures. VRML’s text nature allowed me to quickly write a small script that processes all the URL fields in the VRML files before loading them. Such a script would have been much harder to write for a secret, proprietary and binary format.

I am really looking forward to the day when the big modeling apps finally implement extensive support for the new X3D format too. Then we should be able to easily export most data that we could possibly want into engines with X3D loaders (such as Java3D). The main problem with VRML right now is that it is a bit limited (doesn’t support multi-textures, skeletal animation with skin weights etc.), but it is the best way that I have found to easily get data out of Maya and into Java3D.

VRML is a solution looking for a problem. It was created years ago during the initial Internet craze (think Webcrawler, not Google). At the time, it was thought that since 2D was so successful, 3D would be as well. Of course it didn’t work that way. Your average PC was underpowered for 3D graphics, SGIs were too expensive, and the spec didn’t even handle things like texturing. PC hardware eventually caught up, but by that time there were about 5 competing VRML specs each one requiring its own massive plugin. The clear winner of this little war was Cosmo. Of course, no one cared at that point. So now you have some “official” standards body that uses an open Java3D based VRML loader for their reference implementation and no one really cares.