[ANN] myu Max-Unity Interoperability Toolkit v.1.0 Released

It is my great pleasure to announce immediate availability of the μ [myu] Max-Unity Interoperability Toolkit version 1.0. μ [myu] is designed to simplify communication between the Max/MSP/Jitter http://www.cycling74.com and Unity3D http://www.unity3d.com rapid prototyping environments. Utilizing the TCP network packets, μ [myu] allows for easy bi-directional control of Unity3D and Max/MSP/Jitter assets, as well as importing of dynamic Jitter textures into Unity3D scene. Apart from the Jitter-specific texture communication protocol, μ [myu] relies upon the netsend/netreceive framework, thus making it also compatible with Pure-Data http://www.pure-data.info.

Max/Msp/Jitter and Unity3D logos are trademarks of their respective owners.

WHY μ?
Max/MSP/Jitter and Pure-Data offer unprecedented flexibility in digital signal processing, particularly audio, as well as easy integration of external controllers and sensors, video, and 3D assets, while Unity3D is an advanced scalable and optimized 3D gaming engine with integrated intuitive scene editor and physics engine. By coupling their strengths μ [myu] aims to expand their rapid prototyping potential with minimal integration overhead.

μ [myu] was developed at DISIS http://disis.music.vt.edu and is available for download from the DISIS website Redirecting...

For a YouTube tech demo please visit http://www.youtube.com/watch?v=137huPA9sto
A high-resolution video available at Redirecting...

COPYRIGHT
μ [myu] copyright DISIS 2008.

This program is free software: you can redistribute it and/or modify it under the terms of the version 3 of the GNU General Public License as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

For additional info on the GNU General Public License see Licenses - GNU Project - Free Software Foundation

Questions, Comments, and PR Contacts: ico@vt.edu

BRAVISSIMO !!! You are opening us wiiiiiiide windows. Your demo is really thrilling. Just when I thought I had finished my working day… now I will think all the evening long about some new apps based on your toolkit ! :smile: :smile: :smile:

[edit ] …thanks a lot !

