GMU:Tutorials/Visual Interaction: Difference between revisions

From Medien Wiki
Line 31: Line 31:
3.Press "M" key to make a message node and type '''"/test $1"''' and connect with the number box.<br>
3.Press "M" key to make a message node and type '''"/test $1"''' and connect with the number box.<br>
"/test" is an identifier of the osc message. You can rename whatever you want, but you should pay attention '''not to forget "/"''' before the name of identifier.<br>
"/test" is an identifier of the osc message. You can rename whatever you want, but you should pay attention '''not to forget "/"''' before the name of identifier.<br>
Also, "$1" is required to import external value.
Also, '''"$1"''' is required to import external value.
<br>
<br>
<br>
<br>
Line 38: Line 38:
<br>
<br>
5.Press "N" and type '''"udpreceive 127.0.0.1 2222"'''.<br>
5.Press "N" and type '''"udpreceive 127.0.0.1 2222"'''.<br>
"127.0.0.1" is a IP address, which is used to test this setup internally.<br>
'''"127.0.0.1"''' is a IP address, which is used to test this setup '''internally'''.<br>
If you try this tutorial with 2 computers, check the IP address of a computer for Unity project.<br>
If you try this tutorial with 2 computers, '''check the IP address of a computer for Unity project.'''<br>
"2222" is a name of port. You can define any integer, but make sure that you are using the same port number for Max patch and Unity.
"2222" is a name of port. You can define any integer, but '''make sure that you are using the same port number for Max patch and Unity'''.
<br>
<br>
<br>
<br>

Revision as of 16:49, 29 July 2016

Controlling Unity with Max/Msp


In this tutorial, you will get the basic ideas of interactive connection between Unity and Max/Msp, using open sound control (OSC).
You will try to control noise deformation intensity of a mesh object as an example.

There are some materials you need to test this tutorial.
Please download and install following plugins before you start;

-OSC plugins for Unity
Media:OSC_Plugins_for_Unity.zip
-OSC plugins for Max/Msp
http://cnmat.berkeley.edu/patch/4029
-Perlin noise plugin for Unity
Media:PerlinNoise.zip

Make a OSC bridge on Max/Msp

In this section, you will make a OSC sender part on Max/Msp.

1.Open a new patcher from top menu bar. You can also make a new patcher with shortcuts "command" + "K".

2.Press "F" key to make a number box for float. This will be the input of the noise contoroller.

3.Press "M" key to make a message node and type "/test $1" and connect with the number box.
"/test" is an identifier of the osc message. You can rename whatever you want, but you should pay attention not to forget "/" before the name of identifier.
Also, "$1" is required to import external value.

4.Press "B" to make a bang node and press "N" and type "OpenSoundControl".

5.Press "N" and type "udpreceive 127.0.0.1 2222".
"127.0.0.1" is a IP address, which is used to test this setup internally.
If you try this tutorial with 2 computers, check the IP address of a computer for Unity project.
"2222" is a name of port. You can define any integer, but make sure that you are using the same port number for Max patch and Unity.

6.Connect nodes together like the picture below;

MaxMsp 01 06.png


Make a OSC bridge on Unity

In this section, you will make OSC receiver part on Unity.

Write a noise animation script on Unity

In this section, you will develop the object which you animate with OSC signals.


References

You can downloaded finished sample project files from this link;