Cube Environment

Moderator
Posts: 771
Joined: 2003.04
Post: #1
Hi, I'm trying to implement a "SkyBox", using 6 textures mapped on the sides of a cube. It works great, as long as I use the "original" textures from http://www.gametutorials.com/Tutorials/O...GL_Pg4.htm (see the article "Height Map 2").
I made some new sky textures using Vue'd Spirit 4, using 90 degrees increments, but when I map them on the cube it looks like, well, a cube!
My problem is: what is the right way to generate this textures???? Blink

If this sounds confusing, but you have time, please follow the link and look at the pictures.

Thanks!
Quote this message in a reply
henryj
Unregistered
 
Post: #2
Cube mapping is a way of drawing something spherical without all the hassle of drawing a sphere. The image on your cube still has to be mapped on to a sphere during the construction phase.

If you look at your source textures you'll see that they are distorted in the corners.

There is bound to be source available to do this. I also remember seeing a tutorial a long time ago. Google is your friend.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #3
Most 3D programs for rendering landscapes should have an option to render a skybox...
Quote this message in a reply
Moderator
Posts: 434
Joined: 2002.09
Post: #4
I had a similar problem at one point. I narrowed it down my taking the working picture and modifying it. Still worked. So I figured out that the problem was my texture loading code was reacting to a difference in my input picture. I forget what it was in the end, maybe the color depth was different, or maybe one of the dimensions was the wrong size.

I also found that there wasn't enough error checking in my texture-loading code. :-)

See if you can narrow it down the same way I did. Open their picture and yours in GraphicConverter and compare image attributes and format. Or make changes to their picture directly and make sure you can still load it.

Hope this helps...

Measure twice, cut once, curse three or four times.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Cube auto-rotate sakrist 2 2,998 May 5, 2009 03:31 AM
Last Post: Ingemar
  OpenGL ES - Drawing a simple cube help. MattCairns 7 12,389 Oct 10, 2008 05:26 PM
Last Post: Frogblast
  Pre-generated cube map Fenris 2 3,573 Apr 5, 2007 07:01 PM
Last Post: nich
  Environment Background With OpenGL spinner 14 10,018 Oct 19, 2006 06:38 AM
Last Post: ThemsAllTook
  Environment mapping MACnus 6 3,769 Jul 13, 2005 08:43 AM
Last Post: MACnus