You must be logged in to post messages.
Please login or register

Scenario Design
Moderated by Yeebaagooon, nottud

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: The Guide to Smaller Filesize Through Manipulation of Terrain (image D/Ls inside)
posted 04 December 2004 02:37 AM EDT (US)   

By Mythos_Ruler

1.0 - Welcome

How many times have you designed a mad crazy map for use over ESO, with amazingly lush terrain features, only to be frustrated at every turn when people don't want to download it because it's 1000KB too big? There are four reasons why your map's filesize is too large. This guide will help you with one of them.

Disclaimer: A lot of the understandings I have about how the AOM engine works comes from simple observation. I am neither a programmer nor a game designer. Others, such as CheeZy_Monkey, have helped me to understand a lot of the principles given below. Lastly, some of the terminology might seem quaint to some of you scripter/programmer types. Please forgive me. Also, due to AOMH's image tag filesize limit, some of the following graphics will be in link form.

2.0 - "Why is my map's filesize so big?!?!"

Like I said, there are 4 things that affect your map's/scenario's filesize. One of them, simply put, is entirely your fault - you put too many bloody objects on the map, beit units, buildings, trees, rocks, waves, whatever. Another might be unavoidable, depending on the needs of your map or scenario; that being triggers. Yes, each trigger you make increases filesize of your scenario, but we won't bother with that. Triggers are essential to how a map or scenario is played out. There are a few things you can do to cut down on the number of triggers, like combining effects and such, but filesize saving is minimal.

The final two things that affect filesize are related. One being MAP SIZE and the other (and what we will deal with in this guide) is TERRAIN FEATURES. Lemme 'splain how they are related, then I will get on with dealing with the issue.

2.1 - Vertices, Tiles, and Filesize, Oh My

First, to understand how terrain features such as mountains and hills are presented we have to understand the basics of your map's SIZE or DIMENTIONS.

The size of a map is determined by N number of tiles x N number of tiles. A "tile" is really just the space between where Grid Lines meet, which we'll call Vertices(singular: Vertex). The graphic below illustrates this:

[HTML, (139.06 KB)]

2.1.1 - "So, how does all this have to do with my map's filesize?"

Well, because the way the terrain on your map is presented to you in 3D form is by assigning coordinates to each of the vertices created by the intersection of all those nice grid lines criss crossing your map. So, in essence the larger the dimentions of a map (measured in tiles), the larger the number of grid lines, the larger the number of vertices, the larger the number of coordinates that must be stored in the scenario file (scx). One could also look at that progression in reverse as well - it's all related.

2.2.2 - How the above has to do with "Terrain Features" and this guide

The coordinates of each vertex has an X, or width, variable, a Y, or depth, variable, and also a Z, or height, variable. Right? Knowing this is key to understanding how mountains, hills, valleys, and oceans affect your map's filesize. We must also basically understand how AOM, the game itself, tries to save filesize and exploit it with that knowledge.

