Import DREAM.3D Grain Meshes edit page

A DREAM.3D file can store a three-dimensional microstructure as a surface mesh. The mesh contains vertices, triangular faces, and grain labels.

The two-dimensional chapters define a grain as a phase-homogeneous, spatially connected region of EBSD pixels produced by segmentation. Here, DREAM.3D supplies the three-dimensional counterparts as closed surface meshes. See 3D-Grains for an introduction to this representation.

The importer expects the DREAM.3D triangle-mesh datasets described by loadGrains_Dream3d. The voxel data of a DREAM.3D file is read by EBSD3.load instead and segmented into grains by calcGrains.

plottingConvention.default('y↑→x');

fname = fullfile(mtexDataPath,'EBSD','SmallIN100_MeshStats.dream3d');
grains = grain3d.load(fname)
grains = grain3d (y↑→x)
 
 Phase  Grains  Volume  Mineral  Symmetry  Crystal reference frame
     2     794   15625  unknown       432                         
 
 boundary faces: 757564
 
 Properties: meanRotation

Read the imported object

The printed summary confirms what the import produced. It lists the phases and the number and total volume of their grains. It also reports the number of boundary faces and the properties attached to the grains. The sample contains 794 grains with total volume 15,625 and 757,564 faces. Their symmetry is 432, and the imported mineral name is unknown.

Grain IDs remain attached to grains when you subset a collection. Array indices are positions in the current collection. Select by ID when identity matters; the two only happen to coincide in an unfiltered list.

grainId = 2;
grain = grains('id',grainId);

Orient the face normals outwards

A face normal is perpendicular to one triangular boundary face. Its sign depends on the order in which the face vertices are stored, known as the face winding.

By default, grain3d.load calls orientFaces. This gives every shared face one consistent direction. It points from the first entry of boundary.grainId to the second, so it cannot point outwards from both adjacent grains.

The row of grain.I_GF records which direction is outward for this grain. Multiplying by its signs turns the shared face normals into outward normals. We plot a regular subset so that the individual arrows remain visible.

faceIndex = 1:20:length(grain.boundary);
face = grain.boundary(faceIndex);
faceCentroid = face.centroid;
outwardNormal = full(grain.I_GF(:,faceIndex)).' .* face.N;

clf
plot(grain,'FaceAlpha',0.65,'EdgeAlpha',0.25)
hold on
quiver3(faceCentroid,outwardNormal,'arrowSize',0.15,'Color',[0.7 0 0])
hold off
setCamera(plottingConvention.default3D)

Each arrow starts at a face centroid and points away from the grain. The pale edges reveal the triangular surface mesh. The arrows sample its faces; they are not one arrow per neighbouring grain.

A reference frame is the coordinate system in which data are expressed. These normals share the spatial reference frame of the mesh vertices. They describe boundary-plane directions, not the misorientation across a face.

Pass 'noOrientFaces' to grain3d.load only when the raw stored winding is required. With raw winding, normal directions and signed volumes are not meaningful. The boundary.grainId order has no geometric direction either.

Where to continue

Properties of Three-Dimensional Grains explains face areas, centroids, normals, surface area, and volume. Continue with Boundary Normal Distribution to analyse the measured boundary-plane directions statistically.

References

Citing this page. This page is part of the documentation of MTEX, a free and open source MATLAB toolbox for analyzing and modeling crystallographic textures. It was written by The MTEX Developers and is published at https://mtex-toolbox.github.io/Dream3dGrains.html. If you use MTEX, or reuse text or figures from this page, in your research, please cite

F. Bachmann, R. Hielscher, H. Schaeben: Texture Analysis with MTEX - Free and Open Source Software Toolbox, Solid State Phenomena 160 (2010), 63-68. 10.4028/www.scientific.net/SSP.160.63

BibTeX
@article{bachmann2010mtex,
  author  = {F. Bachmann and R. Hielscher and H. Schaeben},
  title   = {Texture Analysis with MTEX - Free and Open Source Software Toolbox},
  journal = {Solid State Phenomena},
  volume  = {160},
  pages   = {63-68},
  year    = {2010},
  doi     = {10.4028/www.scientific.net/SSP.160.63},
  url     = {https://doi.org/10.4028/www.scientific.net/SSP.160.63}
}

Other papers describing specific MTEX methods are listed under Publications — please cite the one that best fits your application. The MTEX source code is licensed under the GNU General Public License v2.0; the text and figures of this documentation are licensed under CC BY 4.0, which permits reuse — including by automated systems — provided The MTEX Developers and this page are credited.