Flash Video in 3D - The Tutorial

Adobe launched my Flash Video in 3D tutorial today. The tutorial, geared towards intermediate developers, walks you through mapping video to a 3D mesh using Papervision 3D and includes source code.

Check it out.

10 Responses to “Flash Video in 3D - The Tutorial”
  1. Ralph Hauwert Says:

    Paul….awesome!

  2. .Dustin Moore Says:

    Have you ever had a problem with video freezing (On2 codec failing to produce new frames) yet the render event keeps firing and rendering the now static video bitmap on the 3D surface? I’m trying to figure out why my video-on-3d freezes. Is there a place where one can look for exceptions? I don’t get anything out of the debug standalone viewer when the video freezes.

  3. Paul Says:

    Are you streaming the FLV? Security restrictions in the Flash Player won’t allow you to grab a bitmap capture of RTMP content. See the note about it in the live docs, http://tinyurl.com/38rsoe. There are some work arounds but I wouldn’t count on them to work in the future. Unfortunately, the best you can do is embed the FLV into a SWF for now and hope Adobe changes its security policy on the matter.

    If that’s not the cause of the issue… Not sure what is. I’ve never had any problems beyond the security restrictions.

  4. David Johnson Says:

    Hi Paul,

    I’ve tried compiling your project with the latest version of PV (as of 7/5/07), and the video disappears; presumably, the BitmapData doesn’t update properly. Is there an obvious change that I need to make to the code? I haven’t been able to find it.

    Thanks!
    David

  5. Paul Says:

    Hi David,

    There have indeed been changes in some of the newer revisions of the PV3D library that cause issues with the Video 3D code. I had a look and there is a pretty simple fix that should get things up and running again.

    In Video3DScene add the following line above line 78…

    BitmapMaterial.AUTO_MIP_MAPPING = false;

    and change the following…

    screen.addCollada(”screen.dae”, materials);

    to

    screen.addChild(new Collada(”screen.dae”, materials));

    Hope that helps.

  6. adampasz Says:

    Thanks, that fixes it!

  7. OlivierClement Says:

    Hi,
    My flv contains an alpha channel and is encoded with On2 VP6 and I’ve got 2 issues;

    1. I’ve set the bitmapData transparency switch to true and color to 0×00FFFFFF,
    The video and transparency do work, but each frames “stays” on the surface as
    if it were painted on (Lets say “a dot passing by would draw a line”)
    I need to know if there’s a workaround for this

    2. Also the video and sound are completely off-sync. Obviously the video is slowed
    down but the sound plays to its correct speed. Any idea to fix this? I suppose
    the video resolution is for something (1080×608) but when used “normally”
    without PV3D, it plays well.

    Is using a plain instead of a collada mesh would help?

    Thanks,

    Olivier Clément

  8. Paul Says:

    I haven’t tried using a video with an alpha channel. I would guess that you just need to make sure the Bitmap object and Papervision are allowing (setup properly) the transparency.

    Unfortunately I’ve had problems with audio syncing too. I’ve had a better experience with streaming the video. There are security restrictions around capturing RTMP content so you have to hack around these. I did this by using a Flash 8 SWF which loads and streams the FLV and then loading this SWF into my FP9 / Papervision app. However, this may not work in the latest versions of the player.

  9. Darren Says:

    I had same problem as david but even after following instructions…

    In Video3DScene add the following line above line 78…

    BitmapMaterial.AUTO_MIP_MAPPING = false;

    and change the following…

    screen.addCollada(”screen.dae”, materials);

    to

    screen.addChild(new Collada(”screen.dae”, materials));

    …it i still video on my mesh

    pls help

  10. Darren Says:

    Sorry I meant I still have no video showing on my mesh I can here it and move the dae around but I cant see video

Leave a Comment