Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2   Go Down

Author Topic: Objectset1.1 - an alternative to autopop  (Read 5117 times)

0 Members and 1 Guest are viewing this topic.

Nowekat

  • Modder
  • member
  • Offline Offline
  • Posts: 152
Objectset1.1 - an alternative to autopop
« on: August 10, 2018, 01:12:58 PM »

A while ago i posted in a wip map thread an alternative and easier to use prog to the autopop.exe i called objectset.exe. This doesn't need a mapsize.txt and is much less error-prone. It also allows higher population resolutions as the usual 200 meters as it populates areas of 20, 25, 50 and 100 square meters. This works of course only if the specific part of the buildings template is also populated. But it doesn't work properly with the usual 200 meter resolution. So i reworked it now to fix this and now it also works with the 200 meter properly.

There where some downloads but no commends, so i don't know if anyone used ist. Nevertheless i post the fixed version 1.1 as there seem to be some problems to use the autopop and this prog is much more comfortable.

You may download the new version of the tool here:

https://www.mediafire.com/file/7wdhpfmg8y6dp3n/Objectset1.1.7z/file

Firstly you have to rename your map_t.tga as map_tBIG.tga (not case sensitive).

When using the 200 meter resolution just paint your townes and villages as usual. Name your buildings template corresponding to the colour you painted the area to populate with. So if you painted a city or a part of it in colour 16, name the template 16.txt and so on.

Run the prog and type in the colour to populate, thats "16" as an example, and press enter. To prog than creates an inBuildings(colour).txt. This would be an "inBuildings16.txt" here. You may use any greyscale colour to paint the towns but of course the colour should not appear otherwise in the map_t.

To use a smaller resolution enlarge the map_t depending to the resolution (20, 25, 50, 100 meter) you want to use. Thats why i chose the name "map_tBIG.tga". Enlargement factor = 200/resolution. If the chosen resolution is 25 meter: 200/25 = 8, you have to enlarge a 1200 * 800 map_t 8 times to a 9600 * 6400 greyscale with "no" interpolation. This may be a problem with big maps, i don't know the limits in picture sizes. Name the picture also map_tBIG.tga. Paint over your towns as you want. Pin size is always: 1 Pixel = resolution in meter. Paint over also streets and rails in towns in normal paint mode.

Open the objectset.ini and change the resolution to the chosen value and save. Run the prog, insert the colour to populate, press enter and ready.

When using a higher resolution the main problem is that the texture tile size of 200 * 200 meter is much to big and the texture will be only partly populated. So this feature may be best when no specific buildings texture is used at all.

This version 1.2 also populates texture tiles with roads and rails. I simply forgott this in version 1.1.

https://www.mediafire.com/file/piaqwh993zpwabc/Objectset1.2.7z/file

Nowekat
Logged

max_thehitman

  • SAS~Area51
  • Modder
  • member
  • Offline Offline
  • Posts: 8976
  • Beer...Girls...IL2+Mods!
Re: Objectset1.1 - an alternative to autopop
« Reply #1 on: August 12, 2018, 11:24:56 AM »



Sounds very interesting! Thank you so much!  8)
I will test it!
Logged
Everything I like is either illegal, immoral or fattening ! Welcome to SAS1946

Nowekat

  • Modder
  • member
  • Offline Offline
  • Posts: 152
Re: Objectset1.1 - an alternative to autopop
« Reply #2 on: August 29, 2018, 03:48:43 PM »

I use to paint towns and villages to an extra layer of the map_t without streets and rails, so i simply forgott to take them into account. So the tool doesn't populate texture tiles with roads and rails. But of course it may be also usefull to paint towns and villages directly in the map_t and there may be allready roads and rails running trough the towns. The version 1.2 also populates such areas. This works of course only if the map_t (or better: the colour to populate) is within the colour range of 0 to 31 (+ roads and rails). But apart of this the tool still also populats any colour higher than 31 up to colour 255.

The new version is here:

https://www.mediafire.com/file/piaqwh993zpwabc/Objectset1.2.7z/file

Nothing else is changed, so this also works with a resolution from 20 to 200 Meter (200 mod resolution must be "0", so in theory also a resolution of 1 meter should work ;-))

There arn't many comments to the tool but it seems every mapper worldwide downloaded it ;-), so i think this additional feature may be wishfull. Nevertheless a feedback would be wellcomed.

Novekat
Logged

vonOben

  • Modder
  • member
  • Offline Offline
  • Posts: 886
  • Wer den Tod fürchtet, hat das Leben verloren.
    • vonOben's Flight Sim Mods
Re: Objectset1.1 - an alternative to autopop
« Reply #3 on: May 22, 2020, 05:01:17 AM »

Hi Nowekat

I've used some other of your map tools and now I would like to try this one, but I've never used AutoPop so I don't understand how to make the buildings template.  :-[

Best regards

vonOben
Logged
vonOben's Flight Sim Mods  http://vonoben.free.fr/ Twenty Years online January 3, 2022!

Nowekat

  • Modder
  • member
  • Offline Offline
  • Posts: 152
Re: Objectset1.1 - an alternative to autopop
« Reply #4 on: May 31, 2020, 11:16:23 AM »

Hallo, sorry for the delay.

You need a special map_t.tga for one of these little 128*128 maps. This tga is within the autopop download

http://mission4today.com/index.php?name=Downloads3&get=1426

At the very low left edge of the tga you will find two squares. The upper bigger one is for 1600 * 1600 textures. Make the texture you wand to populate slot 16 (City0) in the maps load.in.

Run the map with that tga in the Full Map Builder mode and start to populate the upper square within its limits. You can do this manually, which may take weeks, or you may use the Citybuilder. Well, this may take also weeks the first time but nevertheless will be less frustrating as you will see results quickley wenn testing it.

Objectset works only with 1600*1600 textures, i assume. When populating a map, generally Autopop and also Objectset just compute the coordinates of the template objects to the corresponding coordinates of the same texture in the map to populate. 
Logged

vonOben

  • Modder
  • member
  • Offline Offline
  • Posts: 886
  • Wer den Tod fürchtet, hat das Leben verloren.
    • vonOben's Flight Sim Mods
Re: Objectset1.1 - an alternative to autopop
« Reply #5 on: June 01, 2020, 05:00:52 AM »

Hi Nowekat

Thanks for the reply  :).

I found some Autopop templates posted by mandrill here:
https://www.sas1946.com/main/index.php/topic,30959.0.html

They helped me understand how it works and I have now placed the objects in the actors.static for Autopop.
The templates were made for 1024x1024 texture files, and that is what I've also used.
Doesn't Objectset support that image size?  ]confused2[

I'm also confused about map_tBIG.tga.  :-[

The Map_T.tga for the map I want to AutoPop is 2400x2080 pixels and the scale is 200m/pixel, so I can use my Map_T.tga as it is without re-scaling it?

Best regards

vonOben
Logged
vonOben's Flight Sim Mods  http://vonoben.free.fr/ Twenty Years online January 3, 2022!

Nowekat

  • Modder
  • member
  • Offline Offline
  • Posts: 152
Re: Objectset1.1 - an alternative to autopop
« Reply #6 on: June 01, 2020, 09:16:35 AM »

I should have had written 1600 * 1600 Meter textures. These are the usual 1024*1024 pixel textures. There are other 800 * 800 Meter textures, i think they are 256 * 256 pixel, but they are not longer used and objectset does not support them.

The thing with the map_tBig.tga is confusing and possibly wasn't the best idea. This is just a renamed map_t.tga, but you can, but must not, enlarge it. But the enlarement factor is needed in the ini file (No enlargement = 1). The idea was: As you mentioned the resolution of the original map_t.tga is 200 meter. That means, that the population painted in the map_t is cutted in 200 * 200 Meter pieces and when using a well populated template this means knife cutted population edges:


++++++++ ++
++ ++ ++++ +
+++ + ++ +++
+ +++ +++ ++
+ +++ ++++ +

(+ = object)

If you enlarge the map_t (copied and renamed as map_tBig.tga), the resolution is higher. So you can paint in the map_t (map_tBig) the areas to populate with an resulution of 100, 50 or even 25 meter, as one texture pixel in the map_t (map_tBig) then has just that higher resolution depending on the enlargement factor. The population edges with an enlargement factor of 2 may than look like this:

 +  ++ +   
+++ ++++++
 ++ ++ ++++
  +++ ++
 + +   + +

But the problem is, the textures themselves still show up with a resolution of 200 * 200 meter in the game, and this means, they will not be complitly filled with objects or objects will be placed in areas without the underlaying texture.

An other point is the overblending area of one texture to the next one of, if i remember well, 100 meters. Within 50 meters one texture will dominate, then the other, but you will still see the other texture. So when using a city texture with dense streets or other landmarks neighbouring to an agriculturel texture, you will still see the roads or landmarks when the abricultural texture starts, but these parts will not be populated. You can avoid this using an enlargement factor of 4 with the map_t, but this is quite difficulty -). I used this with my NW-Europe map, but this may be a kind of over engeneering.

With my Kasserine map i used an enlargement factor of 8 to spray these little clusters of just a few objects around the cities using the city template with a resolution 25 Meter/factor 8 (No city unterlaying city texture is used here in the final map_t) and to avoid this cutting knife effect with the city boarders themselves. But as the city texture showing up in the map is still 200 * 200 Meter, i tried to give it a "litte gardens and fields all arround"-look. Well, over all, this enlargement thing may give the best results if no texture is used in the final map_t for small buildings conglomerations :-) . But objectset also works with a just renamed map_t.
Logged

vonOben

  • Modder
  • member
  • Offline Offline
  • Posts: 886
  • Wer den Tod fürchtet, hat das Leben verloren.
    • vonOben's Flight Sim Mods
Re: Objectset1.1 - an alternative to autopop
« Reply #7 on: June 02, 2020, 01:17:43 AM »

Hi Nowekat

I have now tested using Objectset1.2, but I must have done something wrong.   :-[

I renamed the map_T.tga (2400x2080 pixels) to map_TBIG.tga.
The buildings template was renamed 12.txt
I didn't change anything in Objectset.ini initially since it is a 200m/pixels map_T.tga:

Code: [Select]
200    ; Resolution meter/pixel, corresponding to map_tBIG. Allowed values: 20, 25, 50, 100, 200
16,17,18


But when I run Objectset1.2 it says:
Objects colour 12: 0
And the inBuildings12.txt is empty.

But there are colour 12 pixels i the map_Tbig.tga image.



Then in Objectset.ini but I noticed the line: 16,17,18
Is that the allowed colours?
I tested adding 12 but that didn't work either.

I also tested renaming the buildings template to 18.txt with the same result:
Objects colour 18: 0

Any idea what might be wrong?

I've also tested the old Autopop program and it created a inBuildings.txt file without any problems.

Best regrads

vonOben
Logged
vonOben's Flight Sim Mods  http://vonoben.free.fr/ Twenty Years online January 3, 2022!

Nowekat

  • Modder
  • member
  • Offline Offline
  • Posts: 152
Re: Objectset1.1 - an alternative to autopop
« Reply #8 on: June 02, 2020, 12:04:00 PM »

Strange. Everything seems to work right as the progs output shows. But there seem to be no objects in the upper square. So possibly you use a 800 meter template and texture? What is the line in the autopop.ini? The number at the lines end must be 1600 and not 800.

Well, i don't know where these numbers "16,17,18" in your objectset.ini are from, the single line in the objectset.ini should just be:

200    ; Resolution meter/pixel, corresponding to map_tBIG. Allowed values: 20, 25, 50, 100, 200

But these numbers should not count, as the prog only reads the first number in the first line and it reads the resolution well.

So my idea: Template for a 800 meter texture.

If not, could you send me the whole thing?



Logged

vonOben

  • Modder
  • member
  • Offline Offline
  • Posts: 886
  • Wer den Tod fürchtet, hat das Leben verloren.
    • vonOben's Flight Sim Mods
Re: Objectset1.1 - an alternative to autopop
« Reply #9 on: June 02, 2020, 02:21:11 PM »

Hi Nowekat

I wrote this in autopop.ini:
Country0 template_Country0_1600.txt 1600
mask=0

I've sent you a PM with a download link so you can check my files.

Thanks for your kind help!  :)

Best regards

vonOben
Logged
vonOben's Flight Sim Mods  http://vonoben.free.fr/ Twenty Years online January 3, 2022!

Nowekat

  • Modder
  • member
  • Offline Offline
  • Posts: 152
Re: Objectset1.1 - an alternative to autopop
« Reply #10 on: June 02, 2020, 03:11:27 PM »

Aha. Problem found.

Your template 12.txt is formatted in a non standard pattern. It looks like this:

[Buildings]
 0_bld House$FurnitureTreeLine 1 3039.96 2974.32 150.00
 1_bld House$FurnitureTreeLine 1 3063.52 2971.05 250.00
 2_bld House$FurnitureTreeLine 1 3060.16 2951.54 164.99
 3_bld House$FurnitureTreeLine 1 3076.54 2963.85 45.00
 4_bld House$FurnitureTreeLine 1 3031.16 2849.59 80.00
 5_bld House$FurnitureTreeLine 1 3022.21 2831.13 -0.00
 6_bld House$FurnitureTreeLine 1 3071.81 2841.24 -0.00
 7_bld House$FurnitureTreeLine 1 3082.33 2813.59 45.00
 8_bld House$FurnitureTreeLine 1 3009.76 2865.63 15.00
 9_bld House$FurnitureTreeLine 1 3122.75 2808.26 44.99

Notice there is only one leading space before every object line.

It should look like this:

[Buildings]
  0_bld House$FurnitureTreeLine 1 3039.96 2974.32 150.00
  1_bld House$FurnitureTreeLine 1 3063.52 2971.05 250.00
  2_bld House$FurnitureTreeLine 1 3060.16 2951.54 164.99
  3_bld House$FurnitureTreeLine 1 3076.54 2963.85 45.00
  4_bld House$FurnitureTreeLine 1 3031.16 2849.59 80.00
  5_bld House$FurnitureTreeLine 1 3022.21 2831.13 -0.00
  6_bld House$FurnitureTreeLine 1 3071.81 2841.24 -0.00
  7_bld House$FurnitureTreeLine 1 3082.33 2813.59 45.00
  8_bld House$FurnitureTreeLine 1 3009.76 2865.63 15.00
  9_bld House$FurnitureTreeLine 1 3122.75 2808.26 44.99

Standard is this two leading spaces. At least that is what the act.jar (the "original" tool to pack and unpack the actors.static) does when creating the outBuildings.txt with the outact.bat from an actors.static.

Well, i possibly made a not very fail save programming here. My tools count the position of the relevant data within the lines with two leading spaces. It seems the autopop and possibly also the act.jar use an other idea and so can handle also wrongly formatted strings with only one leading space. But i really have no idea how this one space file thing was created?

If you add manually one more leading space in, lets say, the first 30 lines of the file, you will get results.
Logged

vonOben

  • Modder
  • member
  • Offline Offline
  • Posts: 886
  • Wer den Tod fürchtet, hat das Leben verloren.
    • vonOben's Flight Sim Mods
Re: Objectset1.1 - an alternative to autopop
« Reply #11 on: June 03, 2020, 02:16:23 AM »

I'm glad you found the problem.  ]thumbsup[

I did some manual editing of the outBuildings.txt in notepad and Excel.
My mistake to add only one space before the text lines.

I have earlier noticed that ActorsManagement seem to work also when there is no space at all.

Thanks for your help solving this silly issue.  :-[
Logged
vonOben's Flight Sim Mods  http://vonoben.free.fr/ Twenty Years online January 3, 2022!
Pages: [1] 2   Go Up
 

Page created in 0.082 seconds with 23 queries.