LWO (.lwo)

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 and Export are fully compatible with the LWO2 format.
  • Import and Export support the point, line, and polygon content of LWO2 files. Import also reads LWO2 patch data.

Import and ExportImport and 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 as specifying the corresponding .
  • 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 reference pages for full general information on Import and Export.
  • ImportString and ExportString support the LWO format.

ElementsElements

  • General Import elements:
  • "Elements"list of elements and options available in this file
    "Rules"full list of rules for each element and option
    "Options"list of rules for options, properties, and settings
  • 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"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 element by default for LWO files.
  • The and elements correspond to the arguments of GraphicsComplex.

OptionsOptions

  • 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 , the Wolfram Language will apply the transformation to all graphics coordinates when importing from LWO, and the inverse transformation when exporting to LWO.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Import an LWO example file:

In[1]:=
Click for copyable input
Out[1]=

Create a solid 3D object using RegionPlot3D:

In[1]:=
Click for copyable input
Out[1]=

Export the previous output to LWO:

In[2]:=
Click for copyable input
Out[2]=
Introduced in 2007
(6.0)