Pages: [1] 2 3 ... 6
Author Topic: little projection-mapping tool  (Read 18187 times)
hv_francesco

Posts: 104

Gravatar


little projection-mapping tool
« on: December 11, 2010, 10:41:49 AM »

a little proj-map tool for use in our office, my first code ever with C++ and OF.
It’s based on quad warping math gently provided on this forum.
thanks to people on this forum that provided code snippets, tips and examples.


UPDATE: I've set-up a simple web site for this little tool at
http://www.hv-a.com/lpmt
where you can find the latest news and the more recent code.

NEW 14/03/11: on the lpmt site we've added a first experimental binary build for Microsoft Windows.




Main features:
- up to 36 independent projection surfaces
- possible content: solid color, images, video, live-cam, slideshows, smoothly changing solid colors, and more …
- customizable green-screen (chromakey) for video and live-cam sources
- horizontal and vertical flipping for image, video and live-cam content
- independent opacity settings for each content element
- customizable tint for each content element
- several blending-modes for projection surfaces
- on-screen editable masks
- bezier-warping for projection on curved surfaces
- synced multi-projectors shows with adjustable edge-blending
- control and setup through a rich set of OSC messages
- customizable video speed and volume
- save/load project set to/from xml file
- syncronized start for video elements
- vertex snap function for adjacent quads
- customizable image background for rough positioning of projection surfaces
- customizable speed for slideshows and color transitions








source code:

up-to-date code (git repository):
http://gitorious.org/projection-mapping

for the github fans, the repository is mirrored here:
https://github.com/hvfrancesco/ProjectionMapping

not often updated zip file:
http://www.hv-a.com/projectTiles/projection-mapping.zip


key commands

’s' – saves settings to xml (projection_settings.xml in data folder)
‘l’ – loads settings from xml file

‘a’ – adds new quad
‘>’ – go to next quad
‘<’ – go to previous quad
'+' - raise active quad position in layers pile
'-' - lower active quad position in layers pile
‘z’ – selects first gui page for active quad settings
‘x’ – selects second gui page for active quad settings
‘c’ – selects gui page for active quad corner position fine-tuning
‘q’ – fills window with active quad

‘spacebar’ – toggles projection/setup modes
‘g’ – toggles gui (for quad warping with mouse gui must be switched off)
‘f’ – toggles fullscreen mode
‘w’ – toggles cam snapshot window background
‘r’ – resyncs all videos and slideshows in all quads to starting point
‘1’ – shows general settings page of gui
« Last Edit: January 04, 2012, 02:50:06 PM by hv_francesco » Logged

______________________________________
HVA - hermanitos verdes architetti
modena - italy
www.hv-a.com
hv_francesco

Posts: 104

Gravatar


Re: little projection-mapping tool
« Reply #1 on: December 12, 2010, 02:35:03 PM »

I've added a slideshow feature to possible quad content, with customizable speed and colorization.
set up a git repository at gitorious:
http://gitorious.org/projection-mapping

here is a small video showing slideshow feature:


and another one showing a simple test setup with different features:
Logged

______________________________________
HVA - hermanitos verdes architetti
modena - italy
www.hv-a.com
liquid
ShangHai

Posts: 96

Gravatar


WWW
Re: little projection-mapping tool
« Reply #2 on: December 13, 2010, 11:22:44 AM »

nice,thank you for the code,here's the vs2010 version with of0062
http://rapidshare.com/files/436647538/mapping.rar
seems i can't attach files in the forum  :(
Logged
hv_francesco

Posts: 104

Gravatar


Re: little projection-mapping tool
« Reply #3 on: December 13, 2010, 12:53:46 PM »

Quote from: "liquid"
nice,thank you for the code,here's the vs2010 version with of0062
http://rapidshare.com/files/436647538/mapping.rar
seems i can't attach files in the forum  :(

