.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 2: The Ascension Wars

Reply
 
Thread Tools Display Modes
  #1  
Old January 30th, 2004, 09:49 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default JAVA programmer? (and Win-DomMap, and some GIMP)

This site has a blur class, and a map render program. It would be great if someone could look at it and see if it will fill our needs to map-making

http://www.jhlabs.com/index.html

Can the blur run stand-alone?
Batch mode?
on linux?
process targa files?
be told to not blur white pixels (255/255/255)?
be told 3 colors to avoid?

[ February 24, 2004, 19:33: Message edited by: Gandalf Parker ]
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #2  
Old January 31st, 2004, 03:17 PM

BugRoger BugRoger is offline
Corporal
 
Join Date: Jan 2004
Location: Berlin, Germany
Posts: 64
Thanks: 0
Thanked 0 Times in 0 Posts
BugRoger is on a distinguished road
Default Re: JAVA programmer? (and Win-DomMap, and some GIMP)

This filter won't run on itself. It's a class that can be used in conjunction with the Java Advanced Imaging API (JAI). It would be quite easy to implement a filter that does the thing's you mentioned though. But it only works with BMP, GIF (decoder only), FlashPix (decoder only), JPEG, PNG, PNM, TIFF, and WBMP.

For running java programs you need to have at least the JRE installed. Set some enviroment variables and you can (almost) use it like a native executable.
Reply With Quote
  #3  
Old January 31st, 2004, 04:17 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: JAVA programmer? (and Win-DomMap, and some GIMP)

Quote:
Originally posted by BugRoger:
This filter won't run on itself. It's a class that can be used in conjunction with the Java Advanced Imaging API (JAI). It would be quite easy to implement a filter that does the thing's you mentioned though. But it only works with BMP, GIF (decoder only), FlashPix (decoder only), JPEG, PNG, PNM, TIFF, and WBMP.

For running java programs you need to have at least the JRE installed. Set some enviroment variables and you can (almost) use it like a native executable.
This sounds like more reading and experimenting into Java than I wanted to do. I would be running on a linux so raw java code should run fine. Could I ask you to whip up something that works on PNM files to blur the entire image except for 255/255/255 44/135/195 195/87/44 ?

Examples of the maps Im working with are at
http://www.techno-mage.com/~dominion...s2/RandomMaps/

And you can email me as gandalf@ that site or community.net (or a dozen others)
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #4  
Old January 31st, 2004, 05:53 PM

BugRoger BugRoger is offline
Corporal
 
Join Date: Jan 2004
Location: Berlin, Germany
Posts: 64
Thanks: 0
Thanked 0 Times in 0 Posts
BugRoger is on a distinguished road
Default Re: JAVA programmer? (and Win-DomMap, and some GIMP)

Before I spend my day working on Java (again) may I suggest something else? Try ImageMagick. It might be just what you are looking for. If you're running Linux it's probably already installed... I'm not very experienced in using it but it is *very* powerful. I use it for on the fly generation of thumbnails on my webserver.

I browsed the Online docu and there is a blur filter and an option to select a specific set of colors. I haven't tried it but it seems like this should work.
Reply With Quote
  #5  
Old January 31st, 2004, 05:59 PM

Joe Bedurndurn Joe Bedurndurn is offline
Private
 
Join Date: Dec 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Joe Bedurndurn is on a distinguished road
Default Re: JAVA programmer? (and Win-DomMap, and some GIMP)

If you can point me to a site that explains the PNM format and a sample image, I can give it a go.
Reply With Quote
  #6  
Old January 31st, 2004, 07:21 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: JAVA programmer? (and Win-DomMap, and some GIMP)

Quote:
Originally posted by Joe Bedurndurn:
If you can point me to a site that explains the PNM format and a sample image, I can give it a go.
Targa is what the game uses (.tga format). The PNM is just a passthru on its way to JPG (I couldnt find a tga2jpg converter so I go tga2ppg then ppg2jpg)

The JPG exists for web viewing and so that WebMagick can make thumbnails (which does use imagemagick to do it). I did see that ImageMagick had a blur switch but didnt see where I could hold 255/255/255 white aside. Maybe something where I could copy the white pixels to another file then merge it back after the blur?

Of course these are also all work-arounds for the old DomMap program which is in C source code if anyone is interested.

[ January 31, 2004, 17:22: Message edited by: Gandalf Parker ]
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #7  
Old January 31st, 2004, 11:48 PM

BugRoger BugRoger is offline
Corporal
 
Join Date: Jan 2004
Location: Berlin, Germany
Posts: 64
Thanks: 0
Thanked 0 Times in 0 Posts
BugRoger is on a distinguished road
Default Re: JAVA programmer? (and Win-DomMap, and some GIMP)

If I'm correct you can use the map switch. Give it a color map file to select specific colors (I'm totally clueless about the file format though). Pass that output to the matte channel. You might have to create a temp file for that.

In the docs there's an example about using a matte channel to filter only certain areas of the image.
Reply With Quote
  #8  
Old February 24th, 2004, 12:29 AM

gladestrider gladestrider is offline
Private
 
Join Date: Feb 2004
Location: USA
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
gladestrider is on a distinguished road
Default Re: JAVA programmer? (and Win-DomMap, and some GIMP)

Quote:
Originally posted by Gandalf Parker:
Of course these are also all work-arounds for the old DomMap program which is in C source code if anyone is interested.
Gandalf,

Please send me the source code when you get a chance. I'd like to take a look at it.

I'm a bit late to this party. Why are we looking for a blur filter?

gladestrider
__________________
The early bird gets the worm, but the second mouse gets the cheese.
Reply With Quote
  #9  
Old February 24th, 2004, 01:46 AM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: JAVA programmer? (and Win-DomMap, and some GIMP)

PhilD is managing the source code now. The Last batch of changes were his. He has pretty much gotten it to create maps which will work for Dom2. His Version is Linux only and there are people who would love to get just a working Windows compile made available.

The blur story is this. Dom1 had a very restricted use of color. The maps made for Dom2 have a much greater range of allowance. There are alot of possible ways to go as far as making the random maps look much better. But the EASIEST thing Ive found is a blur.

In a few steps, using GIMP, I can layer the white capital dots, layer the blue borders in water provinces, layer the brown color used for land borders, blur the rest and then save. I can provide links of the before and after if you wish.

With DomMap I can generate 100 maps a day and make them available on my web site. But they are ugly. Ive tried to find a way to automate blurring them while not touching 3 colors (or even 1, the 255/255/255 white capitals). But a better answer would be the fact that DomMap has all that info in an array at one point. There are alot of ways to go. Blur then insert the capital pixels to the file would be one.

Id also be interested in whether the C code actually generates a more extensive fractal map then "dumbs it down" to the old Dom1 map format. Such as... does it squeeze everything between height 100-150 into the green tree color because the old Dom1 limited the map to a total of 16 colors? Letting it assign each level to a slight color change could result in a great map.
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #10  
Old February 24th, 2004, 01:47 AM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: JAVA programmer? (and Win-DomMap, and some GIMP)

Found PhilD's link to the newer DomMap code.
http://duchon.philippe.free.fr/dom2/index.html
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 04:48 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.