[Papervision3D] Flash CS4 Spherical Panorama (animating uvtData)

Mikenku livelym1 at nku.edu
Fri Jan 23 22:03:18 PST 2009


Intro
Creating a CS4 Panorama has a unique twist - literally! You actually don’t
rotate the primitive but you animate its texture, using the following code
snippet:

public function step(moveU:Number, moveV:Number=0.0):void {
for (var i=0; i<uvtData.length; i+=2) {
uvtData[i++] -= moveU;
uvtData[i] += moveV;
// each loop i increases by 3 because skiping over the t-coordinate
}
}

The uvtData is easily animated just by skipping through correct U or V
values of the uvtData vector and adding a small increment. Click on the
image below to see the web demo.

http://www.professionalpapervision.com/demos/web/cs4pano/ Demo 
http://flex3cookbook2.googlecode.com/files/CS4SphericalPano.zip Source 
http://professionalpapervision.wordpress.com/2009/01/24/flash-cs4-spherical-panorama-animating-uvtdata/
Book Blog Post 

As in the previous Super Prim post, Petri Leskinen’s great work on Pixelero
http://pixelero.wordpress.com/ was key to this creation. He demonstrates an
animated tube which with a little work I was able to turn into this
panorama. The code is encapsulated and very closely resembles the OOP
regimentation of Papervision3D.

If you want to learn how to make spherical pano images check out the
following YouTube links by Amanda Verette (one of my graphic designers):

http://www.youtube.com/watch?v=wfkLQ93Uey0 Part 1:
http://www.youtube.com/watch?v=wfkLQ93Uey0 
http://www.youtube.com/watch?v=hhjuSIzLXCE Part 2:
http://www.youtube.com/watch?v=hhjuSIzLXCE 
http://www.youtube.com/watch?v=AKpVboahayg Part 3:
http://www.youtube.com/watch?v=AKpVboahayg 

Parts 4, 5, 6, 7, and 8 are still in production.




-- 
View this message in context: http://www.nabble.com/Flash-CS4-Spherical-Panorama-%28animating-uvtData%29-tp21637548p21637548.html
Sent from the Papervision3D mailing list archive at Nabble.com.




More information about the Papervision3D mailing list