MadMapper Spacial Scanner tutorial

So you’ve heard of MadMapper Spacial Scanner function,
but you don’t know excatly what it is, or even how to use it.
I’ll explain that in this tutorial.

The Spacial Scanner allows you to use your projector as a scanner,
to actually capture, pixel by pixel, what your projector “sees”.

For this tutorial, you’ll need:
– MadMapper
– a projector
– a Canon DSLR (compatibility list on MadMapper website)

Sometimes, being kitsch feels refreshing (esp. for the sake of a tutorial)
Here’s what the final mapping will look like (a radio-active garden gnome):

Frightening ? Mwhahaha…
It was done in less that 10 minutes, this might keep you motivated
to read through all the next steps…

I picked up a plastic dwarf. (I had it already actually)
Put it somewhere in my office.
This is my setup by day:

Then, I put a projector in front of it.
(here, a Acer K11, 300 lumens, possibly one of the cheapest unit around)
Noted the resolution, which was 1024 (?!) by 768 pixels.
Because I’m a bit of a cowboy, I installed it on the side (to make things needlessly more complicated, and to prove that the equations work even in extreme situations), being sure it would “shoot” the entire dwarf:

Placed my DSLR around (not necessarily exactly on the same axis as the projector, a 45 degrees axis might be fine as well).

FYI, my DSLR is a Canon EOS 500D with a Sigma lens.
I set it up to shoot the scene, a little bit wider, to capture the full output of the projector.

I did set everything in Manual Mode:
– Manual Focus
– ISO 100 (=less grain)
– 1/15s shutter speed (it has to be lower that 1/60, your projector’s refresh rate)
– F3.5

These settings were the best for my scene, yours might differ a bit.
According to my tests, white background is not ideal because it reflects too much light. Under-exposed pictures are better, you get less artifacts. Ambient light is bad, it troubles the calculations.

Then launched MadMapper. Plugged my DSLR to my Mac using USB.
Then started the Spacial Scanner function.
It all happened in one click (which is good !)…

Once plugged, MadMapper shows a preview from your DSLR:

I clicked “Capture”, which had the effect of starting the automated procedure.
What the program does is projecting a bunch of white patterns, aka Structured Lighting.
These are succesive white bars, such as:

Since the whole process is automated (remember ? just one click …),
I took the opportunity to make myself a cocktail, while waiting for the final result to be processed.
Then I saved the picture somewhere on my drive.
MadMapper also loads it automatically as a background in the preview output:

Note the little artifacts on the resulting picture, due to the poor conditions of this tutorial, and to the reflective nature of the surfaces.
(mate is better)

Next step was to load the resulting picture in Photoshop and do some selection.
I rotoscoped the interesting parts of the dwarf, and made a new layer for each part, filled with white:

Note that I rotated the whole canvas, for an extended lasso/magic wand pleasure. If you do so don’t forget to revert back to the original orientation at the end.

I saved each of the layers as a separate PNG file.
PNG is good because it keeps transparency, aka alpha.
For the super lazy visualist, there’s a script in Photoshop to export all the layers as a separate file automatically (menu/file/script/export layers as file)

Then, launched Modul8, as placed each file in the Media bin:

Then I assigned each picture to a layer, while setting the normalize option.
This had the effect of scaling correctly each layer (provided your preview ratio is set to 4:3):

With everything ready so quickly, I sent Modul8’output to MadMApper (cmd-Y).
Make sure the Syphon resolution is the same as your pictures and projector, in my case 1024 by 768 pixels.
You can check that in Modul8’s preferences/misc/syphon output:

Switched to MadMapper, and set the media input to Modul8 by double clicking in the list:

Then I created one single Quad surface.
A little trick is to unzoom a little bit in the Preview output to display the whole stage and the created Quad will magically fit the stage:

Wow ! Normally, everything fits perfectly.
Then switched back to Modul8, and changed the color of each layer, added some auto-color effect and whatnot. Had fun (there are plenty of other ways to have fun, a cocktail is obviously a part of it).

Witnessed it worked seamlessly in MadMapper:

Finally took a picture of the final result:

