Variable Layer Height (and why you want it)
|Update: 15 Oct 2017
|The latest version of Kisslicer (free download available here) includes the ability to automatically invoke variable layer heights. See the end of this page for info about how to use it and what it does.
For at least the past several months a number of postings on 3D Printing sites explained the benefits of variable layer height for 3D printed parts. These postings are plentiful and easy to find: just search for “variable layer height” and you’ll find lots to choose from. This page from 3ders.org gives the best explanation I’ve found of the theory behind variable layer heights, but you can get a good understanding of how and why it works from the 7 minute video at the bottom of the page: Autodesk VariSlice.
This blog page is intended to show why variable layer height is an important capability to have, and will also how how to get it to work for your prints. I’ll also provide some tips on how and when to use it – and when not to.
The Plic3r slicing program
All the screenshots and photos are based on the first generally available slicer program that supports variable layer height; it is a version of the well-known Slic3r program modified by the developers at Prusa. For clarity I will call the program Plic3r on this page. Be aware that there is some controversy about what the name of the program should be, so it might be found by some other name at some time in the future. If that happens I’ll update this page to reflect the current name.
Plic3r can be downloaded from this web page: Plic3r Download
Update: 07 Jun 2017
The bug that caused variable layer heights to fail in Ver. 135.1 has been fixed. You can now download and use the latest version (currently 135.2) from the above link.
Why use variable layer heights
The basic reason for using variable layer heights is improved final print quality. The variable heights allow for a smoother final finish, better layer adhesion, and a physically stronger part. It is important to note,, however, that variable layer heights only help when printing geometry that has more than about a 45 degree slope to it. For parts that are primarily vertical in shape a fixed layer height is just fine.
To show the benefits of using Plic3r’s support for variable layer heights I made a simple test part. It is 1/8th of a sphere that has a radius of 40 mm. This is what the test part looks like:
Although this is a very simple part it does have continuously varying vertical, sloping, and horizontal surfaces. This means it can show off very well the benefits of variable layer height. Just compare these 2 images; the first is sliced with a constant layer height of 0.300 mm, and the second uses 0.300 mm as the “default” layer height, but I specified where on the geometry to start using variable layers.
Fixed Layer Height
Variable Layer Height
Notice how much more even the individual layers are near the top of the part. This happens because the slicer has adjusted the layer height individually for each layer.
How to invoke variable layer heights
Plic3r functions pretty much like any other slicing program. so you should have no problem loading an STL file into it and slicing it. Of course you’ll have to change the program’s default parameters to fit your printer and filament first.
Here is a screenshot of my test part loaded into Plic3r just before slicing. Note that I have set my default layer height to 0.300 mm. If I just clicked the “Slice now” button I would get exactly what you’d expect – the part sliced with a constant layer height of 0.300 mm.
That is exactly what I did to produce the first screenshot above.
But this is not what I want; what I want to do is use variable layer heights for about the top 20% of the part. So to do this I click on the “Layer editing” box to get this updated display:
To control where and how much variation to apply to the fixed layer height you click and drag your screen cursor in the area indicated above. What you’ll want is a smooth curve that goes from no variation to maximum and then, depending on the shape of your part, possible back to none again. For this part I wanted a smooth transition from 0 to maximum. This next screenshot shows how that looks when completed.
The green band shows the area in which variable layer heights will be generated. The sloping line shows the “strength” of the layer height variation; in this photo is goes from maximum (top left) to minimum (bottom right); this ensures a smooth transition from fixed to variable layer heights. The yellow band shows the area when the variable layer height strength will be changed when you click and drag on the line.
Left click/drag increases the mount of layer height adjustment; right click/drag decreases it. you can specify as many areas of adjustment as you want. There is a small “Reset” area at the bottom of the adjustment space; clicking this rests all adjustments to 0 so you can start over.
This written description is far more complicated that the actual function on a live screen. In other words, it is much easier to do than to describe.
With these changes in place, clicking the Slice Now button slices the part with the layer height variations just specified, and the result is shown in the Variable Layer Height screenshot above.
This photo shows the same STL file printed with and without variable layer heights:
The fixed layer height version on the left printed in 31 minutes; the variable layer height version on the right took 32 minutes. I still have some parameter tweaking to do to fix the bumps on the outside layers, but the difference the variable layer heights make is quite apparent.
What is the cost for variable layer heights?
The answer is increased print times. This should be obvious because your printer will have to print more layers than it would if it were using a fixed layer height. But if your part has geometry that can benefit from this method my guess is you will find it more than worth the extra print time.
What’s nice about Pslic3r’s variable layer height capability is that it is totally automatic once you specify the areas in which you want to invoke it. You don’t have to guess at what individual layer heights might need to be because the slicer software figures it out for you.
Keep in mind that variable layer heights only help when the part’s geometry is sloping at roughly 45 degrees or more, so there is no reason to specify it’s use for other areas of your print. At some point in the future there may be a slicer program that will automatically calculate the best layer height for an entire model, but until that happens Plic3r seems to be a good alternative to printing with a fixed layer height.
KisSLicer does VLH Too
Versions of KisSlicer from 1.6.2 onward include automatic VLH. All you have to do is set up 3 parameters (or 5 if you are a real stickler for control) and KisSlicer does all the work for you.
Here is a screenshot of the KisSlicer default Style settings dialog.
The variables to note are the ones in the Layer Control box. Layer Thickness is the standard/default layer height you want to use for your prints. I set this to 0.200 mm. When Max is set to 0 (zero) there will be no variation in layer height – every layer printed will be 0.200 mm (or whatever value you set in Layer Thickness.) The 1st box lets you specify the height of the first, and only the first, layer, regardless of any other setting. I typically set this to 0.300 mm.
To enable variable layer height just set layer Thickness to the minimum layer height you want, and Max to the largest/thickest layer you want your print to have. I find that 0.100 and 0.400 mm seems to work pretty well, but of course these actually depends on the shape of the part you are printing. You will probably have to do some experimenting to determine the optimal values for these top 3 values.
The bottom 2 boxes (Bottom & Top Stepover) tell Kisslicer when to start making adjustments to layer height based on how far inboard or outboard the current layer is compared to the previous one. I’ve tried setting these at the suggested 50% and this seems to be a good choice.
I did a test on my VLH.stl test part using these settings
This slice resulted in a total of 337 layers, an estimated print time of 27:20, and a total filament length of 4.2m. Using the top group of settings (constant 0.200 mm layer height with a 0.300 mm high first layer) yielded 398 layers (remember, first one is 0.300 mm high), estimated print time of 26:59, and a total filament length of 4.1 meters.
So it seems like KisSLicer’s VLH capability is able to produce higher quality prints that require slightly more print time and filament. This seems like a good tradeoff to me.
PS: I don’t like KisSLicer’s post-slice visualization at all so I used Craftware to check out the GCode generated by KisSlicer. I’ve heard the the upcoming version of Craftware will include VLH support too. I sure hope this is true.
Last Update: 15 Oct 2017