PDA

View Full Version : Skybox textures



starman
10-29-2003, 04:02 AM
My starfield skybox looks distorted at the edges and the cube is visible, especially when the camera yaws. I need to test with proper textures - anyone know where I can get the Quake II skybox textures? I hear those are a good litmus test.

Also, does anyone have any advice for generating my own? I've got Blender if that helps.

Leyder Dylan
10-29-2003, 04:06 AM
Use these textures parameters, you need to clamp your texture.

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);

starman
10-29-2003, 04:42 PM
GL_CLAMP_TO_EDGE is not supported by the OpenGL headers that I have with Borland C++ Builder 6. Where do I get the latest headers?

Leyder Dylan
10-29-2003, 08:12 PM
Check your e-mail, I don't know if it's the same header for MS Visual and Borland but try and u will see.

starman
10-30-2003, 05:03 AM
That fixed my "undefined GL_CLAMP_TO_EDGE" problem, but my skybox still looks funny. I may just have the wrong textures, but you can actually see the stars traversing the corner of the box as the camera yaws. If anyone wants to take a look, you can download my (not completed) app at http://davemikesell.com/jupiterexplorer.htm It's very slow on older video cards...I haven't done any kind of performance tuning as of yet. Thanks...

[This message has been edited by starman (edited 11-04-2003).]

Obli
10-31-2003, 02:23 AM
I can't test it right now (and I probably won't be able to in the next days) but I remember my skybox also looked strange until I set fovx = 90 (fovy is appropriate to mantain square ratio).

After I did that, the skybox looked **much** better. I actually can spot the corners in some points if I concentrate hard enough but I guess a normal user would not be able to.
Anyway, it looks just like in some games...

starman
10-31-2003, 04:53 AM
My FOV is set to 90 when the skybox is rendered.

Obli
11-03-2003, 11:02 AM
All right then. The link seems to be dead. If you are tracking the thread, can you please update?
Can you point screenshots instead of applications? I would rather be safe without installing anything on my box.

starman
11-04-2003, 08:16 AM
Obli - I'll try to post screen shots tonight...thanks.

starman
11-04-2003, 08:28 AM
Actually, there is already a screenshot on my site: http://davemikesell.com/jupex.jpg I can explain what's happening I believe with just this one shot.

Notice the star at the top of the shot almost due north of Callisto, the foreground moon. As I yaw the camera to the left, that star (and others at the top left) will appear to move down and to the right until they reach the center of the view, and then will go up and to the right. Stars on the bottom will do the opposite. The angle is steeper for stars at the top, and the ones in the middle appear to move straight across the screen, which is what I want.

It's like the stars are traversing the outline of the skybox and I'm always looking into the corner.

Does that make sense?

[This message has been edited by starman (edited 11-04-2003).]

[This message has been edited by starman (edited 11-04-2003).]