Marlin Z Fade Height – Explanation & BLTouch Configuration

While configuring the Z probe offset is the first thing that comes to mind when setting up a BLTouch automatic bed leveling sensor, as it’s an essential process to get the sensor to work correctly, the Z probe offset is not the only automatic bed leveling-related parameter you can adjust to ensure that your BLTouch produces the best results possible for your prints.

In this guide, we will explain the purpose of a handy feature that you can utilize to improve the quality of your prints when using an automatic bed leveling sensor, known as Z fade height in Marlin firmware, and take you through the process of configuring the Z fade height value optimally for your BLTouch.

What Is the Purpose of the Z Fade Height Feature in Marlin Firmware?

In essence, the Z fade height feature in Marlin Firmware tells the 3D printer to reduce the compensation applied by mesh-based leveling algorithms (whether it’s manual mesh bed leveling, automatic bed leveling, or unified bed leveling) gradually as the Z-axis position gets closer to the specified value, with the Z-axis movements being corrected less and less for each subsequent layer as the print goes on.

Once the Z-axis position reaches (and surpasses) the specified Z fade height value, the bed leveling compensation isn’t taken into account at all anymore, and the printer continues the printing process without correcting its Z-axis movements based on the print bed’s tilt as it would throughout the entirety of the print if Z fade height wasn’t active.

z fade height feature explanation


While phasing out the bed leveling correction can sound unintuitive at first, especially considering that the whole point of using an automatic bed leveling probe, such as the BLTouch, is to compensate for the flaws of the print bed automatically, the Z fade height feature actually comes with a couple of considerable benefits for little effort.

The standout advantage of activating Z fade height is the improvement it brings to the dimensional accuracy of your prints, as gradually phasing out the bed leveling correction allows to keep the printed part to retain its original dimensions as opposed to being slightly warped based on how warped your print bed is.

While this most likely won’t be too critical for prints with decorative purposes, whether it’s figurines or desk toys, as the slight bit of warping most likely won’t be visible unless you take a very close look and pay extra attention to spot it (or unless your bed is very warped), it’s still an effortless way of increasing print quality, which is nice to have.

On the other hand, where this advantage really shines are functional prints where dimensional accuracy is absolutely vital, as the dimensional inaccuracy caused by the bed leveling correction can be the difference between a replacement part that you have printed fitting into its place or not, and the Z fade height feature can be what saves you from experiencing such an issue.

Additionally, with the Z fade height feature enabled, your 3D printer doesn’t have to perform micro-movements on the Z-axis throughout the entirety of the printing process anymore, which will reduce unnecessary wear and tear on the components responsible for moving the Z-axis, whether it’s the stepper motor, the lead screw, or the V slot wheels.

While the wear and tear reduction isn’t a gamechanger by any means, as it will only have an effect over prolonged periods, it’s definitely a nice bonus to have on top of the dimensional accuracy improvements you’re already getting, specifically if you use your Ender 3 frequently.

How to Configure Z Fade Height for BLTouch?

When configuring Z fade height for your BLTouch, the first step you will need to take is to find a starting point value that produces good results, as using a fade height value that is too low will cause the feature to do more harm than good by reducing layer quality and using a fade height that is too high will reduce its effectiveness.

Fortunately, the Marlin firmware documentation has a recommendation for us regarding the Z fade height value configuration, which is to use 10 mm as a starting point and perform further fine-tuning based on the results of the initial test print afterward.

In most cases, a too high fade height value will show itself in the form of dimensional accuracies still being present on the printed part, as fading the correction out too slowly and too late will diminish the feature’s effectiveness to a point where it barely has any impact.

On the other hand, if you end up using a fade height value that’s way too low, you will experience a drop in overall print quality and potentially print failure due to the bed level correction being cut off way too soon, with the severity based on how much bed leveling correction is initially applied, as your 3D printer’s nozzle will either dig into the previous layers while printing or end up printing in the air depending on the print bed topography.

Once you carefully observe the test print for such signs, you can adjust the Z fade height value in 1 mm increments or decrements based on your results and keep testing until the results become satisfactory.

Finally, when it comes to configuring your 3D printer to utilize the Z fade height feature from now on, there are three paths you can take; which are to add it to the Start G-Code section in Cura (which is what we recommend), send G-code commands to your 3D printer (which would require access to a G-code terminal, such as OctoPrint or Pronterface), or to use the LCD controller of your 3D printer.

Below, you can find explanations and guides for all three of these methods, which you can use to pick the one that will work best for you.

Enabling Z Fade Height with Cura Start G-Code (Recommended)

If you’re already using the Start G-Code section in Cura to enable bed leveling before each print automatically, the most straightforward way to activate the Z fade height feature is to make a slight addition to the command you have there.

We highly recommend using Cura’s Start G-code section to enable bed leveling if you already aren’t, as this will save you from having to activate bed leveling manually before each print, increasing both reliability and convenience.

For this method, all you will need to do is to bring up the Start G-Code section in Cura (Preferences -> Configure Cura -> Printers -> Machine Settings ->), spot the bed leveling activation G-code command you’re using (M420 S1 or G29 A) and add the corresponding flag that allows you to set the Z fade height.

For M420 S1, which is the standard way to activate bed leveling for ABL and manual mesh methods, you will want to add the Z flag, along with the Z fade height value you would like to use, such as M420 S1 Z10 for enabling bed leveling with a Z fade height of 10 millimeters.

example cura start gcode with fade height enabled through m420


On the other hand, for G29 A, which is another way of activating bed leveling, specifically for Unified Bed Leveling (UBL), you will need to append the F flag instead, once again with the fade height value you would like to use, such as G29 A F5 for enabling bed leveling with a Z fade height of 5 millimeters.

example cura start g-code with fade height enabled through g29


Enabling Z Fade Height with a G-Code Terminal

Our following recommendation to activate the Z fade height feature is to add the Z flag with the fade height value of your choice to M420 S1 when you manually enable bed leveling by using a G-code terminal, such as one provided by 3D printing interfaces like OctoPrint and Pronterface.

So, if you would like to enable bed leveling with a Z fade height value of 10 millimeters, you will need to append Z10 to the bed leveling command you regularly use, which, for the purposes of this example, would be M420 S1 Z10.

enabling fade height with m420


Alternatively, if your firmware is configured to use Unified Bed Leveling (UBL), and you’re utilizing the G29 A command to activate bed leveling instead of M420 S1, you will need to pass the F flag to G29 A instead, once again with the fade height value of your choice.

For instance, if you would like to enable UBL with a Z fade height value of 5 millimeters; using the G29 A command as you usually do, the modification you would need to make is to append F5, which turns the command you need to use into G29 A F5.

enabling fade height with g29 for ubl


Enabling Z Fade Height with LCD Controller

Finally, the last method you can use to enable the Z fade height feature is to utilize the LCD controller of your 3D printer.

Please note that the steps in this guide are based on an Ender 3 V2 Neo with Professional Firmware installed and that the exact steps can show differences across different 3D printer models and firmware.

To start, navigate to the Advanced menu from the main screen.

Alternatively if the firmware you’re using is different than the firmware this guide is based on, you can try navigating to the Motion sub-menu located in the Control menu instead, which can be where the Z Fade Height option resides in some caes.

ender 3 v2 advanced settings menu


Next, go into the Mesh Leveling menu.

ender 3 v2 mesh leveling menu


Once that’s done, locate the Z Fade Height entry in the menu, and adjust it to your needs with the knob on the LCD controller.

ender 3 v2 z fade height option


Finally, save your adjustment to the EEPROM by clicking on the Store Settings option, which you can find either in the Advanced Settings or the Control menu.

ender 3 v2 store settings


Conclusion

Configuring the Z fade height value for your BLTouch is one of the quickest and most straightforward optimizations you can perform to reduce the dimensional inaccuracies on the top layers of your prints caused by the bed leveling compensation, which can especially become a problem if you’re working with a warped or considerably unleveled bed.

While it most likely won’t be possible to find the perfect Z fade height value on your first try, meaning that you won’t be benefitting from the full potential of this feature at first, some trial and error should eventually ensure that the quality of your prints sees a noteworthy increase with the Z fade height feature at play.