3D Filament Temperature Tower
If you have a new filament, and you're not sure what temperature to use with it, one way to explore the possible settings is to make a Temperature Tower, which uses different temperatures for each section.
In general, the 'Generic <material>' settings in PrusaSlicer are good enough for most filaments and tasks. But if you want to fine tune quality and speed, there are many options to improve!
Use OrcaSlicer's Built-In Calibration
OrcaSlicer includes presets for most printers, including the Prusa MK3s, Prusa XL, and BambuLabs P1S.
A full suite of calibration prints is built in to the slicer, including changing variables. This is the easiest path to a finely tuned filament profile!
Read here for detailed instructions. Generally, proceeding in the recommended order is the best plan: https://github.com/OrcaSlicer/OrcaSlicer/wiki/Calibration
Customizing a temperature tower in OpenSCAD
There are lots of Temperature Tower models out there. I've been using this one, because it is easy to customize the tower: https://www.thingiverse.com/thing:4876406
If you open this model in OpenSCAD, you can edit the start and end temperatures. You may want to look at the filament manufacturer's suggested range and go a few steps beyond it in both direction.
Click the Render button (cube with hourglass) and then the STL button to export the STL.
Using an existing model
If you don't want to bother with customizing your model, you can grab one with the temperature range you want from your favorite model site (Printables, Thingiverse, MakerWorld, etc.). A typical temperature tower starts with a labeled temperature on the bottom "floor" and changes each floor by an increment of 5 or 10 degrees. Make note of these numbers. You'll also need to figure out two things about the model you want to use: how many layers tall the base is and how many layers tall each "floor" is. You can do this by slicing the model and then looking at the sliced preview and moving the bar that controls which layer you're looking at.
If you use PrusaSlicer
Open PrusaSlicer and load the STL. Set the filament to a good guess for your filament. A setting like "Generic PETG" should work if there is no manufacturer-specific preset.
Make sure you're set up for the the Expert UI (Configuration > Configuration Assistant...) will let you change this. Go to the Printer tab, and select Custom G-code. In the Before layer change G-code box, enter
; TEMP FOR LAYER {layer_num - <BASE LAYERS>} TOWER FLOOR {(layer_num - <BASE LAYERS>) / <FLOOR LAYERS> + 1}
M104 S{<START TEMPERATURE> - (layer_num - <BASE LAYERS>) / <FLOOR LAYERS> * <DEGREES PER FLOOR>}
Replacing all of the <TEMPLATES> with the values for your model. If you used OpenSCAD with the model linked above, <BASE LAYERS> will be 7 and <FLOOR LAYERS> will be 50.
Slice the model and switch the Legend to Temperature. Make sure that each floor of your sliced mode is the right color. Note that PrusaSlicer is showing the wrong temperatures, eg. 256 instead of 255 and 224 instead of 225. I don't know why this is. The values are correct in the G-code. See the later section.
Export the G-code and send it to the printer.
If you use BambuStudio (or OrcaSlicer)
Open your STL or 3MF file BambuStudio. Set the filament to a good guess for your filament. A setting like "Generic PETG" should work if there is no manufacturer-specific preset. In the upper right, move your mouse over the printer tile and a pencil icon will appear. Click that.
In the Printer Settings dialog, select Machine gcode and scroll to Layer Change G-code. Add the following:
; TEMP FOR LAYER {layer_num - <BASE LAYERS>} TOWER FLOOR {(layer_num - <BASE LAYERS>) / <FLOOR LAYERS> + 1}
M104 S{<START TEMPERATURE> - (layer_num - <BASE LAYERS>) / <FLOOR LAYERS> * <DEGREES PER FLOOR>}
Replacing all of the <TEMPLATES> with the values for your model. If you used OpenSCAD with the model linked above, <BASE LAYERS> will be 7 and <FLOOR LAYERS> will be 50.
Slice the model and switch the color scheme to Temperature. Make sure that each floor of your sliced mode is the right color. Note that BambuStudio is showing the wrong temperatures, eg. 256 instead of 255 and 224 instead of 225. I don't know why this is. The values are correct in the G-code. See the next section.
If you want to export G-code in BambuStudio, you must use File > Export > Export G-code... The Export Plate Sliced File option in the Print Plate dropdown outputs a 3MF. You can just click Print Plate if you're set up to print over the network.
Double checking the G-code
I have found that PrusaSlicer likes to forget the custom G-code when I change unrelated things, so I like to double check my G-code by running something like this:
grep 'TEMP FOR LAYER .*[05]0' -A 1 Temp_Tower_235-195_PLA_w_gcode_0.2mm_PETG_MK3S_2h29m.gcode
This shows you a bunch of the temperature changes, so you can double check them:
; TEMP FOR LAYER 50 TOWER FLOOR 2 M104 S230 -- ; TEMP FOR LAYER 100 TOWER FLOOR 3 M104 S225 -- ; TEMP FOR LAYER 150 TOWER FLOOR 4 M104 S220 -- ; TEMP FOR LAYER 200 TOWER FLOOR 5 M104 S215 -- ; TEMP FOR LAYER 250 TOWER FLOOR 6 M104 S210 -- ; TEMP FOR LAYER 300 TOWER FLOOR 7 M104 S205 -- ; TEMP FOR LAYER 350 TOWER FLOOR 8 M104 S200 -- ; TEMP FOR LAYER 400 TOWER FLOOR 9 M104 S195
When you're sure your G-code is right, print the model. I like to check the display after the base prints, and again after the first floor to make sure the nozzle temperature is actually what it should be.







