Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Connect-Lines

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Armored Brigade >> MODS and Scenarios >> Connect-Lines Page: [1]
Login
Message << Older Topic   Newer Topic >>
Connect-Lines - 12/30/2018 6:26:53 PM   
22sec

 

Posts: 789
Joined: 12/11/2004
From: Jackson, MS
Status: offline
A few years ago, when Armored Brigade was freeware and custom maps were first added, Veitikka wrote a neat little program called Command-Lines to fill in the missing pixels that resulted from exporting spatial data sets, such as the data from OSM in to a bmp file. It also works to remove blobs that are formed. Veitikka has agreed to let me share here for those that are interested. Please remember this is a program written three plus years ago, well before the commercial version, and as such it is not officially supported by Veitikka Studios or Matrix Games. Also note, you use it at your own risk.

1. To run you need to first enter Window's Command Prompt.
2. You then need to change the directory to whichever folder you have saved Connect-Lines to.
3. To use you simply type connect-lines file1.bmp file2.bmp, where file1 is your raw exported data and file2 will be the end result. So for example, connect-lines hwys.bmp abhwys.bmp. When it runs, the resulting abhwys.bmp is the file you would use going forward.

**There have been some changes to the RGB of roads used since Connect-Lines was originally written. The three colors currently used for autobahns does not work in CL. I change my autobahns to a different color, run CL, and then change them back to the current autobahn color I need them to be.

A few other pointers:
I prefer to run CL for separate types of roads, i.e. one file for dirt tracks, one for residential roads, one for highways, one for autobahns and one for water, and then use GIMP to place each layer in the order I want. I would recommend using the in-game editor from there to make any other necessary edits to tidying up roads and water.

There are some parameters that can be added to the end of the command prompt, but I don't remember what they are. If and when I remember I will update this post. Please let me know if you have any quesitons.

https://drive.google.com/open?id=1PyqPFbybdU8w6bTXbLExj31dnscZ8TMk




Attachment (1)

_____________________________

Post #: 1
RE: Connect-Lines - 12/30/2018 8:50:54 PM   
storm rider


Posts: 217
Joined: 3/13/2013
Status: offline
Thank you very much! Works great!

(in reply to 22sec)
Post #: 2
RE: Connect-Lines - 12/14/2019 1:09:09 AM   
exsonic01

 

Posts: 955
Joined: 7/26/2016
From: Somewhere deep in appalachian valley in PA
Status: offline
Hey, do you remember any parameters for this script? Also, are there any other scripts?

(in reply to storm rider)
Post #: 3
RE: Connect-Lines - 12/14/2019 10:39:52 PM   
Veitikka


Posts: 1136
Joined: 6/25/2007
From: Finland
Status: offline

quote:

ORIGINAL: exsonic01

Hey, do you remember any parameters for this script? Also, are there any other scripts?


Tell me the parameters you fancy, and I can code them in.


_____________________________

Know thyself!

(in reply to exsonic01)
Post #: 4
RE: Connect-Lines - 12/15/2019 12:19:24 AM   
exsonic01

 

Posts: 955
Joined: 7/26/2016
From: Somewhere deep in appalachian valley in PA
Status: offline
quote:

ORIGINAL: Veitikka
Tell me the parameters you fancy, and I can code them in.

Regarding parameters, I was wondering the parameters for this connect-lines script which 22sec mentioned:
quote:


There are some parameters that can be added to the end of the command prompt, but I don't remember what they are. If and when I remember I will update this post. Please let me know if you have any questions.


Regarding 'any other scripts', is this possible to make a road/stream/river smoothing script, which makes

This 'step-like' road / water network to


like this combination of linear line + 45 degree diag line + linear line.

Current 'connect-lines' script makes so many step-like features from freshly-exported-png-file from QGIS process. Such script will require a logic to modify/import slightly-inclined lines to a line with two or more steps and a linear line. But I guess logic for this script wouldn't be an easy one to write in code...

This is my personal thinking, but step-like feature looks unrealistic, and also might influence on the maneuverability of units, like momentarily exposing side armor more and reduce speed during 90 degree turn in such step-like features.

But if this takes too long time, just forget about it. But if there are any other script to automate or help map cleaning process, let's share. I think 22sec or CCIP could comment more things on such automated script.

(in reply to Veitikka)
Post #: 5
RE: Connect-Lines - 12/15/2019 12:46:13 AM   
Veitikka