[edit #2] …and it works perfectly ! I have just reproduced your entire demo, including the realtime webcam… added a “drag rigidbody” script to the camera, dimmed the cube’s mass, set it to a bouncy physical material, added 2 extra walls to the room… and now I can move the cube with the realtime webcam texture, throw it everywhere… like we say in French, “c’est énorme” !

Thank you very much for your kind words! Very glad to hear you found myu useful. :slight_smile:

Best wishes,

Ico

You’re my new hero man, this looks absolutely fantastic! Finally, my 2 favorite applications combined. Communication between Max and Unity has been done before, but this is just awesome.

Now I just have to find the time to actually roll up my sleeves and dive in… the weekend can’t get here fast enough :wink:

Ethan

[Edit] Link to other Max/Unity thread on the forum:
http://forum.unity3d.com/viewtopic.php?t=5291

OK, today I made further successful experiments with this great tool : simply by lowering Jitter’s webcam video texture size (down to 160 x 160 or 128 x 128) the live video feed can be sent over a local network (802.11n here) to another machine running the Unity app. This allows the cube’s texture to update in realtime…

So, thanks to this toolkit, with a few clicks I could achieve my very first Unity “videochat” in full 3D ! :smile:

Of course, real videochat will probably need image and audio compression/decompression + some other refinements to be useable on anything else than local network or ultra-fast Internet connection, but I guess we’re approaching the Grail…

Many thanks to all for your words of encouragement! They are much appreciated.

Regarding networked textures, we tested textures on a Gigabit LAN for up to 1024x1024 without a problem (although at the expense of considerable CPU overhead due to heavy TCP traffic). In that respect the WiFi is your bottleneck due to its limited bandwidth when compared to wired LAN.

There are also other options to explore in this respect, namely compressed video streams and the like. Lots of opportunities as they say :wink:

We are currently working on an implementation of shared memory that would circumvent the TCP stack entirely (hence ostensibly lowering the CPU overhead), as well as Unity3D->Jitter texture importing.

Best wishes,

Ico

This is one of the coolest things ever. Congrats!

that is amazing! well done

I only used Max for a Digital Music Composition course but I can definitely see how useful this interoperability would be to some folks. The tech demo is absolutely mind-blowing. Great job.

sweet . that will help give me new tools to build into my art installations beyond what Ive already accomplished with Ma/msp+Unity!
thanks!

Here is an example of what Ive got going on between Max and Unity without aforementioned interoperability toolkit:

http://forum.unity3d.com/viewtopic.php?p=130676#130676

Once again, many thanks all for your interest and kind words!

Finally got around to posting another video, this time showcasing [myu] in a real-world setting.

Part of the Revo:oveR collection, “elemental” is an interactive communal soundscape installation that premiered last November (2008) in Roanoke, VA (USA) as part of the grand opening of the Taubman Museum of Art. The exhibit ran non-stop for approximately 5 months and relied upon a bi-directional communication between Max/MSP/Jitter and Unity3d.

For those interested, a brief online preview of the exhibit can be found here: http://www.youtube.com/watch?v=PA-9BOgc1gk

Best wishes,

Ico

Would be a full port of the project to PureData, including the video part, feasible ?

It should be doable, although it may require a custom Pd object for texture import/export functionality (should the netsend/netreceive prove to be inadequate).

Hope this helps!

Ico

Thank you, will investigate :slight_smile:

Thank you thank you thank you for sharing!! The jitter texture plug-in is absolutely lovely! Very easy to use and surprisingly fast. I hope it will attract more people working with live visuals for music to the community.

=D

~ce

Thank you all very much for your kind words!

Not to go off-topic here, however in the light of the recent discussion, particularly Pd-Unity3D interoperability, if I were granted a magical opportunity to request one feature from the Unity3D devs at this point in time, then it would have to be the implementation of the Linux-based Web player. This would indeed make things a lot easier from the Pd/Web side of things, particularly if Unity3D devs have interest in entering the lucrative Flash market (I know, I know–this topic has been touched upon many times before, so I’ll just go ahead and shut up now :-)…

First of all thanl you again for sharing this great kit.
I have e-mailed Ico with the problems I had earlier and he has been amazingly helpful, the kit works like magic :slight_smile:

(I am the guy who is doing his graduation project with this;) )

pd woould be great, since my max/msp academic license will be over in 3 months :smile:

I have found this thread to be very helpful, among many others as I am also trying to get Max/MSP to work with Unity. After much trial and error, I spent about a week getting everything to finally work and would like to share it so it might help others.

I decided not to go the network route, mainly because I have Max 5 and the net objects seem to crash often. I also need to set this up so it runs easily on any computer with little or no set up. The networking always seems to be picky, or at least I don’t understand how to set it up to be fool-proof. The method I chose is based on the Wii post here http://forum.unity3d.com/viewtopic.php?t=4247

Basically, my Max patch writes a text file every time it detects a change. Unity reads this file constantly and will move the object in Unity that has this script attached. I only need the movement on the x-axis so I got rid of everything else I didn’t need. Here’s the code for Unity (it should be dragged onto the object to be moved):

import System; 
import System.IO; 

var yPosition = 0; 
var zPosition = 0; 
var values : Array;

function Update () { 
   var coordinates = (Application.dataPath + "/Scripts/" + "motiondata.txt"); 
    
   if (File.Exists(coordinates)){    
      var sr = new StreamReader(coordinates); 
      var txt = sr.ReadToEnd(); 
      values = txt.ToString().Split(";"[0]); 
   } 

   xPosition = float.Parse(values[0]); 

   transform.position = Vector3(xPosition, yPosition, zPosition);

    //Debug.Log(values); 
}

