Difference between revisions of "File formats/3D Objects"

From Jmol
Jump to navigation Jump to search
m (cosmetic)
(VRML: update of features (in r11258))
Line 10: Line 10:
  
 
== VRML ==
 
== VRML ==
Jmol can export, with limited features, the model into Virtual Reality Modeling Language, [http://en.wikipedia.org/wiki/VRML VRML], version 2, also known as VRML97.
+
Jmol can export most features of the model into Virtual Reality Modeling Language, [http://en.wikipedia.org/wiki/VRML VRML] version 2, also known as VRML97.
 
This can be done from script or from the pop-up menu.
 
This can be done from script or from the pop-up menu.
  
''This feature is partially implemented and subject to further development.''
+
The {{file|vrml file}} can then be opened using several programs and browser plugins, and manipulated in 3D using the mouse.
* Jmol exports atoms (as spheres), bonds (as cylinders) and isosurfaces (as IndexedFaceSets). Translucency and color are supported.
+
 
* The atom size and color, bond thickness and color, are preserved. The orientation and zoom are not always kept.
+
=== Supported features ===
* Labels, 3D-positioned echo texts and measurement texts are partially supported:  
+
* Atoms (as spheres), bonds (as cylinders):
** text, color, font family and font style supported
+
** including atom size, bond thickness, color, translucency
** font size and offset are fixed
+
** double bonds (as parallel cylinders)
** multi-line not supported (only 1st line is displayed)
+
* Drawn objects (lines, arrows, triangles...).
** alignment not supported (always left)
+
* Isosurfaces (as IndexedFaceSets), even map-colored.
* Ribbons and cartoons are supported (using hermiteLevel 1 automatically if necessary).
+
* Labels, 3D-positioned echo texts and measurement texts:  
* Other features (dots...) are not supported.
+
** text, color, font family and font style
 +
* Trace (but slightly irregular if its diameter is very small)
 +
* Ribbons and cartoons (using hermiteLevel 1 automatically if necessary).
 +
* Dots, halos, stars, polyhedra, vectors, dipoles, ellipsoids
 +
 
 +
=== Unsupported features ===
 +
* The orientation and zoom are not always kept.
 +
* Labels, 3D-positioned echo texts and measurement texts:
 +
** font size and offset are fixed (but they follow zoom in the VRML viewer)
 +
** only 1st line is displayed, no multi-line texts
 +
** alignment is always left
 +
** no background labels
 +
* Background image
 +
* Ellipsoid quadrant cutouts
  
The {{file|vrml file}} can then be opened using several programs and browser plugins, and manipulated in 3D using the mouse.
 
: Depending on your VRML viewer or plug-in, you may need to rename the file to a {{file|.wrl}} extension; we are considering making this the default extension.
 
  
 
=== From Jmol to Blender ===
 
=== From Jmol to Blender ===
Line 43: Line 54:
 
* [http://www.agocg.ac.uk/train/vrml2rep/contents.htm A Guide to VRML 2.0 and an Evaluation of VRML Modelling Tools], by Neil Ashdown and Simon Forestiero. Online documentation for the VRML format.
 
* [http://www.agocg.ac.uk/train/vrml2rep/contents.htm A Guide to VRML 2.0 and an Evaluation of VRML Modelling Tools], by Neil Ashdown and Simon Forestiero. Online documentation for the VRML format.
 
* [http://www2.hrp.no/vr/tools/chisel/ Chisel (HVRC Edition)], a tool to optimize VRML files.
 
* [http://www2.hrp.no/vr/tools/chisel/ Chisel (HVRC Edition)], a tool to optimize VRML files.
 
  
 
== Maya ==
 
== Maya ==

Revision as of 20:09, 19 July 2009

File Formats

File Formats for 3D Objects Exported from Jmol

Recent versions of Jmol application and signed applet can export models to several formats that specify three-dimensional objects and can be read by specialized software, either raytracing or 3D-world.


POV-Ray

Jmol can export, with limited features, the current view of a model into POV-Ray format. This can be done from script or from the pop-up menu, but is better controled using the top menu in the Jmol application, which opens a dialog with options. See File formats/Images for more details.


VRML

Jmol can export most features of the model into Virtual Reality Modeling Language, VRML version 2, also known as VRML97. This can be done from script or from the pop-up menu.

The File icon.gifvrml file can then be opened using several programs and browser plugins, and manipulated in 3D using the mouse.

Supported features

  • Atoms (as spheres), bonds (as cylinders):
    • including atom size, bond thickness, color, translucency
    • double bonds (as parallel cylinders)
  • Drawn objects (lines, arrows, triangles...).
  • Isosurfaces (as IndexedFaceSets), even map-colored.
  • Labels, 3D-positioned echo texts and measurement texts:
    • text, color, font family and font style
  • Trace (but slightly irregular if its diameter is very small)
  • Ribbons and cartoons (using hermiteLevel 1 automatically if necessary).
  • Dots, halos, stars, polyhedra, vectors, dipoles, ellipsoids

Unsupported features

  • The orientation and zoom are not always kept.
  • Labels, 3D-positioned echo texts and measurement texts:
    • font size and offset are fixed (but they follow zoom in the VRML viewer)
    • only 1st line is displayed, no multi-line texts
    • alignment is always left
    • no background labels
  • Background image
  • Ellipsoid quadrant cutouts


From Jmol to Blender

Blender is a free, open source, 3D content creation suite, available for all major operating systems under the GNU General Public License.

VRML files created by Jmol can be imported into Blender (v. 2.42 or later) using the VRML97-Import-Script. One dependency you might need is SimpleParse.

Optimizing VRML files

VRML files of medium to large molecules tend to be huge. Some ways to reduce their size:

  • Run them through an optimizer program (see refs. below)
  • Compress them using the gzip algorithm, and maybe rename to .wrz which is the standard extension and should (hopefully) be recognized by viewers and browsers.

References

Maya

Jmol can export, with limited features, the current view of a model into Maya ascii format. This can be done from script or from the pop-up menu. Wikipedia info on Maya

References


OBJ

Jmol (starting v. 11.7.28) can read files in the obj file format. This format is generated by Wavefront, Java3D and PyMOL. The described objects are handled as isosurfaces in Jmol, so they can be saved in more compact JVXL format, if desired, and also can be mapped with other data.

  • Description of obj file format at EG-Models.de, an archive of electronic geometry models.
  • Description of obj file format at FileFormat.info: www.fileformat.info/format/wavefrontobj/egff.htm
  • Description of obj file format at The Graphics File Formats Page by Martin Reddy.
  • Export of obj file format from PyMOL (molecular surfaces).


X3D

Extensible 3D Graphics. This is the successor of VRML.

Not yet supported by Jmol.

References


U3D

Universal 3D format. ECMA-363 Standard.

Not yet supported by Jmol.

The most interesting feature of this format is that it can be embedded in pdf files, providing a 3D experience inside this well established standard for publication.

References

A set of libraries to write, read, extend, render and interact with U3D-formatted data, as defined by standard ECMA-363. Intended as starting point for tools and applications to support U3D (exporters, importers, authoring packages and interactive viewers).
MeshLab is the first open source tool to provide direct conversion of 3D meshes into the U3D format. Now you can create pdf with 3D objects with just MeshLab and LaTeX.
  • This page holds a demo that generates a 3D model in PDF from the molecule's PubChem CID. It also allows to download the result in PDF, U3D and IDTF formats.


Collada

Collada formats (KMZ/DAE) are Open Source arrangements that have been incorporated into many 3D packages and support textures/surfaces etc. They are a possible XML replacement to VRML.

Not yet supported by Jmol. There is a feature request for this.

We would need:

  • A description of how to specify a cylinder (position/translation, orientation/rotation, radius, length) but not using vertexes or meshes.
  • A description of how to specify a sphere (position/translation, orientation/rotation, radius) but not using vertexes or meshes.

References