*blog... kind of... *rss
PV3D 2.0: How to render in anaglyphic (stereo) mode 06.12.2007 | |
No, neither PV3D 2.0 does this render automatically, but again, this is just another example of what can you do being able to render the same scene to different targets.
The technical/physical part of this render is simple. Based on the main camera, you need to have to other cameras, A and B, one on each side of the main camera, if you displace the camera A -50 of the main camera, then you displace the camera B +50. The cameras need to be parallel, so you also have to displace the target of the cameras. Then, render the camera A and copy the red channel
render the camera B and copy the green and blue channels
so, again 2 renders per frame (which means, rendering 2x the amount of polys), then into a final Bitmap you mix all the channels.
Before doing it directly with bitmapData.copyChannel I tried using colorTransform and then using the additive blendMode. It worked, but wasn't as accurate as the proper way is, and it was much more slower.
The final test looks quite good I think, and the effect works with the proper glasses.

There is also another test done with the render mode, which was a quick modification of a test from Ralph.
I must say that it is not 100% correct, in theory the channel displacement should be only horizontal, in some camera angles the effect may not look right. I guess this could be somehow sorter, but I was too lazy again :P
And here you have the sources again! In case you wonder about how the ball.as was generated, I used a modified version of Jerome's AS3 Geom Class exporter. | | posted by mr.doob at 15:50 | | 0 comment written so far |
SORRY! Is not that I don't care about what you have to say, of course I do, but they are speaking louder and I lost my patience :(
|
|
*profile

traditional id: Ricardo Cabello Miguel
based in: London, UK
serving to: Hi-ReS!
contact me: click here
*latest posts
* Showcase is back, now in Javascript (19.11.2008) * Zeh's Fnk (15.11.2008) * Lupen III (Italian Opening) VS Captain... (08.11.2008) * Duuuuude! (31.10.2008) * Pump 'N Seal, Jackie Chan, Manuela and... (26.10.2008) * Ubuntu 8.10 on a Macbook Pro (25.10.2008) * Ubuntu 8.04, Apple Keyboard - Change F... (22.10.2008) * Rules for making the internet a better... (21.10.2008) * The Magic of Viral (10.10.2008) * Jonathan Harris: Beyond Flash, an adde... (06.10.2008) * Zeitgeist: Addendum (05.10.2008) * Crisis (03.10.2008) * Youtube, now in Super HD! (30.09.2008) * Adobe AIR for Linux - Beta (28.09.2008) * What does the Google Chrome logo inspi... (28.09.2008)
*latest comments
* C++, SDL Coding? Maybe.. ;) (Preview) (trace) * C++, SDL Coding? Maybe.. ;) (Preview) (Joey) * La picaresca (spt) * Mr. Slip Up (ricardo) * La picaresca (ricardo) * La picaresca (spt) * La picaresca (sole) * Demoscene @ Cirsa (sml) * La picaresca (humphr3y) * La picaresca (alfio) * fiver2's new baby: debris (Jcl) * Barcelona = full of shit(s) (Soli) * Demoscene @ Cirsa (Scener) * Rar & unrar with Ubuntu (SethPlate) * Mindcandy 2 (Jcl)
*wish list
|