creating my own skycube

Is it possible to create a cube, place a camera inside of it, and have the cube textured in such a way that it acts like a skycube?

I am trying to create a cubic panorama that allows relative movement (Allows the camera to get closer to the cube walls, as opposed to the way the builtin skycube works where the camera is always centered.)

Thanks.

First, you’d have to reverse the cube’s normals using the Mesh API. Then you’d have to create a texture that lines up with the cube’s UV map - I’m not completely sure this is even possible with the builtin cube mesh. A sphere might work better.

Here is a shockwave example of what I’m trying to do…

http://www.fbe.unsw.edu.au/Learning/Director/3D/CubicVR/tutfiles/cubicVR_fin1.dir
(arrow keys control movement, mouse button controls rotation)

http://www.fbe.unsw.edu.au/Learning/Director/3D/CubicVR/

I was hoping that some combination of shader and cubemap could create the cubic ‘skybox’.

So maybe I could reverse the normals of a sphere then apply a cubemap to it?

You can do it with a shader by outputing the vertex position to the uvs used by the cubemap lookup. Possibly the builtin skybox cubed shader already does that.

The question though is if this is really worth it.
Why not just create a cube in your favorite modelling program and uv map it either with

  • multiple materials so you can assign each face seperately
  • uv map a cube with the texture layout as shown in the tutorial you linked to

I guess one question I have is; will creating a cube with 6 ‘skybox’ faces actually create a cubic panorama? I was under the impression that sort of shader trickery (or something) was involved in order to get the perspectives right.

No. The skybox cube is just a cube with textures on the faces. The only thing that is “special” about it that it’s quite big and is centered around the viewer.