1 of 2
1
Surface2TUIO v. 1.0
Posted: 29 June 2012 12:22 AM   [ Ignore ]
Rank
Joined  2010-02-09
Total Posts:  19
New Member

Surface2TUIO is an app I built using Dominik Schmidts C# TUIO server, and Michael Zoellners simple Surface 2.0 project.

I’ve extended the C# server to include the byte tags from Surface 2 (and 1 actually, they’re the same), with orientation. Michaels project has been used as a starting point for me, since I have no past experience with Visual Studio. Somehow though, I managed to slap this together.

The reason for making this, is the pure fact that I wanted to develop my touch-apps in AS3. Running flash on the SUR40 with Windows Touch is extremely sensitive. There’s no finger recognition, no tag support, and the pointers themselves are twitchy. This app uses the underlying tracking system from the Surface 2 SDK, recognizing both fingers and tags, and excluding odd blobs as pointers.

I’d really like to thank both Michael and Dominik for making their respective projects so (relatively) easy to modify. There’s still a lot to be done with this, but right now it does exactly what I need it to. If anyone wants to extend it even further, just send me a message.

-------------------
------------------------------------------------------------------

Note: This is for the Samsung SUR40 Surface 2.0 enabled touch-table. It may work on other Surface 2.0 compliant devices, but I offer no support on this whatsoever. It currently sends the data through OSC. It has been tested ON the table, running a Flash AS3 AIR app with the AS3_TUIO and/or GestureWorks 3.1.7 libraries. It currently supports 2DCur with ID’s and location (X, Y), and also the MS Surface 2.0 byte tags with ID’s, Tag ID’s, Location (X, Y) and Orientation.

If anyone want’s the VS2010 project files, I’ll have to get a hold of both Michael and Dominik before I release anything. As soon I get an OK from both, I’ll link up the project here.

I am NOT an experiences Visual Studio user. This project is most likely highly unoptimized. But it works. Just run the app, and whatever app you have that can receive OSC messages SHOULD catch it. Remember to disable Pen/Touch input from the Windows control panel.

-------------------------------------------------------------------------------------

Current official version: 1.0
Download: GET IT HERE
Download AS3_TUIO demo Air 2.6 app with source files (Flash Professional CS5.5): GET IT HERE

Michael Zoellners project: Link
Dominik Schmidts C# server: Link

-------------------------------------------------------------------------------------

Update July 6th 2012: New build uploaded. 2Dcur velocity values added. New build of the Flash Pro demo is also up, it now supports drag, rotate and scale gestures.
Update July 4th 2012: New build uploaded. The tag orientation gave off weird values. It has now been limited to the correct 0 -> 2PI.

Profile
 
 
Posted: 29 June 2012 12:24 AM   [ Ignore ]   [ # 1 ]
Rank
Joined  2010-02-09
Total Posts:  19
New Member

Just realized this was posted in the wrong section. Feel free to move it and delete this post.

Profile
 
 
Posted: 30 June 2012 12:40 PM   [ Ignore ]   [ # 2 ]
RankRankRankRank
Joined  2008-11-22
Total Posts:  529
Elite

i like to see this project in opposite direction TUIO2Surface with surface vision for years :D
but thank you for sharing anyway

 Signature 

my 19” LCD setup ----> turned into new look
my 60” FTIR setup (old video)

Profile
 
 
Posted: 01 July 2012 10:47 AM   [ Ignore ]   [ # 3 ]
Avatar
RankRankRank
Joined  2010-01-15
Total Posts:  419
Sr. Member

elisoe, thanks for sharing.  I would be interested in the VS project if that is possible.  I’m working on an installation for a university in which they want to use some SUR40 and some non-SUR40 displays—to account for larger than 40” spaces.  Ideally we’d like to allow for a similar experience across platforms and this library may be just what I’m looking for.

 Signature 

Personal MT Blog
Mesa Mundi Inc. and Online Store

Profile
 
 
Posted: 01 July 2012 11:51 PM   [ Ignore ]   [ # 4 ]
Rank
Joined  2010-02-09
Total Posts:  19
New Member

vahid: Why would you go in the opposite direction? I’m just curious smile

grim: As soon as I get the final blessings from the other people involved, I’ll post the source.

Profile
 
 
Posted: 03 July 2012 08:09 PM   [ Ignore ]   [ # 5 ]
Rank
Joined  2012-06-28
Total Posts:  7
New Member

hi eilsoe,

I am a newbie in C# and your application HELPED ME A LOT for me to develop a flash application on SUR40!
It works like magic. Almost cred when i see the tag ID appearing in my flash…

I have two questions:
1) is direction of tag available?
2) currently i m running three apps in windows: my flash exe, your tuio app, and the UDPtoFLC bridge… Is there anyway our flash app can run in the surface mode?

Profile
 
 
Posted: 04 July 2012 12:19 AM   [ Ignore ]   [ # 6 ]
Rank
Joined  2010-02-09
Total Posts:  19
New Member

Hey Terrence

Thanks! I’m glad it works on other tables than my own too smile I also did a little dance in the office when the tags finally appeared :D

Surface2TUIO does support tag rotation. I use TUIO_AS3 (http://bubblebird.at/tuioflash/tuio-as3-library/) to build my own apps. With that, I simple read the “TUIOFiducialEvent.rotation” parameter.

One thing though. While flash can handle the number correctly if you pass it on directly to a displayobjects own rotation, using the raw data for other things is tricky. I’ve checked and doublechecked the output from the Surface 2 in C#, and the actual radian feedback goes from -2PI to +4PI, while the documentation states 0->2PI (as it SHOULD!). I have to figure out why it does it though. But if you just pass it dorectly on to a dislpayobjects rotation, you’ll be fine. It still reads it as -180 to +180 degrees.

Flash cannot run in pure Surface mode. The simple fact is, that ANY app opened via the attract launcher must call a method to signal when loaded. This method is not present in the flash player itself, and therefore the launcher doesn’t register the app as open, then force-closes it again.

About your 3 apps; IF you use TUIO_AS3, it can read the output from Surface2TUIO without any need for UDPtoFLC. With TUIO_AS3, you can initiate a UDPConnector from the API. Alternatively, GestureWorks also works directly with Surface2TUIO.

If you want, I could link up a demo with TUIO_AS3 using tag rotation.

Profile
 
 
Posted: 04 July 2012 01:29 AM   [ Ignore ]   [ # 7 ]
Rank
Joined  2010-02-09
Total Posts:  19
New Member

The tag rotation value has been corrected, new build is up.

Profile
 
 
Posted: 04 July 2012 01:46 AM   [ Ignore ]   [ # 8 ]
Rank
Joined  2012-06-28
Total Posts:  7
New Member

thanks for the information!

Good to know that I am not doing it in the right way.....

Profile
 
 
Posted: 04 July 2012 08:23 AM   [ Ignore ]   [ # 9 ]
Rank
Joined  2010-11-17
Total Posts:  1
New Member

This is amazing!!! I am currently using Gestureworks but have used AS3_TUIO in the past. Is there a chance you could post some quick dirty AS3 to show what to listen / basic example of reading the data (such as tags)?

Regards

Profile
 
 
Posted: 04 July 2012 12:19 PM   [ Ignore ]   [ # 10 ]
Rank
Joined  2010-02-09
Total Posts:  19
New Member

Sure, I’ll link something up tomorrow when I’m back at the office.

Profile
 
 
Posted: 05 July 2012 05:48 AM   [ Ignore ]   [ # 11 ]
Rank
Joined  2010-02-09
Total Posts:  19
New Member

Demo project is up. I linked it from the top post. I’ve included the AS3_TUIO library.

I also included an Air project, which installs the project locally and leaves a shortcut on the desktop. Just install, run Surface2TUIO and then run the demo app. The desktop shortcut should be named “Project”.

If you don’t have Flash Pro CS5.5, you can always just have a peek at the “Main” class file.

For testing purposes, download the Surface 2 SDK which includes an input simulator. You can use that with Surface2TUIO on a standard desktop machine. If you want a simpler method, just use reactivisions “TUIO Simulator”, you can get that on tuio.org.

Profile
 
 
Posted: 05 July 2012 09:53 PM   [ Ignore ]   [ # 12 ]
Rank
Joined  2012-06-28
Total Posts:  7
New Member

Hi Eilsoe,

I tried the new release, the rotation works perfectly!

Do you have any advise for doing multitouch?

I referred to the gesture example codes in TUIO AS3 but the flash TransformGestureEvent doesnt seem to be triggering at all.

Do I have to try GestureWorks?

Thanks!

Profile
 
 
Posted: 05 July 2012 11:30 PM   [ Ignore ]   [ # 13 ]
Rank
Joined  2012-06-28
Total Posts:  7
New Member

Hi Eilsoe,

I have a crazy question.

If I have a windows 7 tablet that has a camera (yeah not surface).
Is there any way that a tracker can recognize the tag and send it as a TUIO message?

Profile
 
 
Posted: 05 July 2012 11:59 PM   [ Ignore ]   [ # 14 ]
Rank
Joined  2010-02-09
Total Posts:  19
New Member

Nope, sorry smile

Regarding the gestures in TUIO_AS3, I also can’t use anything but the rotate gesture. I actually don’t know why… If I use the TUIO Simulator, everything is fine. I’ll have to do a little research on that. Perhaps TUIO_AS3 uses the velocity value from the cursors, that’s the one thing that isn’t done yet.

I’ll dig into it a little and get back to you.

Gestureworks though works fine with this. It hjust doesn’t support tags “officially”. I’ve been bugging the support team there for a while, and with one of the newer releases, they updated the TUIO support for AIR projects. I was told that they actually use TUIO_AS3 for that specific purpose, but fiducial support is still not implemented fully. It CAN use them, if you dig deep enough. They’ve noted it as a feature request for now, so it’ll read objects sooner or later. I’ve yet to try and combine TUIO_AS3 and GestureWorks, but I will in the near future.

Profile
 
 
Posted: 06 July 2012 02:43 AM   [ Ignore ]   [ # 15 ]
Rank
Joined  2012-06-28
Total Posts:  7
New Member

Oh I see…
I havent tried rotation. But dragging doesn’t work…
Let me know when you have some findings!
Thanks!

Profile
 
 
   
1 of 2
1