I’m working on a project that uses the amazing and wonderful as3nui.com to make something delightful with Away3d and Kinect. I’d like to show the Kinect video stream underneath the Away3d render.
I understand that Away3d 4.0 writes to the stage3d layer of Flash, and the only thing below it is stageVideo. It doesn’t seem like I can write arbitrary bitmapData to stageVideo (and the Kinect doesn’t show up as a camera), so it seems like I have to write the background image through Away3d (or not? Please tell me if there’s a better way).
I’ve tried to set a bitmap texture as view3d.background, but it scales the image. My bitmap is 640x480 (streamed from Kinect) and the bitmap image needs to be a power of 2, so I’ve set it to 1024x512. view3d.background dutifully scaled the image to fill the space—so my 4:3 video is distorted by the GPU defined ratio (i.e. 512x512, 1:1 or 1024x512, 2:1). This doesn’t work, since the image needs to be calibrated to the Kinect dimensions. Am I missing something? I’m sure I am, but I’m too addled to figure it out.
I’ve also tried to make a plane in the background of my space, and apply the bitmap image to it, but I can’t figure out how to calibrate it properly. I’m sure this is solvable, and I plea to your greater wisdom!
Thank you!