Jump to content
  • Advertisement

Archived

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

GreyDigger

Terrain Height Files

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

I have a question about what type of data file should be used when dealing with outdoor terrains. Looking at games like Asherons Call and EverQuest, these games have extremely large landscapes, and very detailed in many areas. How is it that these games can have these largly polygonal landscapes and not take up alot of space on the hard drive or CD? The larges file I found on the Asheron''s Call CD was around 44MB. AC also installed a file onto my hard drive which weights in at around 122MB. These files cannot be TXT files or 16-bit height field files, since the space needed for these would be very high. Is there some sort of trick they are doing to get these large land masses into such a small area of disk space? (I did a test in Photoshop, and a 10,000 x 10,000 pixel TGA file, 2 colors (black and white), indexed, came out to around 90MB. The AC map has to be made up of more than that.) I do not want any replys on the game programming, or level of detail stuff. I just want replys dealing with the main, highquality part of the landscape in a file, and how that file can be made so small yet hold a landmass so large. Thank you

Share this post


Link to post
Share on other sites
Advertisement
You''re a little mistaken about the size of the files. First of all you don''t need a 16 bit bitmap for a landscape, 8 bit is more then enough. Second of all, 10,000x10,000 is huge. And I mean HUGE. For a regular strategy game 100x100 heightmap is more then enough. If you make a 1,000x1,000 8 bit heightfield, you are going to have a HUGE very detailed world.

Share this post


Link to post
Share on other sites
kill,

if you had read my post, you would have seen that I made referance to Asherons Call and Everquest, two massive online RPGs. Of course 10,000 by 10,000 is huge, but the worlds within AC and EQ are by far larger than that. In AC I looked at how the world is rendered (and included a screenshot below). AC and EQ are very much different from a "regular strategy game".


Take a look at this screenshot of Asherons Call (edited in Photoshop to show the levels of detail better). Be warned, the screenshot is around 160KB in size. Look at the map that is also in the screenshot. The green circle is my location in the world (the circle should be much smaller than it is on the map, since the area being rendered isn''t the only land within the circle).

The "grid" look (not the red grid I made in PS, but the weird tiled grid on the landscape itself) is a texture problem Voodoo cards have with AC, but it does allow programmers and designers to see exactly how the terrain is rendered with Level of Detail.

Anyway, back to my point. Look at the detail in the map, the size of my player (that small red dot, or in reality, smaller than that red dot). Look at the landscape that is being rendered in view. Look at the circle on the map. Now tell me, what type of data file can handle a world THAT big. I am not talking about small Quake maps, or strategy game maps, I am talking about continental sized maps.

Share this post


Link to post
Share on other sites
Now lets expand by going into pixels. In the center of the onscreen rendered landscape, lets picture each block as a pixel (each pixel becomes 2 triangles). Now, lets say that the total onscreen rendered landscape is 12 low detailed blocks by 12 low detailed blocks (the low detailed blocks are those large ones that are around the edge of the terrain.

Now, if 1 large block is equal to 64 smaller blocks, than that 12*12 terrain, if we removes any level of detail and just rendered the terrain in its highest detail, would be equal to 9216 blocks (or 18432 polygons, since each block is made of 2 polygons each).

The square root of that landscape is 96*96. Now, the whole map (looking at the smaller map in the screenshot with the circle) is roughly 65 times the size of the currently rendered area. 65*96 is 6240, that squared is 38,937,600 total pixels in the map.

I may have just answerd my own question here. Still that map file is huge. 6240*6240. Close to that 10,000*10,000 pixel file I was talking about, heh.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Compression,
Repeating tiles,
Interpolation,

Er, are those too obvious?

Share this post


Link to post
Share on other sites
Yeah, by the way, who stops you from saving your heightmap in a compressed file? I bet in this type of in image compression can get some nice results.

One question... Are you sure they aren''t uploading something from the server to ur machine at runtime?

Share this post


Link to post
Share on other sites
I just thought of something. I bet you this is how these games do it.

If you look closer to the map, you''ll see that the landscape is very, and I mean VERY smooth. You have hills, water, etc, but you really have no high angles, everything is very smooth. If you use splines to do that, holy crap, can you acheive a small file or what!

For every 100x100 points, they''re probably using 4x4 control points. The heightmap is generated on the fly from these control points. Your world is huge, now divide it by 25(my example), and compress it. I think this gives you a reasonable file size, doesn''t it?

Share this post


Link to post
Share on other sites
Will "on-the-fly" generation give over 2000 online users the exact same results on every one of their computers all the time?

And no, there is no map data being sent over when playing the game. The only map data sent is when the player goes to a dungeon thru a portal (like a loading screen), and before the player starts the game (update program starts first, then the game starts).

Large online games like UO, EQ, and AC always store the terrain map on the clients side, since it would be much too large to transfer it across the net to 2000+ users on the fly (many of these users are on 56K remember, so they need all the bandwidth they can get).

Share this post


Link to post
Share on other sites
Forgive my ignorance, but wasn''t there some form of seed? I could imagine it being this way:

The terrain maybe has a seed for each different block of area...

The seed is on every machine which means that everyone is seeing the exact same terrain.

I believe Mankind did something like this... except they sent the seed from the server. *shrug*

Enoch

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!