Cubic panorama in Alternativa3D

Until v5.6 is out, at least, we have no means to make real skybox in Alternativa3D. We can fake it by placing very large static box around our scene. The problem with this solution is that there are many ways to unwrap the box and, correspondingly, there are many incompatible skybox textures. Changing box UVs by hand every time you replace skybox texture in your project is getting boring at some point, and when they want you to support multiple textures originating from all kinds of different sources, it gets nearly impossible. And then you write this thing:

Alternativa3D skybox demo

What we have here is three incompatible cubic panoramas loaded with the same SkyBox class. Additionally, there is simple class loading textures in background that may come in handy to some. Check out full source, if you wish.

7 Responses to “Cubic panorama in Alternativa3D”


  1. 1 dVyper August 20, 2009 at 12:44

    First thought in my head : “That’s amazing!!!”

  2. 2 f00n October 22, 2009 at 17:47

    You might want to check out my flash skybox viewer I made with alternativa3d a few months ago.

    http://f00n.wordpress.com/flash-portfolio/skybox-viewer/

    It is an 8-vert cube which takes a standard cubecross format (but I wrote it to work with 6 images also then disabled it).

    It is simple but highly optimised and looked great in my game. I have seen a couple pop up on the scene since which is inspiring me to make a completed project rather than the beta I made just to get a sky in my game.

    btw I appreciated your code examples when I was learning a3d makc thanks !

    • 3 makc3d October 22, 2009 at 19:17

      the point of this sample was to work with textures that are not converted to some specific format. three skyboxes you see here have their top/bottom images rotated differently. ideally, code should detect rotation automatically using some getPixel()s, but this seemed to be reasonable trade-off.

      • 4 f00n October 23, 2009 at 11:56

        Yeah the converting of 6x jpeg to a cubecross can be a little tiresome when you have a lot to make. This is why I made it work with 6 images also.

        My only problem was filesize issues. 6 quality rendered images is obviously larger than 1 optimised cubecross but its a trade off between high resolution images and a “just good enough” cubecross.

        You can of course enlarge the resolution of the cubecross but you run into problems when the image is larger than 2048×2048 on older graphics cards. 6 images would solve this problem (or buying an up-to-date card ;) ) so there is always room for both options.

        I have been mega busy recently and have missed working with a3d as it certainly is a quality engine. I cant wait to get my teeth into version 7. I will be extending the functionality of my skybox class to cater for skydomes too amongst other things and maybe it can co-incide with the release of v7.0

        • 5 makc3d October 23, 2009 at 12:16

          they have skybox class in v7, and also any code you write now will not compile against v7 so why bother.

          • 6 f00n October 26, 2009 at 14:24

            Ahh good to know. I might still continue anyway just for the geek fun factor. Cant wait for v7 and see what you come up with in regards to making our lives easier. Keep it up.


  1. 1 Cubic Panorama in Flash 10 | Promethe's Blog Trackback on August 28, 2009 at 14:50

Ask a Question

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




Old stuff

August 2009
M T W T F S S
« Jul   Sep »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Oh, btw…


%d bloggers like this: