Slice-time displacement maps for Snapmaker Orca

I have read and understood all rules of the Innovation Fund Phase 2

on

I consent to my project information (username, project cover, summary, etc.) being publicly displayed for review and showcase

on

Username (for public display)

dlvkz

Project name

Slice-time displacement maps for Snapmaker Orca

Project URL

Project cover

Project Category

Software

Project Summary

Displacement maps for Snapmaker Orca put a real surface texture on any print: a pattern texture, the UV and normal maps that come with a model, or a texture generated locally from a prompt. The slicer applies the texture to each layer while slicing, so the mesh is never subdivided.

This builds on fuzzy skin, which already moves the outer wall while slicing, but only with random noise.

I think it is relevant to integrate this into the slicer itself, as there already are standalone displacement tools aimed at 3D printing (e.g. Bumpmesh). However, they achieve it by baking the displacement and creating heavy, high-poly meshes. Bringing displacement to the slicer avoids heavy meshes: the app stays responsive, slicing is faster, and the 3MF stays small.

This is also relevant for printing low-poly and game assets, as details that exist only in the normal map can actually be brought out on the print.

What it adds: a “Displacement map” texture type in the Surface texture settings, and a 3D-view panel.

  • 8 included seamless pattern textures.
  • Height maps (PNG or JPEG).
  • UV and normal maps: when a model comes with a normal map, as game assets and AI-generated models often do, the slicer turns it into a height map and displaces the model through its UVs.
  • Local displacement texture generation using a lightweight SD-Turbo model (893 MB), an optional add-on.
  • Live displacement preview before slicing, using GPU tessellation.

Measured with the U1 profile: a Ø40 mm cylinder with a PNG map is a 0.022 MB project and slices in 1.78 s. The same texture baked into a 1.26 M-triangle mesh is 15.1 MB and slices in 4.95 s. The map is about 700 times smaller and slices about 3 times faster, and the printed outer walls match to a median of 4.3 µm. A map pays off against heavy meshes, and when the detail only exists as a texture; on an already light model it costs more than it saves.

Status: working build on Windows. 26 automated test cases cover the feature, and all of them pass. The existing slicer tests pass too, apart from 5 upstream tests marked as skipped or expected to fail.

Open Source Status

Open Source

Please specify the open source license used by this project

AGPL-3.0

Cash Fund or U1 Hardware Sponsorship

Cash Fund

Originality

Original New Idea

If based on an existing project — your independent contribution

N/A

Is it a paid project?

No

Showcase:

1. Pattern textures

Every pattern spans the full depth you set. All of these are simple untextured meshes (cylinders, boxes, a vase, a sphere), textured only at slice time.

2. Live preview, before slicing

The 3D view displaces the model on the GPU while you drag, before slicing. Above: a 3,000-triangle gargoyle with its UV height map. No high-poly copy is made, so nothing has to load. The Displacement map panel at the top left is there from the start and holds every setting.

Settings are per object. Select an object and the panel edits only that object. With nothing selected, it edits the defaults for every object.

3. Local displacement texture generation using a lightweight SD-Turbo model (893 MB)

In Generate from text…, describe a surface (“tree bark”, “cobblestone pavement”, “woven wicker”) and pick one of four seamless height maps. It runs locally, on your graphics card through Vulkan when it can and on the processor otherwise. On an RTX 3080 Ti the first texture of a session takes about 10 s while the card is prepared, and four more take about 1 s. On the processor, each takes about 5 to 10 s. The model is an optional add-on (about 0.93 GB in all) that the app downloads the first time you use it. Powered by Stability AI (SD-Turbo, quantized to 4-bit), with DeepBump for the normals.

4. Mappings

Box (triplanar), cylindrical, spherical, planar and on the surface, with the same 10 mm hexagons on the same 50 mm sphere. Planar top, planar side and UV (the model’s own texture coordinates) are also available, with rotation and invert. For a part loaded from a GLB, glTF or OBJ file, UV uses that file automatically.

5. Map vs baked mesh

Left: a 512-triangle cylinder (Ø40 × 40 mm) with a PNG as the displacement map. Right: the same PNG baked into a 1.26 M-triangle mesh, the way you would do it in a modelling tool today. Both were sliced with the same U1 profile:

