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: http://gregoire.org/2008/10/06/red5-h264/

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/Red5Server.com 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:

http://www.paperworld3d.com/

PaperWorld3D is released on GoogleCode:

http://code.google.com/p/paperworld3d/

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 com.apple.audio.midi 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/

WiiFlash

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:

[as]
private var wii:Wiimote = new Wiimote();

// later in the init() method
wii.connect();
[/as]

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!

[as]
// 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
plane.pitch(wii.pitch*toDEGREES);
plane.yaw(wii.roll*toDEGREES);
plane.roll(wii.roll*toDEGREES);
[/as]

(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 :)

GK-3GI-20

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).

[as]
var nc:NetConnection = new NetConnection();
nc.connect(“rtmp://localhost/midiDemo”);[/as]

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

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

private function updateMidiOutDeviceList(data:Array):void
{
deviceListOut = data;
}[/as]

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
{
nc.call(“connectToMidi”, null, midiDeviceIn, midiDeviceOut);
}[/as]

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
{
nc.call(“sendMidiShortMessage3″, new Responder(handleMidiSendResponse), 144, note, velocity, 0);
}[/as]

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 FlashLib.as 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!!"
  • "RIGHTOUS! RIGHTOUS! RIGHTOUS!"
  • "ELEVEN’S NOT ENOUGH!!"
  • "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 Papervision3d.org 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.

First Papervision3D Game!

ObstacleCourse game

Anyone remember the original 1992 Xwing game? When you first started playing the game, you had to do obstacle courses to learn how to fly the various ships. They all had their strengths and you needed to learn how to navigate using those strengths basically.

I couldn’t find a screen shot online of the obstacles, so the ones I created are purely from memory. But they’re fun and they get the job done, so how cares, right? I added a little mutliplayer element with the Leader Board (that added a couple extra days), and I think it really makes it 1000x’s more fun if you see your friend’s times :)

The workflow was incredible on creating this game! All told, i think this is probably about 4weeks work, and that’s with all of the learning curves. I was able to create all courses in 3D Studio Max, export as collada and load at runtime! All I had to do was right a little code around handling the child objects of the collada object (better known as obstacles) and whenever I loaded a new course, it already knows where they are and how many etc. Then, to allow for more obstacles to be used in a course, I only show 10 at a time. Couldn’t be easier to create new corses!

I think with this demo, we can see Paperworld taking shape as this uses many of the same features and principles of what we’re putting together for Paperworld.  On my laptop with dualcore2, it smokes at 30fps!

The objective is simple: Follow the arrow and get through all of the obstacles as fast as you can.

Tips:

  • WATCH YOUR SPEED – DO NOT JUST HOLD DOWN “W” – TAP IT TO SPEED UP AND USE “S” TO SLOW AT THE OBSTACLES TO MAKE YOUR TURNS.
  • Use the roll keys (A, D) to orient yourself to the oncoming obstacle.
  • If you don’t have a fast computer, flying in cockpit view helps give you some extra speed by not rendering the Xwing
  • Go fullscreen and back to gain speed while playing in the browser (remember to go back, otherwise your keys won’t work in fullscreen mode)

Check out the videos:

REQUIRES FLASH PLAYER 9.0.28 OR HIGHER – CLICK HERE FOR ADOBE DOWNLOADS

Play it here!


Rings Race

Speed Test

Cork Screw

Red5 :: Flex2/AS3 Samples started

SimpleConnector

I’ve just started on some basic sample/reusable code for creating basic applications with Flex/as3 that use Red5. The first, is a Connection class along with a SimpleConnector.mxml to show how to use the Connection class.

SimpleConnector has a textfield for the URI, Red/Green light for connection status and a connect button. There are methods to get the NetConnection object to pass along for any netstreaming you’ll be doing. This zip includes the orignal FLVPlayer code that now uses the SimpleConnector.mxml and Connection class.

We’re still discussing where we’ll put the sample code for Red5, but for now, I’ll post updates here.

Red5Samples.zip

Red5 Flex2/AS3 Demo :: FLV Stream Player

I went ahead and re-routed some of the guts of my soon to come FLVPlayer to work with Red5 and streaming. This is a Flex2/AS3 app with source so people can have some basic code in getting started with Red5 and Flex2/AS3. This was built with Red5 v0.6RC1.

Source:
Get the updated source

Red5 Flex FLVPlayer

Enjoy!

Follow

Get every new post delivered to your Inbox.

Join 794 other followers