Bas Relief Creation

cnc

#1

Definition:

Bas relief is needed to CNC carve most 3D scenes, as the available (Z) depth of the CNC process is much less than the depth used in most 3D models. Coins are a good example of bas relief images.

A simple, ie proportional, scaling does not work well; most of the detail is lost.

Instead, a non-linear projection should be used. Typically these projections emphasize changes-in-depth, rather than absolute depth. Emphasizing this part of the depth data appears to trick, or allow, the human brain to infer the original depth information, making bas reliefs look more recognizable and “realistic”.

There are commercial programs that will do these projections, for example ArtCam and Vectric Aspire. They are costly.

BlenderCAM, free, has the ability to generate bas reliefs. The process is not straight forward.

There are several research papers and a few scripts out there as well.

In most cases the process steps are:

  1. Generate a depth map of the 3D scene. This is usually a grey-scale image where the shade of grey represents the depth or height. They are also called height maps, and Z buffers. Blender can be used to generate these.

  2. Apply a non-linear scaling to the image. “Height map” aware algorithms look at the 2 dimensional first and second order differentials- the 3D slope, and rate of change in slope, and adjust the heights based on this information. People have also had success with applying typical 2D image adjustments, such as gamma correction (so-so results) and unsharp mask (better) to the height map data.

  3. Use the adjusted height map to generate a CNC routing path. Vectric VCarve and CamBam can do this. Tests need to be done; I suspect both packages will generate “scanning” paths (across X, move down Y, continuously vary Z), which may not be good paths for milling. There may be a need to convert the adjusted height map back into a 3D model (STL) so that the CNC tools will generate smart milling paths- eg use adaptive clearing.

This projects goals are:

  • document how to create and save a height map (Z-buffer image) from blender
  • create/adjust/find software that will do the non proportional height scaling
  • document how to covert the adjusted height map into “safe” milling G-Code

References