What is DFAM vs Design for Rendering
Designing a product for full color 3D printing can be a bit of a nightmare because you need a way to convert your files into the file extension type that allows you to print without losing the design intention. Read further to learn how I do it at Stratasys.
This article was first published on
ntopology.comHave you ever purchased a new device and struggled to find how to connect it to your existing device? You bring the tool into your workspace only to find that it does not connect to your PC directly with a USB or HDMI. Now you must find an adaptor to connect your devices together – sometimes you need multiple adaptors!
This is the same challenge that CAD designers have when first adapting full color 3D printing.
Instead of needing adaptors, it is software that can convert your files into the file extension type that allows you to print without losing the design intention of your file. This process is frustrating as the best CAD software for your functional design process doesn’t have tools for the aesthetic requirements of the design – forcing you to now learn a new software in order to bring your ideas to life in the third dimension.
These are the challenges when designing for full color additive manufacturing.
The main files that are used for printing colored models are STL, VRML, and OBJ. While these are far from the only files used, they are the core file extensions used without being software specific.
Files that are native to a specific CAD software can be used in certain instances, but they require plug-in development in order to be directly supported by the slicing software. As such, I try to avoid talking about them as their functionality is reliant on features that may be released down the line and would make what I say now outdated. To ensure that this information is relevant to a broader audience, I will be focusing on the file extensions that are not software specific.
STL (Standard Tessellation Language), VRML (Virtual Reality Modeling Language), and OBJ (Wavefront Object) are the most used file extensions for 3D printing colored models on Stratasys printers. While each of these store different sets of data, at the coding level, they are very similar. Each file extension uses a three-point coordinate system to define individual points that make up a series of triangles to for the surface geometry of the model. The main area they differ is in how they store their color data.
STL files are the simplest. They store their color data as a single piece of information and are limited to a single hex code. STLs are unable to store more than a single color for the entire model. There isn’t a line of data in the format to specify anything more than that.
VRML files take this one step further. They have a reference line that specifies an external file to be used as the appearance for the outside of the model. This works very similarly to wrapping paper or how a piece of candy would be wrapped. It defines the name of the file, searches for its specific name in the same location that the .VRML file is located, and then assigns it as the “wrap” for the set of specific data points that are listed below. The reference line of code looks like the what you see below:
appearance Appearance {
material Material { diffuseColor 0.141260 0.141260 0.141260 }
texture ImageTexture { url “Base_-_Default_Texture.JPG” }
}#Appearance
OBJ files go another step forward in terms of organizing texture data. Instead of referencing a separate texture file for each set of data points, it has a secondary file with the .MTL file extension. The MTL file stores the texture files as “materials” which are then referenced in the .OBJ file. What this does is allow the same texture file to be used for multiple sets of data points without needing to have duplicate textures in the same folder as the .OBJ file. The reference lines for these files look like the following:
OBJ
usemtl Base
MTL
newmtl Base
Ns 323.999994
Ka 1.000000 1.000000 1.000000
Kd 0.141260 0.141260 0.141260
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
This is especially useful for models that have repeating items. An example of this would be a model of a rose. Instead of needing a separate texture for every leaf, resulting in potentially 30+ duplicates, the leaf can be defined as a material and reused for each set of data points.
This article was first published on the nTopology blog.