Introduction: Ember Printer: Using Pattern Mode for Finer Details

By default, the Ember 3D printer uses its projector in "video mode", in which the projector low-pass filters your slice images and resamples them to accommodate the 45° orientation of the mirrors in its DMD (Digital Micromirror Device). This results in some loss of detail and aliasing artifacts, as explained in this article by Karl Guttag. A single white pixel in a slice image gets transformed into a small group of gray pixels with a bright one near its center, and their exact arrangement and intensities will depend on the particular location of the source pixel in the original image.

In order to bypass that processing and directly control individual micromirrors, the projector must instead be used in "pattern mode". In pattern mode, the intensity of each projected pixel depends only on the gray value of the corresponding individual pixel in the source image, regardless of the location of that pixel. Because of that, parts printed in pattern mode can reproduce finer details than parts printed in video mode. For example, this Instructable shows how to use pattern mode to print very small bar codes, and this one shows how to see the growth of a single printed voxel.

Using pattern mode in Ember also allows it to project twice as many gray levels (64) as are available in video mode (32). More gray levels allows for finer control when using antialiasing and/or positioning features with sub-voxel precision.

Step 1: Prepare Ember for Pattern Mode

In order to use pattern mode, your Ember* must be running firmware version 3.1 or later, and its projector's firmware will also need to be upgraded. To get it to that point, follow these steps in this order:

  1. Make sure your printer has been upgraded to version 3.0, following the manual process described here.
  2. Upgrade to the latest firmware, available here, using the normal Ember firmware upgrade process.
  3. Upgrade the projector, following the steps given here.

Even after the projector is upgraded, Ember will continue to work as before with old or new print data files that do not require the use of pattern mode.

*Check the large label that says "SPARK POWERED" on the back left of your Ember. If it says "Model No.: 001-EMBR-0001", then it will not be upgradeable in this way. Please contact us for information about how it could be modified in support of this upgrade.

Step 2: Your First Pattern Mode Print

To get a quick view of the greater detail achievable in pattern mode vs. video mode, you can print the two files in PR57K resin. They contain a test pattern that's similar to the one used in the Instructable on measuring Ember's horizontal resolution. In this case the pattern consists entirely of single-pixel wide lines, in horizontal, vertical, and diagonal directions, as well as a single-pixel checkerboard.

Notice that the print from "video test" shows the aliasing artifacts (beat frequencies or moiré patterns) described in Karl Guttag's article, while those are absent from the print of "pattern test". In fact you can only see the individual lines within the pattern mode print under higher magnification. That same magnification reveals the variations in the way they're printed in video mode, depending on their location within the build area.

If you extract the contents of these two zip files, you'll find only two significant differences between them:

  1. The size of the pattern mode slice images is 1482x1482, instead of the usual 1280x800 for the video mode slices.
  2. Inside the printsettings file for the pattern mode print, the new print setting "UsePatternMode" has been included and is set to 1.

(They also have different values for the "JobName" setting, but that's only to help tell them apart when printing.)

Step 3: Creating a Pattern Mode PNG Stack

MaddyMaxey's Instructable* shows how to create a (video mode) print data file from a stack of PNGs that represent slice images. The procedure for a pattern mode file is very similar. As mentioned in the previous step, the only differences are in the size of the slice images and the need to add the "UsePatternMode" setting.

However, only a portion of the 1482x1482 slice images will actually be used. That portion is the black rectangle in the center of the first image above. The regions shown in red will be ignored in pattern mode. While that rectangle is at a 45° angle to the sides of the image, when printed it will be aligned with Ember's build area. So anything you want to print in pattern mode must fit within that rectangle. (The attached "pattern mode template" contains this image in PNG format, at its original resolution.)

If you already have a stack of 1280x800 PNGs that you've created for use in video mode, you can prepare them for pattern mode by padding them out to 1482x1482. The attached Processing sketch will take slice images (named slice_N.png, where N starts with 1) from a subfolder called "/input", pad them to 1482x1482, and save the results to a subfolder named "/output".

However, it's important to note that simply padding 1280x800 video mode images to 1482x1482 will exclude some parts of your original slices: the portions shown in yellow in the second image above will not be printed. So if you want to take advantage of the full build area in pattern mode, you'll need to have your PNGs use the full black rectangle shown in the first image.

You can add the "UsePatternMode" setting near the end of your printsettings file like this:

	"ModelZLiftMicrons": 1000,
        "UsePatternMode": 1,
        "RotateHomeOnApproach": 0

*Note that Ember now allows you to put your slice PNGs and printsettings file in a .zip file, which may be easier than creating a .tar.gz file.

Step 4: Printing an STL in Pattern Mode

In order to print in pattern mode an STL that fills the build area, it will need to be rotated by 45° before slicing, such that it aligns with the black rectangle shown in the first image of the previous step.

We have not yet modified PrintStudio or to do that rotation automatically*, so until then you will need to rotate your part manually before slicing. Nor have we yet modified the limits on the build area enforced by those programs, which then also limits the size of the models that can be used: it must still fit within the existing build area after being rotated by 45°. If you don't really care how your model aligns with the build head or the micromirrors in the DMD, you could also leave it unrotated, with the understanding that any parts of the model that fall within the yellow triangles in the second image of the previous step will not be printed.

If you do want to align your model with the build head, then in PrintStudio, select the model, select Move, and enter a value of -45 for its rotation about the Z axis. For, you will need to apply the rotation to your STL (e.g. using Meshmixer) before uploading it. In Meshmixer, it would also be a rotation of -45 about the Z axis, on the Edit > Transform menu.

You will then need to extract the resulting print data file, pad its slice images to 1482x1482, and add the UsePatternMode setting to the printsettings file, as described in the previous step. You can then compress them back into a .zip file, which Ember will then print in pattern mode.

Please note that there is no point in using image processing software to rotate a 1280x800 slice image of an unrotated part into the 45° orientation needed for pattern mode. That would result in a loss of detail similar to what happens in video mode, when the projector itself performs a similar kind of processing.

Also note, the ImageScaleFactor setting, that can be used to correct for inaccuracy in the size of projected slice images, only applies to video mode prints. Pattern mode prints instead use a separate new PatternModeImageScaleFactor setting. It's value may be determined by a process analogous to the calibration procedure for video mode, but currently it can only be modified by ssh'ing in to the printer and editing the /var/smith/config/settings file.

*That rotation, along with the correct slice mage size and printsettings file, is now handled automatically in the Ember workspace of Autodesk Netfabb 2017 Premium, even for models that use the entire build area. Just check the "Use pattern mode" box on the Slicing tab of the Print Settings dialog, as shown above.

Step 5: Why Would You Ever Go Back to Video Mode?

Any print data files that don't set "UsePatternMode" will continue to use video mode. Some possible advantages of video mode over pattern mode are:

  1. The low-pass filtering it imposes may produce smoother printed surfaces. (Though you could get the same effect in pattern mode by applying some blur to your slice images, and you could apply that selectively in parts of the print lacking fine detail.)
  2. Until support for pattern mode is included in applications*, they can't be used to generate slices that will fill the build area in pattern mode, and their output needs to be modified (slice images padded and UsePatternMode setting added) to use pattern mode.

*Support for pattern mode is now included in the Ember workspace of Autodesk Netfabb 2017 Premium, even for models that use the entire build area, and without modifying the slice images or printsettings file.


Mohammad HasanE (author)2016-07-22


I'm confused at how to padding the slices out to 1482x1482

Any help would be appreciated ...tnx

greener1 (author)Mohammad HasanE2016-07-22

If you haven't used Processing before, you'll need to install that. Then download the attached PadSlicesForPatternMode.pde and place it in a folder called \PadSlicesForPatternMode

Then create a subfolder of that called \input, in which you place your 1280x800 slices. Then open PadSlicesForPatternMode.pde in Processing, and click the Run button. It will then create your padded slices in a subfolder called \output.

Mohammad HasanE (author)greener12016-09-09

padding out Works fine now, thanks

but i have a another problam:(

i put myslice PNGs and printsettings file in a .zip file but the ember can't read the file

the error that shown is : error loading file

greener1 (author)Mohammad HasanE2016-09-09

The printer's logs should have more details about the error. Go to the printer's web page (at for USB connection), select "Download logs", and extract syslog from the downloaded file. Look up from the end of syslog till you see the error messages from when you tried to load that file. If it says UsePatternMode is an unknown setting, then your printer is still running firmware 3.0 or less. Other common errors are that the last setting in the printsettings file must not have a comma after it, and when you edit the printsettings file, you must use a plain ASCII text editor that uses simple quotation marks, instead of separate open & close (Unicode) quotes. Let me know if there's some other error.

Mohammad HasanE (author)greener12016-09-09


the error that shown is : Print data invalid for file: Bad file descriptor

greener1 (author)Mohammad HasanE2016-09-09

If you'll attach the syslog file and the file, I'll take a look.

Mohammad HasanE (author)greener12016-09-09

greener1 (author)Mohammad HasanE2016-09-10

It looks like the problem is that you zipped up your "c" folder, instead of selecting all the files in that folder and zipping them (without including the enclosing folder itself). Sorry the error messages aren't more informative.

Mohammad HasanE (author)greener12016-09-10

it works :)

thank you so much

ApricotColonel (author)2016-07-20

I'm slightly confused at how to use the .pde file. I downloaded Processing, opened the .pde, put my previously created .png slices into the sketch folder but when I run it I just get a blank grey screen. Any help would be appreciated, thanks.

greener1 (author)ApricotColonel2016-07-20

Rather than putting your previously created .png slices directly into the sketch folder, they need to go into a subfolder of the sketch folder. You will need to create that subfolder and name it "/input". When you run the sketch, the padded .png slices will be placed in a subfolder called "/output" (that the sketch creates if it doesn't exist already). You can actually close the big grey screen to see the name of each slice listed as it's padded, and "done" when all the slices have been padded.

Does that help?

ApricotColonel (author)greener12016-07-21

Works fine now, thanks!

elazgar (author)2016-06-28

Nice post and new features! Just wondering why the slice_21 is empty in the test part.

greener1 (author)elazgar2016-06-28

Thanks. I don't know why that slice is empty. The image stack for the base plate was created by slicing an STL in PrintStudio, and it left that slice empty. Fortunately layer 22 was able to cure through the missing layer and attach to layer 19 in my test prints. But if it's causing a problem you could also just replace the empty slice_21.png with a renamed copy of slice_20.png.

elazgar (author)greener12016-06-28

It wasn't a problem when I printed the test parts. I just broke one of them when detaching from the build head :) Should be more careful next time.

About This Instructable




More by greener1:Ember Printer: How a Voxel GrowsEmber Printer: Bar Codes for Small PartsEmber Printer: Using Pattern Mode for Finer Details
Add instructable to: