More optimization

I’ve been on a cabin trip this weekend, and I haven’t worked on the project while I’ve been away. But this week I’ve finaly implemented a function to optimize the terrain based on how interesting it is. And what is interesting terrain? Well, in my implementation it’s terrain containing lots of angles, bumps and turns. Flat areas are not interesting. Sides of hills are not interesting either. And those bits are removed, or rather, being represented by bigger squares. The result?

Optimizer working

Optimizer working

Rather looks like a quilt blanket. 🙂 But it works. Sort of. There is a problem.

There's a hole in the ground

There's a hole in the ground

See that hole there. Those holes appear where one big square meets several smaller ones. I need to fix this, and the way to do it is to divide the triangles meeting smaller squares…but how do I find out witch ones to divide… This will take some thinking, but hopefully it will be doable. I also created a bigger height map, to test and to show of a bit. 🙂 This one is less hilly, and is optimized even more.

Bigger map

Bigger map

Looks pretty good. And runs smoothly 🙂 Except for the holes of course. Hopefully I’ll be able to solve those soon.

-Knut

Advertisements

Tags: , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: