Here’s a link to the live demo to try yourself:
Direct your iphone here (don’t waste paper, if you can help it!!):
Boba – http://www.suniljohn.com/labs/boba/markers/boba.jpg
Starscream – http://www.suniljohn.com/labs/boba/markers/starscream.jpg
Print the markers here:
Boba – http://www.suniljohn.com/labs/boba/markers/boba.pdf
Starscream – http://www.suniljohn.com/labs/boba/markers/starscream.pdf
There are keyboard controls for both models. ASDW to move Starscream and directional arrows to move Boba Fett. Each character also has jump, taunt and attack controls. The UI controls are still pretty rough, and not quite as polished as online games available over broadband connections from o2 or similar providers. There are about 14 other animations I haven’t had time to program.
I re-factored the earlier multimarker flar prototype to use the FLARManager 0.3 from Eric Socolofsky at transmote.com. I was able to trace out the string names of the individual 3D channels of the MD2 models I’ve been using. I can now play the individual animations I want to play instead of looping through them all.
This snippet might help those that are trying to figure out the string names of the 3d channels of their MD2 Quake 2 models:
//_channels = new Array();
// _channels = animatedBoba.getAnimationChannels();
//
// trace("channel count", _channels.length);
//
// for each(var channel:AbstractChannel3D in _channels) {
// _numFrames = Math.max(_numFrames, channel.keyFrames.length);
// channel.updateToFrame(_currentFrame);
// trace("channel.name", channel.name);
// }
I also implemented Saqoosha’s hole effect using Papervision3d, in the form of trap doors, with some slight modification to what cube faces are visible. I think this has to do flipped coordinate space, when comparing a standard PV3d scene and to the flarnode. Here’s the mod:
Instead of :
var hole:Cube = this.scene.addChild(new Cube(new MaterialsList({all: cmats, bottom: cmatb}), 300, 300, 300, 1, 1, 1, Cube.ALL, Cube.TOP)) as Cube;
this._green = this.scene.addChild(new Cube(new MaterialsList({all: new ColorMaterial(0x00ff00)}), 300, 300, 300, 1, 1, 1, 0, Cube.TOP)) as Cube;
Changed to:
var __hole : Cube = new Cube(new MaterialsList({all: __cubeSideTexture, bottom: __cubeBottomTexture}), 80, 80, 80, 1, 1, 1, Cube.ALL, Cube.FRONT);
var __green : Cube = new Cube(new MaterialsList({all: new ColorMaterial(0x00ff00)}), 80, 80, 80, 1, 1, 1, 0, Cube.FRONT);
I went through at least 10 different asymmetrical patterns for the Starscream flar marker. Most of the time the camera would keep losing the pattern or confusing it with the Boba Fett pattern. Bad lighting and problematic marker patterns were the biggest issues.
I don’t have to use keycodes very often, but when I do it’s always a pain trying to remember what uint corresponds with what key. Here’s a snippet I picked up for using as3 to generate keycodes:
http://evolve.reintroducing.com/2008/11/21/tips-n-tricks/flash-key-codes/
The end result isn’t quite this:
….but each time I revisit this prototype it’s seems to be getting closer….
In the future I want to implement mac3d’s adaptive filter, to help eliminate problems with marker detection caused by poor lighting conditions.
Also what fun would spawning 3d characters in AR be without laser canons and collision detection!?!
makc
May 6, 2009 -
I always thought those chess were actually clay animation, they do not really look like cgi.
Sunil
May 6, 2009 -
You’re absolutely right…I wonder if they replaced the claymation in the enhanced re-releases a couple years back.
Javier patiño
May 10, 2009 -
nice work… I try to use flarmanager with DAE.as but is imposible.. only works with MD2 or Collada.as.. and for move the model I use in flash iDE DAEMC.as for load an animated but in flashmanager dont work..can you help me with that
s heng
May 11, 2009 -
can you drop me an email, thanks.
John Warren
Jun 13, 2009 -
Hey there! Awesome work! I have been meaning to get into FLART and papervision for a long time now and just recently have been toying around with it. I am at the point now where I can get .md2 models to work with it and all but in order to get to the next level I need to find out how to control the animations that are embedded as well as move the model with keyboard events. If you could shoot me off an e-mail to possibly help me out or even some source code so I can take a peak it would be greatly appreciated. Again awesome job man!
Aloysio Chagas
Jun 22, 2009 -
Hello, Sunil. Nice work! I’m trying to do what you did but I can’t.
Already I can load multiple markers and their md2s but I got some delay and and the objects are very slow, appearing and desappearing all the time.
What are you did and if you can, help me!
Thanks! 🙂
Leanne
Jul 14, 2009 -
Hi Sunil, this is great. I have some questions about getting MD2 to work in FLAR- namely, how?! I have been working on this for a school project for two days and could really use the help if you could drop me an e-mail. I was able to get MD2 to load in a papervision file, but not the SimpleCube for some reason. Hope you can help. Thank you!
Ben
Jul 21, 2009 -
Hi,
I’m just starting to get into flartoolkit. I was wondering if you could send me your source code so that I could learn from it. Thanks!!!
Patrick
Aug 15, 2009 -
I’m curious if you could go into more detail on your 3d-Channel naming code (I’m facing a similar problem)