Results 1 to 3 of 3

Thread: Tiled Height Field question?

  1. #1

    Tiled Height Field question?

    I am writing a terrain editor, the terrain is editable by squares.
    ie 100 x 100 = 10000 editable terrain squares, in one square you could place a grass tile, in another water etc...

    my problem is the number of polygons 20,000 if I use quads.

    I was hoping to use tessalation to remove unneeded triangles by joing squares that have the same elevation.

    BUT then I will loose my tile coordinates for the squares, so I will not be able to have 100 tiles by 100.


    example normal
    (a letter = tile)

    ABCDE
    FGHIJ
    KLMNO

    But if I use tesselation
    ABBCC
    DEFCC
    GHIJK

    I will have to texture B and C as one quad
    wont I?

    as certain tiles will have been eaten up into a larger one, Is there a way round this?

    Ironduke

  2. #2
    Guest

    Re: Tiled Height Field question?

    >I was hoping to use tessalation to remove >unneeded triangles by joing squares that >have the same elevation.
    >BUT then I will loose my tile coordinates >for the squares, so I will not be able to >have 100 tiles by 100.
    > <cut>
    >I will have to texture B and C as one quad
    >wont I?

    Could you not detect the fact that you've merged two quads together, and then modify texture coordinates appropriately?

    eg. normal quad has texture coordinates 0,0) (1,0) (1,1) and (0,1);

    merge two together:
    (0,0) (2,0) (2,1) and (0,1);

    That would draw the texture twice, side by side, as if there were two separate quads.

    You'd need to set texture properties to GL_REPEAT rather than clamp.

    Hope that helps,

    Steve

  3. #3

    Re: Tiled Height Field question?

    Thanx.

    There is still a problem what if the larger squares requires more then 1 tiles as it is taking up four cells.

    I suppose I create a texture by fusing the two tiles together and then applying it right?

Similar Threads

  1. Height field
    By in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 09-17-2004, 11:32 AM
  2. height field terrain
    By incus in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 04-14-2003, 09:12 AM
  3. Height field question?
    By ironduke in forum OpenGL: Advanced Coding
    Replies: 11
    Last Post: 01-13-2002, 07:31 AM
  4. Height field Question?
    By ironduke in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 07-09-2000, 06:50 AM
  5. Tiled Height Field question?
    By ironduke in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 03-15-2000, 04:09 AM

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