Archive for the ‘ Open Source ’ Category

HEAD Conference 2008 – it was alot of fun!

The Les Paul has NOTHING to do with the conference, but it DEFINITELY ROCKED \m/

It was the first time I’d spoken in a while (since Feb08 in Amsterdam if I remember right) and I had a blast!  It’s incredible how lively an online chat room can be like that – the people in there were awesome and we definitely covered alot of Papervision3D goodness in the hour I was on.  I went over by 15 minutes ;)

I talked at length about materials and animations and how they affect CPU/performance.  The coolest part about preparing for this conference was the benchmark application we got out of it.  We’d been meaning to write a good benchmark app to test new revisions with and so forth, and so this is a good start.

One part I was excited to talk about is how the new Benchmark showed the latest trunk to be 5% faster than the GreatWhite branch before we merged!  Andy’s changes to accommodate QuadTree resulted in a very nice increase in speed.  Even with GreatWhite before the merge, we’d been seeing 13k poly scenes rendering at 12pfs – that’s pretty freakin good if you’re keepin’ score.

check it out:

http://www.rockonflash.com/papervision3d/benchmarks/Papervision3D_Benchmarks.html

microsoft: Did they have a hand in it? I’ll say…probably.

I was just heading over to Hank’s article on the situation with EcmaScript 4.0. The short of it is: it’s been drop kicked for good, leaving Adobe with decisions to make. As you read, Adobe had put alot into being standards compliant with AS3 and for obvious good reasons. The speculation is, however, that microsoft has had something to do with it’s death. As I read through Hank’s observations, I have to say, it seems pretty obvious, but I’m sure there are other factors. When you consider Silverfish (microsoft’s attempt at being a flash competitor), this makes almost too much sense.

One of the replies to the post suggested that Adobe seriously consider adopting haXe. I have to say, I see some real reason behind that at this point. Its already open source and has a great community behind it.

What’s interesting to note is that, when Nicolas emailed the open source flash list and introduced the concept of haXe (over updating MTASC to be AS3 compatible – thus creating his own language), I *got* the concept and even understood his reasoning, but didn’t necessarily feel like this would happen like it did (ie: es4 being tossed out). I literally thought it was a standard, but apparently, I wasn’t paying attention. Looks like Nicolas was a bit of a visionary I’d say, and now we’re actually living out what he suggested could happen.

And dood, that’s some serious apples right there – write your own language?? are you kidding me? And there’s only 2 people I’ve ever told on this blog who have big apples :)

Anyway, some interesting developments for sure are coming down the road – it’ll be very interesting to see what pans out. Personally, I’d love to see haXe adopted and basically hand microsoft their ass later on. Who am I kidding anyway, WHATEVER Adobe does to call microsoft’s move, I think i’ll be right there to support em’.

What’s even funnier is: it seems that both microsoft AND apple have it in for Adobe and Flash – what the hell gives with Apple and iPhone/iTouch not supporting Flash? The funny part is that Job’s used to be the leader of an underdog with ideals that matched his gear, and now he’s showing signs (and getting reactions btw) of the company he sought to dethrone (yes, that would be microsoft). Remember this ad? He might soon find himself as “the man behind the glasses”

PS> if you’ve been emailing me or im’ing me, and I haven’t replied, it’s because I finally contracted pneumonia – Dr says “you have a touch of it” – whatever that means. I feel like crap. But this got me mad enough to sit up in bed and say something

Flash on Tap conference

You know, i’ve been to quite a few Flash conferences ( not as many as Grant or Keith however ), and I’ve often wondered what it’d be like to put on a conference – what would I do with it? How would it be different and, for love of God – why another one?!

I mean really, do we need another conference? People already have a pretty big selection and usually can only swing one or maybe two with their company to pay for, so it’s really a task to pick very best ones! There are 4 one day workshops, and Andy Zupko and I are teaching Papervision3D at one of them. Andy will be teaching Effects/layers and I’ll be teaching optimization techniques.

Ok yeah, FOT is put on by IR5 along with the guys at influxis (we love you guys!!), so it’s natural I’d show up for this one conference. BUT, what’s unique is that this is a conference BY Flashers FOR Flashers. I have a feeling we’ll see some inspired work for sure, given the atmosphere is zero pressure and it mixes beer tasting from local brewery’s. It’ll probably be one giant “sit back and relax with some flashin’ and friends” party.

Anyway, this one you won’t want to miss – it’ll likely be a one time wonder where everyone had a mindblowingly good time, and nothing like it will ever occur on the face of the planet like it again – ever.

Well, Go3D is official – We need base 3D classes that all engines can use

What turned out to be just something to finally scratch a strict typing itch i’d had with tweening has no become and full blown side project. Not only did Moses get me started, but Graeme Asher and John Lindquist fueled the fire as well. Graeme’s been working on Tween3DCamera and John’s been helping me add some other properties like scale/scaleX/scaleY/scaleZ to the property types as well as a small refactor.

If you’ve tried Go3D lately, you’ll notice that I had put static property methods (yeah kinda weird name, but that’s what they do ) in Go3D.as, but have now moved them to Value.as in the properties directory. It seemed to make alot more sense with what their function was, and Go3D.as has been deleted for now since it serves no purpose.

check out the project here:
http://code.google.com/p/goplayground/wiki/JohnGrden

svn:

http://goplayground.googlecode.com/svn/trunk/JohnGrden/GO3D

One thing I added just today was the ability to pass a tweenTarget for a 3D object. If you look at the code samples below, you can now just pass a target and it’s position and rotation will be used to tween to. You can also use constants to just tween to position or just rotation. You can also pass custom properties for it to use with the target. The swf demo I’ve posted in the playground basically tells the Cylinder object to use the properties of the orange sphere.

[kml_flashembed movie="http://www.rockonflash.com/papervision3d/Go3D/sphereAnimation/SphereAnimationsGo3D.swf" width="500" height="400"/]

[as]
protected function tweenAll(e:Event=null):void
{
resettargetObject();
tween = new Tween3D(targetObject, [Value.tweenTarget(middleObject)], duration, Easing.easeOutElastic);
tween.start();
}

protected function tweenXYZ(e:Event=null):void
{
resettargetObject();
tween = new Tween3D(targetObject, [Value.tweenTarget(middleObject, Value.XYZ)], duration, Easing.easeOutElastic);
tween.start();
}

protected function tweenCustom(e:Event=null):void
{
resettargetObject();
tween = new Tween3D(targetObject, [Value.tweenTarget(middleObject, [Value.X, Value.Y])], duration, Easing.easeOutElastic);
tween.start();
}

protected function tweenRandom(e:Event=null):void
{
tween = new Tween3D(targetObject, [Value.x(getRandom()), Value.y(getRandom()*.5), Value.z(getRandom())], duration, Easing.easeOutElastic);
tween.start();
}
[/as]

Value.tweenTarget() returns an array of Go3DProperty objects that Tween3D expects to get to do the tween. It’s basically a convenient, yet strictly typed way of doing things. I’d say we’re having as much fun as untyped objects at this point – Even more probably ;)

Note:
I’ll be teaching on Go3D at the Toronto class in 2 weeks, and if you haven’t signed up yet, I seriously suggest getting out there asap – seats are filling up

Now, the reason I say we need base 3D classes for all 3D engines to use is because in a situation where I want to open this up for Sandy3D or Away3D or any other 3D engine that uses x/y/z/rotationX/Y/Z/scaleX/Y/Z, I’d have to write specific classes tailored to their api and object types.

We need to have one set of common 3D classes that define the atom level of a 3D object with the main 10 properties:

x, y, z, rotationX/Y/Z, scale, scaleX/Y/Z

So, I’m going to be starting such an effort and see how that pans out ;) It makes too much sense especially when you consider any project that has to work with a 3D engine, but isn’t integrated with the code base. ASCollada being one, and Go3D being another.

I’d love to hear people’s thoughts on this matter.

Update on Go3D API – much more simple

Well, thanks to the guys on the GoASAP list, I’ve started coming up with an API that most of us are used to seeing/using with packages like Tweener and Fuse. The change is that you literally create the propertyChanges array for Tween3D in the arguments to pass to the constructor. No parsing has to be done in the constructor at all – just set the propertyChanges array to what’s passed in the constructor.

So, what used to look like this:
[as]
var tween:Tween3D = new Tween3D(target, 1, Equations.easeOutCubic, .5);
tween.x = 0;
tween.y = 50;
tween.rotationZ = 0;
tween.start();
[/as]

Now looks like this:
[as]
tween = new Tween3D(target, [Go3D.x(0), Go3D.y(50), Go3D.rotationZ(0)], 1, Equations.easeOutCubic, .5);
tween.start();
}[/as]

you can still create a Tween3D object and set the properties outside of the constructor if you want to of course.

The coolest part is that this abstracts the property objects. You can create 1 or multiple property classes that return property objects. So, in this sample, Go3D is a “properties class” that has static methods called x, y, z, rotationX, rotationY, rotationZ and they all return a Go3DProperty object that Tween3D uses. Now imagine that all of this is strongly typed, it’s fast and in a large scale development environment with many devs you could lock down what properties are tweenable as well as other logic and rules around doing this type of work. It’s complete abstracted out from the tweening/sequencing itself.

I’ve updated the rolodex files as well as put the new source out:

Go3D.zip
RolodexDemoGO3D.zip

Same demo, new code :)

[kml_flashembed movie="http://www.rockonflash.com/papervision3d/Go3D/RolodexGODemo.swf" width="550" height="500"/]

The new createTween method now looks like this:

[as]
protected function createTween():void
{
sequence = new SequenceCA();
sequence.addEventListener(GoEvent.COMPLETE, handleSequenceComplete, false, 0, true);

tween_0 = new Tween3D(target, [Go3D.x(0), Go3D.y(50), Go3D.rotationZ(0)], 1, Equations.easeOutCubic);
sequence.addStep(tween_0);
sequence.lastStep.advance = new OnDurationComplete(.2); // advance early/overlap

tween_0b = new Tween3D(target, [Go3D.z(200)], 1, Equations.easeOutCubic);
sequence.addStep(tween_0b, true); // 2nd param groups it with previous step. param is “addToLastStep”

tween_1 = new Tween3D(target, [Go3D.x(-10), Go3D.y(85), Go3D.rotationZ(15)], 1, Equations.easeOutCubic);
sequence.addStep(tween_1);
sequence.lastStep.advance = new OnDurationComplete(.25); // advance early/overlap

tween_2 = new Tween3D(target, [Go3D.rotationX(0), Go3D.rotationY(0)], 1, Equations.easeOutBounce);
sequence.addStep(tween_2);
}
[/as]

Papervision3D + GoASAP = Go3D

Well, ok the name needs some work, but temporarily I’ll call it this since I’m using GoASAP under the hood of Go3D Tween classes. The idea is simple: Write a tween class specifically catering to a DisplayObject3D with x, y, z, rotationX, rotationY, rotationZ properties. What I ended up with was Tween3D (again, the name will likely change as this is a bit generic).

Now, after all my rants about untyped objects blah blah blah, I’ve really come to at least appreciate *why* people use this approach. It certainly is faster to type and get something up and running. But, I didn’t want to walk down that path with this one AND I wanted something reusable. I think there are situations where you can waste alot of time recreating these transient tweens within the body of your code that could easily be re-executed after being created one time. Tween3D does this.

It’s not a magic trick by any means, I’m simply initializing the “start” values when a Tween3D actually “starts”. It’s very simple and allows for reuse and instantiation.

I really wanted to take this on for a couple of reasons, but mainly to get into writing my own tween classes using Go. I’ve had the pleasure of being able to sit and talk to Moses at length about what Go is and the first thing I wanted to do ever since was try my hand at creating a strongly typed API. So far so good, but I think there’s room for improving the amount of code you have to write. It’s actually pretty compact and very easy to understand, but still, I’d like to see some even shorter ways of creating strongly typed tweens.

As you might expect, if you’ve used Fuse or Tweener in the past, a strongly typed tween might look like this:
[as]
var tween:Tween3D = new Tween3D(target:DisplayObject3D, duration:Number, easing:Function, delay:Number);
tween.x = 2000;
tween.y = 1000;
tween.start();
[/as]

As you can see, its alot like a Tweener call, except the properties aren’t in an untyped object, they set after instantiation. This setup is good for a few reasons:

1. Faster – always faster to set properties after instantiation than it is through the constructor
2. Strict typing – easy to understand what you can and can’t do with the Tween3D
3. reusable – you can create once, and reuse the tween over and over. This is nice in a situation where tweens are kept in a manager class that someone else maintains through out a project. Single point of management can be a very cool thing. This can also keep the CPU hit down when you need a tween.

Another thing about GoASAP is the Sequencing classes that come with it. Alot of times I’ve used Fuse for sequencing events, not necessarily animation tweens :) The sequencing is a very strong and abstract part of GoASAP. If you need it, great, hook it up. If you don’t, then it’s not there apart of the payload. Adding your own custom managers is a snap as well. if you need the OverlapManager that comes with Go, you can hook it in with one line of code. You can also create your own or just leave it out altogether.

I’ll be covering Go3D at the classes in Vancouver (this weekend) and Toronto in June, but you can get the source here and the Rolodex demo files here. Its definitely in early stages, but I think it’d be great to get some input if anyone’s interested. You’ll also need to sync or download GoASAP here. Tween3D is written specifically for use with Papervision3D’s DisplayObject3D, so if you’re gonna play, you obviously need to use it with a 3D scene and 3D objects ;)

+++++++ [ shameless classes plug ]++++++++++
Vancouver: May 3rd & 4th

Toronto: June 7th & 8th

This demo below is something I converted from Tweener to using Go3D. The lines of code were more for sure, but thats because of what GoASAP isn’t assuming for me like other animation engines would have to. So, I had to add a Sequence and an OverlapManager to acheive the same effect. Ok so it’s more complexx, but it’s also a ton more flexible. if I didn’t like Moses’ OverlapManager, i could write my own. if I didn’t like his sequencer, I could write my own and plug it in. The point is, I can completely customize any portion of the Tween engine to my project, company or general tastes at any given level. Companies can actually dictate the API and have maximum control over *what* the tween/sequence engine is doing in their application. I think once people realize what GoASAP is, we’ll see alot of uses for it in many ways we’re not even able to comprehend yet.

[kml_flashembed movie="http://www.rockonflash.com/papervision3d/Go3D/RolodexGODemo.swf" width="550" height="500"/]

Code for this animation sequence:
[as]package {
import com.rockonflash.go3d.Tween3D;
import com.rockonflash.go3d.utils.Equations;

import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.utils.getDefinitionByName;

import org.goasap.GoEngine;
import org.goasap.events.GoEvent;
import org.goasap.managers.OverlapMonitor;
import org.goasap.utils.SequenceCA;
import org.goasap.utils.SequenceStepCA;
import org.goasap.utils.customadvance.OnDurationComplete;
import org.papervision3d.cameras.FreeCamera3D;
import org.papervision3d.materials.MovieMaterial;
import org.papervision3d.objects.primitives.Plane;
import org.papervision3d.render.BasicRenderEngine;
import org.papervision3d.scenes.Scene3D;
import org.papervision3d.view.Viewport3D;

//import com.rockonflash.go3d.utils.Equations;

public class RolodexGODemo extends Sprite
{
public var target :Plane;
public var viewport :Viewport3D;
public var scene :Scene3D = new Scene3D();
public var camera :FreeCamera3D = new FreeCamera3D(11);
public var renderer :BasicRenderEngine = new BasicRenderEngine();

public var sequence :SequenceCA;
public var tween_0 :Tween3D;
public var tween_0b :Tween3D;
public var tween_1 :Tween3D;
public var tween_2 :Tween3D;

protected var doLoop :Boolean = true;

public function RolodexGODemo()
{
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
init();
}

public function init():void
{
GoEngine.addManager(new OverlapMonitor());

viewport = new Viewport3D(0, 0, true, false);
addChild(viewport);

var cls:Class = getDefinitionByName(“rolodex”) as Class;
var rolodex:Sprite = new cls() as Sprite;

var mat:MovieMaterial = new MovieMaterial(rolodex, true, false);
mat.smooth = true;

target = new Plane(mat, 292, 168, 4, 4);
scene.addChild(target);

reset();
createTween();

finalizeInit();
}

protected function finalizeInit():void
{
stage.addEventListener(MouseEvent.CLICK, handleClick);
stage.addEventListener(Event.ENTER_FRAME, loop);

loop();
doLoop = false;
}

protected function loop(e:Event=null):void
{
if( !doLoop ) return; // only render when we have to
renderer.renderScene(scene, camera, viewport);
}

protected function handleClick(e:MouseEvent):void
{
doTween();
}

protected function createTween():void
{
sequence = new SequenceCA();
sequence.addEventListener(GoEvent.COMPLETE, handleSequenceComplete, false, 0, true);

tween_0 = new Tween3D(target, 1, Equations.easeOutCubic);
tween_0.x = 0;
tween_0.y = 50;
tween_0.rotationZ = 0;
sequence.addStep(tween_0);
sequence.lastStep.advance = new OnDurationComplete(.2); // advance early/overlap

tween_0b = new Tween3D(target, 1, Equations.easeOutCubic);
tween_0b.z = 200;
sequence.addStep(tween_0b, true); // 2nd param groups it with previous step. param is “addToLastStep”

tween_1 = new Tween3D(target, 1, Equations.easeOutCubic);
tween_1.x = -10;
tween_1.y = 85;
tween_1.rotationZ = 15;
sequence.addStep(tween_1);
sequence.lastStep.advance = new OnDurationComplete(.25); // advance early/overlap

tween_2 = new Tween3D(target, 1, Equations.easeOutBounce);
tween_2.rotationX = 0;
tween_2.rotationY = 0;
sequence.addStep(tween_2);
}

protected function handleSequenceComplete(e:GoEvent):void
{
doLoop = false;
}

protected function reset():void
{
target.x = (Math.random() * (stage.stageWidth*.5));
target.y = -350;
target.z = -1000;
target.rotationY = 30;
target.rotationX = 30;
target.rotationZ = Math.random() *-180;//-10;
loop();
}

protected function doTween():void
{
reset();
//createTween();
doLoop = true;
sequence.start();
}
}
}
[/as]

I gotta say a huge thanks to Moses for putting up with my questions and debugging ;) It was FUN non the less!

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

Physics engine for 3D in Flash – WOW

No, it’s literally called “WOW” and that’s about what you find yourself saying when you see the demos for the first time!

Here’s the technical “what is it?” answer:
WOW-Engine is a free AS3 open source physics engine written by Seraf ( Jérôme Birembaut ) capable to handle positions in a 3D environment.

There are several demo’s and downloads at the site and demo’s as well as sample apps to help you get started with the engine.

This is one of my favorites on the demo’s: Cloth over 2 sphere’s (can you guess what the picture is??)

Anyway, BIG congrats to the WOW team on getting this out, it really looks outstanding!!

I’ll be covering using WOW with Papervision3D at the San Francisco classes Feb 2nd and 3rd

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!

Phlash5 – an experiment in Rock gone right

The headline should read “WHAT WERE THEY THINKING?!?!…hey! that’s actually pretty good…”

Which is nearly exactly what I was saying before we actually rehearsed :) but after our first session in Boston, I was blown away – these guys are unbelievable musicians and we came up with some originals that are really fun and have alot to do with – you guessed it – flash

The time has finally come to let the cat out of the bag (for later, we’d have a dead cat) and announce Phlash5 – A band of Flash musicians. It was bound to happen sooner or later. Nearly everyone I know, that’s a flasher, plays music – in fact, I’ve met so many that I purchased flashMusicians.com and flashDrummers.com a while back. There’s some natural draw for musicians when it comes to flash!

Check out seb’s post on the band (much more words than I have)

Phlash5


FITC Hollywood – Monday October 22nd, 9pm at the Howl at the Moon club in the city walk

The line up
Samuel Agesilas (Saffron) : Guitar
Chris Allen (Red5, infrared5) : Trumbone and MD
Aral Balkan (OSFlash, SWX) : Vocals
John Grden (PaperVision3D, Red5) : Drums
Seb Lee-Delisle (Plug-in Media and particles freak) : Bass
Chris Mills (formerly FriendsOfEd, now Opera) : percussion
Jared Sims (the only non-flasher of the band, here purely on musical merit!) : Saxophone
Craig Swann (Crash!) : Guitar, samples and visuals

Follow

Get every new post delivered to your Inbox.

Join 794 other followers