Making Detailed Polygons

Lux maps won't make themselves.
Post Reply
User avatar
SunTzu
Lux Cartographer
Posts: 1585
Joined: Sat Jan 14, 2006 1:48 am
Location: Maryland

Making Detailed Polygons

Post by SunTzu » Tue Sep 26, 2006 9:47 am

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.

User avatar
paranoiarodeo
Semiholy Exile
Posts: 10421
Joined: Sun Jul 17, 2005 5:30 pm

Post by paranoiarodeo » Tue Sep 26, 2006 10:36 am

Or ... you can use Adobe Illustrator to draw polygons over an image ... and carefully strip the coordinate data from the resulting PDFs ... lock to a single pixel grid ... or not ... if you don't mind running your numbers through Excel and ( TRUNCATING / ROUNDING ) decimals along the way ...

I streamlined the process through a weekend of trial and error ... kludgy little spreadsheet even concatenates each country's coordinates into an XML ready string ...

∞ paranoiarodeo pats himself on the back ∞

Three or four of my beta maps are lounging oceanside with Bar's ... sipping cold beers and peeking under the grass skirts of exotic drink girls ... they occasionally send postcards, rarely call and never visit ... I'm thinking of abandoning the RAW rat race and joining them in paradise ... ah ... wouldn't that be swell ... !

User avatar
SunTzu
Lux Cartographer
Posts: 1585
Joined: Sat Jan 14, 2006 1:48 am
Location: Maryland

Post by SunTzu » Tue Sep 26, 2006 10:57 am

I looked into that method a few months ago, Para, but was never able to make it efficient.

I actually stumbled across a perl script written by cyanshade that will convert the html output of ImageReady to a lux map. (See http://sillysoft.net/forums/viewtopic.php?t=822 for more details.)

Boy did THAT ever make my life easier!

User avatar
Ricklionhart
Luxer
Posts: 77
Joined: Sat Jul 08, 2006 2:49 am
Location: Down Under "Down-Under"
Contact:

Post by Ricklionhart » Thu Sep 28, 2006 5:11 pm

I use Adobe Indesign for all my precise linework, and then export it to Photoshop as a PDF bitmap. This also allows me to change line weights easily, and it has far better control of text-on-a-path than Photoshop.

Anonymous

Post by Anonymous » Thu Nov 02, 2006 4:28 am

Thanks for advice. I will try.

User avatar
djdee
lux widowmaker
Posts: 1911
Joined: Wed Nov 29, 2006 4:55 pm
Location: Geordieland
Contact:

Post by djdee » Thu Aug 16, 2007 10:18 am

paranoiarodeo wrote:and carefully strip the coordinate data from the resulting PDFs
Hi Para

How do you do this?

djdee

User avatar
Cuarto
Lux Wunderkind
Posts: 706
Joined: Fri Jun 01, 2007 10:21 am
Location: Alabama
Contact:

Post by Cuarto » Thu Aug 16, 2007 10:36 am

you can also find a picture of what you want on the internet, place it behind where you want the country to go and alternate between the map editor and the internet browser following the border of the internet picture with your mouse, changing to the editor, then clicking. this has worked really nicely in my making of the Oklahoma, Delaware, and Vermont maps (not yet published)

User avatar
enjoymoreradio
Lux Addict
Posts: 552
Joined: Mon Apr 30, 2007 5:47 pm
Location: Walking uphill both ways in the snow

Post by enjoymoreradio » Thu Aug 16, 2007 11:19 am

Isn't that the whole purpose of the Load Background Image (Cmd-L)? I mean, you don't need to switch between browser and editor if you just make the image the background for the editor.

User avatar
Cuarto
Lux Wunderkind
Posts: 706
Joined: Fri Jun 01, 2007 10:21 am
Location: Alabama
Contact:

Post by Cuarto » Thu Aug 16, 2007 11:25 am

damn. if only i had known... lol

navyboysaipan
Lux Newbie
Posts: 7
Joined: Tue Aug 28, 2007 1:57 am
Location: San Jose, CA
Contact:

Re: Making Detailed Polygons

Post by navyboysaipan » Fri Aug 31, 2007 10:54 am

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.
how do you copy the polygon coordinates to your .luxb file?

User avatar
SunTzu
Lux Cartographer
Posts: 1585
Joined: Sat Jan 14, 2006 1:48 am
Location: Maryland

Re: Making Detailed Polygons

Post by SunTzu » Fri Aug 31, 2007 12:02 pm

navyboysaipan wrote:how do you copy the polygon coordinates to your .luxb file?
Hard Way:
  • Create a new .luxb file from scratch in a text editor, with the <continent>, <country>, and <polygon> tags all set up correctly
  • In ImageReady, make sure the image is upside down
  • Go to File > Preview In > choose your browser
  • For each <area shape="poly" on the html page, copy the coordinates found in coords="" and put them in your .luxb file in the appropriate <polygon> tag
  • Open the .luxb file in the Lux map editor to finish editing the map
Easier Way:
  • Download and install Perl onto your computer (You may already have it if you have a Mac)
  • Put the html2lux.pl file in your Perl directory
  • Use a text editor to read the comments in html2lux.pl and find out how to set the html settings in ImageReady
  • In ImageReady, make sure the image is right-side up
  • Put the name of each country polygon in its polygon Alt tag
  • Go to File > Preview In > choose your browser
  • In your browser, save the html file to your Perl directory
  • In a command line, go to your Perl directory and type "perl html2lux your_test_map.html > test_map.luxb"
  • All of the polygons are now in the .luxb file, but they're in one continent, so you need to edit the .luxb file in a text editor
  • Create the new <continent> tags you want and move the <country> tags to their correct <continent> tags
  • Open up the map in the Lux map editor to finish the map

User avatar
Weed Acct 33
Luxer
Posts: 148
Joined: Wed Apr 16, 2008 9:02 pm

Post by Weed Acct 33 » Mon Aug 04, 2008 12:23 pm

Sup,

Cyan's site is gone. Can anyone else upload the html2lux file?

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

Post by Enokrad » Mon Aug 04, 2008 1:19 pm

download and extract the file from the rar archive

http://www.hotlinkfiles.com/files/16659 ... ml2lux.rar

thanks to SunTzu for giving me the file a few months back. :D

User avatar
Weed Acct 33
Luxer
Posts: 148
Joined: Wed Apr 16, 2008 9:02 pm

Post by Weed Acct 33 » Mon Aug 04, 2008 6:20 pm

gracias señor!

and I know what to do with a rar file -.-

User avatar
Weed Acct 33
Luxer
Posts: 148
Joined: Wed Apr 16, 2008 9:02 pm

Post by Weed Acct 33 » Fri Aug 08, 2008 1:23 am

More questions!

I'm winging this whole thing, since I have no prior experience with Photoshop or ImageReady.

Do I even need Photoshop, or can the whole thing be done in ImageReady?

When I am in Photoshop, you say to create a new layer. I opened the picture, went to the Layer menu, everything is grayed, and it won't let me make said layer. Why?

How do I run the cyanshade's perl script?

Also, will ImageReady CS2 work with Photoshop CS3 (because that's the one I have, and I have yet to get ImageReady at all).

Thanks in advance!

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

Post by Enokrad » Fri Aug 08, 2008 3:22 am

Create your file in photoshop (CS2 or CS3) and save it in png format.
make sure only the overground layer is visible.

After that open in imageready and use the magic wand to select all the areas that are going to be your countries. In the Magic wand properties choose "add to selection" button so in the end all the countries are selected simultaneously. At that point you just have to save the shapes and then export them to html format.

Then you use the perl file and after it creates a lux xml map
you just have to open the reg Lux editor and create new continents.

As to how to use the perl file, basic instructions can be found at this post by cyanshade

User avatar
Weed Acct 33
Luxer
Posts: 148
Joined: Wed Apr 16, 2008 9:02 pm

Post by Weed Acct 33 » Fri Aug 08, 2008 5:42 pm

I can't find anything I can use to convert it to .png (its .gif right now), and it won't let me make a new layer (which I assume is the overground you're talking about).

Do you have any suggestions?

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

Post by Enokrad » Fri Aug 08, 2008 7:45 pm

Overground is the image that will be placed over the countries.
in the end you will have

background.jpeg
foreground.png (if you want to have one)
overground.png

What program are you using for the layers?

Use Photoshop to create the pictures (overground) and layers and save as..... png

In theory you don't even need to create layers at all.
just make sure your overground is transparent and saved as png.

a really nice guide to learn how to use photoshop is Pixel Perfect It has very informative video clips

Has all kinds of cool stuff you can make. I would start with lesson one and go one a few episodes. eventually when you learn to make some of the stuff you can skip to the things you are mostly interested in.

User avatar
Weed Acct 33
Luxer
Posts: 148
Joined: Wed Apr 16, 2008 9:02 pm

Post by Weed Acct 33 » Sat Aug 09, 2008 12:46 am

But I have no idea how to make a layer! I have my image but it won't let me choose anything from the layer menu. I also don't know where to go to convert the file, any chance you could just point me there, so to speak..?

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

Post by Enokrad » Sat Aug 09, 2008 1:04 am

ok i see why that happens

layers are locked when a file is open in gif format

usually it's fine if you open a jpeg bmp png or whatever else.

just do this

open the gif

select on the right the one layer that does exist (default or index layer)

press : ctrl + A

then : ctrl + N

click ok
you should see a new clear window open up (white background most likely)

press : ctrl + V

and the image that was on the gif should appear.

if you look at the right where layers should be,
you have a white background layer (that is shown locked)
and over it the new layer you just added which is a copy of the pic in your original gif image.

after that you can go and right click the white layer and delete it.

you should be left with the gif layer unlocked that you can edit and add new layers over it.

User avatar
Weed Acct 33
Luxer
Posts: 148
Joined: Wed Apr 16, 2008 9:02 pm

Post by Weed Acct 33 » Sat Aug 09, 2008 1:17 am

Haha you totally could have just told me to copy/paste it in a new file. Sorry about that, not trying to be difficult but I'm trying to do this with no experience whatsoever. It'll make it that much more significant. Thanks a bunch for the help.

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

Post by Enokrad » Sat Aug 09, 2008 1:29 am

EDIT: The method used in this comment does not work - deleted

Post Reply