Map, whole surface Map, per layer only Baked mesh
Project size (3MF + PNG) 0.022 MB 0.022 MB 15.1 MB
Slice time (median of 3 runs) 1.78 s 1.53 s 4.95 s
Estimated print time 57 min 52 min 52 min

Printed on my U1 (Bambu PLA Matte):

6. A low-poly model and its height map

Two models generated with Tripo (48k and 45k triangles) were decimated to 3,000 triangles. What the decimation removed was then baked into a 16-bit height map along the low-poly surface: about 1 mm deep, 2048 × 2048 px.

Printed on my U1 (the gargoyle, Bambu PLA Matte):

Size and speed: these Tripo models are light to begin with, so here the map costs more than it saves.

Gargoyle (Tripo) Project size Slice time Est. print
48k-triangle original mesh 0.65 MB 9.5 s 4 h 0 min
3k mesh + map, whole surface 4.6 MB 14.5 s 4 h 21 min
3k mesh + map, per layer only 4.6 MB 10.4 s 3 h 52 min
3k mesh, no map 0.05 MB 5.7 s 3 h 22 min

7. Game assets: relief from the normal map

The previous section started from a high-poly model. This one starts where game assets do: a low-poly mesh plus texture maps. Poly Haven’s carved wooden plate (CC0) has 2,112 triangles. The zig-zag carving on its rim and the chisel marks in the bowl are not in the mesh at all; they exist only in its 4K normal map. A slicer that reads only the mesh prints a smooth plate.

The fork reads the normal map from the glTF file and turns it into relief: it integrates the normal map into a 16-bit height map (0.9 mm deep on a plate 122 mm across) and prints it through the model’s own UV coordinates. It offers this when you load the model, and it is also on the right-click menu and on the command line (`–relief-from-normal-map`). Nothing was modelled, baked or exported by hand.

Carved plate, 122 mm Slice time Est. print
mesh only 8.0 s 5 h 6 min
mesh + its normal map 30.7 s 6 h 27 min

One run each. The 30.7 s includes turning the 4K normal map into the height map. The rim’s underside needs tree supports either way.

A character works the same way. Poly Haven’s gothic statue (CC0) has 27,739 triangles. The mesh carries the pose, the robes and the chain, but the face under the veil, the crown’s ornaments and the edges of the chain links exist only in its normal map. With the relief, they print.

Gothic statue, 150 mm Slice time Est. print
mesh only 18.5 s 7 h 51 min
mesh + its normal map 49.2 s 10 h 36 min

One run each. Here the relief is 2.0 mm deep and covers the whole figure, so it adds about a third to the print time.

8. Test print

Printed on my U1 in Bambu PLA Matte, 0.4 mm nozzle, 0.16 mm layers.

Every pattern reads clearly at 0.4 mm deep, on the walls and on the tops. Noise is the softest of the eight: 20 mm noise at 0.4 mm depth is gentle on the walls.

9. How it works (short version)

- Walls: each wall point is moved along its normal by the texture value at its 3D position, using the chosen mapping. Height = (value − (1 − offset)) × 2 × depth.

- Whole surface: for each layer, steep faces offset the layer outline by depth ÷ sin(slope). Shallow faces (tops, slopes, overhang undersides) add or cut material by tracing the texture over the face’s footprint, and the face on the bed stays flat. Everything after that (walls, skins, overhangs, supports) works on the textured outlines, exactly as if the texture had been modelled.

- Per layer only: each layer’s outline is resampled, and every point moves along the outline’s own outward normal by the texture value at that point. Shallow faces are skipped, so nothing is traced over tops.

- On the surface, cells: sites are placed on the mesh, seeded from a honeycomb along it, and then relaxed. Flat areas get a lattice in their own plane; round parts get rows around the axis, spaced along the profile. A point’s height comes from its 3D distance to the nearest two sites, so the pattern is continuous over every edge.

- On the surface, images and stripes: small patches (about one tile across) are placed over the mesh, each with its own frame: level on walls, carried over from its neighbour on tops. Each patch’s image offset is chained from its neighbours across the surface, so the image runs on from patch to patch, and the patches are blended where they overlap.

- Live preview: each part is drawn as tessellation patches with smooth normals. The GPU subdivides them to about 4 px per segment on screen and moves the new points by the same lookup the slicer uses, including the patterns laid on the surface and UV maps (there each corner carries its texture coordinates, and vertices split along the texture’s seams).

- Text to height map: SD-Turbo draws a seamless colour texture in one step (circular padding, 4-bit weights with the most sensitive 30% at 8-bit, run through stable-diffusion.cpp). DeepBump turns the colour into normals, and the normals are integrated into heights (Frankot–Chellappa) and saved as a 16-bit PNG.

- Normal map to height: the normal map is turned into slopes per texel in mm, high-pass filtered and saved as a 16-bit PNG. The depth comes from the model’s real size.

- Tests: 26 automated test cases cover the feature:

- white pushes out and black pulls in, the offset moves the range as set, and the depth goes past the 1 mm fuzzy skin allows;

- each projection, rotation and invert;

- the patterns tile with no seam;

- cells laid on the surface are evenly spaced on sides and tops, smooth over the rim, and the same wherever the part sits;

- images laid on the surface repeat at the tile width on flat faces and run on around a cylinder;

- whole-surface displacement of walls and tops, with the bed face left flat;

- per layer only, with every mapping: outlines move sideways by the full depth and nothing rises above the top;

- open sheets print at the set width, thin parts are widened, thick ones left alone, and a broken mesh slices the same every time;

- textured OBJ loading, normal map to height map (also on a mesh whose facets were reversed when a project was loaded), refusing compressed glTF, and text to height map.

All 138 fff_print test cases pass. Of the 362 libslic3r test cases, 357 pass; the other 5 are upstream tests marked as skipped or expected to fail.

Docs: the “Displacement map” section of `doc/print_settings/others/others_settings_fuzzy_skin.md` in the branch.

Known limits:

- A flat image can’t wrap a closed shape without a seam or stretching somewhere. On the surface avoids that, but where its patches meet you can see faint doubled lines, most of all on spheres.

- glTF files with compressed geometry (EXT_meshopt / Draco, as current Tripo exports) are refused with a clear message. `scripts/glb_unmeshopt.py` converts meshopt files.

- Open or broken meshes can still slice with gaps. Open surface thickness covers sheets, not every hole.

- Very fine, deep textures add print time.

- With UV maps, the live preview can show thin spikes along the texture’s seams at large depths (around 2 mm on the gargoyle). The slicer itself is not affected.

- Tested on Windows only.

Hi dlvkz, thanks for sharing the project and the U1 test prints. Your “Per layer only” mode reminded me of “Poikilos’s 2022 PrusaSlicer prototype” (Displacement mapping a.k.a. bump mapping at the slicing stage (reusing Fuzzy Skin backend code). · Issue #8649 · prusa3d/PrusaSlicer · GitHub), which also used a height map to shift layer outlines during slicing. Some of the controls in your screenshots, particularly texture depth and point spacing, also look similar to the settings described in that earlier proposal.

I noticed that the submission is marked “Original New Idea.” Did the PrusaSlicer prototype or the later OrcaSlicer port influence your design or implementation? I’d be interested to hear how your approach came about and which parts you see as your main contributions beyond the earlier work.

I came up with all of it myself, the ideas, the design and the implementation. Thats why i marked it this way. I think that makes it clear enough that everything implemented in the fork is my own work

Thanks for clarifying that you developed it independently. One detail stood out when I compared your first commit with the 2025 OrcaSlicer port. Both add displacement mapping to Fuzzy Skin using the same enum value (“NoiseType::DisplacementMap”) and the same configuration string (“displacementmap”). The sampling and projection code differ. Were you aware of “OrcaSlicer PR #7985” (Implement 'fuzzy skin' displacement mapping by undingen · Pull Request #7985 · OrcaSlicer/OrcaSlicer · GitHub) when you started work on the fork?

Since “Poikilos prototyped the underlying technique in 2022” (Displacement mapping a.k.a. bump mapping at the slicing stage (reusing Fuzzy Skin backend code). · Issue #8649 · prusa3d/PrusaSlicer · GitHub), could you clarify which part of the project you had in mind when you selected “Original New Idea”?

I’m only asking because I remember the PrusaSlicer prototype, and the similarities made me curious.