Possible to animate the UV’s of a Skybox?

Software: Away3D 4.x

julespong, Member
Posted: 12 April 2013 10:09 PM   Total Posts: 53

Hello all, I’ve been trying to figure out an efficient way of “animating” a Skybox. I’ve created my own runtime rendered bitmap texture and implemented it in a custom cube texture for use in my skybox. That works, and if the GPU i’m using is beefy enough works pretty flawlessly.

However, that’s obviously not ideal. I’m curious if it’s possible or if anyone has tried using the “animated UV’s” approach to updating a CubeTexture/Skybox. I added a get geometry method to the Skybox, and then tried to use SubGeometry.scaleUV() to no avail. It would seem the Skybox’s SubGeometry doesn’t have any UV data. So I’m not sure if this is the right approach. Any ideas?

   

Avatar
theMightyAtom, Sr. Member
Posted: 13 April 2013 10:01 AM   Total Posts: 669   [ # 1 ]

Have you thought of using an inverted sphere instead of a skybox?
This would reduce your update to a single set of UV’s. Whether that helps or not, I guess depends on the specific scene you’re trying to render.
I use this technique for panoramas, so they are stored in a single bitmap.

Good Luck!

 

   

northmantif, Newbie
Posted: 24 May 2013 06:47 PM   Total Posts: 14   [ # 2 ]
theMightyAtom - 13 April 2013 10:01 AM

Have you thought of using an inverted sphere instead of a skybox?
Good Luck!

...that would be mightybomb for those newbies (like me) to get simple tutorial how exactly do it.  The only needed ingridients would be : code soup and specially prepared bitmap that would fill inverted sphere from the inner side.
I tried to deal with skybox but distortion is not acceptable but can’t find how exactly do what you suggest…

 

   

Avatar
theMightyAtom, Sr. Member
Posted: 27 May 2013 02:47 PM   Total Posts: 669   [ # 3 ]

The quick and dirty way is to make a large sphere in Away, place it at the same position as you camera, apply a bitmap material, and make sure you set bothsides=true.

When I’ve use this technique, it’s been easier to work with a sphere I’d prepared in 3D Studio and exported as 3DS.
Here is an example sphere, and an example of what an environment would look like.

I hope that guides you in the right direction smile

Good Luck!

 

File Attachments
inverted_sphere.3DS  (File Size: 26KB - Downloads: 0)
   

northmantif, Newbie
Posted: 27 May 2013 06:16 PM   Total Posts: 14   [ # 4 ]

Thanks for these hints. With provided texture I easily managed to get my own 360 Inn. Do you have any idea what attached jpg could be used for? It’s the reason why I was in a tangle with my “spehrical world”.
Cheers.

 

   

Avatar
theMightyAtom, Sr. Member
Posted: 27 May 2013 08:44 PM   Total Posts: 669   [ # 5 ]

It appears to be a 180 fisheye image. You need 3 or more to make a decent 360. I use some software called PTgui for putting them together, but there are many different panorama programs out there.

 

   

swarm, Newbie
Posted: 30 May 2013 01:11 PM   Total Posts: 1   [ # 6 ]
theMightyAtom - 27 May 2013 02:47 PM

The quick and dirty way is to make a large sphere in Away, place it at the same position as you camera, apply a bitmap material, and make sure you set bothsides=true.

When I’ve use this technique, it’s been easier to work with a sphere I’d prepared in 3D Studio and exported as 3DS.
Here is an example sphere, and an example of what an environment would look like.

I hope that guides you in the right direction smile

Good Luck!

good practice

 

   

Pokey, Newbie
Posted: 31 May 2013 05:27 PM   Total Posts: 23   [ # 7 ]

Scaling a SphereGeometry by -1 on the X axis will also invert the texture. It may be a little easier than importing.

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X