Making Detailed Polygons Redux

Lux maps won't make themselves.
Post Reply
User avatar
Enokrad
Dark Spawn
Posts: 3367
Joined: Thu Aug 23, 2007 4:16 am
Location: New York
Contact:

Making Detailed Polygons Redux

Post by Enokrad » Sat Nov 01, 2008 4:58 am

SADLY I NO LONGER RECOMMEND USING THIS METHOD, SO DON"T USE IT
Image ready sucks making detailed polygons without creating huge files.
99% quality is horrible and 100% quality creates maps that are unstable during online play.
Unless you find another program that does a better job than image ready,
please don't use this since any map created at 100% will most likely be rejected by the maplab for having to big of a map file (.luxb)
If you do find another program that can do this better than image ready please post it below, thanks.



OLD POST (NO LONGER RECOMMENDED)


I decided to re-do the guide to making detailed polygons since the information given in the original was very vague and I stumbled to many problems trying to get mine to work.


After having made a few maps and using the tracing option to create country boarders I felt it was time to start refining my methods to making my life easier, my maps build faster and the country shapes more precise.

In the original thread
SunTzu wrote:I've been asked a few times on how I make detailed polygons for maps, so here is a quick overview:
  • Start with a reference image
  • Create a new layer in Photoshop (Paint Shop Pro, Gimp, etc. will work as well)
  • Outline the polygons using 1-pixel dots
  • In ImageReady (or any image mapping tool) use the polygon image map tool and create the polygons by connecting the dots
  • Preview the image when complete, and copy the polygon coordinates to your .luxb file.
While this is accurate it is vague and some of the methods outdated (“create the polygons by connecting the dots”)

Before we start


My method can be done by any intermediate/advance image editor BUT requires ImageReady for the creation of the html file that will be used to extract the vector image coordinates.
Other Image Mappers can do this too but most require you to still trace by hand the country shapes.
If anyone knows of any other software that you can use the Magic Wand Tool to create an “image map” and export to html please share it with the rest of us.
In my method I’m assuming that you are planning to use an overground to cover the country shapes and edges. You can simply skip to step 2 if you plan to create a simple map (with no overground image) but with detailed polygons.
Users familiar with image editors and layers can also skip to that step 2 also :)

Remember being accurate is not as important as creating a map with decent sized countries that will be playable on average sized monitors (17”-19”)
To my opinion the final size of your map should not exceed the 1200x900 pixels barrier (the chat window in multiplayer takes part of your screen height wise) and you should always leave a little room for the Player info box so it doesn’t overlap countries.

Step 1
Using an advanced image editor (photoshop, gimp or others)
This will help you create layers of the images that will be placed on your overground.
After creating the layers that will be your map. The next thing is to create the country boarders.
Create a new layer that will be placed on top of all the others.
Using the straight line or brush tool (1 pixel thick) draw the country shapes. You can use 3-5 pixels for continent boarders.
Image

Using the magic wand select inside all the countries that you want included in the map.
Create a new layer and fill all the countries with a solid color (ex. green)
Image

Select that layer and flip it vertical.
Image
Save the file (in a format that will keep the layers intact) and open it with Image Ready.

Step2
In Image ready hide all the layers except the one you filled the countries with a color. (make sure it's flipped vertical)
Right click at the image of the layer as shown in the picture and select “Set selection to ……”
Image

Go to Select->Create Image Map from Selection….
Image


Best results when you set the value to 100 although i recommend trying with a smaller value and increase appropriately.

UPDATED : Please do not use 100%
It makes perfect vectors for the file but the more complex the map is (lots of corners and rounded endges) the larger the file will be.
On alexanders empire the file with 100% is 142 KB and at 99% is only 30 KB. that is 5 times less vectors for lux to calculate during online play,
which avoids issues such as lag or hosts crashes.
Doing it at 99% would mean that you would have to actually do some small changes by hand on your map, but will results to better results gameplay wise along the line.

Image

Save the file under File->Save Optimized As…..
Image

Make sure you save type as html only and setting set to xhtml.
Image

Step 3
Now you have to open the html file with Notepad or any other editor and extract the coordinates.
Image

You just have to place them one by one inside your map.luxb file.
Image

After that just open the map file with the lux editor and you can go and assign countries to continents, give names etc.

Hope all this helped
Last edited by Enokrad on Tue Jul 14, 2009 5:34 pm, edited 2 times in total.

User avatar
dustin
Lux Creator
Lux Creator
Posts: 10726
Joined: Thu May 15, 2003 2:01 am
Location: Cascadia
Contact:

Post by dustin » Sat Nov 01, 2008 8:41 pm

Cool! I've added this thread to the list of useful stuff stickied in the maplab forum.

User avatar
yi3artist
Luxer
Posts: 68
Joined: Tue Mar 01, 2005 7:36 pm
Location: Texas

Honorable Move Sir

Post by yi3artist » Wed Nov 05, 2008 7:15 am

Very kind of you.

It's a good addition to Tzu's post (which had me lost too when i first read it).

Salaam
Luxer
Posts: 15
Joined: Sun Nov 04, 2007 6:52 pm
Location: Somewhere...

Post by Salaam » Sat Jan 10, 2009 8:02 pm

Thank you.

I can finally graduate from just using the tracing option!

link bookmarked

User avatar
Enokrad
Dark Spawn
Posts: 3367
Joined: Thu Aug 23, 2007 4:16 am
Location: New York
Contact:

Post by Enokrad » Fri Apr 10, 2009 7:52 am

Just came out with the mini version of the above map
Having the chance to redo the map with new boarders, i found the reason the larger version kept crashing during the motw run.

Using 100 % polygon detail for the countries would eventually create way more vector coordinates than needed and would bloat the map.luxb file.

The original alexander's .luxb file surpassed in size even that of Dark Ages :shock:
142 KB might not seem much these days, but apparently are capable of bring online lux gameplay to its knees.
This new map was done at 99% quality and resulted in a filesize of just 18 KB

that is 8 times smaller. 8 times less vectors for lux to calculate.

all that because of a single 1% in quality difference (i blame ImageReady).

still, at 99% quality means that any map created with sharp or rounded angles still requires you to go to the Lux map editor and shift A LOT of pointers to their right position. at 100% no manual editing was required at all :(

It adds another hour of doing it by hand by avoids created a bloated luxb file and in the end less crashes online :D

/me apologizes for all the crashed games people had to suffer because of his negligence :oops:

Post Reply