Beginner’s Guide to Augmented Reality Part 2

Beginner’s Guide to Augmented Reality Part 2

Tutorial Details
  • Difficulty: Beginner
  • Program: Flash
  • Estimated Completion Time: 1-2 hours
This entry is part 2 of 2 in the series Beginner’s Guide to Augmented Reality

Welcome to Part 2 of my Beginner’s Guide to Augmented Reality, I hope you finished off the first part of this tutorial, or at least downloaded and read the source files (otherwise you may get a bit confused with what’s going on).


Quick Recap

Last time we looked at setting up a simple AR environment, creating a cube, applying materials to the cube and the “hole in the wall” effect.

Today we will be building on that knowledge and creating the final as shown in the demo. To create that final effect, we need to know how to render spheres, animate objects, play sound effects and finally, render 3d objects. Rendering 3D objects in the palm of your hand is the main reason why Augmented Reality has become a big hit this year, especially when you create some of the more interesting shapes or animate them. If you are in the UK you may have seen The Gadget Show recently where they featured Augmented reality and had an animated version of Suzi Perry that you could hold in your hand. Very nice.

So let’s get down to business. I’ll be starting with the world and stars render first of all, then moving on to animating the shapes and finally creating the cow. Open up your files from last time and let’s get creating.


Step 1: Download the World

source: Nasa

Source: NASA Visible Earth. Credit: Reto Stöckli, Robert Simmon.

Download the 2048x1024px version of the image above from the NASA Visible Earth page and call it map.jpg. Place it into the following folder: deploy > assets. This is the same folder where you saved the images for the inside of the cube in the last part of the tutorial. This lovely image of the world came from NASA. They take good photos don’t they?


Step 2: Creating a Sphere

In your code, navigate to where we set up the “hole in the wall” effect for Marker 0 last time. Just after the “hole in the wall” code, add in the following code:

var Earth:Sphere = new Sphere(earth, 40);
Earth.z=200;
dispObj.addChild(Earth);

Step 3: Mapping the World

Now that we have set up a sphere, it needs a texture. This is done in the exact same way as mapping a texture to a cube. Notice how in the set up for the sphere, it’s looking for something called “earth” this is our texture variable.

Navigate in the code to where we set up materials before. Add to that code the following line:

var earth : BitmapFileMaterial = new BitmapFileMaterial("assets/map.jpg");

Just the same as the others.


Step 4: Test it!

When you test it, you should see something like the following image (but of course without that handsome devil holding up the marker for you):

source: A very white room

Just as last time, you’ll need to download the marker image and print it off with plenty of white space around the edges.


Step 5: Stars in Your Eyes

Now what would a space image be without some stars? Let’s add some in shall we? This is possibly the most tedious part for me to write up since all the stars need to be individually positioned. But you cheeky rascals get the benefit of copy and paste.

Add in the following code after the earth render code:

var star1:Sphere = new Sphere(star, 4);
star1.z=65;
star1.x=84;
star1.y=164;
dispObj.addChild(star1);

var star2:Sphere = new Sphere(star, 3);
star2.z=246;
star2.x=32;
star2.y=64;
dispObj.addChild(star2);

var star3:Sphere = new Sphere(star, 2);
star3.z=163;
star3.x=78;
star3.y=98;
dispObj.addChild(star3);

var star4:Sphere = new Sphere(star, 4);
star4.z=120;
star4.x=164;
star4.y=157;
dispObj.addChild(star4);

var star5:Sphere = new Sphere(star, 2);
star5.z=148;
star5.x=-164;
star5.y=-157;
dispObj.addChild(star5);		

var star6:Sphere = new Sphere(star, 3);
star6.z=46;
star6.x=-36;
star6.y=-156;
dispObj.addChild(star6);

var star7:Sphere = new Sphere(star, 5);
star7.z=40;
star7.x=-16;
star7.y=-84;
dispObj.addChild(star7);

var star8:Sphere = new Sphere(star, 5);
star8.z=59;
star8.x=-84;
star8.y=30;
dispObj.addChild(star8);

var star9:Sphere = new Sphere(star, 4);
star9.z=87;
star9.x=-134;
star9.y=84;
dispObj.addChild(star9);

var star10:Sphere = new Sphere(star, 2);
star10.z=49;
star10.x=10;
star10.y=18;
dispObj.addChild(star10);

var star11:Sphere = new Sphere(star, 5);
star11.z=94;
star11.x=-84;
star11.y=41;
dispObj.addChild(star11);

var star12:Sphere = new Sphere(star, 3);
star12.z=54;
star12.x=91;
star12.y=-46;
dispObj.addChild(star12);

var star13:Sphere = new Sphere(star, 2);
star13.z=180;
star13.x=88;
star13.y=-130;
dispObj.addChild(star13);

var star14:Sphere = new Sphere(star, 4);
star14.z=102;
star14.x=134;
star14.y=-13;
dispObj.addChild(star14);

var star15:Sphere = new Sphere(star, 1);
star15.z=61;
star15.x=-35;
star15.y=145;
dispObj.addChild(star15);

Phew, that”s quite a lot. Of course, you can add more if you want more stars. Or just use a loop an array to add an arbitrary number.


Step 6: Color the Stars

Now we need to add a material for the stars. Add the following with the other material code:

var star : ColorMaterial = new ColorMaterial(0xFFFFFF);

Step 7: Testing Time!

Test the flash movie and hopefully you’ll see something like this:

source: A very white room

Step 8: Trapped in a Box

Wouldn’t it be cool if, say, we could have the space scene we just created, be trapped in a little box held within the marker and then explode out? Well you’re in luck, and probably saw the outcome as that’s exactly what we are going to do.

It’s fairly simple to animate things in AR. Especially if you just want to move them from one point to another like we want to. To do this, we need to download some extra classes for Flash. GreenSock do a very nice series of animation libraries that help us easily move objects from one point to another.

Head over to greensock.com and download the AS3 TweenMax library.


Step 9: Importing a new Library

Once you have downloaded the TweenMax library, you need to extract the .zip file and place the greensock folder into src > com of our project. This is where the squidder library is also kept. Extract here and all will be just swell.

Now move back over to Flash. Add the following line at the top of your code with the other import lines:

import com.greensock.*;

Now you have access to the GreenSock library.


Step 10: Animating the Earth

Find the code where you set up the Earth variable. Replace it with the following code:

var Earth:Sphere = new Sphere(earth, 1);
Earth.z=-40;
TweenMax.to(Earth, 4, {scaleX:40, scaleY:40, scaleZ:40, z:"200", delay:4});

What I’ve done here is alter the Earth’s starting point and size so that it’s very small and inside the box. TweenMax is a great animation class. Here we set up which variable to animate (Earth), how long it will take in seconds (4), by how much it should scale up the variable, its z point and finally how long it should wait before animating. This is set to 4 so that we can animate other things first.


Step 11: Animating the Stars

Replace all your star setup code with the following:

var star1:Sphere = new Sphere(star, 1);
star1.z=-40;
TweenMax.to(star1, 4,{scaleX:1, scaleY:1, scaleZ:1, x:"84", y:"164", z:"65", delay:4});
dispObj.addChild(star1);

var star2:Sphere = new Sphere(star, 1);
star2.z=-40;
TweenMax.to(star2, 4,{scaleX:3, scaleY:3, scaleZ:3, x:"32", y:"64", z:"246", delay:4});
dispObj.addChild(star2);

var star3:Sphere = new Sphere(star, 1);
star3.z=-40;
TweenMax.to(star3, 4,{scaleX:2, scaleY:2, scaleZ:2, x:"78", y:"98", z:"163", delay:4});
dispObj.addChild(star3);

var star4:Sphere = new Sphere(star, 1);
star4.z=-40;
TweenMax.to(star4, 4,{scaleX:4, scaleY:4, scaleZ:4, x:"164", y:"157", z:"120", delay:4});
dispObj.addChild(star4);

var star5:Sphere = new Sphere(star, 1);
star5.z=-40;
TweenMax.to(star5, 4,{scaleX:2, scaleY:2, scaleZ:2, x:"-164", y:"-157", z:"148", delay:4});
dispObj.addChild(star5);

var star6:Sphere = new Sphere(star, 1);
star6.z=-40;
TweenMax.to(star6, 4,{scaleX:3, scaleY:3, scaleZ:3, x:"-36", y:"-156", z:"46", delay:4});
dispObj.addChild(star6);

var star7:Sphere = new Sphere(star, 1);
star7.z=-40;
TweenMax.to(star7, 4,{scaleX:5, scaleY:5, scaleZ:5, x:"-16", y:"-84", z:"40", delay:4});
dispObj.addChild(star7);

var star8:Sphere = new Sphere(star, 1);
star8.z=-40;
TweenMax.to(star8, 4,{scaleX:5, scaleY:5, scaleZ:5, x:"-84", y:"30", z:"59", delay:4});
dispObj.addChild(star8);

var star9:Sphere = new Sphere(star, 1);
star9.z=-40;
TweenMax.to(star9, 4,{scaleX:4, scaleY:4, scaleZ:4, x:"-134", y:"84", z:"87", delay:4});
dispObj.addChild(star9);

var star10:Sphere = new Sphere(star, 1);
star10.z=-40;
TweenMax.to(star10, 4,{scaleX:2, scaleY:2, scaleZ:2, x:"10", y:"18", z:"49", delay:4});
dispObj.addChild(star10);

var star11:Sphere = new Sphere(star, 1);
star11.z=-40;
TweenMax.to(star11, 4,{scaleX:5, scaleY:5, scaleZ:5, x:"-84", y:"41", z:"94", delay:4});
dispObj.addChild(star11);

var star12:Sphere = new Sphere(star, 1);
star12.z=-40;
TweenMax.to(star12, 4,{scaleX:3, scaleY:3, scaleZ:3, x:"91", y:"-46", z:"54", delay:4});
dispObj.addChild(star12);

var star13:Sphere = new Sphere(star, 1);
star13.z=-40;
TweenMax.to(star13, 4,{scaleX:2, scaleY:2, scaleZ:2, x:"88", y:"-130", z:"180", delay:4});
dispObj.addChild(star13);

var star14:Sphere = new Sphere(star, 1);
star14.z=-40;
TweenMax.to(star14, 4,{scaleX:4, scaleY:4, scaleZ:4, x:"134", y:"-13", z:"102", delay:4});
dispObj.addChild(star14);

var star15:Sphere = new Sphere(star, 1);
star15.z=-40;
TweenMax.to(star15, 4,{scaleX:1, scaleY:1, scaleZ:1, x:"-35", y:"145", z:"61", delay:4});
dispObj.addChild(star15);

This will animate your stars from a hidden start point to their final positions. Again, I’ve altered the stars’ z-positions so that they start inside the box.


Step 12: Test it!

Let’s test the Flash movie again. You should have a nice animated transition from nothing to the earth and stars exploding out of the box we trapped them in.

source: A suspiciously white room
source: A suspiciously white room
source: A suspiciously white room

Step 13: It’s all a Cover up!

For the box lid that will open up and have the Earth and stars explode out, we will use four images. I use a wooden panel look for my box but feel free to create your own. Here are the images I made, download these and save them into deploy > assets.

source: I made this.

Save as top.png

source: I made this.

Save as bottom.png

source: I made this.

Save as left.png

source: I made this.

Save as right.png


Step 14: Create the Box Lid

Beneath where we set up the stars, add the following code:

var top:Cube = new Cube( new MaterialsList( {all: Top} ) , 80 , 0 , 80 );
top.z=0;
top.y=40;
TweenMax.to(top, 2,{rotationX:-180, delay:2});
dispObj.addChild(top);

var bottom:Cube = new Cube( new MaterialsList( {all: Bottom} ) , 80 , 0 , 80 );
bottom.z=0;
bottom.y=-40;
TweenMax.to(bottom, 2,{rotationX:180, delay:2});
dispObj.addChild(bottom);

var left:Cube = new Cube( new MaterialsList( {all: Left} ) , 80 , 0 , 80 );
left.z=0;
left.rotationZ=90;
left.x=-40;
TweenMax.to(left, 2,{rotationX:180, delay:2});
dispObj.addChild(left);

var right:Cube = new Cube( new MaterialsList( {all: Right} ) , 80 , 0 , 80 );
right.z=0;
right.x=40;
right.rotationZ=90;
TweenMax.to(right, 2,{rotationX:-180, delay:2});
dispObj.addChild(right);

This sets up all the parts that make up the box lid, positions them correctly and animates them. Great stuff.

Each “cube” is set to have a depth of zero (the third argument in the constructor), so they appear to be flat planes.


Step 15: Lid Material

In the material section, add the following code:

var Top : BitmapFileMaterial = new BitmapFileMaterial("assets/top.png");
var Bottom : BitmapFileMaterial = new BitmapFileMaterial("assets/bottom.png");
var Left : BitmapFileMaterial = new BitmapFileMaterial("assets/left.png");
var Right : BitmapFileMaterial = new BitmapFileMaterial("assets/right.png");

Now the lid will look the part. I’m sure you noticed that the left and right images are rotated and then I rotate them back again in the code in Step 14. You are probably wondering why I did that instead of just leaving the images as they were. Well, there’s a reason for that. They won’t work correctly unless you rotate them. It’s an odd bug, but the images turn up backwards when rendered and when you apply an animation to them they go the wrong way. Rotating them first and then back in the code makes them work as they should. It’s quite odd, but there you go.


Step 16: Testing!

Now all the parts are ready for another test, it’s all coming into place. I’m sure you’re making all sorts of oohing noises right now. Marvelous.

source: The whitest of white rooms
source: The whitest of white rooms
source: The whitest of white rooms

Step 17: This Needs Some Drama

If you’re like me, you’re looking at this thinking, wow that’s great, but it really needs some more drama. Well we’re going to do just that. Let’s add some dramatic music when the box opens.

Go to the Hollywood Edge sound effects library and download BrightPad.wav. (It’s not included in the Source download.) I’ve converted this to an MP3 called “dramatic.mp3″ but you can follow these instructions while keeping it as a WAV.

Save it to the folder deploy > assets.


Step 18: Adding in the Sound

Open up the .fla file and go to File > Import > Import to Library. Import dramatic.mp3.

Open up your library and you should see your newly imported file sitting right there.

Right-click on it and click on Properties. Check the “Export for ActionScript” box. The class box should now become active; type in it “dramatic” without the quotes.

source: Flash cs4. A property menu

Step 19: More Coding

Return to the .as file. At the top of the file, find the import code. Add the following import code:

import flash.media.SoundMixer;
import flash.media.SoundChannel;

A little further down, there are some private vars. You may remember this from last time when we set up the green cube. Add the following code to the private vars:

private var drama:dramatic = new dramatic();
private var dramaChnl:SoundChannel = new SoundChannel();

Now what we have done here is to set up the sound file “dramatic” and a sound channel. The sound channel allows starting and stopping of the sound through code.


Step 20: Playing the Sound

Since we only want the sound to play once (when the box opens and not every time we show the marker) you need to put the following code with all the shape set up code. I put mine just after I set up the box lid.

dramaChnl = drama.play(0,1);

This plays the sound once when the lid opens.


Step 21: Testing!

The sound should now play and hopefully it will feel very dramatic indeed.

You should feel very pleased with yourself right now, you have created something you can impress your friends with.


Step 22: Cows!

Now we get to the part where we render a 3d cow that you can hold in your hand. First of all, you need to download the following two files, save them in the usual place:

source: Not a real cow skin

The texture, which you should save as Cow.png and the cow model file which you need to save as cow.dae.


Step 23: Setting up the Cow

At the top of your file, you need to add an import. Add the following line:

import org.papervision3d.objects.parsers.Collada;

Find the private vars a little further down and add the following:

private var cowSkin: BitmapFileMaterial;
private var cowMat: MaterialsList;
private var cow: Collada;

Step 24: More Setting Up

We are going to load the cow up onto a second marker. This is to show you that this method of loading different objects onto different markers is fairly robust and can handle not only shapes but 3d complex objects too.

Remember in the previous part of the tutorial, we had four markers on a single sheet of paper, and created different colored cubes for each marker? We’re going to re-use that code to let us use a separate marker for the cow and the Earth.

Navigate through your file until you find else if (id ==1){ – the check for the second marker.

Replace everything within the two curly brackets with the following code:

cowMat = new MaterialsList();
cowSkin  = new BitmapFileMaterial("assets/Cow.png");
cowMat.addMaterial(cowSkin,"all");

//Create the new Collada Object with cowMat
cow = new Collada("assets/cow.dae",cowMat);
cow.rotationX = 90;
cow.scale = 0.5;
dispObj.addChild(cow);

Step 25: Testing!

Yes, more testing already, wasn’t that quick. Download and print out the second marker. If all goes well, you should be the proud owner of a new little 3d cow. Congratulations!

source: This room is oh so white

Step 26: Is That Cow on Moo-t?

It’s great that we have such a nice looking cow, but wouldn’t it be better if the cow were to moo?

Go to this directory of files from a CD called, The Best Of Tucows, Volume 2 – and download MOO.WAV. (It’s not included in the Source download.)

Save it in the usual place as moo.wav.

Head on over to your .fla file and import the file to your library. Just like you did with the last sound file you imported, open up its properties, tick Export for ActionScript and change its class to mooSnd.


Step 27: Moo-sic to my Ears

Navigate to the private vars and add the following lines of code:

private var moo:mooSnd = new mooSnd();
private var mooChnl:SoundChannel = new SoundChannel();

Now, for this marker, I want the sound to play every time the cow appears but to only play once. To do this, you need to add the code to play the sound in a slightly different place than we did last time.

Find this line in your code:

private function _addCube( id:int , index:int ) : void {

We want to add our code just after this. By taking the following out of the shape set up code, it will play every time that ID is found rather than when the shape is set up, which only happens once.

Add this code:

if(id==1){
	mooChnl = moo.play(0, 1);
}

Conclusion

Test the file for the last time and the cow should moo. You can even use both markers at the same time and be super swish.

source: One handed, oooh yeah.

I hope you’ve enjoyed this two part tutorial on Augmented Reality and hope that you can go off now and create some very cool things.


Other parts in this series:«Beginner’s Guide to Augmented Reality

Add Comment

Discussion 45 Comments

  1. Agi Masekela says:

    Amazing!!! Enough Said. Man ima sit and work on this for the entire night!. This technique is very very very new and seen as really revolutionary in my country(South Africa).
    Thanks for the Tut.
    Will keep me experimenting for nights to come.

  2. fremox says:

    Hello !
    Very nice tuts ! Thank you for the tips, there isn’t enough tutorials about RA, and i need such yours… juste perfect for me !! I wondered how the “hole” was done, and didn’t managed to do it with the saquoosha’s tut on his web site…

    Oh, sorry for the mistakes, i’m french and my english is very bad…

    I have a technical question for you :
    I managed to to the 2 parts of your tuts, but when i try to import and play a DAE (my own animation of a little guy made by me in 3DS MAX), it seems that flash can’t play the animation at all (the time is frozen on the first animation key), even if i can see my object with the right textures….
    I’ve already managed to play this same animation with flarToolKit, but :
    Any idea on how to achieve that with FLARSquidderKit ??

    A little new tutorial on that would be very very interesting, and, for instance, another one on how to cast “shadow” on the virtual “floor” (the perspective of the marker) would be extremely useful !!

    By the way, thanks a lot for your work, and keep the good stuff !

    • Author

      First, thanks for reading and enjoying my tutorials!

      When importing you DAE file, do you use code similar to the following?
      var dae : DAE = new DAE(true);

      The (true) part should make your DAE file animate, it sounds to me that you haven’t set that and so the DAE file remains still.

      Good luck

      • fremox says:

        Thanks for your response,
        but i’ve well wrotten the “true”, even a little bit more… my exact code is :

        var _pixelGuy = new DAE(true, null, true)

        with “_pixelGuy” the name of my DAE animated in 3ds max…

        and nothing happens !
        The DAE remains still…
        Any other idea ?

    • Author

      Hmm, I’m not sure then. If it works in flARToolkit, it should work in squidderkit as it is flARToolkit with a few extra functions written in.

      You may be missing some import classes from your version of flARToolkit or other reasons. Can’t really think of much off the top of my head sorry.

    • Ray says:

      Heya,
      fremox… how did you manage to replace the cow with your dae.? I tried to do the same by renaming my animated dae.file and texture to cow.dae and cow.png but nothing would happen. I imagined to have at least a motionless character, but no.
      WOuld appreciate your help.
      Cheers Ray

  3. mutiu says:

    very useful… again. Thank you!

  4. Amazing! I think it’s useful for every developer of love flash 3D.

  5. Salman says:

    Hi Jonathan

    loved both tuts, very informative

    i have a question for you, is there any facial recognition kit that can be used in conjunction to FLAR, if possible a small demo will be much much appreciated

    if i need you professional commercial services will you be available?

    Salman

    • Author

      Hi,

      Facial recognition with AR is possible as demoed by squidder.com. It will recognise a face rather than idividuals faces though. I haven’t played around with this myself yet unfortunately.

      I am available for work yes, but not for any big projects as in a months time I will be returning to university for my final year. I can work on smaller projects while doing university work though. You can contact me through my website http://www.kablamo.co.uk

      Thanks!

      • Salman says:

        Hi Jonathan

        Thanks, i ll look at the face recognition link and see if that helps the project

        i ll get in touch if i am not able to implement this with FLAR

        thanks again

        Salman

  6. i want to develop this, but also change the 3D object and put a video. How can i do it?

    • Author

      Changing the 3d object is as simple as replacing the .dae file with your own and then changing the name in the code.

      For video, have a look for Papervision 3d video material. Basically, you just use a video as a material for an object. Plenty of tutorials for this already online.

  7. Where i can find some dae. objects? Looking for brain. Thanks for answer.

  8. Andre Hamon says:

    Hey, thanks for the amazing tutorial! I am able to export .dae files from Google Sketchup, but am wondering how I export the textures image like you have done with the cow. How does it line up etc?

    Thanks again :)

    • Author

      I don’t have much knowledge of 3d modelling, but I’m pretty sure you apply the materials in sketchup (bound to be guides online about this) and then export the .dae file. The textures should be created alongside the .dae file I’d imagine.

  9. urbanoid says:

    An example of this technology in action: http://dressingroomonline.com/

    I just finished it, let me know what you think!

  10. Brendan says:

    Hi i am trying to embed a modified version of this onto my website for a class project. Its not actually going online. But it wont work. Do i have to modify file links in the actual flash file? How would i go about that?
    Thanks.

    • All you need to do is embed the .swf file like you would any other flash file. When uploading to your server, remember to include the assets folder and anything else you have inside the deploy folder. It should work, I’ve uploaded AR to my website several times.

  11. That´s a great tutorial. Very useful.

    Are you planning on a tutorial about animated collada?

  12. Felipe says:

    Could someone please take a look at this animated collada to see if it´s possible to make it animated? I´m tryinf this but can´t make it run.
    Please download the DAE e texture here http://www.add-digital.com.br/collada/collada.rar

    It´s a simple animation of twist.

    Any help will be very appreciated.

    Thanks

  13. Cameron says:

    Thanks so much for the tutorial, it’s fantastic to be able to set this all up just using Flash. You’re the man bring AR to simple people such as myself.

    Excellent tutorials, really enjoyed them both and easy to follow – keep up the good work!!

  14. sxmcrow says:

    Hello,

    Welldone for your tutorial!

    Just one question, how do we do with FLARtoolkit to add the shadow and effects in phong shading?
    is it possible to manage animations from a 3D model?

    thank you in advance and congratulation

  15. Hi,

    I completed this tutorial too without any problem. Very well written.

    I wanted to try this with Google 3D warehouse models. I downloaded a Collada model and replaced the cow.dae file with the new model.dae file. but it did not work out.

    Also, the google 3d warehouse models use multiple image files as texture unlike cow.png. How do I get them to work?

    I am a new to 3D and AR but have knowledge in AS.

    Thanks

  16. galaxyhxy says:

    Thank you vary much

  17. chkkll says:

    hi there..
    thanks for your great tutorial and the source..
    i was tryin to add my own 3dmodel, bu unfotunatly i failed i guess. the cow file u used works perfectly but when i try to use some custom models it gives the errors:

    ERROR: DisplayObjectContainer.addChild : DisplayObject3D already has a parent, ie is already added to scene.

    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at org.papervision3d.objects.parsers::Collada/buildObject()
    at org.papervision3d.objects.parsers::Collada/parseGeometry()
    at org.papervision3d.objects.parsers::Collada/parseNode()
    at org.papervision3d.objects.parsers::Collada/parseScene()
    at org.papervision3d.objects.parsers::Collada/buildCollada()
    at org.papervision3d.objects.parsers::Collada/onComplete()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()

    i can see from the debugger that it reads the texture file but not the DAE file… i tried exporting from both lightwave and 3dmax, both didnt work.. any idea how i can solve this?
    thanks for all your help in advance

  18. mike says:

    Can animations from any 3d software be imported and used? I’m assumming all this data is in the .dae file. Am I wrong?

  19. Zhee says:

    hi jonathan .. if i want to put augmented reality project to web server on my web hosting in yogyakoe.com/interior .. how i can do it ?

    i create augmented reality with flash builder and there i has some folder, src, assets and bin-debug.

    best regards

  20. Tang says:

    Qiute an amazing thing!
    And I want to know more about it!
    Final design is a cow, and if I want to animate such as running. How can I do?
    Thank you !

  21. Daniel says:

    Probably, nay, definitely the best two tutorials out there for beginners to AR.

    Like you I’m a designer first, coder seco… thir,,, well i’m not really a coder at all, I only knew some very basic Flash but your instructions are so clear and logical and so much easier to follow than the tutorials written by hardcore coders.

    Now I’m hoping to create some AR apps for my own University projects.

    Thanks

  22. TM says:

    I have downloaded your source file for part 2 however when i try to test the movie i get a white screen? Any ideas?

    Thanks,
    T

  23. jack d says:

    great tutorial. this is the very clear AR tutorial for beginner like me.
    thks alot God bless U

  24. jack d says:

    o ya btw if u dont mind, would u give us the tutorial about adding movie to AR and step by step to put it to web server. thks alot jon…

  25. Lou says:

    Hello!This tutorial is very nice and it helped me a lot as I am completely new to AR. Thank you! I have a question if you can help me.I would like to have a simple 3d animation from blender. I export it as collada file but nothing moves. I do not know what I do wrong. Should I import something more than the ones that are in your code?

    Thx a lot!

  26. Jay says:

    Hi…

    I hope somebody could assist me problem to get new 3D model in the program. The easiest way what i have done was replaced the cow.dae with google 3D Warehouse (collada dae) and when i run it seems nothing happen and no error at all.. it did’t show the new model. I have seen many people facing the same problem… may i know exactly which part i am missing. I do really need to know and resolve the problem. Please help.

  27. JinxD says:

    Hi! I’m a designer and I want to develop a project with augmented reality. I managed to do the part 1 of your tutorial. It was super easy for someone like me that has a very limited knowledge of ActionScript and AR
    However I find myself stuck on step 2 of this tutorial. Even if i try to play the the ready made fla that you provide it always comes up with the same error:

    1046: Type was not found or was not a compile-time constant: Sphere
    1180: Call to a possibly indefined Sphere

    Excuse my ignorance, but i really don’t know what to do

    And by the way how could i use this technique to play videos (not necessarily 3D)?

    • Anon says:

      You need to add this line at the top:

      import org.papervision3d.objects.primitives.Sphere;

      If you look you are only importing the cube.

  28. Leandro says:

    Hello there,

    thank you for the very helpfull tutorial!
    I´m having problems after uploading the files to my server, while I´m testing the project offilne, everything goes well, I embbeded the swf file into a html file, and everything showed up perfectly online, except for the swf file.

  29. Leandro says:

    Oh, I forgot to mention, Ive uloaded my entire project´s folder, with everything inside, which was the content in flarsquidderkit.zip

    Thank you in advance for any help.

  30. MafReino says:

    Great tutorial! Thank you very very much for all information!

    Now I’m trying to create my own project and I’m thinking about how to make the animation restart every time it’s shown to the cam… I mean, following this tutorial I get the animation plays until the end and then it stays at that final point but I want it to start again if someone else shows the marker…

    I guess it’d be just a simple line but I’m not pro enough to work it out… :(
    Help would be very welcome! :P

  31. swp says:

    thank’s about tut, but how about if i want to rotate cow.dae, like flartoolkit example earth.as
    sorry about my english

  32. miha says:

    .. i am starter flash user ….

    How can you implicate this tutorial:

    http://active.tutsplus.com/tutorials/effects/create-3d-effects-with-the-stardust-particle-engine/

    in this code with hole and earth, i am trying to and i am having a problem because i am having eror 1084,constantly…

    thank you very much, Miha

  33. Designer says:

    Hi, can anyone please explain how COW.dae is added to display for specific marker? I think here lies explanation how to replace cow model with other dae file, since I can’t replace it no matter what I do. Thanks!

  34. how can i make my project into a standalone swf? I mean, to make it run as it does when debugged. I can’t seem to make that work with this tutorial :< everything is white when I try to copy generated .swf

Add a Comment

To add a code snippet to your comment, please wrap your code like so: <pre name="code" class="html">YOUR CODE</pre>. You can replace the class name with "js," "css," "sql," or "php." If there are any "<" or ">" within your code, please search and replace them with: &lt; and &gt; respectively.