Archived

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

shakazed

How to fill my terrain!

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


Link to post
Share on other sites
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


Link to post
Share on other sites
Guest Anonymous Poster
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


Link to post
Share on other sites