Top Banner
Projection Mapping in Processing: 1 Day Evan Raskob [email protected] Becky Stewart [email protected] Adam Stark [email protected] Openlab Workshops
49

Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Apr 11, 2019

Download

Documents

doankhue
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Projection Mapping in Processing: 1 DayEvan Raskob

[email protected]

Becky [email protected]

Adam [email protected]

OpenlabWorkshops

Page 2: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

http://learning.codasign.com

Click on Projection Mapping in Processinghttp://learning.codasign.com/index.php?title=Projection_Mapping_in_Processing

Contains short tutorials and links to other supporting material like code and slides

Page 3: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Helpful links to software used in this workshop:

Processinghttp://processing.org

SurfaceMapper (open souce, bezier surfaces, movie support)http://www.ixagon.se/surfacemapper/

Code:http://github.com/pixelpusher/P5ProjectionMapping

Other libraries & add-ons:

3D vs 2D? Project onto 3D models using 3D models as a guide? (requires all sorts of math). This could be done using saitoobjloader: http://code.google.com/p/saitoobjloader/

Quase-Cinema Feijoada VJ softwarehttps://github.com/AlexandreRangel/QuaseCinemaFeijoada

The Software, etc.

Page 4: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Projection Mappingin the wild...

Page 5: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Amon Tobin ISAM: http://vimeo.com/28840857

Page 6: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

In the Wild:http://www.bbc.co.uk/news/technology-18356814

Page 7: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Why?

● Visual perceptions are Approximations of Reality

● Empirical evidence from our experience● Statistical, pragmatic, learned over time

We can be fooled...

Page 8: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Forced Perspective

● Ames Rooms (Honi Effect)

Page 9: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

it defies be-leaf

Page 10: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Wood you believe this moth??

Page 11: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Practical Perspective Problems

http://marcinignac.com/blog/projection-mapping-in-3d/

Page 12: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Perspective Correction

http://marcinignac.com/blog/projection-mapping-in-3d/

Page 13: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

How do we create a mapped projection?

1. The scene(s) being projected● Draw shapes● Import and manipulate images● Import and manipulate videos

2. The surface(s) being projected on● Mathematical transformations to adjust

perspective● We'll use code contributed by others to do

this (today SurfaceMapper)

Page 14: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Why Use Processing?

● Free / Open Source● Extensible - infinitely programmable● Interactive● Reactive / realtime / generative - things you

can't do with video:○ http://www.flickr.com/photos/davebollinger/○ http://hemesh.wblut.com/ (this image)

Page 15: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Why NOT Use Processing?

● DIY - not a finished product!● Rely heavily on pre-rendered media like

videos● Need to create your own visual editing tools

○ 3D texture mapping will blow your mind...

Page 16: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Basics of Processing

Page 17: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Drawing Shapes

● rect, ellipse, triangle● colors● stroke

Page 18: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Instead of rect(x,y, w,h )

beginShape();

vertex(10, 10); vertex(280, 20); vertex(370, 300); vertex(220, 360);// any other vertices you want...

endShape();

Page 19: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Exercise 1:Draw a scene with shapes and colors.

Page 21: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Exercise 2:Import and manipulate an image.

Page 22: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Making Decisions in Code

Page 23: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Bouncing BallAnimating a Scene

http://learning.codasign.com/index.php?title=Animating_a_Shape_in_Processing

Disco Ballhttp://learning.codasign.com/index.php?title=Animating_a_Coloured_Shape_in_Processing

Page 24: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Exercise 3:Animate a shape or image.

Page 25: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Movies via GSVideo

1. Install GSVideo (and GLGraphics)2. Using GSVideo to play & control movies

Page 26: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

LUNCH!grab a pint or whatever floats your projector

Page 27: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Getting Ready to Map:Applying Gestalt laws and neurological tricks

Page 28: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.
Page 30: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Which side is brighter?

Page 31: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Actual brightness, graphed:

Page 32: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Proof!

Page 33: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Chiaroscuro: light/dark

Page 34: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Behold: The Magic Goblet

Page 35: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Intermediate spaces

Page 36: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.
Page 37: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Lighting direction

Page 38: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Gestalt Laws

● Intermediate spaces● Law of Proximity

● Narrow and far● Invisible shapes

● The smooth curve: ● Closure (of shapes)

● Reversing patterns● Symmetry (balance) in form across the image

● Continuation, Unity in the whole● Common Fate (common movements)

Page 39: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Using the SurfaceMapper library

Now, apply it:

Page 40: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Basics of SurfaceMapper

● Included examples● Building our own sketch from scratch

Page 41: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

SurfaceMapper Projection Mapper

1. How to get (in github code)2. required libs3. overview of features

a. change textures, load, save, visually edit shapes, show mapped view

4. How to modify for our own uses

Page 42: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Exercise 4:Map an image to a shape using SurfaceMapper

Page 43: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Demo + Exercise 5:Create a generative sketch and map it to a shape using SurfaceMapper

Page 44: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Interesting Case Studies

Page 45: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.
Page 46: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.
Page 47: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

Omicron (AntiVJ)

http://vimeo.com/41486619

Page 48: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

How?

● 3D model○ Texture mapping

● Multiple projectors● Edge-blending, masking

Page 49: Projection Mapping in Processing: 1 Day - TU/edesis.id.tue.nl/.../2013/02/Projection-Mapping-In-Processing-1-Day.pdf · Processing: 1 Day Evan Raskob ... Lighting direction. ... b.

1. Overview - Tools (MadMapper, etc) - why use Processing?2. Illusions - quick version3. Show website, code repository4. Draw stuff - shapes, colors5. Adding and drawing images6. Installing libraries - GSVideo, GLGraphics

a. do video7. LUNCH: 1 - 2pm (Brewery?)8. Making decisions in code ( if / else, mousePressed, etc )9. time based animations?

a. if / else and counterb. millis() and smooth etc.

10. Install other necessary libraries - GLGraphics, SurfaceMapper11. Demo of libraries in action

a. irregular shapes, etc.b. 4 point gradient contrast effect

12. Play with library on a live project (1 hr)13. Break14. Case Study - multiprojectors, edge blending, etc.

a. AntiVJ etcb. Marshmellow Laser Feast

15. More supervised project work16. Done!