Results 1 to 5 of 5

Thread: Scene enclosing Textured background

  1. #1
    Guest

    Scene enclosing Textured background

    In order to add some realisme to a scene, I'm trying to the whole scene into a box. At the inside of this box I'm texturing nice scenes (by the way, created in terragen). The effect is quiet nice, except that the borders of the box are still visible. The different textures for every side perfectly match one to another, this can't be the problem. Is there anyone who knows how to draw the box without actually drawing the edges of the box ? Or maybe a box isn't the best idea to create this enclosed background and I should use a cylinder or sphere(might can really hard to put the right tex coordinates on a sphere).

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: Scene enclosing Textured background

    I forget the settings, but this has been brought up before about sky box's.
    Do a search on "sky box" on here and the internet. There are a few tutors on it out there.

    There is a texture setting that will remove the edges.


    Originally posted by Thordev:
    In order to add some realisme to a scene, I'm trying to the whole scene into a box. At the inside of this box I'm texturing nice scenes (by the way, created in terragen). The effect is quiet nice, except that the borders of the box are still visible. The different textures for every side perfectly match one to another, this can't be the problem. Is there anyone who knows how to draw the box without actually drawing the edges of the box ? Or maybe a box isn't the best idea to create this enclosed background and I should use a cylinder or sphere(might can really hard to put the right tex coordinates on a sphere).

  3. #3
    Senior Member Regular Contributor
    Join Date
    Oct 2001
    Location
    Holland
    Posts
    179

    Re: Scene enclosing Textured background

    Try setting the texture coordinates just inside the [0,0-1,1] range instead of exactly at 0.00 and 1.00.
    Also try rendering with GL_CLAMP instead of GL_REPEAT for the GL_TEXTURE_WRAP modes.
    Another thing is to use textures without an actual border (if you're not already doing that).

    HTH

    Jean-Marc

  4. #4
    Member Newbie
    Join Date
    Aug 2002
    Location
    London, England
    Posts
    34

    Re: Scene enclosing Textured background

    like JML...

    ..I use the following which gets rid of the lines at the edges of my sky box:

    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);

  5. #5
    Guest

    Re: Scene enclosing Textured background

    Thanks all of you GL_CLAMP_TO_EDGE did the job !

Similar Threads

  1. Background image behind 3D scene
    By Ivan_j_147 in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 11-23-2012, 08:12 AM
  2. howto import into opengl a textured scene from 3ds
    By Adrian B in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 12-08-2010, 01:16 PM
  3. Landscape as a scene background
    By alexr in forum OpenGL: General
    Replies: 3
    Last Post: 06-06-2009, 09:42 AM
  4. Quickest scene background redraw
    By JADSYS in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 12-19-2005, 06:07 PM
  5. ReadPixels doesn't work with Textured Scene?
    By rangers99 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-07-2002, 10:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean