Voxels and Pixels
pixel dog

Voxels and Pixels

3d space and imaging with lights require a 3d dimensional worldview. I wrote a long time ago about the differences between 2d and 3d work spaces. I neglected to discuss data in detail. 3d is an almost ethereal domain that plots virtual coordinates in space as opposed to the Cartesian approach. 3d space is a virtual environment detached from a position on a 2 dimensional plane. On a cosmological level its rather like comparing the streets of New York city to the position of a galaxy in a Universe that is expanding.

2D AND PRINTING

2 dimensional maps are a fairly easy thing to understand (assuming they are scaled correctly and you always position the map north). Maps use a simple X and Y coordinate system. When we add terrain and the concept of a Goedesic, 2d maps get a tad more complicated. A straight line with terrain and a curved surface are more complicated to understand. It is with wonder, that the Greeks (Eratosthenes) first postulated that the earth must be round, when they tried to calculate the flatness of the land by using the idea that a square has four 90 degree angles (360 degrees), and noting that the giant square they created did not meet !

No alt text provided for this image

This aside, simple 2d geometry as postulated by the Greeks and Babylonians, is easy to understand as it references a position on a surface. When we walk, we reference a surface, when we bike we reference a surface and a direction. When we go home from work, we return to a point with an X and Y coordinate that we left early that morning.

When we relate this is a printed piece, we can can reference a halftone cell or where a pixel is translated into a spot / dot on a piece of paper or emulsion coated screen. In terms of a halftone, lets examine an extreme, but simple halftone cell.

No alt text provided for this image

When you print we are used to using dpi to explain the quality of a print. In the simplified version you can see our resolution is 4x4 dpi, so for every inch we print, our image is split into 4 sections. In a square in, there are 16 sections. Each sections or square can be a color (or bit of detail). If you ever look a print that is blocky (or watched a youtube video and you see blocks that make the video look grainy), this is a function of the resolution as defined here. So imagine 300x300dpi image. Each inch would have 300 squares/ sections across the width in both directions. NOTE: The direction of dpi/ Resolution can often be 2 numbers, Ie: 360x720dpi. The first number (360) references the width of the print or resolution that matches the side to side movement of the print head. The second number (720) is determined by the movement of the feed stepper motor (which is itself a function of the physical number of nozzles and the print driver). A good print driver/ RIP can provide various resolution options for you to play around with. TIP: When it comes to halftones and film output, it is better to use a "square" resolution like 1440x1440dpi than 720x1440dpi also called "non square" resolution. Why ? Halfone output requires dots that are formed as perfectly as possible, non square resolution tends to deform the overall shape of a dot in the feed direction.

  • So how is halftone formed ? Taking the same example, we take our grid or resolution and we split it into groups of equal "cells". So in the example, we split into 4 cells.
No alt text provided for this image

So in the example we divide the one inch grid made up of 16 dots/spots/pixels and equally divide it into groups of 4 dots/spots/pixels. This creates a frequency or Lines Per inch of 4 ! Now, this means that each cell is made up of 4 pixels, and as this cell is binary in nature you can turn individual dots/spots/pixels off, which in turn creates levels of gray or creates a tint, ie: if all were on and the color were black, it would look like a solid printed black or 100%, if half the spots/dots/pixels were turned off, and the color we printed was black, it would look gray or would measure 50%. Imagine printing a gradation at 4 lpi at 16dpi, your print would be odd and the shading rather limited, but this is how it works.

  • 2d printing is thus binary and raster in nature in that it references a grid like a bitmap, and turns on/off bits of the grid to create the detail it needs.
  • Printing dithered/ stochastic and so on, creates a resolution that is closer to the actual resolution of the print head as we tend discuss them in terms of microns and not halftones. Color output is therefore faster than half-toned output (if we compare acceptable quality. Again, output is a function of print head resolution and the print driver/ rip, and the math has to be divisible otherwise you will produce moire patterns that are NOT pleasing.

So, we can conclude that 2d geometry, like a Roman city is a fairly easy to understand concept to understand. We operate on the perpendicular matrix with an X and Y coordinate. A map and a printed cell are in essence identical. The complication comes from terrain on a map and curvature of the surface and for the printed cell (Pixel), the complication comes when we use non square resolution, quad toning and dithering.

ADDITIONAL Qbit - It is worth mentioning quad toning here. This is a wonderful concept that I was introduced to by a phenomenal software engineer at Gerber Scientific. The concept was also used by Mike Ware at Wasatch very effectively. The idea is that we create a "virtual resolution" from an existing cell. So our 4 x 4 cell we split in a few potential ways to "appear" to have a greater number of gray levels and thus smoother transitions (or colors), but the core resolution remains. In terms of geometry this is really has no bearing on X and Y, just adds greater detail to the map.

3D AND SPACE

In 3d we can not reference a grid or raster binary data as we are not imaging onto a substrate, we are extruding a medium (molten plastic, liquid polymer) into an open space, so we need a digital "wireframe" or "mesh" that our XYZ stepper motor driven head can extrude its shape into. This is similar to the "Point Cloud" or .ply file format that a 3d scanner produces, however the difference is with a point cloud you have specific coordinates that define a shape in a 3d space, however no route between the individual points. A polygon mesh converts a point cloud into a shape that creates a mathematical route between points and therefore a path that a toolhead can follow (imagine towns and no roads between them, you could gaze from a helicopter and see the towns, but without a path between them, how would you travel ?).

  • A polygon mesh therefore references the outer surface of a 3d object. Now, when we print we also reference infill. The term for a polygon mesh with reference to the inside of the object is a Volumetric Mesh. For now, lets stick to the outside bit !
  • Why a polygon ? You can actually use a variety of shapes to render a 3d space. Triangles, Quadrilaterals, convex, polygons with holes. Typically we see shapes made up of triangles as these tend to lend themselves to folds and detail in a rendering and therefore a print.
No alt text provided for this image

Lets take a look a Oliver Cromwell (a Great Brit !). We see a very detailed object with over 33,000 polygons to define his exterior.

If we look closer at the polygon mesh we can see the following rendering.

No alt text provided for this image

You can see how the polygons create the outer shape (they fold and orientate themselves thanks to some very cool software). The toolhead now has XYZ coordinates or pathways that can be followed via "slices" that are based on the imaging resolution.

Now if we reduce the amount of polygons to 10,000, you can the affect upon the resolution.

No alt text provided for this image

What is does, is greatly simplifies the object and reduces processing time greatly. However it also reduces detail dramatically on a print.

So how does one determine what the correct polygon mesh resolution should be ? It should be function of the micron size you are printing. If you reduce your polygon too far, you will lose detail, if you add too many, you just cant print it and your slicing times become very long. My rule of thumb is based on file size. There is a very cool feature in MeshLab called Quadratic Edge Collapse Decimation. Using the settings you see below, you can reduce file size a lot but maintain geometry without losing too much detail. I recommend experimenting and try to get file sizes under 20mb. This original Cromwell file was over 100mb. With meshlab I reduced it to under 6mb and it printed amazing.

No alt text provided for this image

Lasers, DLP and Voxels

In terms of using lasers, LCD, LED and DLP technology how do we reconcile the 3d space with imaged resolution on a surface ?

No alt text provided for this image

This is a SLA resin print of Arnold as Conan the Barbarian. Print at 100 micron layer resolution. Lets take a closer look at the print closer.


No alt text provided for this image

You can see the layer lines in the print up close. If I had printed at a resolution of 20 micron, the layer lines would be less obvious but still there !

The object is "sliced" into individual layers based on a height , in this case 100 microns. The individual layers are themselves composed segments from the light source. In a typical UV LED on a resin printer, the array is segmented.

No alt text provided for this image

The array on the right has 54 individual LED's that pass through a lens through an LCD panel. The LCD panel has a resolution. We are projecting a "slice" of the file (a monochrome mask) one layer at a time. the LCD (just like your Iphone or Android or Ipad) has a resolution and the "slice" is composed of individual pixels.

No alt text provided for this image

The LCD (RGB) is composed of individual pixels (Pixels Per Inch). It is worth noting that LCD's are not an efficient medium due to edge blur and light bleed they experience. The Source LED is itself projected through a lens (though the Photon is not stretched , there is a differential in the distance travelled from the center to the outer edge, which translates into a differential in energy within a Time variable that we would measure, thus a weaker edge). This is noticeable with Resin 3d prints. LCD based resin has amazing resolution on prints. Compared to FDM, its is almost a night and day difference on detailed prints. However when you compare LCD to DLP, we see the difference in efficiency in terms of how much of energy is collimated and maintained within the process.

No alt text provided for this image

This introduces us to the idea of a Voxel. With an LCD and projected LED, the edge definition is defined but less so than DLP (indeed the edges are blurred which I will explain later). More on Voxel data in the next section.

These layer lines are built up 100 micron per layer @ a fixed LED exposure of 3.4 seconds. LED exposure allows you to make adjustments to the energy and thus you are able to "blur" the exposure to create a less pronounced edge definition. This does affect detail in a print.

In terms of my Arnold print, we are introducing additional detail to each layer. The "slice" at 100 micron is one resolution. The individual layer is itself composed of our grid (above image), which makes up our Voxel.

No alt text provided for this image

Our Rubix cube shows this very clearly. Each layer (100 micron), is created by a grid of squares. Our 3d dimensional model is composed of individual layers of squares. The voxel is each cube in the Rubix matrix !

VOXEL DATA - More detail required

As introduced, our LCD exposure is based upon a grid which is composed of individual pixels, called Voxels.

Laser and LED exposure adds another level of complexity to the 3D space. Instead of layer lines we add a Z height to create a 3 dimensional space. Instead of 2d grid layer, we have a layer composed of a 2 dimensional grid with a Z height. This translates into layers composed of individual squares (with an X, Y and Z value). This is the same as LED/ LCD, DLP and Laser printing.

wiki

This wiki image, shows the Z height. If our X and Y is the 2d grid or squares (defined by a square resolution), our "boxes" represent a 3 dimensional "minecraft" like environment. Images are made up individual squares. Just as we defined 3d space in terms of polygons for the purpose of defining a digital space that we can visualize, our Voxel becomes the DNA of our 3d print.



No alt text provided for this image

You can see on this image to the left the individual layers and how each layer has a "box" edge or stair stepped edge. This is a function of incredible efficiency in DLP technology. DLP typically has little energy loss and translates into visible Voxel edges in prints.


No alt text provided for this image

Voxels are NOT an issue. Indeed they translate into an almost pure form of efficient energy conservation or at the very least we see DLP (photons) in a physical form.

DLP

The heart of the DLP printer is the TI (Texas Instruments) DMD chip. The chip itself has a surface with individual mirrors that actuate at 12 degrees On and Off (simple binary) to reflect a light source, whether LED, Laser or even an old fashioned bulb. I wrote about this in another article. It is a somewhat efficient way for photons to travel, hence the edge quality.

LASER

There is actually no such thing as 2 dimensional. Everything we do, even on a flat surface has a height. Whether it is the graphite from a pencil on paper, it has a Z distance. When a laser ablates it is removing to a depth which is function of T (time). Laser, whether direct or directed by a mirror from a DLP, has and X, Y and Z direction under movement. It ablates a point (X, Y) to a depth (Z). The laser moves (X+/-, Y+/-) to a depth (Z+/-). The ablation on a printed surface (emulsion etc) is a function of time, energy, substrate thickness (resistance). The point I am laboring, is that Lasers (or any light) are NOT 2 dimensional, they ablate (penetrate) to depth. Feynman clearly showed that light on a mirror is not efficient. It reflects at ALL angles, and is even absorbed into the mirror, so 100% is not reflected. In terms of our Voxel data, with SLS printers, we see very detailed Voxel prints (see above).

Hard edge data

Voxel Resolution and Print Height - Minimize Print Moire (RESIN PRINTING)

One of the things I have learned over the years and teach others is that you can minimize patterns (moire) in prints, 2d or 3d, by matching X, Y and Z resolutions (mathematically - "arctangent"). 3d printing is a discipline filled with reddit experts who have a small amount of experience yet confidently claim to have every answer to every issue without nuance. The reality with patterns or moire is that anything with a frequency (pattern) in a print is a function of math. If a DLP or LCD has a resolution of 1440 x1440, the Voxel X and Y values using 1 as our primer, is 1440 and 1440 (X = 1440 (1) and Y = 1440 (1)). In terms of the Z value (our slicer thickness or print height), you need to make sure your voxel height is a function of the X and Y value. A 25 micron height would increase the probability of moire in the pint (1440 / 25 = 57.6). To minimize moire you need a divisible integer not a fraction (or try for an integer). Thus 24 (60) micron or 30 (48) micron would minimize the probability of moire (a visible frequency or "layer line"). Note, frequency lines can and will occur along any of the Voxel Axis.

Stepper values - Same math

The same is true with FDM printing. The stepper motors have a resolution that is a function of voltage (energy) and the physical step or turn of the motor. This does relate to your extrusion width. This is probably too advanced for most users, but in a closed loop system (closed loop motor), feedback on extrusion width with stepper motor / vRef would minimize frequency patterns on an FDM print.

In conclusion

I will update this article from time to time. I hope the reader gets to understand the difference between 2d and 3d environments.

要查看或添加评论,请登录

Nigel Heywood的更多文章

  • Light Sentience

    Light Sentience

    We are able to measure light (denoted as C, the speed of light in a so called vacuum as being 983,571,056 feet /…

  • Light - The basis of everything

    Light - The basis of everything

    My obsession with light is not accidental it has been a journey. It is axiomatic that we make assumptions in our search…

  • Symmetry, chance and Printing

    Symmetry, chance and Printing

    PART 1 - Definition This is the first part in a series of articles examining the inexorable progression of…

  • 2d - 3d Printing

    2d - 3d Printing

    This is a quick article on how you can use an AI website to scan a 2d image, generate a 3d model and with some "Post…

  • Light and energy loss

    Light and energy loss

    When the sun shines directly upon your face, the energy created has traveled for around 8 minutes unencumbered by any…

  • Laser's and Temperature !

    Laser's and Temperature !

    Laser has no heat, just energy. It has no inherent heat.

  • Light - A tale of two photon's

    Light - A tale of two photon's

    Light is made up of measurable amounts of energy (quanta), called the Photon. Without the Photon the cosmos would be…

  • Lasers, Light and Energy Conservation

    Lasers, Light and Energy Conservation

    NOTHING IS WHAT IT SEEMS ! DLP, Lasers, LCD projection are all mediums for the transfer of energy quanta (photons) with…

  • Printing and SpaceTime- Part 2 "Stuff"

    Printing and SpaceTime- Part 2 "Stuff"

    The first article examined what a Geodesic path is. Its purpose within the context of these articles will become…

  • The Tale of two Ink Droplets - Dilation

    The Tale of two Ink Droplets - Dilation

    If two droplets of ink are shot from a inkjet printhead at the same time onto a substrate, which one hits the paper…

社区洞察

其他会员也浏览了