Plains Terrain: Part 3 - I'm a Moron


I am a moron. Let me explain. Last time I was trying to stitch the terrain together by averaging the vertex data itself, but I use a heightmap to get all of my vertex data. So why not just stitch the heightmaps together before I generate the vertex position data? It'll be faster, and I won't have to keep wrestling with my arrays. It's also very easy to store heightmaps, they're just images, if I ever want to make a save system of some kind.

But first, check out the heightmap. It looks weird.



It shouldn't look like that, it should look more like this.



Well, I fixed it. I'm not completely sure why it was doing that, but whatever. Now it looks like it should, and the terrain isn't completely odd.



Now, let's try stitching the heightmaps together as I originally thought.



Sweet! It looks perfect. Well, mostly perfect. It's not smoothed or anything, but the vertices meet up in exactly the same places. The next step would be to just have the averaging of the heightmaps go deeper in to make the transition smoother. But I think I'm going to stop here for now. It's been almost a month since I wrote this code that I'm doing this write up, and I've lost interest for the moment. I'll probably come back to it later, but for now this project is going on the shelf.

2 comments:

Anonymous said...

losing interest; a common theme, i've got 20 or so major projects 75% done that I lost interest in. So anyhow - what was this project? something more than just learning GL?

Elec0 said...

Yeah, happens to me all the time..
Kinda, I wanted to make a basic biome generator thing, but, as you can see, I got hung up on the terrain part.

Post a Comment