Skip to main content
Participant
April 1, 2013

Adobe AIR- Stage3D Integration - Away3D?

Wondering what would be involved to support the rift in Adobe AIR. AIR allows for "Native Extensions" essentially native C/C++ code that can be packaged and used inside an AIR application. I don't have any real experience developing my own though.

There are a lot of 3D engines for AIR already in the market (Flare 3D, Minko, etc..) but Away3D is endorsed by Adobe and is open source so it seems like a good fit. There's already a discussion on the forums about Rift here: http://away3d.com/forum/viewthread/3286/

Wondering if anyone has any thoughts on this / experience with AIR native extensions that could help implement

    30 replies

    Participant
    May 28, 2013
    Don't worry, I did all the hard work for you guys. I just completed the first stable version of the Native Extension that routes the tracking coordinates into AIR:

    https://github.com/jonathanhart/oculus-ane

    Mac OSX only for now .. Windows version can come quicker if someone wants to help me out with it!

    It comes with a demo project as well, simply traces the output data but it should be enough for people to get started.

    The next steps will be setting up Away3D to correctly utilize the tracking coordinates as well as render in stereoscopic with the correct lens correction shaders, etc.
    Participant
    May 31, 2013
    I just added support to Away3D Rendering for the Oculus Rift:

    https://github.com/jonathanhart/oculus-ane

    In conjunction with the native extension, these Away3D custom classes will put the framework in an Oculus friendly render mode.

    This is early alpha, the limitations are listed on the github readme, however I wanted to get it in everyone's hands as soon as possible.

    As always, if anyone wants to help out with this project, PM me!
    Inspiring
    May 31, 2013
    Great news! Thanks for your effort.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    New Participant
    June 4, 2013
    I have a Windows version that reads the tracking data pretty much just like yours but I was having a very stupid time getting the HMDInfo into AS3 (not really much of a cross platform coder, or a programmer at all, ha!). Seeing that you cast things as doubles gives me hope haha!

    Either way, I'll clean up my code and send it your way!

    On the distortion front, I was thinking of writing a Pixel Bender shader for that. I'm wondering how responsive things will be with that many hacky plugins though...
    Participant
    June 4, 2013
    A distortion shader is definitely called for but I would focus on AGAL instead of PixelBender.

    I don't believe Adobe even supports PixelBender anymore now that Stage3D/AGAL is out..
    New Participant
    June 5, 2013
    Good point!

    It seems that Pixel Bender is still available but it's more or less an 'easy mode' shader tool. Fine for a quick effect but much less valuable for complex tasks. In the end it compiles to the same thing but, as (almost) always, it's better to use the lower level code for more control.
    Participant
    June 7, 2013
    I agree, AGAL seems to be right on the hardware and PixelBender's syntax suggests its a higher level language that does its own transpiling which may not be optimized.

    But also, announcing that grimmrobe's contributions to the ANE are now up on the repo: Windows support is also available now!

    We'll be adding further coverage of the Oculus SDK but the essentials are now there for both mac and windows. Cheers.
    Up and Coming
    June 19, 2013
    Posted a new question to the away3d forum, concerning where to actually put the barrel distortion:
    http://away3d.com/forum/viewthread/3286/P30

    Away3d forum seems pretty dead for the moment, so bump :-)
    Up and Coming
    July 6, 2013
    Agal code is done. Setup for away3d looks about ready and usable.
    Up and Coming
    September 20, 2014
    We're almost there on DK2 support in Adobe Air / flash, but i'm stuck on the correct projection.

    i'm getting the projections from the SDK and they give me these values

    rawProjectionData (left eye)

    0.9297889471054077,0,0.015671759843826294,0,
    0,0.7522833943367004,0,0,
    0,0,-1.0000009536743164,-0.010000010021030903,
    0,0,-1,0

    But when i use those nothing gets rendered. Can somebody confirm these values?
    The values i calculate for the Flare3D engine (using some of the code from the older DK1 sdk)

    0.3333333432674408,0,0,0,
    0,0.5393565893173218,0,0
    -0.5,0,1.0000009536743164,1,
    0,0,-0.010000010021030903,0

    And those work, the result is offcourse a bit off because of the incorrent input parameters like screen size, ipd, screen distance, ....

    Do i need to do something to the SDK deliverd matrix before it's usable in the engine?
    Thanks for any help on this.