The Official vrml2pov Website!

I am working on a program called vrml2pov that converts VRML files (VRML97 specification) into POV-Ray files. On this page you will find

Why version 0.7, you might ask?

I consider this a sort of public beta test of vrml2pov. It works on the samples I've tried it on so far, but I imagine there are still bugs to work out. So at the risk of being inundated with angry users' flaming e-mail messages, I'm releasing this preview version so that people can start to test it.

Naturally, I'd like to hear about any bugs you find. There will be a section on the download page that will describe the recommended procedure for bug reporting that will maximize the chances of it getting fixed.

Changes since version 0.6:

Changes since version 0.5:

 


What vrml2pov does and does not do

My name is Paul Thiessen, and I am a chemist and computer scientist, and am currently a Staff Scientist at NCBI. I like to tinker with computer graphics too, and am an avid user of POV-Ray, a terrific freeware raytracer. So, I wanted to be able to take molecules generated by various chemical software packages and import them into POV scenes. I discovered that VRML has great potential for scientific visualization, as realized by the authors of such programs as Molscript and Ribbons. So, three weeks and 6,000 lines of code later, I had a tolerable beginning to a useful VRML to POV converter, which in the spirit of UNIX, I had to name "vrml2pov".

Vrml2pov is written in C++ without (I think) any reference to system-specific libraries, and does not have a windowed user interface, so the code should be quite portable, with a few command line switches to control the behaviour of the program. I have provided compiled binaries for PC/Windows and SGI. A note about the parser: I wrote my own VRML parser because I wanted to write in C++, to follow the very latest VRML97 specification, and because some of the parsers out there that I tried failed to parse even simple samples that I fed to them. It should work with VRML V2.0 files, but will not take VRML V1.0.

This program aims to convert a VRML file into a static POV scene. Thus, everything in the VRML file having to do with time, animation, events, and routes is ignored. So, basically it is only the VRML Shape nodes that get transferred into the POV scene, although there are many other nodes that are necessarily read along the way. Not every standard VRML node has any correlation to a POV object, and of those that do, not every one is currently implemented. But I think a large majority of VRML scenes should be covertible by the current version of vrml2pov.

There are a few standard nodes that I want to mention here, that are not implemented yet, but that will likely be added in the not-too-distant future:

There are some general types of things that vrml2pov does not do, and that it will not likely do anytime soon: Lastly, I should say that while I have tried to establish a reasonably good correlation between VRML Material and POV finish, it is still inexact. Transparency and specular highlights are allowed, but emissiveColors (i.e. glowing objects) are not.

 


Samples

Here are some sample images, comparing original program output (mostly from Molscript), to VRML browser (in this case Cosmo) screen capture, to the final POV-generated version. Click on any thumbnail to get a larger image. I have also provided some of the examples in VRML and POV format for you to play with, all gzipped.

If anyone comes up with some other nice examples, please feel free to share them - I'd like to have some cool stuff here other than just chemistry...

This is a cool bacteriochlorophyll protein (PDB entry 3BCL) created with Molscript's molauto program and rendered with Molscript.
Here's the Molscript-generated VRML file viewed with Cosmo. (from this VRML file)
And finally, the POV version. The main point here is that the shape and color of the VRML objects are converted quite faithfully into POV. However, VRML's and POV's lighting models are quite different, so the color intensity, and especially the material apperance, will likely not be an exact match. But it should be pretty close, and POV users can of course manually tinker with the finish statements to make it right. (Here's the POV file)
This is a Molscript representation of the insulin molecule (that I was using to learn to use Molscript), showing the backbone helices and the disulfide bonds that hold the two peptides together.
... and the Cosmo version (or in VRML) ...
... and the POV version (or the POV file) .
This is a sample that I borrowed directly from the Molscript image gallery. It is the ras p21 enzyme (PDB entry 1CRQ), rendered with Molscript. Users of Molscript should pay particular attention to the README file's discussion of backface culling, which is required for the rendering of 2-color helix ribbons like those shown here.
... and the Cosmo version (or in VRML) ...
... and the POV version (or the POV file).
This is a tRNA molecule created with the Ribbons software package. It is one of the demo molecules that comes with the latest version. This is the final POV rendering of the molecule - Ribbons does some fancy things with animated viewpoints in the VRML file, so the corrleation of viewpoints between the Ribbons console and the VRML (and thus POV) output is not as direct as with Molscript.


Downloading vrml2pov

First, in order to protect my time investment in this code, I must ask that you read this brief legal statement. This text is also found in the LEGAL file of the source code distribution.

 

This is the LEGAL file for vrml2pov version 0.7. These are the legal terms to
which you implicitly agree when using vrml2pov for any purpose:

Vrml2pov is written and copyrighted (C) 1998-2003
   by Paul Thiessen, paul@ChemicalGraphics.com

This software is copyrighted freeware. The binary program, either distributed
by the author or compiled from the source code as distributed, may be used for
any purpose without incurrence of any fees or royalties. The author may not be
held responsible in any way for any losses that occur via the use of this
software.

The author makes no guarantee as to the efficacy of this software. Support,
if any, is provided at the sole discretion of the author.

Neither the compiled program nor any portion of the source code may be sold
for profit, nor distributed without the author's explicit permission.

The source code is protected by U.S. copyright laws. Permission to use
portions of the source code in academic or non-profit applications may be
granted upon request to the author, and at the author's discretion. If
permission is granted, appropriate credit to the author must be given.

The source code, whole or in part, MAY NOT be used in any commercial (for-
profit) application without the payment of a (negotiable) fee to the
author. Requests for commercial use of the code will be handled individually
and should be made directly to the author.
Now, with that out of the way, let's get on with it!

Follow this link to download vrml2pov. Note that in activating this link, you are agreeing to abide by the terms of the above legal statement.

Enjoy!

 


You are visitor number to this page since I created it on 4/25/98. Please send me your comments and suggestions to the address below. Thanks, and come again!
This page and all its contents Copyright 1998-2004 by Paul Thiessen / paul@ChemicalGraphics.com. All rights reserved. Last updated January 06, 2004.