|
|
Fathah Noor, Newbie
Posted: 07 November 2011 05:08 AM Total Posts: 11
[ # 1 ]
Great! After so much searching and waiting, finally there is example of Away3D 4 - IN2AR that can work. If you do not mind, I am very interested to learn more about the source code, thank you very much~
Anyway, have you tried projection matrix like the one in this link?
|
manuelbujes, Newbie
Posted: 07 November 2011 07:39 AM Total Posts: 10
[ # 2 ]
I am also interested in the source code!! a lot of thankss!!
|
T.ale, Newbie
Posted: 07 November 2011 05:22 PM Total Posts: 1
[ # 3 ]
I would be interested in the code if you can. thank you much
|
Samuel Girardin, Member
Posted: 07 November 2011 06:27 PM Total Posts: 74
[ # 4 ]
tips : no need to display webcam on a 3D plane. I ve just discovered this : away3d.containers.View3D.backgroundImage(value:BitmapData):void.
Best fps with this method.
I love this engine !
For the source, I need to do some change. So be patient.
|
venom, Newbie
Posted: 07 November 2011 06:33 PM Total Posts: 26
[ # 5 ]
|
Erik, Newbie
Posted: 08 November 2011 12:40 PM Total Posts: 4
[ # 6 ]
I would be interested in the source code as well, Thanks a lot!!!
|
The Aryeh, Newbie
Posted: 09 November 2011 03:28 PM Total Posts: 3
[ # 7 ]
I’d also love to see the source code for this. Thanks for offering!
|
whoamiwhoareyou, Newbie
Posted: 09 November 2011 03:35 PM Total Posts: 2
[ # 8 ]
could you share your source code to me, thanks a lot! .(JavaScript must be enabled to view this email address)
|
Samuel Girardin, Member
Posted: 09 November 2011 03:41 PM Total Posts: 74
[ # 9 ]
Hi,
I’m working now on a test with asfeat and awayPhysics. Here is a piece of code to make asfeat matrix compatible with away3D mesh. I started with simple demo.as in asfeat sdk.
protected function onModelDetected(e:ASFEATDetectionEvent):void { var refList:Vector.<ASFEATReference> = e.detectedReferences; var ref:ASFEATReference; var n:int = e.detectedReferencesCount; for(var i:int = 0; i < n; ++i) { ref = refList[i]; var m:Matrix3D = new Matrix3D() ; m = get3DMatrixLH(ref.rotationMatrix , ref.translationVector,false) ; m.prependRotation(180,Vector3D.Y_AXIS) ; m.prependRotation(180,Vector3D.Z_AXIS) ; head.transform = m ; } }
public function get3DMatrixLH(R:Vector.<Number>, t:Vector.<Number>, mirror:Boolean = false):Matrix3D { var data:Vector.<Number> = new Vector.<Number> ; if (mirror == false) { data[0] = R[0]; data[1] = -R[3]; data[2] = R[6]; data[3] = 0.0; data[4] = R[1]; data[5] = -R[4]; data[6] = R[7]; data[7] = 0.0; data[8] = -R[2]; data[9] = R[5]; data[10] = -R[8]; data[11] = 0.0; data[12] = t[0]; data[13] = -t[1]; data[14] = t[2]-600; // tZ data[15] = 1.0; } return new Matrix3D(data) ; }
Still looking for a true projection matrix to apply !
|
manuelbujes, Newbie
Posted: 10 November 2011 08:16 AM Total Posts: 10
[ # 10 ]
I cant make view.backgroundImage works!! It’s correct?
myBitmapData.draw(Sprite(_flarManager.flarSource));
view.backgroundImage = myBitmapData;
Thanks!! How do you it?
|
Samuel Girardin, Member
Posted: 10 November 2011 01:18 PM Total Posts: 74
[ # 11 ]
I display the webcam like this (flash player 11.2 only), and I’m at work and don’t have my source there.
protected function ini():void { getCam() ; stage.addEventListener(StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY, onStageVideoAvailability); } private function getCam(w:int = 1024, h:int = 512, fps:int = 25):void { _cambuff = new BitmapData( w, h, true, 0x0 ); _cam = Camera.getCamera(); _cam.setMode( 1024, 512,25, true ); } private function onStageVideoAvailability(e:StageVideoAvailabilityEvent):void {
stage.removeEventListener(StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY, onStageVideoAvailability); if ( stageVideo == null ) { stageVideo = stage.stageVideos [ 0 ] ; stageVideo.viewPort = new Rectangle ( 0 , 0 , 1024 , 512 ) ; } stageVideo.attachCamera(_cam) ; stage.addEventListener(Event.ENTER_FRAME, render); } protected function render(e:Event = null):void { // draw video stream to buffer _cam.drawToBitmapData(_cambuff) ; _view.backgroundImage = _cambuff ; asfeatLib.detect( _cambuff ); view.render() ; }
|
manuelbujes, Newbie
Posted: 11 November 2011 10:48 AM Total Posts: 10
[ # 12 ]
My code dont work, i tried your code , flash 11.2 beta crash without debug
i have all working except the webcam capture as background :(
|
Erik, Newbie
Posted: 11 November 2011 11:19 AM Total Posts: 4
[ # 13 ]
I have the exact same thing… But i haven’t found a solution yet!
|
|
Samuel Girardin, Member
Posted: 21 November 2011 06:10 PM Total Posts: 74
[ # 15 ]
Eugene Zatepyakin updates his in2ar sdk with away3D 4 support.
Samuel
|