What AOM's engine does to save filesize (and perhaps simplify the code?) is whenever an N amount of vertices are A.) adjacent to each other, and B.) the same height, the Z coordinate (height, remember?) can be assumed for all the adjacent vertices. In essence, the AOM engine can drop 1 of the 3 coordinate numbers for each of the vertices, thus saving filesize. It's a form of filesize compression. It's an extremely easy concept and will soon open doors for you to manage your map or scenario's filesize to make everyone happier who plays your gorgeously designed map over ESO (so they don't have to wait 10 minutes for the bloody map to download from you, plus it helps others spread your map around).

Basically, what we will do is exploit to the fullest the way the AOM engine tries to save (compress) file space.

"Taunt 010 - Are you ready?.mp3"
"Taunt 001 - Yes.mp3"

3.0 - Flattening Terrain Made Easy

After you have completed the map design for your scenario, go ahead and turn on the terrain grid (in the "Show" menu at the top) and check out how the vertices of your map terrain are fairing. As you can see below, it probably doesn't look too promising in the filesize department, huh?

[HTML, (191.53 KB)]

Probably not a single darned pair of adjacent vertices is at the same height, requiring your scx file to do things the hard way, taking up more disk space. So, what we'll do is find an area of "relative flatness" like a valley or field of grass or something. It's not completely flat, creating a larger file size, so we'll make it flat.

Choose the "Adjust Elevation" Tool and choose the Brush Size for the job. The Brush Size is really up to you, so experiment a little. You will then raise the elevation of the to-be-flattened area until it hits the elevation ceiling. It should flatten out on its own at that height. Make sure that once you click the mouse button to raise the terrain you don't move the cursor, because it'll do some weird and undesirable things to the terrain height.

[HTML, (146.93 KB)]

Finally, make sure to position the brush exactly over the raised area, then lower the newly flattened terrain down to the proper elevation, corresponding roughly to the elevation of the surrounding terrain...

...and you've taken the first and very easy step to reducing your map's filesize.

4.0 - Hill Country

After mastering the art of flattening prairies or other lower areas, it's time to move on to those beautiful rolling hills (read: additional KBs) you peppered throughout your map.

Choose a hill and, again, the correct Brush Size for the job...

Follow the steps from "3.0 - Flattening Terrain Made Easy"...

And now, you've "flattened" the top of a hill to save filespace...

Still looks pretty natural, eh?

5.0 - When the Going Gets Rough...

Okay, now that you've mastered both points 4.0 and 3.0, you'll start to notice some areas where the differing flattened elevations of terrain stick out like a sore thumb. This usually happens along the edge of a flattened area when it connects to another area of different elevation. This is where the trusty Smooth Tool comes in.

Set the appropriate Brush Size of the Smooth Tool so that you don't "smooth" too much of the flattened areas. Unfortunately, the more of the flattened area you "smooth" the less "flat" it is, and that's the opposite of what we're trying to do. I usually set the Brush Size to 2x2.

Then what you do is simply smooth the edges of the flattened area into the surrounding terrain. It's that easy, and it makes a beautiful transition between the different heights between the flattened and unflattened areas. It can look extremely natural.

The following two graphics illustrate the entire 5.0 process (albeit, in exagerated form):

When performed on two terrains that are closer in elevation, the result is seemless. Experiment for yourself to see which brush settings are best for which situation.

Remember, the important thing is to smooth the edges between slightly different elevations in order to create a natural transition. Too much smoothing negates some of our previous file savings.

6.0 - The Abyss

And now we've come to the final piece of the pie - Ocean. The water is an often neglected area of the map, but can be one of the more important areas when trying to reduce your map's file size.

You've painted your map with some beautiful Aegean Sea water, but look closer to the terrain beneath the gentle undulating sea...

The terrain beneath the layer of water is still rendered the same as if it were above water. That means if we want to fully optimize this sucker we'll have to dive right in and get wet. The upside of it is this is the easiest area of all to flatten, because all you have to do is use the "Elevation Tool" and lower the terrain beneath the water to its lowest possible point, thus flattening it completely.

Flatten the terrain completely, as close to the shoreline as to where the sand stops.

Applying this guide to maps with a large amount of water is crucial and almost mandatory.

And that's it! If you come too close to the shore and the shoreline gets too rough for you, use the same SMOOTH technique applied in section 5.0.

7.0 - In Conclusion...

That wasn't so hard now, was it? Apply this technique to any large multiplayer or single player scenario or map you want whenever you want to reduce the size of your scx file for easier and swifter up/downloading. This technique may also cut down on lag caused by slower video cards, although that hasn't been tested. It has been my experience when applying this technique to my Peloponnesian War scenario (a 930x930 map) that over 200K was shaved off of the file size, from well over 1MB to around 800K.

If you have anything to add, please feel free to comment. Let me know how things work out for you!

[This message has been edited by Mythos_Ruler (edited 12-04-2004 @ 01:02 PM).]

Replies:
posted 04 December 2004 03:07 AM EDT (US)     1 / 16  
very nice guide mythos

(¯`-.Proud Member of Ambition Designs and professer at Tsuniversity.-´¯)

Curent projects:
The Job 25% Complete Hot

Antisbackfiles.tk
For a guide on how to make WMV trailers for you campaign click Here

posted 04 December 2004 03:13 AM EDT (US)     2 / 16  
Great guide, I'll be sure to use it!

-=Skycat=-
posted 04 December 2004 04:50 AM EDT (US)     3 / 16  
Instead of raising the elevation t he highest possible, use teh sample elevation tool

I think FOG.
posted 04 December 2004 05:02 AM EDT (US)     4 / 16  
What a pretty guide... I haven't read it, because frankly I don't care how large my maps are, but a very nice layout nonetheless. I'm glad you didn't cheap-out on the JPEG quality, too. And seemingly very thorough and researched information, there. I commend you, good sir.

Your Divine Overlord
KING JARED
Aw, hell, I dunno, she had some tig-ole-bitties, d'int she?
big.vitt@gmail.com
posted 04 December 2004 05:29 AM EDT (US)     5 / 16  
Good guide ! Goes right in the Library IMO... But have you heard of the "Pick Terrain's Height" or so button, it flattens an area in no time plus to a determined height! For example the ocean would be a matter of 5 seconds. Apart from that, I had no clue of that before, very nice!

[This message has been edited by AoMPlayer000 (edited 12-04-2004 @ 05:30 AM).]

posted 04 December 2004 06:47 AM EDT (US)     6 / 16  
posted 04 December 2004 09:24 AM EDT (US)     7 / 16  
great guide mythos. ever since you explained this to me i thought i should have been published to the web. Good work.

the fate of Rome lies in your hands
---------------------------
S . P . Q . R
---------------------------
comming soon
posted 04 December 2004 09:35 AM EDT (US)     8 / 16  
Great guide. It gets more people do d/l your scenarios.
posted 04 December 2004 12:54 PM EDT (US)     9 / 16  
Error found!!!

Quote:

"Taunt 014 - Are you ready?.mp3"
"Taunt 001 - Yes.mp3"


Taunt 10 is "Are you ready", not 14

I think FOG.
posted 04 December 2004 12:56 PM EDT (US)     10 / 16  
awesome guide mythos, i might as well use it to update my hyrule map.

regards
Auron


Auron: || Aurons Site || Aurons AoM:TT Creations || MY POETRY WEBSITE ||
posted 04 December 2004 01:13 PM EDT (US)     11 / 16  
Well, won't sample elevation make every place you paint it the same height? That won't help you with areas of different elevation, like the tops of hills and such. Although it might help for underwater. However, when the Adjust Elevation Brush is set to fastest, it's almost as fast as using the Sample Elevation. Good thoughts though, guys!

BTW - taunt error fixed.

PS: Make sure to experiment a little to get the most natural looking effect you can. Also, note the filesize of your map before you apply this technique and then when you're done. Depending on your scenario (how many triggers, ocean, entities, etc.) you could shave off 10-20% of your filesize. Triggers effect scenario size immensely, BTW. After shaving off 200K from my Peloponnesian War map, it went back up 80K because I added another 100 triggers since then. LOL But imagine the size of the map if I (with CheeZy's help) hadn't aplied this technique! LOL

[This message has been edited by Mythos_Ruler (edited 12-04-2004 @ 01:18 PM).]

posted 04 December 2004 01:34 PM EDT (US)     12 / 16  
Hehe, my World Map would have been twice as big if I hadn't used my file size reducing technique. Theres a few other things I do besides changing terrain and elevation, mostly involving thinning out forests and removing objects here and there.

CheeZy ex-HG Angel
WildFire Games - Artist, Lead Scenario Designer, Game Designer for 0 A.D.
"But really, stop fighting and listen to CheeZy when he says use good grammar." - Phantom_rider.
----Stuff I've Made----
posted 04 December 2004 01:40 PM EDT (US)     13 / 16  
CheeZy's right. Too many entities like trees, rocks, etc, is the other major factor in filesize (touched on it in the guide). Each tree in a forest is treated like any other unit or object you place on the map, so thinning out forests is a good technique to save a bit more disk space. Plus, huge amounts of entities cause mucho lag, so thinning of forests has a two-pronged benefit.
posted 04 December 2004 02:02 PM EDT (US)     14 / 16  
For under water, when using the water tool, have the box checked next to - I think it's Paint Terrain.

Then it'll flatten the floor under water and also smooth the transition between water and land.

Nice guide but I won't really use it much on single-player scenarios - maybe on multiplayer though.

posted 05 December 2004 12:08 PM EDT (US)     15 / 16  
Cool guide I already scanned it previously, but now I read it thoroughly and it's really clear and a good read. You didn't have to explain it that detailed though, but I guess there are some people who could use such an explanation.

Nice screenies

posted 05 December 2004 05:08 PM EDT (US)     16 / 16  
Nice guide.
Although this is a nice guide, I am supposed to say:
added.

Theris264
former Age of Mythology Heaven and Age of Empires III Heaven forumer||former member of Ambition Designs
"An eye for an eye, and the whole world goes blind" -Gandhi
Age of Mythology Heaven » Forums » Scenario Design » The Guide to Smaller Filesize Through Manipulation of Terrain (image D/Ls inside)
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Mythology Heaven | HeavenGames