cool, thanks.
I would like to integrate this in main source tree in git repo, but I'm not sure about the best way to do it as I don't know anything about developing on windows.
can you give me any hint?
best, francesco
Logged

______________________________________
HVA - hermanitos verdes architetti
modena - italy
www.hv-a.com
httpdospuntos

Posts: 1

Gravatar


Re: little projection-mapping tool
« Reply #4 on: December 28, 2010, 05:49:26 AM »

hi, thank you for this cool tool for drawing the world with our computers.  We have a small problem with these two methods from testApp.cpp:

gui.addComboBox("image bg", quads.bgImg, imgFiles.size(), images);
gui.addComboBox("video bg", quads.bgVideo, videoFiles.size(), videos);

we've compiled it under OSX and latest oF verion from github.
when compiled without those methods commented, the application freezes.
when compiled with those methods commented, the application runs fine but we can't load video nor images to the quads.

is there anyway around this other than invoking textures separatly in the draw method from quads.h?

thank you in advance!
Logged
hv_francesco

Posts: 104

Gravatar


Re: little projection-mapping tool
« Reply #5 on: December 30, 2010, 02:50:55 PM »

Quote from: "httpdospuntos"
hi, thank you for this cool tool for drawing the world with our computers.  We have a small problem with these two methods from testApp.cpp:

gui.addComboBox("image bg", quads.bgImg, imgFiles.size(), images);
gui.addComboBox("video bg", quads.bgVideo, videoFiles.size(), videos);

we've compiled it under OSX and latest oF verion from github.
when compiled without those methods commented, the application freezes.
when compiled with those methods commented, the application runs fine but we can't load video nor images to the quads.

is there anyway around this other than invoking textures separatly in the draw method from quads.h?

thank you in advance!

Unfortunately I have not much experience with openframeworks, and besides I just can try it out on a linux system. Maybe it has something to do with paths on different systems? I'm afraid my approach to dir listing actually is a bit dirty. In the slideshow stuff I've added a sort of minimal filtering for the directory listing, sort of:

if (slideshowName != "." && slideshowName != "..")

does the slideshow feature works for you? if it is the case we could try to see if that is the problem.
At present I'm traveling through south-america and will not be able to access my computer for a couple of weeks, but I will try to investigate this as soon as I get back.
Maybe someone else with access to an OSX system could try it out and see if we can understand better what's going wrong?
hope I can be more helpful soon.
best, francesco
Logged

______________________________________
HVA - hermanitos verdes architetti
modena - italy
www.hv-a.com
circassia

Posts: 101

Gravatar


Re: little projection-mapping tool
« Reply #6 on: January 05, 2011, 12:37:17 AM »

Hi Francesco,

really interesting project. how about projecting with a beamer onto something? Did you made any testings? that would be nice. If you could create textures on the fly.
Logged
hv_francesco

Posts: 104

Gravatar


Re: little projection-mapping tool
« Reply #7 on: January 18, 2011, 03:35:20 AM »

