Introduction: Updated Milkscanner V1.5

Picture of Updated Milkscanner V1.5

The Milkscanner is a tool that allows the scanning of objects and creates a Displacement map for use with Moviesandbox or any other 3D App that would allow for displacement mapping.

1 Webcam
1 Tupperware Bowl
3 cups of Milk
1 custom LEGO rig

You can download the Milkscanner PC-Application and SourceCode (creates the displacement map automatically from a webcam image) from the Milkscanner webpage:

If you have questions, please feel free to leave a comment on the Moviesandbox forums at:


Check out a life-size version of the milkscanner using Ink on vimeo!

Thanks for your interest!

Step 1: Scanning...

Picture of Scanning...

You fix the webcam above the bowl (you don't necessarily have to use LEGO, but it is a fast way to build and adjust...) and put the object to be scanned in it. Note that the Scanner can only scan half an object at a time.You then cover it half in milk. The milk basically "slices" through the object.

You can subtract the white part form the picture the webcam takes and the rest serves as your "slice". You then add some more milk and make another picture. That way you slice through the whole object, three spoons of milk at a time.

Step 2: Use Your Displacement Map

Picture of Use Your Displacement Map

After creating a Displacement-map from your scanning, you can use it with the Trace-Tool and bring it into Moviesandbox, as shown in the youtube-video.

You can also import it as a displacement Map in Blender or Maya or any other Application that uses Displacement Maps. But remember - the displacement map only covers half the object!



haqbany (author)2013-09-20

you are genius

davidbarcomb (author)haqbany2014-11-28

Yes he is!

animedubbedonline (author)2013-09-09

nice one

dgn3 (author)2007-06-06

i think a good solution would be to have the camera attached to the same screw drive that lowers the object into the milk, like sort of have the whole assembly lowering into the milk (without having the camera ever reach the milk of course ;)

drcrash (author)dgn32007-06-06

Another enhancement, which would make it not a "milk scanner" anymore, would be to replace the milk with a horizontally scanning laser. You can get one for $10, regularly on sale at It's a laser level that paints a line. To paint the object all the way around, you could position the laser level so that part of its scan hits the object from the front, and part of it bounces off a mirror and hits it from the back. (Or better, do it from three angles 120 degrees apart, with the middle of the laser stripe hitting the object directly, and each end of the stripe reflected off a mirror behind the object and to one side and the other.)

rabid_engineer (author)drcrash2010-08-10

Picking out such a laser line against dispersed light coming in from the surroundings can be tricky, especially since you are looking at a reflection of the light at non-tasty angles. You'd then best use a darkroom box to take the pictures in. And even if you do that, there are parts (most notably car tires and other black rubber parts) that don't reflect much light, and won't be picked up at all. An added problem can be angular distorsion (perspective), if you can't make it so the laser and webcam's axes of orientation are virtually identical. You'll still have a mapping, but it'll be skewed. We once built a 3D scanner that scanned moving parts on a conveyor belt. Fun times. In short: Milk (or any opaque liquid) is probably easier. Except for parts of the same color, of course...

fiezi (author)drcrash2007-06-06

The problem with lasers is that it would narrow down the types of objects you could scan. For example, you couldn't scan a ring anymore, or anything that has holes in it. A fluid can do that because you can pour it in. Also, one other thing to remember when going for precision is that the milk level rises depending on the size of the object in the pool (unless you use the infinity pool idea) when you lower the object.

moopet (author)fiezi2007-06-06

You can't scan a lot of objects with this setup anyway - for instance, how would you scan something like a yo-yo where the camera cannot see the milk because at whatever angle, some part which is narrower is obscured by some part which is wider.

dbell (author)moopet2007-06-12

Still won't work for *all* shapes, but for a yo-yo, rotate it 90 degrees around an axis other than the axle. In other words, put the slot in the vertical plane. And for a symmetrical object like the yo-yo, you only need half the scan (one hemisphere.)

mappum (author)moopet2007-06-09

This is a great idea, and probably needed a good imagination to think up! For problems of not being able to see everything, can't you just use more than one camera? They could be at angles, although, the may totally screw up the thing from the perspective.

sourcerror (author)fiezi2007-06-07

I think it would be a better idea not to rise the object being scanned, but push another object (a cube or cylinder) in the milk. 1, This would reduce the speed of milk level to half. 2, The rising speed of milk level would change less.

drcrash (author)dgn32007-06-06

I don't see the advantage of having the camera move. Having the camera and the milk level fixed seems ideal. Any distortion will be simple fisheye distortion in a plane, and constant. (So it'd be easy to correct for.) Unless you correct for fisheye, it'd be better to have a long lens (or a zoom zoomed in) and put the camera as far away as practicable. With a decent-res still camera with time lapse, you could get some pretty precise images.

drcrash (author)2007-06-02

Nice. If you're raising the level by hand anyway, it might be preferable to use a screw drive, and turn the screw by hand, to lower the object into the milk. (Easier to turn a screw 1 revolution or 1/2 a revolution or whatever than to dole out 3 uniform teaspoons of milk.) An advantage of the screw drive is that it would work with different-sized containers, and it would raise the level by a constant distance per turn rather than a constant volume. (If your object is reasonably large relative to the size of your container, how much liquid you need to raise the level a given amount depends on the fraction of the surface that is occupied by the object---for places with large cross-sections, you need to add less liquid because the object itself is occupying more volume at that level.)

n0ukf (author)drcrash2007-06-03

Even if you use a screw mechanism to lower the object into the milk, the object will displace some milk and raise the level as well, changing the uniform increments of screw distance to a less uniform step. Though the smaller the object displacement is relative to the area of the milk surface, the smaller this effect will be.

drcrash (author)n0ukf2007-06-03

Good point. I suppose that if you raise/lower the object, you could set up a couple of tubes to maintai the milk at the right level. One would be almost flush with the surface, but a little below it, coming down from a milk reservoir. (Like a water cooler or one of those dog bowls with the jug that refills the bowl). The other would also be flush with the surface, but a little above it, coming up from a milk drain. If the level in the scanner container dropped below the first one, it would dispense more milk. If it went above the second one, it would drain excess milk. That should keep the milk level within about a millimeter of what it's supposed to be, with no intervention.

drcrash (author)drcrash2007-06-03

Wait a second... if you're just lowering the object into the milk, you only need the overflow tube, not the dispenser tube. As long as you never raise the object during a scan, you shouldn't have to add more milk to restore the level. Doh. Cool. Doh.

stib (author)drcrash2007-06-03

nonononono! Raising and lowering the object would distort the map, because as you raise or lower it it's going to get bigger as it approaches the camera and vice versa. Why not, raise the level of the milk using a pump (you can get small submersible pumps for fishponds fountains ).

highjacked (author)stib2010-03-28

You could hook up the camera to the screw drive as well, which would lower the camera as it lowers the object.

drcrash (author)stib2007-06-03

My understanding is that the scan is only looking at the perimeter of the object, where it meets the milk. If you hold the milk level constant, and lower the object into the milk, that plane stays the same distance from the camera. It is not distorted except by the fisheye effect of a relatively short-focal-length lens. I'd think that fixed "distortion" would be easier to compensate for correctly if you use a fixed camera-to-scan-plane distance than if you used a rising one. (Fisheye effect gets worse for objects that extend toward the camera.)

stib (author)drcrash2007-06-03

dang, you're right. Raising the level of the milk is actually going to give you perspective distortion, so you do need to have some sort of mechanism for raising or lowering the object, without changing the level of the milk.

hack124x768 (author)stib2007-06-06