And in a true spirit of self-satisfaction of the quickly achieved video-mapping tutorial, a made myself a final cocktail.

26 Responses to “MadMapper Spacial Scanner tutorial”

  1. hey there!!
    thanks for the info, I was trying out this function today and was not very sure of details such location of the DSLR, background; etc…
    nice tips!!
    keep up the good work and the cocktails too ;)

    saludos

    Aitor

  2. what exactly are you using structured light scanning for here?

    you seem to be just making a standard 2d mask from a photo..

    • I’m wondering the same thing!

    • Will, I think what is happening is the projector position is being calibrated and the image is being rendered from the projector’s position instead of the cameras position. If you compare the scanner input screenshot to the output you can see that they are from a different perspective, the camera image is higher than the scanner output.

      I was a little confused about this as well, as I expected the 3d model, point cloud or depth map to be used. I am very curious on how to recover the model as well as I would like to use this to create effects.

    • the structured light scanning is used to find a correlation between the camera pixels and projection pixels. once you have that you can use the colors from the camera image to make an image of the scene as seen by the projector.

    • Francois Wunschel Says:

      with a photo you won’t have the precise view of the projector.
      With the Space Scanner, you have it pixel by pixel, which is much more precise (and useful)

  3. how do i set the canon 500d as a live input? i can’t see mine when it’s plugged in via usb. what settings do i need?

    • Hi Leon, I used a different model of canon camera but I was able to get mine to work by switching autofocus to manual, setting exposure mode to manual, opening aperture all the way (smaller number), 1/15 second exposure, ISO 160, and making sure RAW mode was off so I was only photographing JPEGs.

  4. Greg Downing Says:

    Great tutorial! I saw it and immediately downloaded the demo. Can this be completed w/ the demo? I don’t see where you save the image once the scan is complete.

  5. how to save resulting picture on a hard drive (after Spacial Scanner)

  6. gregdowning Says:

    It I guess the blog author doesn’t check the comments. Anyone know who the author is?

    • Francois Wunschel Says:

      I just come back from China, where the censorship prevented me from loggin in to approve/reply comments.

  7. [...] pixels to fit screens / objects / spare wall spaces etc. The Madmapper folk have been releasing an inspiring set of very detailed tutorials too, as well as pretty useful [...]

  8. Salut!
    Comme j’ai vu que vous êtes francophones je me permet d’écrire en français.
    Je n’ai pas très bien compris ou doit on placé l’appareil photo par rapport au projecteur ?
    De plus j’ai essayé avec un appareil photo quelconque mais madmapper ne l’a pas detecté, est-ce normal?
    Merci et félicitation pour ce tres bon logitiel et tout vos projets, votre site est passionant!
    Corentin, madmappeur débutant
    Ps : Allez vous organiser un workshop à Paris? On m’a dit que vous y habitiez!

    • Francois Wunschel Says:

      Ca ne fonctionne qu’avec un DSLR Canon, ou une camera video branchee en firewire.
      L’appareil photo se place plus ou moins dans le meme axe que le projecteur.
      On organisera prochainement un workshop a Paris. Pas de date pour l’instant.

  9. photo scanner…

    [...]MadMapper Spacial Scanner tutorial « 1024 Architecture Blog / MadMapper, Video Mapping, Quartz Composer plugins, whatever …[...]…

  10. I have a problem mappear a cube,
    is the hub around the light projector slightly lower
    there a solution?

  11. 3d Rendering|3d modeling|3d rendering company…

    [...]MadMapper Spacial Scanner tutorial « 1024 Architecture Blog / MadMapper, Video Mapping, Quartz Composer plugins, whatever …[...]…

  12. Hi, thanks for the tutorial, but I’m confused about why a camera is needed if it’s not taking a picture that exactly copies the view from the projector. Could you explain more fully please?

    • Francois Wunschel Says:

      the camera actually gives you a pexel perfect map of what the projector “sees”

  13. awesome tutorial! Forgive my ignorance in PS, but when you write “rotoscoped”, what do you mean?

  14. …. I meant “your use of the verb” ….

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 687 other followers