Working with STL
From LightWiki
back to the Tutorial Ideas page
A lot of LightWave users have to deal with the STL format provided to them by clients in the engineering or architecture markets. LightWave is at a disadvantage in that it only handles polygons, rather than NURBS, but the reason that these people want to send STL files, is because LightWave has a vastly superior render quality to the kinds of packages that architects and engineers rely on. Getting STL into LightWave is an easy job, thanks to Sean Hyde-Moyer's SHM_STL_Tools script for the Mac and PC.
Contents |
Getting the STL format into LightWave
Get the plugins needed
- The SHM LScript page - Get SHM STL Tools, Sean Hyde-Moyer's excellent LScript website
- MergeTrigonsX plug-in for the PC only - written by Yahma, redone by FlatHama website
- MergeTrigonsX LScript - written by Yahma, redone by FlatHama website
The SHM_STL_Tools script is for both Mac and PC and is an import and and export script, so that you can send back STLs, or produce work that you export to said engineers/architects.
- A new option for Windows users is MoI - a 3D modelling package that can load STL models directly and export them as OBJ files. You can get MoI from here.
Getting them into LightWave
Unpack the archives you have downloaded into a folder called "3rdParty" that you've put in your LightWave plugins folder. This will enable you to keep things organised since you will know that all the plug-ins external to LightWave reside in this folder.Now, hit Alt F11 or choose Utilities > Edit Plug-Ins and choose Add Plug-In from there. You should have three scripts/plug-ins to add, so add them all.
Editing your menus
Now we need to enter the plug-ins into your menus. The STL ones need to go into the File > Import and File > Export menus, and we'll put the Merge Trigons one into Construct > Reduce. Hit Alt F10 to bring up the Configure Menus window. In the left-hand window, go to the Additional section and find your three new plug-ins. Drag them one by one into the appropriate places in the right-hand list.Using STL in LightWave
Importing
STL is a very simple format, used for sending files to Stereo Lithography machines for 3D printing. It has no surfacing information, but files can contain one or more "parts", which are correctly brought in by the plug-in. It's always a good idea to keep your statistics window (w) open in order so that you can choose parts, or surfaces easily from it.The only thing that might stop the plug-in from successfully importing an STL file is if the byte order contained within it is wrong - you attempt to bring in a Mac STL file using Intel Byte order and so on. This is not a serious problem, you can always try again with the other...
When your STL model has been imported, you might see nothing in your viewports, although the statistics window might have updated with the information. This will be because the model is either too small to see, or too big. Hit a to fit the whole model to all viewports so that you can see it.
Cleaning
When you bring in the STL file, you will note that it is all triangles - not necessarily what you want. You can simplify it by using the other plug-in we installed called MergeTrigonsX on the PC. On the Mac, you need to use the LScript version which can take a very long time to work (on the order of 1000 polygons per minute). In either case, what the plug-in will do is merge all co-planar triangles together into quads or greater. It's very successful at doing so, but it can leave some errors and some non-planar polygons. The easiest way of resolving the issue is to select all non-planar polys in the Statistics window and hit Shift t or the Triple button in the Multiply tab. The align all the polygons using Detail > Polygons > Align in order to have them all facing the same way.
Exporting
Simplicity itself, you just need to make sure you have all polygons tripled and then choose the STL Export item from the File > Export menu.


