Crystal Impact Home  
  About version 5 New functions Feature tour Download  

Diamond Version 5 User Manual: Printing, copying, and exporting structure pictures

Exporting 3D structure picture data

The contents of a structure picture can be exported as 3D model into the formats OBJ (Wavefront), STL, and VRML via the command "File/Save As/Save Graphics As..." or via "File/Export...".

Previous article: Creating video sequences or image series
Next article: Creating POV-Ray scenes


Supported 3D formats

While a metafile and the raster bitmap formats (as described in "Saving the Structure Picture as 2D Image File") store the graphics in a 2D format, the 3D object formats described in this article keep the 3D informations of the objects, when Diamond stores the crystal or molecular structure picture in a 3D object file. Diamond offers the Wavefront OBJ format (OBJ), the STL format (by 3D Systems, Inc.), and the Virtual Reality Modelling Language (VRML) format.

OBJ format
The OBJ file contains the coordinates of the vertices of the objects (atom spheres, bond cylinders, etc.), whereas a second file, using the same title but with the extension *.MTL (Material Template Library) describes the surface shading (material properties, especially color) of the objects in the OBJ file. Diamond creates both OBJ and MTL file when you save in "OBJ format".

STL format
The STL format is the native format of the stereolithography CAD software from 3D Systems and contains faces of the objects (spheres, cylinders, etc.) with their vertices. Diamond creates an STL file in ASCII format.

VRML format
VRML ("Virtual Reality Modeling Language") files can be viewed with a World-Wide Web browser (or browser plug-in). Usually these files have the extension .WRL ("world).

The size of a VRML, OBJ, or STL file depends on the number of objects used in the structure picture.


Using the "Save Graphics As" command

To save the structure picture in one of the above mentioned 3D graphics formats, choose the Save Graphics As... command from the Save As sub-menu of the File menu. This opens the Save As Graphics dialog, which is derived from the standard Windows "Save As" dialog. In the Save Graphics As dialog, choose one of the following graphics formats from the dropdown list at Save as type:
- VRML 1.0 (*.wrl)
- Wavefront OBJ (*.obj)
- STL (*.stl)

After you have chosen the output format, adjust the file name or destination folder, if necessary, and confirm with the OK button.

In case you choose OBJ or STL format you will have the chance to define a higher resolution in the subsequent Save 3D Graphics dialog. Resolution here means the number of vertices to be used for every single sphere or cylinder that describes an atom or a bond, than the default. The maximum is 8, meaning your resulting file will have up to 64 times more vertices than with the default resolution.

The following screenshot shows an OBJ file created from the sample file PCD-PtO2_Pt3O4_RhO2.diamdoc, structure data set "250929", picture "Some Rh-O spheres expanded with environments" in one of the 3D graphics applications delivered with Windows 10, 3D Builder. Note that most of these 3D applications prompt you, if or where to import the material properties from. Diamond stores these material properties in an MTL file with the same title and in the same folder as the OBJ file.

Screenshot of 3D Builder


Using the Export command

The File -> Export command opens the Export dialog, which offers several options to write structural, or graphics, or textual data into a file.

The "export" of data works similar to the several Save [...] As commands that are also available from the File menu (or some context menus, e.g. for tables) with the main difference that the exported data are deposited in a special folder (which can be changed via the common Windows Save dialog that will prompt you for the target file title after the Export dialog), while the Save [...] As commands use an individual latest folder each.

Here we only look for the option to export structure picture graphics. Activate the option (radio button) Structure picture graphics for that and press the OK button (or the Return key). Choose the file type (OBJ, STL, or VRML) in the subsequent Export Graphics As dialog as well as the file name and, if necessary, the target folder where to save the graphics file.


Previous article: Creating video sequences or image series
Next article: Creating POV-Ray scenes


[1] Pearson's Crystal Data: 250929. Muller O., Roy R.; "Formation and stability of the platinum and rhodium oxides at high oxygen pressures and the structures of Pt3O4, b-PtO2 and RhO2"; Journal of the Less-Common Metals, 16, 129-146 (1968).