Flash CS4 Spherical Panorama (animating uvtData)

View: New views
3 Messages — Rating Filter:   Alert me  

Flash CS4 Spherical Panorama (animating uvtData)

by Mikenku :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.

Demo
Source
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):

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

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




Re: Flash CS4 Spherical Panorama (animating uvtData)

by Mark Barcinski-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It's a neat trick, but the best panos for fp10 are going to be cubic  
(skybox).
I've tried few different setups and arrived at skybox having the best  
quality and performance.
That was a nice surprise to me as I often have to sacrifice one for  
the other, but this time the best quality has the best performance.
You can se the results here:
http://blog.barcinski-jeanjean.com/2008/12/14/flash-player-10-quality-and-speed/

cheers,
Mark

On Jan 24, 2009, at 7:03 AM, Mikenku wrote:

>
> 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.
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D@...
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org


_______________________________________________
Papervision3D mailing list
Papervision3D@...
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

Re: Flash CS4 Spherical Panorama (animating uvtData)

by Sagar Gupta-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Mike,

Are you suggesting that moving texture is more suitable than camera itself?

I like your demos and samples, all of them. And usually don't have any doubts. But here I just want to know what would you do make sure the panoramic image doesn't appear distorted.

I would like to know if you tried using cube for the purpose. I am wondering if that's more feasible. Thoughts?

Best regards,
Sagar Gupta
http://www.linkedin.com/in/guptasagar 
http://www.eworks.in 
Adobe Certified Professional

-----Original Message-----
From: papervision3d-bounces@... [mailto:papervision3d-bounces@...] On Behalf Of Mikenku
Sent: Saturday, January 24, 2009 11:33 AM
To: papervision3D@...
Subject: [Papervision3D] Flash CS4 Spherical Panorama (animating uvtData)


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.


_______________________________________________
Papervision3D mailing list
Papervision3D@...
http://osflash.org/mailman/listinfo/papervision3d_osflash.org


_______________________________________________
Papervision3D mailing list
Papervision3D@...
http://osflash.org/mailman/listinfo/papervision3d_osflash.org