Difference between revisions of "File formats/3D PDF"
AngelHerraez (talk | contribs) |
AngelHerraez (talk | contribs) (→IDTF to U3D: merging info from the 3D_Objects page) |
||
Line 7: | Line 7: | ||
=== IDTF to U3D === | === IDTF to U3D === | ||
(See also descriptions and comments for Jmol output to [[File_formats/3D_Objects#IDTF|IDTF]] and [[File_formats/3D_Objects#U3D|U3D]] formats.) | (See also descriptions and comments for Jmol output to [[File_formats/3D_Objects#IDTF|IDTF]] and [[File_formats/3D_Objects#U3D|U3D]] formats.) | ||
+ | |||
+ | Conversion from IDTF to U3D can be done using a simple command-line utility, IDTFConverter. | ||
* ''Windows'' installation of IDTFConverter | * ''Windows'' installation of IDTFConverter | ||
− | # Download and unzip | + | # The converter is available from Universal 3D Sample Software and from Michail Vidiassov's site (see refs. below). Download and unzip into, perhaps, {{file|c:\idtf\}} |
# Create a simple command file {{file|u3d.bat}} and place it in a folder where it is easily accessible (e.g. the Windows directory or a folder included in the system's path). This {{file|u3d.bat}} file must contain this text: | # Create a simple command file {{file|u3d.bat}} and place it in a folder where it is easily accessible (e.g. the Windows directory or a folder included in the system's path). This {{file|u3d.bat}} file must contain this text: | ||
:: <code>c:\idtf\idtfconverter.exe -input %1.idtf -output %1.u3d</code> | :: <code>c:\idtf\idtfconverter.exe -input %1.idtf -output %1.u3d</code> | ||
* ''MacOS and Linux'' installation of IDTFConverter | * ''MacOS and Linux'' installation of IDTFConverter | ||
− | # | + | # You can get a port of IDTFConverter from Michail Vidiassov's site (see refs. below). |
# Create a command file similarly to the one described for Windows. | # Create a command file similarly to the one described for Windows. | ||
+ | |||
+ | ==== References ==== | ||
+ | * ''Windows:'' [http://sourceforge.net/projects/u3d/ Universal 3D Sample Software]. Go to 'View All Files' and download the latest {{file|U3D_A_??.zip}} file. Within it, see {{file|Docs/IntermediateFormat/IDTF Format Description.pdf}}) and {{file|Bin/Win32/Release/IDTFConverter.exe}}. | ||
+ | * ''Windows:'' Alternatively, get just the necessary files from http://www.iaas.msu.ru/tmp/u3d/u3dIntelWin.zip (thanks to Michail Vidiassov). | ||
+ | * ''MacOS and Linux:'' A port of the software is available from http://www.iaas.msu.ru/tmp/u3d/u3d-1.2.852.tar.gz (thanks to Michail Vidiassov). | ||
=== LaTeX to PDF === | === LaTeX to PDF === |
Revision as of 16:25, 18 July 2010
Contents
PDF documents with integrated 3D interactive models
Installations
Jmol
You need at least version 12.0.RC26 to do this.
IDTF to U3D
(See also descriptions and comments for Jmol output to IDTF and U3D formats.)
Conversion from IDTF to U3D can be done using a simple command-line utility, IDTFConverter.
- Windows installation of IDTFConverter
- The converter is available from Universal 3D Sample Software and from Michail Vidiassov's site (see refs. below). Download and unzip into, perhaps, c:\idtf\
- Create a simple command file u3d.bat and place it in a folder where it is easily accessible (e.g. the Windows directory or a folder included in the system's path). This u3d.bat file must contain this text:
c:\idtf\idtfconverter.exe -input %1.idtf -output %1.u3d
- MacOS and Linux installation of IDTFConverter
- You can get a port of IDTFConverter from Michail Vidiassov's site (see refs. below).
- Create a command file similarly to the one described for Windows.
References
- Windows: Universal 3D Sample Software. Go to 'View All Files' and download the latest U3D_A_??.zip file. Within it, see Docs/IntermediateFormat/IDTF Format Description.pdf) and Bin/Win32/Release/IDTFConverter.exe.
- Windows: Alternatively, get just the necessary files from http://www.iaas.msu.ru/tmp/u3d/u3dIntelWin.zip (thanks to Michail Vidiassov).
- MacOS and Linux: A port of the software is available from http://www.iaas.msu.ru/tmp/u3d/u3d-1.2.852.tar.gz (thanks to Michail Vidiassov).
LaTeX to PDF
There are several pdfLatex software, like teTeX (Unix; discontinued in 2006), MiKTeX (Windows), TeX Live (Unix, Linux, Windows), MacTeX...
- Installation of MiKTeX (Windows)
- Download and install MiKTeX "basic" from http://miktex.org/
- Do an update (menu
Programs > MiKTeX > Maintenance > Update
). - Download the movie15 package (menu
Programs > MikTex > Maintenance > Package Manager
).
- You can avoid installing software and use instead an online service like ScribTeX (they have a Free Plan that gives you 50 MB storage space; you can even test-run it without signing up).
Creating the document
1. Within Jmol script console: write c:/temp/xxx.idtf
- or from the application's pop-up menu:
File > Export IDTF 3D model
(a dialog prompts for destination folder and filename). - Either of those will create two files: xxx.idtf and xxx.idtf.tex
2. At the system command line or terminal, call the u3d.bat file (Windows), or equivalent MacOS or Linux command file, to convert the .idtf to .u3d format:
u3d c:\temp\xxx
If using MikTeX:
- 3.2. Click menu item
Typeset > Typeset
, or click on the green 'play'-like button (leftmost in the toolbar). - When processing ends, you will see a blank document in a new TeXworks window, because MiKTeX can't display the model, but xxx.idtf.pdf should have been created.
If using ScribTeX:
- 3.1. Go the ScribTeX website, sign up or use the guest account.
- 3.2. Click on [
Upload file
] and select in turn your xxx.idtf.tex and xxx.u3d files (or a .zip file containing both, it will be automatically unzipped in the server).
- 3.3. In the file listing on the server, click on the xxx.idtf.tex file to display it, then click on [
Compile
].
- 3.4. When the .pdf file opens in the browser, click on the [
Save copy as
] button in your viewer's toolbar, to store it in your local disk.
4. Open the .pdf file using a reader/viewer that supports 3D PDF (see a list below).
- If you don't see the model in its panel inside the document, right-click on it and choose
Partial options > Fit visible
Caveats
- If you move in Jmol the model rotation center away from screen center (as with CTRL-ALT-drag), the model in the 3D PDF will be a very close but not quite perfect reproduction. (The reason for this is that moving the center of perspective seems to be not supported in virtual reality formats like VRML and U3D.)
- Lighting is not working properly: the light moves with the model. If someone knows how to do that, please let us know.
- Perspective canot be orthographic from the beginning (Jmol uses this by default for crystal structures). Once in the 3D PDF, there is a right-mouse-button option to go into that mode. Please let us know if you know how to do that.
- Don't expect rotation and translation using the mouse in the 3D PDF to be like in Jmol. It is harder to control, and you can even completely loose the rotation center.
- For large models (big proteins, surfaces, electron density maps), files are quite big, and seeing and manipulating the model in the PDF will need substantial computer power. To alleviate this, you can try to set the image frequency to a lower value in the Reader's 3D options and/or to change the optimisation method for small frequency to 'Abandon'. Also, if you are using it in a presentation, it is a good idea to preload the PDF document in the Reader ahead of time.
Documents with text
In order to have text, images etc. alongside the 3D model, ideally you need a full PDF editor, which is normally commercial like Adobe Acrobat Pro.
As an alternative, some of the freeware PDF viewers, like PDF-XChange Viewer, allow you to add text and images onto the generated 3D PDF and save the modified document.
Sample documents
(Text in these documents has been added externally to the process descrbed here.)
- 3D PDF with an organic molecule, ball and stick.
- 3D PDF with a small protein, crambin (1crn.pdb), in cartoon rendering.
- 3D PDF with a polyhedra rendering of quartz.
- 3D PDF with a carbon nanotube, ball and stick and molecular surface.
Software for creating or viewing 3D PDF
(This aims to be a compilation of resources; if you know of another software, please add it here).
3D PDF Viewers
- Adobe Reader v.7 or later (proprietary, freeware).
3D PDF Editors
- Adobe Acrobat Pro (proprietary, commercial).