Added basic layers-style management for quads.
before quads were just rendered in creation order, higher numbers quads on top.
Now you can re-arrange the order of quads by raising/lowering the active quad in layers pile using '+' and '-' keys.
Up to date code is in git repository.
(the layers implementation is, I'm afraid, a bit messy. my coding skills are showing their limits)
Logged

______________________________________
HVA - hermanitos verdes architetti
modena - italy
www.hv-a.com
hv_francesco

Posts: 104

Gravatar


Re: little projection-mapping tool
« Reply #8 on: January 21, 2011, 05:32:22 PM »

added a helper-grid in setup mode to active quad, for better alignment of quads to real world objects
Logged

______________________________________
HVA - hermanitos verdes architetti
modena - italy
www.hv-a.com
hv_francesco

Posts: 104

Gravatar


Re: little projection-mapping tool
« Reply #9 on: January 22, 2011, 11:04:15 AM »

Quote from: "httpdospuntos"

gui.addComboBox("image bg", quads.bgImg, imgFiles.size(), images);
gui.addComboBox("video bg", quads.bgVideo, videoFiles.size(), videos);

we've compiled it under OSX and latest oF verion from github.
when compiled without those methods commented, the application freezes.
when compiled with those methods commented, the application runs fine but we can't load video nor images to the quads.

hi httpdospuntos, could you try the last version from git repo and see if the problem still exists?
Logged

______________________________________
HVA - hermanitos verdes architetti
modena - italy
www.hv-a.com
hv_francesco

Posts: 104

Gravatar


issues with some NVIDIA driver on Ubuntu Lucid
« Reply #10 on: February 21, 2011, 12:50:15 PM »

Having upgraded my graphic card, I discovered that upgrading NVIDIA drivers on my Ubuntu Lucid system strangely triggered some problem with libstdc++ and strings that was leading to a segfault of my projection mapping tool.
It is very likely due to some dumb thing in my code that I wasn't able to debug at all, but downgrading to previous Nvidia driver solved the problem.

newest driver was
270.18-0ubuntu1~lucid~xup1
and came from this ppa
ppa:ubuntu-x-swat/x-updates

reverting to 195.36.15-0ubuntu2 apparently fixed the problem

I'm reporting this just to see if there's someone else that experienced similar problems, and I'm curious to see if there's someone that has tested successfully the code on more recent Ubuntu systems (e.g. 10.10 aka Maverick).

best, francesco
Logged

______________________________________
HVA - hermanitos verdes architetti
modena - italy
www.hv-a.com
hv_francesco

Posts: 104

Gravatar


Re: little projection-mapping tool
« Reply #11 on: February 26, 2011, 10:35:05 AM »

added green-screen (chromakey) feature to both video and live-cam content.
screen color is configurable.
This implementation is rather CPU intensive on large source videos, and if you're greenscreening many large stuff at the same time it could cause slowdowns, but it's ok in normal conditions.

btw.: if anyone has tips and examples on how to do greenscreening through OpenGL magic or in a more efficient way  it would be nice.
Logged

______________________________________
HVA - hermanitos verdes architetti
modena - italy
www.hv-a.com
hv_francesco

Posts: 104

Gravatar


Re: little projection-mapping tool
« Reply #12 on: March 14, 2011, 11:07:57 AM »

experimenting with double-window version, keeping GUI in its own window thanks to ofxFenster addon

http://bit.ly/dQnJP9[attachment=0:1r3428bd]Schermata.png[/attachment:1r3428bd]


* Schermata.png (182.79 KB, 800x500 - viewed 985 times.)
Logged

______________________________________
HVA - hermanitos verdes architetti
modena - italy
www.hv-a.com
zuppaman
Belgium

Posts: 39

Gravatar


WWW
Re: little projection-mapping tool
« Reply #13 on: May 05, 2011, 04:18:03 PM »

Hey Francesco,


Thx for sharing the code for this great piece of software.
Just did a Git Fork and added a XCode project for OSX
https://github.com/lab101/ProjectionMapping

Also changed the search path for assets
Code:
string imgDir = ofToDataPath("img",true);

Now it's working great on my Mac.

Thx
Logged
hv_francesco

Posts: 104

Gravatar


Re: little projection-mapping tool
« Reply #14 on: May 06, 2011, 08:35:45 PM »

Thx for sharing the code for this great piece of software.
Just did a Git Fork and added a XCode project for OSX
https://github.com/lab101/ProjectionMapping

Also changed the search path for assets
Code:
string imgDir = ofToDataPath("img",true);

Now it's working great on my Mac.

Thx

That's great! I had no acces to an apple system, I'm really glad it worked. thanks for your contribution!
francesco
Logged

______________________________________
HVA - hermanitos verdes architetti
modena - italy
www.hv-a.com
Pages: [1] 2 3 ... 6
 
Jump to:  

Powered by SMF 1.1.15 | SMF © 2011, Simple Machines

viagra priser