WEMLoad

MLModule
genre WEMGenerate
status stable
authors Olaf Konrad, Bart De Dobbelaer
package MeVisLab/Standard
dll MLWEMModules
definition MLWEMModules.def
see also LocalWEMLoad, WEMSave
keywords WEM, load, file, format

Purpose

The module WEMLoad loads different 3D mesh file formats from disk and converts them to a WEM.

Usage

Select a filename for the 3D mesh by browsing your file system and connect the output to the input of any WEM module.

Surface models generated by other applications sometimes have a counter-clockwise ordering of nodes in the faces. If such models are loaded, all the face normals will point inwards, so do not forget to check Mirror Faces. This applies to the Stanford models, for example.

Details

The following 3D mesh file formats are currently supported by this module:

Format Description
Object File Format (*.off *.geom)

This file format was developed in 1986 at Digital Equipment Corporation's Workstation Systems Engineering for the interchange and archiving of 3D objects. It is mostly known as GeomView Object File Format because of its use in the 3D mesh viewer with the same name.

Useful links:

http://www.geomview.org/

http://www.csit.fsu.edu/~burkardt/data/off/off.html

Wavefront (*.obj)

This file format is used by the WaveFront suite of commercial high-end animation packages. It was developed by Wavefront/Alias Technologies. The file format is also used in 3D photography.

Useful link:

http://www.csit.fsu.edu/~burkardt/data/obj/obj.html

Polygon File Format (*.ply)

This format is also known as Stanford File Format and is widely known because of the Stanford Bunny which is a scan-converted 3D mesh of a bunny. Its shape is very good for testing triangle reduction and triangle decimation algorithms due to its specific geometry.

Useful links:

http://www.csit.fsu.edu/~burkardt/data/ply/ply.html

http://astronomy.swin.edu.au/~pbourke/dataformats/ply/

http://graphics.stanford.edu/data/3Dscanrep/

Standard Tessellation Language (*.stl)

STL (Standard Tessellation Language) is a file format native to the stereolithography CAD software created by 3D Systems of Valencia, CA, USA. STL files describe only the surface geometry of a three dimensional object without any representation of color, texture or other common CAD model attributes.

Useful link:

http://en.wikipedia.org/wiki/STL_(file_format)

Winged Edge Mesh (*.wem) This format was created to support the ever growing number of WEM features. It is the only format which can hold the very specific WEM parameters. The more advanced WEM related things cannot be stored by the other public formats. Its main goal is to keep the loading process as fast as possible, and it succeeds so by loading meshes at least two to four times faster. The size on disk is also considerably smaller.

More information on the public file formats can be found at this link: http://cmp.felk.cvut.cz/~pajdla/Doc/3D.formats.html

Windows

Default Panel

../../../Modules/ML/MLWEMModules/mhelp/Images/Screenshots/WEMLoad._default.png

Output Fields

The loaded mesh in WEM format.

outWEM

name: outWEM, type: MLBase

Parameter Fields

Field Index

Auto load: Bool isProcessing: Bool removePreviousWEMs: Bool
autoClear: Bool Load: Trigger show: Bool
autoUpdate: Bool loading: Bool Status: String
editable: Bool loadingOK: Bool Triangulate Faces: Bool
elapsedTime: Float loadSurface: Trigger unloadSurface: Trigger
Filename: String Mirror Faces: Bool useFaceDiffuseColor: Bool
Generate Edges: Bool Mode: Enum usePolygonOffset: Bool
id: Integer progress: Float  

Visible Fields

Auto load

name: autoApply, type: Bool, default: TRUE

If checked, the module will load the WEM on network startup and on changing any parameter.

Load

name: apply, type: Trigger

If pressed, the given mesh is loaded as a WEM.

Filename

name: filename, type: String

Sets the filename of the 3D mesh file on disk.

Mirror Faces

name: mirrorFaces, type: Bool, default: FALSE

If checked, the coordinates of each polygon are flipped in the mesh so that inside becomes outside.

Some meshes are stored in clockwise vertex ordering, others in counter-clockwise ordering, this option let's you choose how the mesh is supposed to be used.

Generate Edges

name: generateEdges, type: Bool, default: TRUE

If checked, WEM edges are being generated.

Generating WEM edges takes up half the amount of loading time, so if you do not need edges for further processing or visualization, this option can be turned off. It will speed up the loading process by a factor of two! Should modules in the WEM pipeline do need edges, those will be generated on that module, with the exception of the SoWEM modules.

Triangulate Faces

name: triangulateFaces, type: Bool, default: FALSE

If checked, non-triangle faces will be triangulated after loading.

Normally this module outputs a 3D mesh with the same number and type of faces like described in the file and the file format. This can include triangles, quads or arbitrary polygons. This option will output a WEM with only triangles. Some WEM modules support arbitrary polygons, others do not.

Mode

name: triangulationMode, type: Enum, default: Strip

Defines the triangulation mode.

Values:

Title Name Description
Center node Center node In the first case a center node is calculated for the polygon which is then shared by all triangles making up the polygon.
Fan Fan In the other case a triangle fan is created.
Strip Strip In the other case a triangle strip is created.

Status

name: status, type: String, default: No filename specified.

Shows the status of this module.

Hidden Fields

isProcessing

name: isProcessing, type: Bool, persistent: no

elapsedTime

name: elapsedTime, type: Float, persistent: no

id

name: id, type: Integer, default: 0

autoUpdate

name: autoUpdate, type: Bool, default: TRUE

autoClear

name: autoClear, type: Bool, default: FALSE

removePreviousWEMs

name: removePreviousWEMs, type: Bool, default: TRUE

show

name: show, type: Bool, default: TRUE

editable

name: editable, type: Bool, default: TRUE

useFaceDiffuseColor

name: useFaceDiffuseColor, type: Bool, default: TRUE

usePolygonOffset

name: usePolygonOffset, type: Bool, default: FALSE

loading

name: loading, type: Bool, default: FALSE

loadingOK

name: loadingOK, type: Bool, default: FALSE

loadSurface

name: loadSurface, type: Trigger

unloadSurface

name: unloadSurface, type: Trigger

progress

name: progress, type: Float, persistent: no