Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Fast terrain system

Author
Message
Math89
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: UK
Posted: 24th Jul 2006 16:28 Edited at: 24th Jul 2006 16:29
This is my new memblock-terrain engine :
-Fast loading (40 ms for a 32*32 terrain)
-Vertex color-transparency based on height and color-map
-smoothing on/off
-Allow you to make some holes in the terrain (if you don't want useless polygons under your buildings)
-It's an object, so it reacts well to the light, it can be ghosted etc...







download

Attachments

Login to view attachments
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 24th Jul 2006 17:20
That looks great. I might consider using this instead of a matrix.

I think you should make a get ground height function though, either by using intersect object, or maybe finding it out from the heightmap, or even from the gradient of the slope.

Well done

Math89
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: UK
Posted: 24th Jul 2006 17:32
Thank you .
And here is the get_terrain_height function :
Xystus
21
Years of Service
User Offline
Joined: 2nd Sep 2003
Location:
Posted: 24th Jul 2006 17:51
Perfect 1000 points

With a hole example doesn´t work maybe because gradient 2.png is missing in the attached file
Math89
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: UK
Posted: 24th Jul 2006 17:54
Wops .
You don't need gradient 2, juste rename it to gradient.png.

Now, I think I'll add a simple lightmapping command for the terrain .

Login to post a reply

Server time is: 2024-11-23 03:26:49
Your offset time is: 2024-11-23 03:26:49