View Full Version : import autocad model in to lightwave

11-19-2008, 09:06 PM

im goin to work rendering some architectural work and will like some point to start whit the right foot. The model are goin to be from auto cad. Dit i need to export it in Certain way?

11-20-2008, 01:46 AM
I have a feeling there are a few threads on this ;) ... and a few schools.

The Accutrans (DXF) school. Costs about 20 bucks. My fave.
The Deep Exploration (expensive) path.
The 'edit in illustrator first', EPS in method (exception's favourite). This gives you nice 3d planes to work with (anything 'filled' in illustrator).
LWCAD also has a quite good importer.

In the end it depends what you start with, and whether you want to model from scratch, etc. Often it's the better option.

PS: never trust that the person who made the cad drawing drew it accurately !

11-20-2008, 09:33 AM
PS: never trust that the person who made the cad drawing drew it accurately !

:agree: ...in several years of arch-viz I've only had one building which actually lined up in all views and it wasn't drawn by an architect!...It's so rare that I can still remember it from two years ago.

For 2d plans and elevations, Illustrator often works well, I also use AcmeCAD to convert to eps before opening in illustrator for some difficult files. I find that the most predictable results come from exporting a legacy .ai file from Illustrator (v.8) and using the eps importer in Lightwave to open it.

For 3d AutoCAD models (very rare, most people don't know that AutoCAD does 3d) Rhino gives the most predictable results by far. I've used PolyTRANS and Deep Exploration for 3d file conversions and Rhino wins hands down for DWG's.

I can highly recommend the distance scale plugin for LW (search Flay) as the imported files will not be real-world scale. Also be sure to weld points (w) and merge polys (Shift-I) to speed things up.

11-20-2008, 11:07 PM
Following are some things to watch for when converting your CAD models
to LWO files regardless of the conversion software used.

AutoCAD drawings are saved to proprietary file formats called DWG and
DXF. DWG is the default format for saving.

DWG files are binary files and smaller in size than the DXF files which
are ASCII (can be read in Wordpad) files. AutoCAD publishes the file
format specification for DXF files but not for DWG files. As far as I
know, a DXF file contains all the information that is saved to a DWG file.

Depending upon which conversion software you use, the drawings can be
saved to either DWG or DXF files.

When exporting to DXF files export to Release 12 (R12) files. Many
changes have been made to R13 and later version DXF files which cause
problems for many programs that read DXF files.

Many people draw 2D lines using the spline entity. If splines are saved
to a R12 DXF file they are converted to polylines. AccuTrans supports
polylines and currently does not have support for splines.

DWG and DXF files are parametric files. This means most drawing
entities are described by an equation. For example, a circle is just a
center point and a radius. If the circle is extruded, a thickness value
is also specified.

All of the drawing entities have to be converted to line segments and
polygons so that they can be used in a program like LightWave. Arcs,
circles, and the bulges (curves) of polylines have to be represented by
line segments. AccuTrans allows you to control the number of line
segments used.

You have to watch how you create geometry for 3D models since they have
to be converted to polygons. If you are going to create a cylinder with
a cap on one end, you must use the same starting point for the circles
used for the cylinder and end cap. As the circles are represented by
line segments, if the start point is not the same the vertices for the
two parts will not line up and you will have small gaps.

Many people making 2D drawings of buildings do poor work. The ends of
the lines do not match up, for example. So be careful when using them.

For 3D buildings, solid entities may have been used in AutoCAD. The
more expensive programs will convert the solid entities to polygon
meshes. AccuTrans does not support solids.

The solids have to be exported from AutoCAD to 3DS files using the
3DSOUT command. During the export the solids are converted to
triangles. Next import the 3DS files into AutoCAD using the 3DSIN
command and finally delete the original solids.

In AutoCAD 2008, AutoDesk had removed 3DSOUT and 3DSIN commands. They
later made this available via a plug-in.

AutoCAD does not give any direct control over the number of triangles
that are created from a solid. Zooming in and out on the solid will
change the number of triangles saved to the 3DS file.

CAD programs are two sided rendering programs. LightWave, by default,
is a one sided rendering program. When the drawing entities from CAD
are converted many of the surface normals will be pointing in the wrong
direction. This means you will think you have missing polygons when you
view the model in LightWave. The surface normals have to be flipped so
that the polygons will be visible. AccuTrans has a routine that will
flip the normals faster than you can do the same in LightWave.

AccuTrans, by default, automatically merges / welds vertices when it
reads the DXF file. If you turn this feature off, you can also do it
manually later. The manual merge allows you to specify the distance
between vertices that will be used to determine that the vertices are

AccuTrans, by default, removes all duplicate triangles. This feature
can be turned off.

AutoCAD and AccuTrans use the same coordinate system. LightWave uses a
different coordinate system. When AccuTrans writes a LWO file it
adjusts the vertices to the correct coordinate system.

The unit of measurement in a LWO file is the meter. It does not matter
what unit of measurement is displayed in LightWave as the unit will
remain the meter in the LWO file.

AutoCAD and AccuTrans use a unitless system of measurement. This means
a unit represents whatever you want it to be. AccuTrans will allow you
to scale the building before or when you save it to the LWO file. If
the building was built using inches than use the conversion factor
0.0254 to convert to meters. If the building was built using
millimeters than use a conversion factor of 0.001

3D model building programs like 3DS Max, Cinema 4D, LightWave, Maya and
XSI use floating point variables called floats. CAD programs like
AutoCAD use floating point variables called doubles.

A double uses 8 bytes of memory and a float uses 4 bytes of memory.
This difference means that an object can be further away from the origin
in CAD and you can still see all parts of the object accurately whereas
in LightWave you can't. Due to the limitation of floats models are
built close to the origin in LightWave. In CAD, the model can be far
away from the origin. Before saving a CAD model to a LWO file check to
see if the model is close to the origin. AccuTrans allows you to center
the object either before or when saving the LWO file.


11-21-2008, 02:32 AM
Wayne, bravo! If I wasn't married and with children ...

.. but I digress.

That info should really become a sticky post in the archviz section of the forums.

And BF's post was great too.

I would add a few points:
The DWG version changes are a BIG pain, even for Autocad users, especially when you don't have the latest autocad version. Autodesk showed unprecedented honesty by providing a converter to take new versions back to release 2000 DWG format. You can download it here (http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=6703438).

It works very well, and even has options to bind x-refs (other referenced DWG drawings) into the same file, while keeping images etc. attatched.

Regarding solids, ACAD solids can simply be exploded, in which case they become 'regions', which Accutrans will convert to tris.

The 3dsout/in commands for ACAD can be downloaded here (http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&id=9481286&linkID=9240737).

I have an autocad script for converting splines to polylines, which you can d/l from here (http://jmla.eu/spl2pl.lsp) (or PM me if it disappears).

11-21-2008, 10:40 PM

Thank you for the links to the ACAD plug-in and the spline to polyline
script. I have them recorded for when people ask for help.

I have been using 'DWG TrueView' just for viewing DWG files. I have not
tried the conversion back to release 2000 as I don't have AutoCAD.

I've told AutoDesk sales people that AutoDesk should provide a free or
low cost (say 50 dollars) DWG to DXF converter program. They've never
listened yet to that suggestion.

The LWO file is based on the IFF file format specification. The file is
composed of chunks, with names, that have sub chunks inside the chunks.
Once a chunk is defined its features should never be changed. A
program with a properly written file parser (reader) will use the chunks
that it knows how to use and skip the chunks it doesn't know. An old
program can read a newer version file and at least use what it knows.

File formats like DWG and DXF are different. Once a new feature is
added to the file, it is impossible for an older program to read the new
file. The parser has to be specifically written to handle all data in
the file and soon as it encounters something different it will either
have an error in code execution or just exit out of the file parser.
Thus this is bad file design as it forces users to buy new versions of
the software for a very minor change in the file format.

When solids are exploded and saved to a R12 file, they are not really
regions according to my definition for a region which is a flat object
laying in the same plane. If the solid was a cylinder all that is saved
to the DXF file is two sets of line segments in the shape of two
circles. AccuTrans reduces the number of line segments and then creates
a polygon mesh to fit to the two circles.

Has AccuTrans been creating the correct meshes for your solids? Do you
make solids that require lots of Boolean operations? No one has
reported back to me on well this solid to mesh feature works so I still
list it as being in development on the 'index' page at the web site.