Browse Source

Merge remote-tracking branch 'origin/master'

master
c-mendoza 8 years ago
parent
commit
cff175f54e
  1. 68
      README.md
  2. 6
      src/Application/Application.cpp
  3. 42
      src/Application/Modes/ProjectionMappingMode.cpp

68
README.md

@ -3,21 +3,24 @@
This should be selectable as an additional FBO source in PiMapper, looping all images in the /media/internal/images/* folder This should be selectable as an additional FBO source in PiMapper, looping all images in the /media/internal/images/* folder
Would be cool to adjust the speed with a simple flag, simple opacity transition welcome, but not necessary. Refresh state, so it checks if there are new images added during playback and play them as well. make all images fullscreen. Would be cool to adjust the speed with a simple flag, simple opacity transition welcome, but not necessary. Refresh state, so it checks if there are new images added during playback and play them as well. make all images fullscreen.
(if its not possible to handle various sizes as one, i will make an imagemagick script to convert all to 1920x1080) (if its not possible to handle various sizes as one, i will make an imagemagick script to convert all to 1920x1080)
### 2. Play all videos from a folder ### 2. Circular shapes for mapping (there are only square and tringle shapes so far)
Circular mapping shape (if possible with movable center distorsion)
### 3. Bezier handles
Adding bezier handles to masks for better aligment: https://github.com/TsubokuLab/ofxBezierWarpManager
### 4. Play all videos from a folder
This should be a an additional FBO source in PiMapper, looping all videos in /media/internal/video/* This should be a an additional FBO source in PiMapper, looping all videos in /media/internal/video/*
### 3. Circular shapes for mapping (there are only square and tringle shapes so far) ### 5. Grid Warp (meshing of square shapes)
Circualr mapping shape check out this http://www.hv-a.com/lpmt/sssm.pdf on page: 10
### 4. Grid Warp (meshing of square shapes)
https://forum.openframeworks.cc/t/grid-mesh-warping/12883 https://forum.openframeworks.cc/t/grid-mesh-warping/12883
### 5. SoftEdge ### 6. SoftEdge
Image overlay to making adges transparent, could be achieved with overlaing a png with a black gradient. Image overlay to making adges transparent, could be achieved with overlaing a png with a black gradient.
Finalize the mapping converter: https://github.com/magdesign/mapping-converter
This will be an opensource project and freely available for everyone. This will be an opensource project and freely available for everyone.
Targeting OF_0.9.x on RaspberryPi. Targeting OF_0.9.x on RaspberryPi.
Each function will be rewarded to the coder from a pot sponsered by pocketvj.com. Each function will be rewarded to the coder from a pot sponsered by pocketvj.com.
The keybindings will be changed to ones matching to PocketVJ CP and there will be an audio branch added.
# ofxPiMapper # ofxPiMapper
@ -47,15 +50,6 @@ You can use the example application of the addon for projection mapping projects
``` ```
## Compiling on Linux
There might be issues with compiling because `ofxOMXPlayer` and `ofxRPiCameraVideoGrabber` addons do not exist on Linux and also other non-RPi platforms. To avoid the issues, do the following.
1. Open `example/addons.make` and remove ofxOMXPlayer line.
2. Open `example-camera/addons.make` and remove ofxRPiCameraVideoGrabber line.
3. Compile one or both examples by using make.
## Problems with Audio ## Problems with Audio
If you are having problems with audio playback, here are two steps for you. Before you do these, make sure audio of your video file works. If you are having problems with audio playback, here are two steps for you. Before you do these, make sure audio of your video file works.
@ -184,33 +178,41 @@ Key | Function
2 | Texture editing mode 2 | Texture editing mode
3 | Projection mapping mode, use this to select a surface first 3 | Projection mapping mode, use this to select a surface first
4 | Source selection mode 4 | Source selection mode
i | Show info c | Show info
t | Add triangle surface t | Add triangle surface
q | Add quad surface q | Add quad surface
x | Add hexagon surface
g | Add grid warp surface g | Add grid warp surface
d | duplicate selected surface a | duplicate selected surface
\+ | Scale surface up o | Scale surface up
\- | Scale surface down i | Scale surface down
p | toggle perspective warping (quad surfaces only) p | toggle perspective warping (quad surfaces only)
] | add columns to grid surface (grid warp surfaces only) v | add columns to grid surface (grid warp surfaces only)
[ | remove columns from grid surface (grid warp surfaces only) b | remove columns from grid surface (grid warp surfaces only)
} | add rows to grid surface (grid warp surfaces only) n | add rows to grid surface (grid warp surfaces only)
{ | remove rows from grid surface (grid warp surfaces only) m | remove rows from grid surface (grid warp surfaces only)
. | select next surface (projection mapping mode only) . | select next surface (projection mapping mode only)
, | select previous surface (projection mapping mode only) , | select previous surface (projection mapping mode only)
\> | select next vertex k | select next vertex
\< | select previous vertex l | select previous vertex
0 | Move selected surface one layer up h | Move selected surface one layer up
9 | Move selected surface one layer down j | Move selected surface one layer down
s | Save composition s | Save composition
l | Hide/show layer panel y | Hide/show layer panel
z | Undo z | Undo
rbt | Reboot (Raspberry Pi only) rbt | Reboot (Raspberry Pi only)
sdn | Shutdown (Raspberry Pi only) sdn | Shutdown (Raspberry Pi only)
new | Clear composition (remove all surfaces) new | Clear composition (remove all surfaces)
ext | Exit application and return to command line ext | Exit application and return to command line
BACKSPACE ('\' via SSH) | Delete surface. d | Delete surface.
SPACE | Toggle pause for video sources (texture and projection mapping modes) w | Toggle pause for video sources (texture and projection mapping modes)
TAB | Select next source (no need to use the source selection interface) 5 | Select next source (no need to use the source selection interface)
Arrow keys | Move selection. If no surface is selected in the projection mapping mode, all surfaces are moved. 8 | Move selection Up
9 | Move selection Down
7 | Move selection Left
0 | Move selection Right
If no surface is selected in the projection mapping mode, all surfaces are moved.
Dont know if this works already:
\/ | Toggle 1px/10px steps for keyboard moves on Raspberry Pi \/ | Toggle 1px/10px steps for keyboard moves on Raspberry Pi

6
src/Application/Application.cpp

@ -121,7 +121,7 @@ void Application::onKeyPressed(ofKeyEventArgs & args){
setSourceMode(); setSourceMode();
break; break;
case 'i': case 'c':
toggleInfo(); toggleInfo();
break; break;
@ -132,8 +132,8 @@ void Application::onKeyPressed(ofKeyEventArgs & args){
case 'z': case 'z':
undo(); undo();
break; break;
case 'n': case 'f':
setNextPreset(); setNextPreset();
break; break;

42
src/Application/Modes/ProjectionMappingMode.cpp

@ -64,11 +64,11 @@ void ProjectionMappingMode::onKeyPressed(Application * app, ofKeyEventArgs & arg
app->createSurface(SurfaceType::GRID_WARP_SURFACE); app->createSurface(SurfaceType::GRID_WARP_SURFACE);
break; break;
case 'h': case 'x':
app->createSurface(SurfaceType::HEXAGON_SURFACE); app->createSurface(SurfaceType::HEXAGON_SURFACE);
break; break;
case OF_KEY_BACKSPACE: case 'd':
app->eraseSurface(app->getSurfaceManager()->getSelectedSurfaceIndex()); app->eraseSurface(app->getSurfaceManager()->getSelectedSurfaceIndex());
break; break;
@ -76,19 +76,19 @@ void ProjectionMappingMode::onKeyPressed(Application * app, ofKeyEventArgs & arg
app->togglePerspective(); app->togglePerspective();
break; break;
case '}': case 'n':
app->addGridRow(); app->addGridRow();
break; break;
case '{': case 'm':
app->removeGridRow(); app->removeGridRow();
break; break;
case ']': case 'v':
app->addGridColumn(); app->addGridColumn();
break; break;
case '[': case 'b':
app->removeGridColumn(); app->removeGridColumn();
break; break;
@ -100,15 +100,15 @@ void ProjectionMappingMode::onKeyPressed(Application * app, ofKeyEventArgs & arg
app->selectPrevSurface(); app->selectPrevSurface();
break; break;
case '>': case 'k':
app->selectNextVertex(); app->selectNextVertex();
break; break;
case '<': case 'l':
app->selectPrevVertex(); app->selectPrevVertex();
break; break;
case OF_KEY_UP: case '8':
if(app->isShiftKeyDown()){ if(app->isShiftKeyDown()){
app->moveSelection(ofVec2f(0.0f, -10.0f)); app->moveSelection(ofVec2f(0.0f, -10.0f));
}else{ }else{
@ -116,7 +116,7 @@ void ProjectionMappingMode::onKeyPressed(Application * app, ofKeyEventArgs & arg
} }
break; break;
case OF_KEY_DOWN: case '9':
if(app->isShiftKeyDown()){ if(app->isShiftKeyDown()){
app->moveSelection(ofVec2f(0.0f, 10.0f)); app->moveSelection(ofVec2f(0.0f, 10.0f));
}else{ }else{
@ -124,7 +124,7 @@ void ProjectionMappingMode::onKeyPressed(Application * app, ofKeyEventArgs & arg
} }
break; break;
case OF_KEY_LEFT: case '7':
if(app->isShiftKeyDown()){ if(app->isShiftKeyDown()){
app->moveSelection(ofVec2f(-10.0f, 0.0f)); app->moveSelection(ofVec2f(-10.0f, 0.0f));
}else{ }else{
@ -132,7 +132,7 @@ void ProjectionMappingMode::onKeyPressed(Application * app, ofKeyEventArgs & arg
} }
break; break;
case OF_KEY_RIGHT: case '0':
if(app->isShiftKeyDown()){ if(app->isShiftKeyDown()){
app->moveSelection(ofVec2f(10.0f, 0.0f)); app->moveSelection(ofVec2f(10.0f, 0.0f));
}else{ }else{
@ -140,35 +140,35 @@ void ProjectionMappingMode::onKeyPressed(Application * app, ofKeyEventArgs & arg
} }
break; break;
case ' ': case 'w':
app->togglePause(); app->togglePause();
break; break;
case OF_KEY_TAB: case '5':
app->setNextSource(); app->setNextSource();
break; break;
case 'd': case 'a':
app->duplicateSurface(); app->duplicateSurface();
break; break;
case '0': // Move selected surface up the layer stack case 'h': // Move selected surface up the layer stack
app->moveLayerUp(); app->moveLayerUp();
break; break;
case '9': // Move selected surface down the layer stack case 'j': // Move selected surface down the layer stack
app->moveLayerDown(); app->moveLayerDown();
break; break;
case '+': // Scale surface up case 'o': // Scale surface up
app->scaleUp(); app->scaleUp();
break; break;
case '-': // Scale surface down case 'i': // Scale surface down
app->scaleDown(); app->scaleDown();
break; break;
case 'l': case 'y':
_bDrawLayerPanel = !_bDrawLayerPanel; _bDrawLayerPanel = !_bDrawLayerPanel;
break; break;
@ -295,4 +295,4 @@ void ProjectionMappingMode::onGuiEvent(Application * app, GuiEvent & e){
} }
} // namespace piMapper } // namespace piMapper
} // namespace ofx } // namespace ofx

Loading…
Cancel
Save