• Advertisement

Archived

This topic is now archived and is closed to further replies.

Terrain rendering with indexes

This topic is 5921 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello again everyone, here is post about a little confusion that I have and that blocks me in me engine design... Look at this: These are your points in your map *---*---*---*---*---* |    |    |    |    |    | *---*---*---*---*---* |    |    |    |    |    | *---*---*---*---*---* |    |    |    |    |    | *---*---*---*---*---* |    |    |    |    |    | *---*---*---*---*---* |    |    |    |    |    | *---*---*---*---*---* Each point has a TU and TV for texturing, right ? Let's zoom for a single "tile", the higher left one: *---------*---- |        /  | |      /    | |    /      |    / |  /        |  / *---------*---- |        /  | |      /    | If the upperleft vertice have (0.0f, 0.0f) and (1.0f, 1.0f) in the lowerright vertice in (TU, TV) coordinates. The question is : "Take the last considerations I've showed you, does the tile at the right side of the upperleft tile of the terrain will have a lowerleft vertex with texture coordinates (1.0f, 1.0f) (I mean while using a index buffer that the purpose is for reusing vertices). Imagine if this tile must not have (1.0f, 1.0f) coordinates, but (0.0f, 1.0f) because it uses another texture or another region of the texture. Do you have to use special texture coordinates or draw quads like this ?" *---------* *---------* |        /  |   |        /  | |      /    |   |      /    | |    /      |   |    /      | |  /        |   |  /        | *---------* *---------* *---------* *---------* |        /  |   |        /  | |      /    |   |      /    | |    /      |   |    /      | |  /        |   |  /        | *---------* *---------* Thanks in advance for clarifications
/* Bullmax */ ------------- Reality has many forms : good and evil, black and white, ying and yang. Edited by - Bullmax on February 5, 2002 12:20:52 AM

Share this post


Link to post
Share on other sites
Advertisement
I do the below method you described (put vertexes in same spot.) But thats just me =) I probably don''t do it "right."

What you could probably do is check the X of the quad, make it 0,0 if its odd, make it 1,1 if its even...

You could probably play with it and find a way that is comfortable to you and has good performance.

Share this post


Link to post
Share on other sites
I wonder if what I meant is called texture multipassing...



/* Bullmax */
-------------
Reality has many forms : good and evil, black and white, ying and yang.

Share this post


Link to post
Share on other sites

  • Advertisement