Here is my Max 5 patch. Important: the patch needs to be built into an Application to work, and placed just above the Assets directory so that it writes the text file into Assets/Scripts/ so that Unity finds it in the right place. If you just run it in the Max editor it will write to your Max application folder.

The patch below assumes that you have a built in web camera and will attempt to track motion from left to right.

----------begin_max5_patcher----------
3244.3oc4cs0aiiaE94L+JHBPQeIqGdWh6BTLSQQ6VfceZaeZmECjski0NxR
dkjmjoK1+6kjGoDaO1wTxzTtoHHwlxxwG9wy8ygz+9at41okOlVeK5aQ+L5l
a982byM1KYtvMsiu41UIONKOo1da2Vj9P4ze816fWpI8wF6kSVuNsXN5Ce36
5doEkEMEIqRsu76qxRx6dkhMqxJxSar+CIOewxMM6eUy+j5r+i8eBgLQnDj3
n1WacRyrkYE2+wpzYMvTHJVNAeGRPisOnL+khmfQ+R66A9HZ9x5T3Mb6sO8R
YysTpdx8MD5slq8Gu4Ml+bmiHyrxUqRKZ9Jn4esLqFsHqXdMpYYJJubVRSVY
ApbgcrcZbGJQidYKPYE0MI44o5AEnDz+tHq4KnEk4ySqPOjkmidnJqIE0TZe
uuutVCXn+t8069fyyJRmUtov9oy8wpAdXqFDBkYVAXQl+RhDlGjaubrElGyF
BleDtw4o4IeAQv3dxLRcmYjNAe7YNEaY.krm+6KyFNMo39CxJFS7HrzTV+kU
SKyGSQTBIJBvC4YIiJiFBvrJstN49zuBYVUZDImmzjLo4wlQhqoCZHRK2CnK
iD2enI1m7LnoH+vvP6Mfn.8GTE1pFgNQ3jbzcGSsdzqMYIr.ChOhyRVJh3SY
Ivnza+oYUYq0ONVBSsXCQZko.VnAHLEQ8HSi1F9xzpzjUY8DUvdBUZknHRt4
gH7PYXX9jg469Pk99P0ZGH0tQpo5keELsiOMzwgiJVYAMAAPPRqNodicbehc
f6fe31eLYVVgVmzRz2+2912990qyy.2Lqe6Ol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6u1HVa+BaxrY65FclTK0oZ21S2pZSS.ANRAEPGjXGctTqSU0smRps4lgP
aOlxwOM5bcOzVd4SVH.a32gyhtkpTNQT3vRTwtPTpvRSQtPSwgkljtPSQgkl
DtPSxvRSbWnIQXoIlKzDOrzD0EZhEVZh3BMQCKM4ll7fQShXWoI70EMIw8uz
2lZYC6BLVrbhr6XsRJ8S4sOI6VXiRR3hOjpvVa68yPywxiSnoJm5NAbTfoJW
BURD3V3g3TwhwAlpvtUAi.WXchSMMAIvgVRbppoDVfoJoSTUfULPbRcEQFXt
83qQECjqQhhe8QTBmL1D38IEwoFPd+lx4ZoIfBrtJm1vOAtHvtoU+rZhK8f+
3M+W.6awe5C
-----------end_max5_patcher-----------

Hope this helps some people and let me know if you use it or improve it!

Bryan

Thanks Bryan for posting this!

We actually have a newer version in the works which bypasses third-party netsend/netreceive Max externals that appear to be the culprits for the instabilities (this was something we observed as well). The newer version relies upon the built-in jit.net.send and jit.net.receive and in our tests has proven much better (e.g. the “Elemental” has been using it and running stably for several weeks without a single crash so far).

So, as soon as we get around to the code clean-up we will be releasing the new version.

Hope this helps!

Best wishes,

Ico

Thanks a lot slipstream for this fantastic tool !!

That’s exactly in this way i wanted to work with Unity. You have opened for me the first door. Thanks a lot ! :smile:

And Thanks to Bryan too for the very interresting Max code !