Raising the level of milk only brings the "clip" closer to the camera. The actual object doesn't change, only its outline. A automatic spoon would be the way I would go for this. Just make it so the spoon dips in some milk and dumps in in the trough three times. Its lego, It would be a piece of cake!

drcrash (author)hack124x7682007-06-06

The object doesn't change, but it's already somewhat fisheye distorted by the short focal length lens. (With near parts looking a bit too big and far parts looking a bit too small.) The successive scans with the rising milk will capture that distortion, which is in each image. A screw thread to lower the object and an overflow for the milk seems much better. One way to do that would be with a geared-down synchronous motor, like a rotisserie motor, to turn the screw slowly and steadily. That wouldn't cost much. Given automatic, very steady downward motion like that, you could just shoot a video and sample the video for about the right number of frames, and get precisely spaced slices. The screw can just be a long enough piece of all-thread rod, for a very few bucks at the hardware store. The lowering platform can be attached to it with a couple of nuts around it, glued to a strut at a wide enough spacing that it holds very good alignment. Add a couple of guides rails to keep the platform from moving laterally (rotating around the threaded rod), and you'd be done.

magents (author)drcrash2008-07-10

Why not place a ruler in the milk tub, with the bottom of the ruler at the bottom right hand corner of the tub and the top of the ruler at the top of the upper right corner. Then as the milk is added you and/or the software can see the depth of each slice. MAybe not use a ruler, but a graduation of colors or black and red bars. the pump is controlled by the webcam, it looks for red and stops when it can't see it, then it looks for black and stops when it can't see it.

DeadlyDad (author)magents2009-08-31

That's perfect, and you only need a black bar. Each frame will show the exact length of the bar that is still above the milk. From that, basic trig will tell you precisely how deep the milk is in that frame, which gives you your 'Z' offset. It doesn't matter how much the relative volume changes between frames, as each one will give the absolute offset.

keastes (author)magents2008-07-13

1. you run into the control problem again, when you stop pumping there will still be some in the piping between the pump and the container, this will drain into your container ( afterthought:unless the inlet is near the bottom we/ a one way valve 2.if you know the pumps flow rate you can have it run for so long dispensing a certain amount of milk I might have missed something there if i did feel free to let me know I'm not afraid of being proven wrong (it's just another way not to do it)

justmefjs (author)keastes2009-04-09

I work at an envelope plant, and we maintain constant levels of liquids in different vats wtih nipple bottles. You get a bottle with a long neck. Fill it with your liquid, and invert it over the vat. The liquid will auto dispense to the lip of the bottle. Now if you want to raise the level of the vat. You just raise the bottle that much.

MatanArie (author)justmefjs2009-04-30

Wouldn't you get the best result by keeping a constant milk level while submerging (or emerging) the object and keeping the camera at a constant distance from it? I say, have your object lay on a moving platform that slowly travels down into the milk tank. Have the cam also connected to a platform that slowly lowers it towards the milk at the same rate as the object.

keastes (author)MatanArie2009-07-09

your mechanism would change the volume of the milk also changing the level.

ahuezo (author)keastes2009-07-29

Use a recipient with a constant flow of milk. The recipient needs to have a hole on it at one side. This hole will maintain the milk level while a pump restores the milk back. Then use a mechanism to lower the object. When the objects ups or downs, the volume of milk will vary, but the excess of milk or the lack of it will be drained or filled by the system. The camera does not need to move. My English is not good, I hope you did understand me. Saludos desde México.

drcrash (author)stib2007-06-03

A submersible pump doesn't solve the problem. Pumping is easy, but controlling it precisely is hard. I think it's easier to precisely control the level of the object with a screw thread than to precisely control a rising level of milk. (Except perhaps by putting the container on a screw thread and raising it, but why bother?)

bddbbd.b (author)drcrash2008-06-06

But what about a simple, homemade pump. The oldest mechanical solution to this problem I can think of, the screw of Archimedes. That can be (assuming a good seal) very precisely adjusted. This can then be used manually, and at a future point, hooked up to a little stepper and then you have a fully automated scanner. Other precise pumping options could involve little chemistry styrettes (sp?) but that seems like it could get complicated, and would be harder to scale.