Posts: 1136
Joined: 6/25/2007
From: Finland
Status: offline

quote:

ORIGINAL: exsonic01

quote:

ORIGINAL: Veitikka
Tell me the parameters you fancy, and I can code them in.

Regarding parameters, I was wondering the parameters for this connect-lines script which 22sec mentioned:
quote:


There are some parameters that can be added to the end of the command prompt, but I don't remember what they are. If and when I remember I will update this post. Please let me know if you have any questions.


Regarding 'any other scripts', is this possible to make a road/stream/river smoothing script, which makes

This 'step-like' road / water network to


like this combination of linear line + 45 degree diag line + linear line.

Current 'connect-lines' script makes so many step-like features from freshly-exported-png-file from QGIS process. Such script will require a logic to modify/import slightly-inclined lines to a line with two or more steps and a linear line. But I guess logic for this script wouldn't be an easy one to write in code...

This is my personal thinking, but step-like feature looks unrealistic, and also might influence on the maneuverability of units, like momentarily exposing side armor more and reduce speed during 90 degree turn in such step-like features.

But if this takes too long time, just forget about it. But if there are any other script to automate or help map cleaning process, let's share. I think 22sec or CCIP could comment more things on such automated script.


What is the ConnectLines version you have?


_____________________________

Know thyself!

(in reply to exsonic01)
Post #: 6
RE: Connect-Lines - 12/15/2019 1:36:01 AM   
exsonic01

 

Posts: 955
Joined: 7/26/2016
From: Somewhere deep in appalachian valley in PA
Status: offline

quote:

ORIGINAL: Veitikka
What is the ConnectLines version you have?

I only have the version uploaded in this post by 22sec.

(in reply to Veitikka)
Post #: 7
RE: Connect-Lines - 12/15/2019 7:16:13 PM   
Veitikka


Posts: 1136
Joined: 6/25/2007
From: Finland
Status: offline

quote:

ORIGINAL: exsonic01


quote:

ORIGINAL: Veitikka
What is the ConnectLines version you have?

I only have the version uploaded in this post by 22sec.


The version number and the options should be visible when you run connect-lines.exe. We were experimenting with many different features in this console application, but many of them are currently disabled. As I replied in the other thread, we had similar ideas about the roads, but our map designer wanted to draw them by hand, so the road algorithm was not improved from what it is. If somebody can represent how the algorithm should work step by step, then I can write it to the code.


_____________________________

Know thyself!

(in reply to exsonic01)
Post #: 8
RE: Connect-Lines - 12/15/2019 7:37:44 PM   
exsonic01

 

Posts: 955
Joined: 7/26/2016
From: Somewhere deep in appalachian valley in PA
Status: offline
quote:

ORIGINAL: Veitikka
The version number and the options should be visible when you run connect-lines.exe. We were experimenting with many different features in this console application, but many of them are currently disabled. As I replied in the other thread, we had similar ideas about the roads, but our map designer wanted to draw them by hand, so the road algorithm was not improved from what it is. If somebody can represent how the algorithm should work step by step, then I can write it to the code.


It is version 1.15.

This is copy & paste from my Windows 10 command prompt

>connect-lines terrain.bmp terraint.bmp
ConnectLines v1.15
Hit Ctrl+C to exit
Reading input header...
Initializing temp array...
Reading input terrain...
Reading fields.bmp... Not found
Reading urban1.bmp... Not found
Reading urban2.bmp... Not found
Reading urban3.bmp... Not found
Reading urban4.bmp... Not found
Adding missing pixels #1...
Tidying up the blobs........
..
Streams to water...
Adding missing pixels #2...
Adding bridges...
Removing orphan pixels...
Writing output header...
Writing output terrain...
Finishing output...
Deleting temp array...
Done!



Like I mentioned, I wish if there is a script which makes a road and water less step-like feature, and make more smooth lines combination of perpendicular lines + 45 degree diag lines. This will require for script to create 2 steps instead of one step when depict angled road / water, as 2 or more steps will make 45 degree line on the map.

Plus, features like connecting disconnected road / water tiles to become a linear one might be a good one IMO, but I guess this would be dangerous to create unwanted strange features...

But I wish to listen what 22sec or CCIP or any other map editors would comments about this idea and other ideas...




< Message edited by exsonic01 -- 12/15/2019 7:43:08 PM >

(in reply to Veitikka)
Post #: 9
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Armored Brigade >> MODS and Scenarios >> Connect-Lines Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.114