Why use a PDF for 3D?
Some data really needs to be seen in 3D, but how do you easily distribute a 3D diagram? VRML, the erstwhile 3D web standard, seems to have all but disappeared leaving no widely-adopted replacement (O3D not withstanding).
It turns out that Adobe Acrobat reader contains a 3D engine! And since it’s in the ordinary Acrobat Reader, it’s pretty much ubiquitously installed. Here are a couple of examples, with links to two of the 3D pdfs I made for the paper; there are more in the supporting information (view with Acrobat for the 3D to work):
How to make a 3D PDF
There are essentially just two steps to making a 3D pdf:
- converting your model into the U3D format that acrobat uses, and
- embedding that U3D file into a pdf.
Converting VRML to U3D
VTK will produce VRML directly with the vtkVRMLExporter class (take a look at the comet_vtk.cpp file to see how we used it). Calling comet with a single frame (e.g. ‘comet vtk 200:200’) will write out a .vrml file (see the cometwiki for more details).
To convert the VRML files that VTK produces to the U3D format needed for the pdf you need to buy Acrobat 3D or Deep Exploration (the converter in Acrobat 3D is just a re-branded copy of Deep Exploration anyway). The academic price for Acrobat 3D was only $70, and my fellowship payed for it, but the non-academic price for Acrobat 3D (now called Acrobat Pro Extended) is a rather steep $699.
Embedding the U3D into the PDF
Once you have the 3D models converted into U3D format, you can just copy and paste them into a pdf using Acrobat itself. This might work if you only have one model, but I actually found using Acrobat to place the models to be surprisingly difficult. Pasting the model into the pdf result in a model bigger than the page itself, and I couldn’t figure out how to resize other than dragging the corner, which doesn’t preserve the aspect ratio. It was all very haphazard, and having all the subfigures sized and aligned correctly was nearly impossible.
In the end, I used the LaTeX movie15 package, which I would recommend over Acrobat 3D if you’re at all familiar with LaTeX. Not only does it allow you to easily size and place all the subfigures correctly, but makes it very easy to have a consistent layout between figures.