Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Interactive spatial augmented reality (aka projection mapping)

Discussion in 'Made With Unity' started by Thomas-Mountainborn, Jun 11, 2015.

  1. Thomas-Mountainborn

    Thomas-Mountainborn

    Joined:
    Jun 11, 2015
    Posts:
    489
    Hey there,

    For my internship and bachelor thesis, I developed a Unity application that does 3D projection mapping. Using a model of the object that's being projected onto, the real time or prerendered imagery is warped so it looks correct after being projected onto a non-flat surface.

    The application can output to any number of projectors (as long as the PC has the capabilities for that amount of projectors), and projections can be blended so very large, seamless projections can be achieved. It's also possible to interact with the projection using a laser pointer and a webcam.

    Here's a video of a little tech demo I created in a jiffy; you'll have to excuse the programmer art. At the end it shows some stills of a video mapping show (with eight mannequins and a backdrop, using four projectors) that was created using this application, but sadly I'm not allowed to show footage thereof.

     
    chelnok and XCO like this.
  2. vr28vr

    vr28vr

    Joined:
    Sep 29, 2015
    Posts:
    3
  3. johnsuarez

    johnsuarez

    Joined:
    Jan 17, 2016
    Posts:
    5
    Hi Thomas,
    I reviewed your video on unity app for projection mapping. I have a need for something like this and wanted to know if you are available for consulting. Thanks.
     
  4. Thomas-Mountainborn

    Thomas-Mountainborn

    Joined:
    Jun 11, 2015
    Posts:
    489
    What exactly is it you require?
     
  5. johnsuarez

    johnsuarez

    Joined:
    Jan 17, 2016
    Posts:
    5
    I was looking to be able to utilize an application like you develop for a proof of concept. Basically we would have a number of projectors mounted in a fashion to cover a 15'x15' room (project on 3 sides of the room). We would located various objects (styrofoam to represent various objects (trees, facades, etc). We would want to project on to this surfaces a scene to be developed in unity. We would be looking for your expertise in creating unity code, asset development and animation. You can email me directly at js1055_1@hotmail.com.
     
  6. Thomas-Mountainborn

    Thomas-Mountainborn

    Joined:
    Jun 11, 2015
    Posts:
    489
    While this is definitely a very interesting project I'd love to be a part of, I'm employed full time and this project is too sizable to undertake after hours. I'm currently in the process of improving my projection mapping code base though, and looking into putting it onto the asset store - it might still be of use to you that way.
     
  7. johnsuarez

    johnsuarez

    Joined:
    Jan 17, 2016
    Posts:
    5
    Hi Thomas, I would be interested in purchasing this, even before you put it in asset store. From your description it provides what I need. Let me know if we could work out an arrangement I would be happy to purchase an early copy.
     
  8. Thomas-Mountainborn

    Thomas-Mountainborn

    Joined:
    Jun 11, 2015
    Posts:
    489
    I've given it some thought, and while I would love to help out, I cannot in good conscience sell the project as it is now - it would also require a whole lot of support from my part, for which I sadly have no time. I am working on getting it into a far more refined, optimized, and globally usable state, and I will get back to you then.
     
  9. johnsuarez

    johnsuarez

    Joined:
    Jan 17, 2016
    Posts:
    5
    Hi Thomas, understand perfectly being a developer myself. Let me know when done and I'll be first in line to purchase :)
     
    Thomas-Mountainborn likes this.
  10. TheRaider

    TheRaider

    Joined:
    Dec 5, 2010
    Posts:
    2,245
    Microsoft have open sourced room alive which is another option.
     
    Thomas-Mountainborn likes this.
  11. Thomas-Mountainborn

    Thomas-Mountainborn

    Joined:
    Jun 11, 2015
    Posts:
    489
    Oh wow, that's super cool! Thanks so much for introducing me to it, I'll definitely be looking into that.
     
  12. TheRaider

    TheRaider

    Joined:
    Dec 5, 2010
    Posts:
    2,245
    I am trying to work with them to get the unity plugin for it.

    I am planning to do a multi projector setup in my labs.
     
  13. johnsuarez

    johnsuarez

    Joined:
    Jan 17, 2016
    Posts:
    5

    wow if you can get Unity plugin working I would be very interested.
     
  14. thrmotta

    thrmotta

    Joined:
    May 27, 2014
    Posts:
    32
    Hey @TheRaider, are there any news on that Unity plugin for RoomAlive Toolkit?

    Thanks!
     
  15. Guillaume1986

    Guillaume1986

    Joined:
    May 28, 2016
    Posts:
    11
    Hi I am trying to work on something like this, and what you did is great man! I was wondering is there a plug-in to do the video mapping or is it a combination of Unity with a video mapping software like Resolume or Madmapper through Spout or Syphon?

    Just trying to figure your workflow thank you.
     
  16. Thomas-Mountainborn

    Thomas-Mountainborn

    Joined:
    Jun 11, 2015
    Posts:
    489
    Hey Guillaume, thanks for your kind reply. For this project, the projection mapping was done directly through Unity, using my own code. I don't have the time to write up the full work flow right now, but I'll write an article about it on my site when I do, and link it here. You can read about two mannequin projection mapping projects I did with that software there. If you also require interactivity using lasers, that's also something I did myself, using EmguCV in this case. Since then, I have worked out native OpenCV integration, yielding much higher frame rates - I'm also planning on writing about that soon.

    For a different projection mapping project, I did go through existing video mapping software, simply because of the much larger scope and the necessity of absolute reliability, as it is a fixed installation, instead of a temporary one. I supplied 2 monitors worth of content to d3 servers to project content onto a massive sculpture (link below).

    So, both routes are possible - if you already feel at home with existing software and it is good enough to do the job for you, you can capture Unity's output and send it to your video mapping software. You'll need some kind of capture card for this though, which don't come cheap, especially for higher frame rates. Or, you can directly map from Unity, but since there isn't a plug-in for that yet, at least not to my knowledge, you'll have to learn the ins and outs of it yourself and program it in. I'd love to send some code your way, but the project was made for the company I work for, so I don't have the rights to it.
     
    Last edited: Jun 10, 2016
  17. Fortitude3D

    Fortitude3D

    Joined:
    Sep 7, 2017
    Posts:
    155
    Brilliant :)