Jump to content
• Advertisement

#### Archived

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

# How to fill my terrain!

This topic is 5977 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

Ì´ve made a simple terrain engine. The problem is that I use Trianglestrips and by that not every piece of ground is presented. I have a pic. here so you can see for yourselves. http://www26.brinkster.com/shakazed/index.html I sure hope there´s some easier way to handle this than defining every vertex manually. Any help appreciated!
http://www.shakazed.tk

#### Share this post

##### Share on other sites
Advertisement
Use a vertex buffer and an index buffer so that when your second strip calls on the first vertex (that is actually a vertex used in the second line of the first strip) then it will use the exact same vertex. It looks like when a new strip starts you use totally new random vertices when they should be connected to the last strip''s close vertices.

#### Share this post

##### Share on other sites
I once had a similar problem, turned out that i was using the wrong height values for one side of each strip.

I should have been using height values at
(x,z) (x,z+1) (for the two sides of the strip)

eg

(0,0) (0,1)
(1,0) (1,1)
(2,0) (2,1)
(3,0) (3,1)
(4,0) (4,1)

BUT I was using: (x,z) (x+1,z)

and getting

(0,0) (1,0)
(1,0) (2,0)
(2,0) (3,0)
(3,0) (4,0)
(4,0) (5,0)

But that''s coz I''m a bit stupid, you might not be

#### Share this post

##### Share on other sites
They are supposed to be generated, going from left to right and then back again. I Will try out your techniques later on. Thanks for the help!

http://www.shakazed.tk

#### Share this post

##### Share on other sites

• Advertisement

### Announcements

• Advertisement

• ### Popular Contributors

1. 1
2. 2
3. 3
Rutin
25
4. 4
5. 5
khawk
14
• Advertisement

• 11
• 11
• 23
• 10
• 9
• ### Forum Statistics

• Total Topics
633649
• Total Posts
3013117
×

## Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!