LWO (.lwo)

Background & Context

    • MIME type: image/x-lwo
    • LightWave 3D object file format.
    • Native format of the LightWave 3D rendering and animation software.
    • LWO is an acronym for LightWave Object.
    • Developed by NewTek.
    • Binary format.
    • Stores 3D objects as a collections of polygons and their properties.

Import & Export

  • Import["file.lwo"] imports an LWO file as a Graphics3D object.
  • Export["file.lwo",expr] exports a Graphics3D expression to an LWO file.
  • Import["file.lwo"] returns an expression of the form Graphics3D[ GraphicsComplex[vertices,polygons]].
  • The vertices are given as a list of coordinates, and the polygons are represented as integer indices taken to be the corresponding vertices.
  • Import["file.lwo",elem] imports the specified element from an LWO file.
  • Import["file.lwo",{elem,suba,subb,}] imports a subelement.
  • Import["file.lwo",{{elem1,elem2,}}] imports multiple elements.
  • The import format can be specified with Import["file","LWO"] or Import["file",{"LWO",elem,}].
  • Export["file.lwo",expr,elem] creates an LWO file by treating expr as specifying element elem.
  • Export["file.lwo",{expr1,expr2,},{{elem1,elem2,}}] treats each expri as specifying the corresponding elemi.
  • Export["file.lwo",expr,opt1->val1,] exports expr with the specified option elements taken to have the specified values.
  • Export["file.lwo",{elem1->expr1,elem2->expr2,},"Rules"] uses rules to specify the elements to be exported.
  • See the following reference pages for full general information:
  • Import, Exportimport from or export to a file
    CloudImport, CloudExportimport from or export to a cloud object
    ImportString, ExportStringimport from or export to a string
    ImportByteArray, ExportByteArrayimport from or export to a byte array

Import Elements

  • General Import elements:
  • "Elements" list of elements and options available in this file
    "Summary"summary of the file
    "Rules"list of rules for all available elements
  • Data representation elements:
  • "Graphics3D"LWO file represented as a Graphics3D object
    "GraphicsComplex"LWO file given as a GraphicsComplex object
    "PolygonData"list of polygon indices, referencing the vertices given by "VertexData"
    "VertexData"list of vertex coordinates
    "PointObjects"list of Point primitives specified with absolute coordinates
    "LineObjects"list of Line primitives specified with absolute coordinates
    "PolygonObjects"list of Polygon primitives specified with absolute coordinates
  • Import and Export use the "Graphics3D" element by default for LWO files.
  • The "VertexData" and "PolygonData" elements correspond to the arguments of GraphicsComplex.


  • General Import options:
  • BackgroundAutomaticwhat background color to use
    ImageSizeAutomaticoverall size of the graphics to display
    LightingAutomaticwhat simulated lighting to use in coloring 3D surfaces
  • All options of Graphics3D can be given when importing from LWO.
  • Advanced options:
  • "VerticalAxis"{0,0,1}orientation to assume for the coordinate system used in the file
  • By default, the Wolfram Language assumes that in the coordinate system used by LWO the vertical axis corresponds to the third coordinate.
  • With the setting "VerticalAxis"->{0,1,0}, the Wolfram Language will apply the transformation {x,y,z}->{x,-z,y} to all graphics coordinates when importing from LWO, and the inverse transformation when exporting to LWO.


Basic Examples  (2)

Import an LWO example file:

Create a solid 3D object using RegionPlot3D:

Export the previous output to LWO: