Display a View3D on top of a Bitmap object

Software: Away3D 4.x

Julien26, Newbie
Posted: 08 January 2013 12:34 PM   Total Posts: 3

Hi guys,

I began to use Away3D for an augmented reality project I’m working on, and I have a problem : I want to use Away3D to display .3ds objects with my webcam in background. But I can’t use StageVideo for the webcam, because each frame has to be analysed to search markers, so my webcam images are always on top of my View3D.

Is there a way to put a View3D on top of a Bitmap object, with a transparent background ?

Thanks in advance for your help, and thanks for Away3D, it’s a great tool !

   

Julien26, Newbie
Posted: 09 January 2013 09:54 AM   Total Posts: 3   [ # 1 ]

bump, it’s really important for me and I would be infinitely grateful for your help !

   

bart_the_13th, Newbie
Posted: 09 January 2013 10:40 AM   Total Posts: 14   [ # 2 ]

Maybe I just dont get your question right..
I think you can use the view.background instead using bitmap object.
You can blit/draw the image from the webcam directly into the view.background.bitmapData.

   

Julien26, Newbie
Posted: 10 January 2013 07:08 AM   Total Posts: 3   [ # 3 ]

Hi ! Thanks for your answer but unfortunately View3D.background doesn’t have a bitmapData attribute so that doesn’t work. However, I dig a little more and found out that I can create a new BitmapTexture object with my frame’s bitmap data passed in the constructor, and set it as background like this :

view.background = new BitmapTexture(newBitmapData);

I’m forced to do a new BitmapTexture for every new bitmapData, because without that the background isn’t updated :(

On my computer that works pretty well, but that seems pretty “hacky” to me and I don’t really like “hacky” solutions. Furthermore, my project will run on Android tablets and in this case this solution doesn’t work at all : my app completely freeze…

Given that, I gave up and decided to try to use StageVideo, but without any real success.. before I continue to spend some hours to work on that, I have a simple question : can someone confirm to me that I can have a StageVideo on the background, an Away3D object in Stage3D with transparent background, and some artifacts in the Stage ? At some places I have read that I cannot have together a StageVideo and a Stage3D on my screen…

Thanks in advance for your help !

   

_kihu, Jr. Member
Posted: 10 January 2013 09:06 AM   Total Posts: 43   [ # 4 ]

Maybe it could work like this?
http://www.adobe.com/devnet/flashplayer/articles/away3d-starling-interoperation.html

I think this image:
http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/flashplayer/articles/away3d-starling-interoperation/fig01.jpg

Shows the setting you’re looking for.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X