Bureaucrats, emailconfirmed, Administrators
5,203
edits
No edit summary |
No edit summary |
||
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
!! See functioning Processing [[:File:skeletonTrackingWithCaptury.pde|sketch]] provided by Felix | |||
== Introduction == | == Introduction == | ||
Processing is usually used for the electronic arts, new media art and visual design.<br> | Processing is usually used for the electronic arts, new media art and visual design.<br> | ||
Line 135: | Line 138: | ||
Since we can successfully use the data from the capture, it can be creatively to use the position of the object to control whatever you want in Processing! <br> | Since we can successfully use the data from the capture, it can be creatively to use the position of the object to control whatever you want in Processing! <br> | ||
The following is an example of using position values to play or reverse the video and change the play speed of the video.<br> | The following is an example of using position values to play or reverse the video and change the play speed of the video.<br> | ||
This video is about a 3D Chinese Knot tied from loose to tight. The 3D animation is made by 3DS MAX.<br> | |||
<br> | <br> | ||
'''PART 01 – Play a video in Processing''' <br> | '''PART 01 – Play a video in Processing''' <br> | ||
Line 169: | Line 173: | ||
*First thing to know is about the relationship between coordinate axis in the Captury and the Performance Platform. Here is the diagram: | *First thing to know is about the relationship between coordinate axis in the Captury and the Performance Platform. Here is the diagram: | ||
[[Image:CapturyAxis.png|thumb|left|Coordinate Axis of the Performance Platform]] | [[Image:CapturyAxis.png|thumb|left|Coordinate Axis of the Performance Platform]] | ||
[[Image:CapturyAxis2.png|thumb|left|Diagram]] | |||
<br style="clear:both"> | <br style="clear:both"> | ||
*Using position x as the condition. If user stand | |||
*Using position y as the condition. If user stand close to the | *Using position x as the condition. If user stand in the center of the platform, the speed will be slowest. The farther away from the center user stand, the faster the movie play. | ||
*Using position y as the condition. If user stand at the side close to the Video Wall, the movie will play as usual, if else the movie will reverse. | |||
<source lang="Java" line start= "4"> | <source lang="Java" line start= "4"> | ||
int play; //Declare a value to judge play or reverse the video | int play; //Declare a value to judge play or reverse the video | ||
Line 192: | Line 198: | ||
*Pay attention that if the movie play to the end, it must be reversed. And if the movie reverse to the beginning, it must play as usual. | *Pay attention that if the movie play to the end, it must be reversed. And if the movie reverse to the beginning, it must play as usual. | ||
<source lang="Java" line start= "26"> | <source lang="Java" line start= "26"> | ||
if( | if(x < -50 && getFrame() < (getLength() - 1)){ | ||
play = 1; | play = 1; | ||
myMovie.play(); | myMovie.play(); | ||
Line 201: | Line 207: | ||
} | } | ||
float newSpeed = map(abs(y)/10, 0, 150, 0*play, 2*play); //abs() to have absolute position value | |||
float newSpeed = map( | |||
myMovie.speed(newSpeed); | myMovie.speed(newSpeed); | ||
</source> | </source> | ||
== Let's Enjoy The Example File== | == Let's Enjoy The Example File == | ||
Thanks for your attention to this tutorial, and feel free to debug and improve it. | Thanks for your attention to this tutorial, and feel free to debug and improve it. | ||
*Here is the complete code for this tutorial uploading on GitHub: [https://github.com/Yunbaby1028/WoolsWorld.git Complete Code of Wool's World]<br> | *Here is the complete code for this tutorial uploading on GitHub: [https://github.com/Yunbaby1028/WoolsWorld.git Complete Code of Wool's World]<br> | ||
*Example File including the movie is shared on Dropbox: [https://www.dropbox.com/sh/f8jcuw03nekoelz/AABeKONtJAI1vfNK4tWSZ3dTa?dl=0 Example File of Wool's World] | *Example File including the movie is shared on Dropbox: [https://www.dropbox.com/sh/f8jcuw03nekoelz/AABeKONtJAI1vfNK4tWSZ3dTa?dl=0 Example File of Wool's World] | ||
== Demonstration == | |||
{{#ev:youtube|https://www.youtube.com/watch?v=dufgDEGYieY|1000|left|Demonstration Video of Controlling the Video in Processing with Captury|frame}} | |||
[https://www.youtube.com/watch?v=dufgDEGYieY Demonstration Video of Controlling the Video in Processing with Captury] |