Milk8Man (author)drcrash2007-11-18

We know how much liquid is added with the spoon approach. Three spoon fulls every frame. This is a set volume every captured layer. Any +/-displacement from the object should be handled by the program. In other words the size of layer (circumference of the image caputerd) is proportional to the height of the layer (distance from previous layer). Hopefully I am correct that the program would compensate for knowing that X amount of liquid has been added from one frame to the next. The "resolution" of the output should not be affected if this compensation is handled.Can you clarify that for us Mr. Fiezi? With that said, onto precision for automating the introduction of the liquid. I agree that a screw thread would be a precise way to introduce the milk into the tub. And the comment below about the syringe fits perfectly for precise measurements of liquids. Use a large CC syringe and anchor the plunger to a nut. Attach a threaded axel to a fixed speed motor. thread the nut ont the axel and secure bot the syring and motor to a common mount. See the horrible little mock up I put here:

ummm....doesn't adding more milk raise the level as well.........

Joell (author)drcrash2009-08-29

hang on, I think you've failed to account for how using a screw drive (moving an object by a fixed distance rather than fixed volume) would essentially negate the whole point of this exercise because your screw drive would lower differing volumes of the object per revolution if the object is irregular. The final effect after taking all the pictures and scanning them would be distorted because of this difference. And because of the differing volume per revolution the liquid displaced wouldn't be constant and the whole thing would get messed up...

12tigers (author)drcrash2009-07-18

or you could use your small amount of common sense, put on your thinking cap, take a nappy to let your tummy settle, wake up, and discover that adding milk (fine, for you, danimals) makes this so much easier i hope i came across "constructive"

Lance Mt. (author)2009-10-27

 Wait.. cant you just flip the object? Some careful alligning otta do it?  

PS i'm doing it now ^.^

joeld42 (author)2009-09-15

brilliant! couldn't you just start with the object submerged, and have a pinhole drain for the milk, and take pictures at a fixed interval as it drains? then you wouldn't need any mechanical parts at all. i think i have to try this...

computerwiz_222 (author)2009-08-23

Nice idea! This is truly awesome.

FreakCitySF (author)2007-06-12

So you got a scaned 3-d image can you print it out on a 3d printer now?

lovely2 (author)FreakCitySF2008-01-09

huh ? does it say anything about having a third printer. You don't need to create a 3d image from an actual physical model, you can model 3d objects with nothing but software and a mouse. And use that with a printer.

snowpenguin (author)lovely22009-04-07

A 3D printer, as in a three-d printer. Third is spelled 3rd.

Alpha2904 (author)snowpenguin2009-07-17

Third Dimension would a more clear understanding.

snowpenguin (author)Alpha29042009-07-20

Sorry, I didn't know anybody couldn't understand '3D' to mean three dimensions. Facepalm.

Rossiroller (author)snowpenguin2009-05-06

i dont see why not. as long as its not too "dirty" of a model

snowpenguin (author)Rossiroller2009-05-06

Am I correct in assuming that that was meant for FreakCitySF?

Rossiroller (author)snowpenguin2009-05-13


arduinoe (author)lovely22009-06-03

it can be done , and as many milk scanners output a .stl file , it is an imediate compatibility , no conversion needed . and what can i say " A 3D printer, as in a three-d printer. Third is spelled 3rd." oh dear oh dear oh dear should do the job nicely

Ex Marine (author)2009-07-16

you imported this to unreal Ed aye

fiezi (author)Ex Marine2009-07-17

yes, a long time ago. Now there's a standalone application that runs on windows that lets you view things.

disintegrator (author)2007-11-09

can you use soy milk?

About This Instructable




More by fiezi:updated Milkscanner V1.5
Add instructable to: