Making of Part III – Anaglyph

by

In the previous article we talked about how we shot our footage in stereo. Now we are going to talk about how to render those stereo images for 3D glasses. And how to render Papervision3D for 3D glasses.

There are many techniques for displaying stereoscopic 3D images. We opted for Anaglyph, the one you need the red/cyan glasses to view, since those are the glasses people are most likely to have laying around somewhere. Also these are the least expensive glasses of the lot and that mattered since we were also going to do a mailing of Barcinski & Jeanjean 3D glasses.

In short, an anaglyph image is obtained by taking the red color channel from the left camera and combining it with the blue & green color channels from the right camera. The drawback of this technique however, is the loss of color information, mostly affecting the red color component. So that was an issue we had to take into account as to what colors we would use in the website. Black doesn’t suffer in any way by anaglyph, so that kind of pushed us towards a basic graphic black & white design for the intro and menu cube.

On to rendering Papervision3D in anaglyph! For our website we have created an AnaglyphView class which offers anaglyph renedering in Papervision3D with the ease of use of the BasicView class. Click on the image below to view the demo. Toggle anaglyph rendering on and off by clicking on the Stage.

The AnaglyphView has one camera and two viewports. For each frame it moves the camera to the left, renders the camera projection to the left viewport, then moves the camera to the right, renders the camera projection to the right viewport and finally moves the camera back to it’s initial position. This way you still have complete freedom of camera movement in between the renders. Best is to use a Target Camera and move the target object to the focus point, creating the same mechanics as our eyes when focusing.

The left and right viewports are combined using ColorTransforms and BlendModes. While this offers a fast way of combining the two channels to an anaglyph image it is important to note that the viewports will not render correctly when not completely opaque. That’s why the AnaglyphView uses extended Viewport3D classes that make sure the viewports have a background filled with the supplied background color.

To combine 2D stereo images with 3D stereo rendering you need to attach the 2D stereo images to their respective viewports. That’s what we did in our website. The left panorama video is added to the DisplayList of the left viewport and the right video to the DisplayList of the right viewport.

Needless to say stereo rendering in Papervision3D can be very heavy. Your aim would be to keep the scene as simple is possible and limit the redraw regions as much as possible. We’ll be going into some optimization tricks in our article covering the Papervision3D side of our website.

Feel free to download the AnaglyphView class and start playing with it. The example above is also included in the package.

About these ads

19 Responses to “Making of Part III – Anaglyph”

  1. Jannes Says:

    this is pretty cool. downloaded the class and its working great! thanks!

  2. Floris Says:

    Nice, but … there’s nothing like OutlineAttribute (Sandy3D) in Papervision ?

  3. anavfrances Says:

    AMAZING!!!!!!!!!

  4. Özgür ALTAY Says:

    This is great to see an interacitve anaglyph, good job guys!

  5. head tracking plus anaglyph / CODEISPOETRY Says:

    [...] anaglyph camera [...]

  6. Dimitris Says:

    Great work, thanks for sharing!

  7. Oklahoma City Lawyer Says:

    Thanks for posting this, as I’m sure it will be useful to many people out there. The more you know and prepare yourself, the better off you’ll be.

  8. Dortha Headlon Says:

    Most of my issues in this area that had previously, just by visiting this site, I would speak highly of it for anyone with the same problems

  9. Tomsen Says:

    Your site is great !!!!!!! Thanks for sharing the class !

  10. crystal wine glasses Says:

    I’m categorically disappearing to bookmark you! Thank you pro your info.

  11. http://www.blogplays.com Says:

    thanks, very helpful to newbie like me!

  12. harilal Says:

    it’s a great article . i tried it and it’s works great.

    but when i tried to align the objects it won’t work.

    i couldn’t align things ..
    can you help me pls

  13. harilal Says:

    hello

    I found this link and it’s usefull

    http://blog.melihelibol.com/?p=21&cpage=1#comment-12973

  14. history of golf Says:

    That is some inspirational stuff. Never knew that opinions could be this varied. Thanks for all the enthusiasm to offer such helpful information here.

  15. RF Modulator : Says:

    Corning made wine glasses seem to be the best! they are tough and have great designs _

  16. Michael Higashi Says:

    Very interesting post. Certainly a lot of useful information. Very happy I found your blog. Will note it and check back for more info.

  17. Syampu Rambut Says:

    I am trying to find a new template.Yours looks clean. What name is this theme? Thanks.

  18. value my car free Says:

    Hi there to all, how is the whole thing, I think every one is
    getting more from this web site, and your views are pleasant designed for new visitors.

  19. Roy Says:

    Peanuts

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: