Archive for the ‘ Red5 ’ Category

Red5 does H264 ;) Release in 0.9 probable

Well, you read right – Paul Gregoire and Steven Gong have teamed up to get Red5 to support H256 video format streaming! This is awesome news!

Read more on Paul’s blog:

Congrats Paul and Steven, you guys ROCK \m/


PaperWorld3D released and is for real!

About a year ago, we were all sitting there blissfully typing away about the new possibilities of 3D in Flash now that Papervision3D was here. One of the obvious ideas was multi player gaming or MMOG (Massively Multi-player Online Gaming), but it was considered a lofty idea by some, and a total dream by others. For a couple, it was a passion, and for one, it was his destiny. That one is Trevor Burton, and WOW did he come through. Incredibly infact.

From the very first day we’d even breathed the words MMOG with Papervision3D, Trevor was throwing a framework together with ideas and concepts about how to get an SDK to the masses to add their own ships, weapons, objects and participate at a much deeper level in the game itself. He worked tirelessly for months and months. He kept going at it, even through the time when people had forgotten about the idea of PaperWorld. He’d ping me with updates and how he was coming along and I’d be waiting with great anticipation to finally get my hands on the framework and give it a go! I was simply amazed at his ability to stay on target.

Then, PaperWorld3D received a huge blessing – the guys over at Influxis/ saw the vision of what was to be the backend framework for gaming. We were at a point where we needed to get the backend framework started, and needed a place to host the demo. After a brief phone call and very little description, they jumped in head first with us and made it possible for Trevor to work full time on both the client side side and now server side of the framework. So, not only was trevor great with AS3 and Flash, he apparently was pretty decent with Java as well, and has been hard at work on the PaperWorld3D server using Red5 and the guys over at Influxis/Red5Server made it possible in a much much shorter amount of time.

Now, all of that is VERY cool in and of itself, right? But get this, the guys at influxis/Red5Server all agreed that the backend framework, along with the client side framework, should be open sourced to the public – INCREDIBLE. That’s a HUGE gift from them to not only the Flash Community, but anyone wanting to leverage MMOG abilities in a game system online.

It is with great pride and admiration that get to announce the release of Paperworld3D to you today! And it’s also a moment I’d like to say congratulations to Trevor for a job well done – you ROCK my friend!

The press release was also just picked up by Yahoo today as well

Get yer goodies here:

PaperWorld3D is released on GoogleCode:

The server is licensed unde the LGPL open source license

Getting external Midi devices recognized by Red5/java applications on Mac OSX

Well, I went to fire up the guitar on my mac for the first time with Red5 and my Roland GI-20. Much to my dismay, none of my external Midi devices were recognized by Red5 which is a java application. I had the latest drivers, I rebooted, reinstalled, howled at the moon, stood in the farthest east corner of my office on one leg and yelled “I’m a useful engine I am!” and still nothing.

Then, Joachim Bauch, who happens to be a core/leading developer on Red5 and a REALLY good friend, found the answer in his first google search (I’d been searching all night of course).

“As of Mac OS X version 10.4.8 Apple do no longer support the java package ( so bugus, I can’t believe that ), which on previous OS X versions allowed java applications to easily access the CoreMIDI system. mmj steps into that hole by providing a universal binary JNI wrapper to CoreMIDI, that is deployable across system versions and processor architectures. If you need to work with Midi from java on both PowerPC and Intel Macs with all Java runtimes >= 1.4, this is what you need. mmj supports most of the original CoreMIDI functionality. All external hardware and internal software MIDI devices – a.o. IAC Bus, virtual endpoints provided by other applications and Apple’s Network MIDI – will be available to the application.”

Get the files here and installation is as easy as copying the 2 files into /Library/Java/Extensions and restarting Red5 or your Java application of choice.

After that, my midi guitar demo lit right up!

WiiFlash + Papervision3D = \m/\m/\m/


Man the title says it all – the WiiFlash server rocks and married with Papervision3D, well, that’s just about a slice of heaven right here in the RockOnFlash studios! Thibault Imbert and Joa Ebert really have done an outstanding job in creating a very solid server and a great looking, easy to use API for working with the wii’s in flash! I gotta say a special thank you to both of them, they really let me beat the crap out of them for 2 weeks leading up to FITC to get the drum demo working and it really was well worth the effort IMHO. Once you try the server and get connected, you’re gonna be hooked – it’s that easy!

First, I wanted to show the WiiBallet app and post the code for the demo. Thibault had asked me to work out a PV3D demo using the WiiFlash server and this is what I came up with. The idea was that a ballet dancer would hold the wii, and dance. Then they’d display the visual on screen as she danced. It was supposed to happen the FlashFestival in France a week ago, but I don’t know if it every quite panned out or not. Still waiting for the pics!

The amazing thing is, I spent 2 seconds on implementing the wii code and getting that connected and the rest of the time was spent on creating the PV3D app, then messing with it to find something that looked decent! The API for WiiFlash server is as easy as it gets:

private var wii:Wiimote = new Wiimote();

// later in the init() method

That’s IT! From there on out, all I had to do was grab the properties I wanted from the wii object I created, applied the angles to the new plane object I was creating on the fly, and BAM, render camera!

// I instanced these at the class level:
private var toDEGREES :Number = 180/Math.PI;
private var toRADIANS :Number = Math.PI/180;

// then we confvert to degrees since the wii props are in radians

(see Keith? I memorized em’ like you said ;))

Source available here – I’ve commented through the code and it’s fairly straight forward. AS3 / Flex builder project files

In the video, you can see how I’m using roll and pitch with the wii to fly around in virtual space. The app creates planes on the fly, and the direction of the stream is dictated by the roll/pitch of the wii and some creative bending of the rules since we don’t have “yaw” with the wii without the sensor bar. To create the the chase cam, I actually created a dummy object (DisplayObject3D) and set it as the camera’s target. Then, I use transform.copy and copy the previous plane’s coordinates to the dummy. I’m later adding some camera movement around the stream based on the x/y properties I’m maintaining. This gave it a nice visual as though the cam were truly affect by the wii stream rather than just clumsily moving around the stream based on some noticeable constraints. I just wish I’d have more time to spend with it – this was about 4hrs total effort, and while it may show, I think it’s a testimony to how easy the WiiFlash API is to use and how well Papervision’s api works.

This last video with WiiFlash server is the drum demo I did at FITC in April. The drums are Papervision3D created in 3D studio max and animated with the Tweener animation classes. The WiiFlash server made this demo possible and very easy to create. This time, with 2 wiiMotes, the WiiFlash server just created another wii object and I was off and running. This was also the first time we’d demo’d Red5 doing midi out. For triggering sounds with any type of speed, we had to go outside the flash player and Red5 provided that via RTMP. The sounds are triggered from a Roland TD-10 sound module. Midi via RTMP – You gotta give it up for Red5 🙂

3D Guitar Player Pro – a deeper look

I realized, later of course, that I hadn’t even gone over the guitar technology and explained *how* I created it. I was so wrapped up in writing code for the conference that I completely spaced any discussion on it. Well, let’s make that up, shall we? Hopefully, this will make it up to all the people that actually showed up 9am Sunday morning for the show! Please forgive me for not going over the details right there!

A BIG HUGE THANK YOU TO LUKE HUBBARD AND JOACHIM BAUCH – I bugged and bugged and bugged them to help me make this thing work and they came through for me like you wouldn’t believe. They’re both VERY nice people and extremely talented developers. They’re also core developers on the Red5 team since day 1 of it’s creation.

First off, I used a Roland Guitar setup consisting of the GK-3 pickup, the GI-20 midi processor. If a Roland guy is reading this, I REALLY could use a sponsorship! This is turning into a real roadshow 🙂


Next, I used the midi application with Red5 that everyone now gets when the install Red5 server. Just connect to “midiDemo” with a NetConnection object, and bingo, you get back a list of compatible Midi in and out devices (separate lists).

var nc:NetConnection = new NetConnection();

When the connection shows successful, you can then request the midi lists:
[as]“getMidiInDeviceNames”, new Responder(updateMidiInDeviceList));“getMidiOutDeviceNames”, new Responder(updateMidiOutDeviceList))[/as]

[as]private function updateMidiInDeviceList(data:Array):void
deviceListIn = data;

private function updateMidiOutDeviceList(data:Array):void
deviceListOut = data;

Next, you connect to your devices by telling Red5 which 2 you’d like to use:
[as]public function setMidiDevice(midiDeviceIn:String, midiDeviceOut:String):void
{“connectToMidi”, null, midiDeviceIn, midiDeviceOut);

At this point, you’ll have 2 lists: 1 for Midi In devices, the other for Midi Out devices on your system and you’ll be able to receive midi events from Red5 😉

Finally, you’ll receive midi in calls by creating a “midi” method and be able to send midi messages via sendMidiShortMessage3() call to Red5:
[as]public function midi(time:Number, data:Array):void
dispatchEvent(new MidiDeviceEvent(MIDI_MESSAGE, data));

public function sendMidiMessage(note:Number, velocity:Number):void
{“sendMidiShortMessage3”, new Responder(handleMidiSendResponse), 144, note, velocity, 0);

This setup is EXTREMELY fast and works well. I was playing close to 64th notes on the guitar and Red5 just smiled mildly 😉 AS3/Flex2 provide a MUCH better rendering experience than the AS2 drum demo I created.

Papervision3D provided the next valuable chunk to this project. The idea was to create a learning tool for learning chords, scales and patterns people use on solos. The absolute mind blow of this thing is that when you rotate the guitar to the “guitarists” view (over the neck from behind the guitar), it’s about 1000x’s easier to follow along and learn.

I had to create a decent guitar model in 3D Studio Max that was as low on the poly’s as possible. I needed the performance to be retained for the playback of the notes on the fret board. I was able to get a good looking model at about 646 polys and keep the neck, body and head separate.

3D StudioMax screenshot

All I had to do was create groups in 3DS and name them appropriately. Then save out as Collada file format. In Flex2, I was able to simply use the getChildByName(“neck”) and I’m able to hide/show the various parts of the guitar. It’s almost like creating flash movieclips, but I’m actually doing the work in 3DS!

Body onlyNeck only

Ok, now we’re actually getting to the cool part: The skin. This is what makes it all happen! Here’s the actual texture I started with. I had to go outside and lay the guitar down on a white towel on a cloudy day – that helped in getting a great diffused shot of the guitar! HUGE thanks to Peter Kapelyan on the PV3D list for giving me a million tips on how to photograph stuff for use as textures! He’s a genius!! To bad he uses Lightwave 😉

Guitar Texture

After I successfully mapped this bitmap to the guitar in 3DS, I was able to import the image into Flash CS3, and create a movieclip where I could then create my “Note” and “Fret” movieclips and supporting classes to handle the incoming midi notifications. I imported the skin, resized the stage to the dimensions of the skin (important since we’re going to use the Flash movieclip to skin the guitar, and it has to be the exact same size). Then proceeded to create a Fret movieclip and Note movieclip (which goes inside Fret). Fret contains 6 copies of Note – make sense? Then I just name them appropriately: fret_0 – 21, and then inside of Fret, note_0-5.

Flash CS3 Skin

Now, this is where you glue it together – the big question in your mind is: How did I communicate with the SWF that’s loaded for use with a PV3D skin AND register events with it -am I right? is that your question?! good question.

Thanks to Grant for coming along at the EXACT moment I was dealing with this (no, i’m not kidding, literally, I was JUST starting work on it and 5 minutes later, Grant pops up with an IM). He’d just released FlashLib for this very issue. So, all I had to do was select “Create FlashLib” from the commands menu in CS3, and BAM, it created the SWF and class for accessing assets from the library. The Note class I created was completely in tact and accessible from Flex2! All I had to do was call FlashLib.getInstance(LinkageName:String) and that’s all I needed!

[as]var texture:DisplayObject = FlashLib.getInstance(“guitar”);[/as]

DONE. Now, I could use that with my Collada object with Papervision3D for the skin, AND I had all the access to the fret board that I needed to marry the midi note values to the proper frets.

I’ll be going over this and showing code at the classes (RMI) in June, so if you’re interested, you might want to book a seat now 😉 I’ll also post a demo so that you can rotate the model around and see the interface.

FITC 2007 – Toronto

What do you get when you cross an axe and a wii?

  1. splintered white plastic?
  2. a happy axe?
  3. a psychotic blend of midi/wii joy?
  4. a ROCK ON experience you’ll never forget?

We’re not talking "wii" like, "I gotta go man, pull over NOW!"

We’re not talking about "wii" like, "oh those puppies are soo adorable!"

We’re talkin’ about " W\m/ "!! The kind of wii we’re talking about causes involuntary outbursts like:

  • "DO IT AGAIN!!"
  • "ROCK ON \m/"

If you find yourself at FITC Toronto 2007 this year, catch Red5’s presentation and get yer dose of Rock for the day! I’m planning on trying to find the time to get this all working together, but if it does, we’ll have some people helping out in the audience and get some groove on with their wii’s.

Disclaimer: I’m partly insane – i’m not a guitar player, I’m a hack, but I LOVE playing and I figure, why not make a TON of noise with some rowdy Flashers liker yerselves – am I right??!

New Era of Flash gaming article

I just posted on some thoughts I’ve had since launching the Obstacle Course game and wanted to direct some attention and comments over there.

The game has received alot of great comments and suggestions! We had SO many hits on Sunday, we had to restart the server!

Anyway, some of the comments on the game prompted the article on Papervision3D’s blog:

New era of Flash gaming? Yeah, I think so.