Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 10 of 10

Thread: Skybox textures

Hybrid View

  1. #1
    Junior Member Regular Contributor
    Join Date
    Feb 2003
    Location
    Westerville, Oh, USA
    Posts
    202

    Skybox textures

    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.

  2. #2
    Member Regular Contributor
    Join Date
    Jul 2000
    Location
    Arlon, Belgium
    Posts
    486

    Re: Skybox textures

    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);

  3. #3
    Junior Member Regular Contributor
    Join Date
    Feb 2003
    Location
    Westerville, Oh, USA
    Posts
    202

    Re: Skybox textures

    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?

  4. #4
    Member Regular Contributor
    Join Date
    Jul 2000
    Location
    Arlon, Belgium
    Posts
    486

    Re: Skybox textures

    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.

  5. #5
    Junior Member Regular Contributor
    Join Date
    Feb 2003
    Location
    Westerville, Oh, USA
    Posts
    202

    Re: Skybox textures

    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).]

  6. #6
    Advanced Member Frequent Contributor
    Join Date
    Aug 2001
    Location
    Italy
    Posts
    628

    Re: Skybox textures

    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...

  7. #7
    Junior Member Regular Contributor
    Join Date
    Feb 2003
    Location
    Westerville, Oh, USA
    Posts
    202

    Re: Skybox textures

    My FOV is set to 90 when the skybox is rendered.

  8. #8
    Advanced Member Frequent Contributor
    Join Date
    Aug 2001
    Location
    Italy
    Posts
    628

    Re: Skybox textures

    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.

  9. #9
    Junior Member Regular Contributor
    Join Date
    Feb 2003
    Location
    Westerville, Oh, USA
    Posts
    202

    Re: Skybox textures

    Obli - I'll try to post screen shots tonight...thanks.

  10. #10
    Junior Member Regular Contributor
    Join Date
    Feb 2003
    Location
    Westerville, Oh, USA
    Posts
    202

    Re: Skybox textures

    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).]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •