Photometry scan box prototype
2019-Jun-07, Friday 12:01 pmLast March 9th and 10th was Science Hack Day Dublin. And I wanted to do something sciencey. Some colleagues told me about photometry scanning and Reflectance Transformation Imaging (RTI). I did a bit of research and decided to give it a go.
Research;
Dave Riganelli
Building a Portable PBR Texture Scanner
Your Smartphone is a Material Scanner: Vol. II
Normal Map Photography
Highlight RTI Image Capture
Crafting a Next-Gen Material Pipeline for The Order: 1886
You take a physical object and put it into the digital world. Think of a textured material, like a cable-knit jumper. You take that and create a digital skin, that you can then apply to a model/mesh, rather than creating a full 3D scan itself (that's a bigger rig, one I might try later on).
The basic concept is eight lights arranged around a central area (to contain the material to be scanned). The lights are evenly spaced, angled at 45 degrees, and all ambient light removed. Eight photos are taken, in sequence, with only one light on at a time. These images are then feed into image processing software (and manually tweaked) to produce an albedo map and a normal map, which can be combined to create Physically-Based Rendering (PBR) materials that can be used as assets in digital artwork.
There's a lot going on here, so let's break it down.
Switch plate
If there are eight lights that need to be turned on one-by-one in sequence I'm going to need a controller. I had some satisfying toggle switches, so I laid them out on a perma-protoboard, and then the rest of the circuit to make it work. The lights connect into the headers. And after soldering up I Sugru'd the back so I won't short anything while holding it.
Materials;
Toggle switches
Perma-protoboard
Barrel jack
Sugru
2x 8 pin 'female' headers
Wire
Solder
( Photos )
How big is this thing anyway?
Good question. The colleagues fancied something of decent size, which became an octagon with each side an A3 sheet. This works out to fit inside a square of 717mm x 717mm, or a circle with diameter of 776mm. So I got a large piece of paper (pattern tracing paper in my case), roughly squared. Folded it in half, folded it in half again, and then half again. Opened it out, and at the very centre (where all the folds meet) I pinned 776mm of string attached to a pencil, and drew a circle. Then trimmed down the paper. This is my 'ground mat'.
Materials;
Paper
(Paper) Scissors
Ruler
String
Pencil
( Photo )
Box
Foam board comes in A2 size. So I can cut one sheet in half to get two A3 sheets. I need eight for the uprights, so that's four sheets.
I also need eight pieces for the top. These pieces are cut from squares the size of the short side of A3; 297mm. If I made a perfect isosceles triangle that is as tall as its base is wide I'd have eight segments fitting together into a planar octagon. But I want the lid to be at a 45 degree angle. So the high point of the triangle is widened into a trapezoid, to a width of 104mm.
I could not find a neat way to pack these together on the foam board, so I needed another four sheets of foam board to make the eight segments, making a total of eight A2 sheets of foam board for the structure.
Cutting foam board seems to work best with an utility knife in a sawing motion, on a cutting board. When I'd cut everything out I went around the edges with the most matt black gaffer tape I could find. Both for neatness, and because the foam core inside the boards is bright white.
Materials;
Black foam board
Gaffer tape (>25 yards)
Utility knife
Cutting board
( Photos )
Turn panels into walls
Time to make the panels an octagon by connecting them in an accordion manner.
Materials;
Gaffer tape
( Instructions and photos )
Lighting
One of the people at ScienceHackDay was
partfusion, and he happened to have recently been working on good lighting solutions. He gave me some 6500-7000 Kelvin white three-LED boards to use. I detached them from his rig, shorted the three LED positive pins together so they would all turn on at once, and soldered on positive and negative leads.
I measured the approximate middle position for the LEDs on each of the lid segments, punched holes for the wires, and threaded the wires through. The LEDs were hot-glued in place, and gaffer tape was placed over the wire hole on the outside.
( Photos )
Packs up small
Because of the accordion arrangement the whole thing packs up nice and small, for transport or storage.
( Photo )
Extend wires, power it up, test
I extended the LED wires to fit all the way to the switch controller. Plugged in a 12V power supply (that's what the LEDs I used like), and tested that the electronics worked. It's functional, but does it do the job?
( Photo )
Assemble, test
All that's left to do is set it all up and try it out. Because I want to be able to pack this up again and the gaffer tape is quite strong I layered it over masking tape in this step, for easier removal.
Tape the uprights together into one continuous piece. Tape the lid together into one continuous piece. Tape the lid to the uprights turning it all into one piece. Make sure none of the joins let light through. As I only have a 'ground mat' at this point I place blankets around the floor edges to block out light.
Set up the camera on a tripod with an extended jointed arm, remote trigger, and polarising filter. Cover the whole thing with a black-out curtain, and test.
( Photos )
Next steps
So, it seems to work! Excellent. What's next? A black floor. A lid to fit the camera more snug. A more stable way to support the camera. And then on to ways to get more information, like backlighting the material.
Research;
Dave Riganelli
Building a Portable PBR Texture Scanner
Your Smartphone is a Material Scanner: Vol. II
Normal Map Photography
Highlight RTI Image Capture
Crafting a Next-Gen Material Pipeline for The Order: 1886
You take a physical object and put it into the digital world. Think of a textured material, like a cable-knit jumper. You take that and create a digital skin, that you can then apply to a model/mesh, rather than creating a full 3D scan itself (that's a bigger rig, one I might try later on).
The basic concept is eight lights arranged around a central area (to contain the material to be scanned). The lights are evenly spaced, angled at 45 degrees, and all ambient light removed. Eight photos are taken, in sequence, with only one light on at a time. These images are then feed into image processing software (and manually tweaked) to produce an albedo map and a normal map, which can be combined to create Physically-Based Rendering (PBR) materials that can be used as assets in digital artwork.
There's a lot going on here, so let's break it down.
If there are eight lights that need to be turned on one-by-one in sequence I'm going to need a controller. I had some satisfying toggle switches, so I laid them out on a perma-protoboard, and then the rest of the circuit to make it work. The lights connect into the headers. And after soldering up I Sugru'd the back so I won't short anything while holding it.
Materials;
Toggle switches
Perma-protoboard
Barrel jack
Sugru
2x 8 pin 'female' headers
Wire
Solder
( Photos )
Good question. The colleagues fancied something of decent size, which became an octagon with each side an A3 sheet. This works out to fit inside a square of 717mm x 717mm, or a circle with diameter of 776mm. So I got a large piece of paper (pattern tracing paper in my case), roughly squared. Folded it in half, folded it in half again, and then half again. Opened it out, and at the very centre (where all the folds meet) I pinned 776mm of string attached to a pencil, and drew a circle. Then trimmed down the paper. This is my 'ground mat'.
Materials;
Paper
(Paper) Scissors
Ruler
String
Pencil
( Photo )
Foam board comes in A2 size. So I can cut one sheet in half to get two A3 sheets. I need eight for the uprights, so that's four sheets.
I also need eight pieces for the top. These pieces are cut from squares the size of the short side of A3; 297mm. If I made a perfect isosceles triangle that is as tall as its base is wide I'd have eight segments fitting together into a planar octagon. But I want the lid to be at a 45 degree angle. So the high point of the triangle is widened into a trapezoid, to a width of 104mm.
I could not find a neat way to pack these together on the foam board, so I needed another four sheets of foam board to make the eight segments, making a total of eight A2 sheets of foam board for the structure.
Cutting foam board seems to work best with an utility knife in a sawing motion, on a cutting board. When I'd cut everything out I went around the edges with the most matt black gaffer tape I could find. Both for neatness, and because the foam core inside the boards is bright white.
Materials;
Black foam board
Gaffer tape (>25 yards)
Utility knife
Cutting board
( Photos )
Time to make the panels an octagon by connecting them in an accordion manner.
Materials;
Gaffer tape
( Instructions and photos )
One of the people at ScienceHackDay was
I measured the approximate middle position for the LEDs on each of the lid segments, punched holes for the wires, and threaded the wires through. The LEDs were hot-glued in place, and gaffer tape was placed over the wire hole on the outside.
( Photos )
Because of the accordion arrangement the whole thing packs up nice and small, for transport or storage.
( Photo )
I extended the LED wires to fit all the way to the switch controller. Plugged in a 12V power supply (that's what the LEDs I used like), and tested that the electronics worked. It's functional, but does it do the job?
( Photo )
All that's left to do is set it all up and try it out. Because I want to be able to pack this up again and the gaffer tape is quite strong I layered it over masking tape in this step, for easier removal.
Tape the uprights together into one continuous piece. Tape the lid together into one continuous piece. Tape the lid to the uprights turning it all into one piece. Make sure none of the joins let light through. As I only have a 'ground mat' at this point I place blankets around the floor edges to block out light.
Set up the camera on a tripod with an extended jointed arm, remote trigger, and polarising filter. Cover the whole thing with a black-out curtain, and test.
( Photos )
So, it seems to work! Excellent. What's next? A black floor. A lid to fit the camera more snug. A more stable way to support the camera. And then on to ways to get more information, like backlighting the material.