Special Aircraft Service

Please login or register.

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

Author Topic: Automatic bridges ?  (Read 8003 times)

0 Members and 2 Guests are viewing this topic.

GilB57

  • Modder
  • member
  • Offline Offline
  • Posts: 377
    • Trucs & Bidules
Automatic bridges ?
« on: January 03, 2011, 11:45:29 AM »

Hi everybody !

I'm currently building an extended version of Asheshouse's BoF map.
I have now to put there new bridges.
This map is very highly populated ...also with bridges, and it may take ages to manually add all the bridges !

I found a menu command called "CreateBridges" apparently to automatically populate the map with bridges.
My map has now a complete network of roads, highways & railroads but it seems to generate only a few bridges...if my network is ininterrupted above rivers, and even less if I cut my roads above rivers.

Can someone help me with this problem ?

Logged

canonuk

  • member
  • Offline Offline
  • Posts: 130
    • Canons Skins - textures for Il-2
Re: Automatic bridges ?
« Reply #1 on: January 03, 2011, 12:57:22 PM »

Hi Gil,

Your post reminded me of this function - one I had never used. Adding bridges to my channel map took bloody ages, so I wish I had found this earlier. Anyway, I just tested it on my Kharkov map and it populated nearly all the right bridges, except a few. I did a little investigating and I've worked out that the engine is looking at map_t, and wherever a road, rail or highway pixel lies over a RGB 31 pixel (i.e. CoastRiver) it will place a bridge. So, bridges don't work automatically in cities because they don't have CoastRiver tiles.

So, to do this, make a copy of your map_t. Load the map and wherever you have rivers in cities or woods etc line the banks with CoastRiver. Save and exit, transfer the new map_t, reload the map and then use the Create Bridges function. Then, once bridges are in place get your original map_t back and you'll have bridges everywhere, including in cities.

You know I'm so glad you posted this, because I wasn't aware of this tool (in fact I bet most map makers aren't) and I really wasn't looking forward to manually adding bridges to my Kharkov map.

Joe
Logged

Uzin

  • Modder
  • member
  • Offline Offline
  • Posts: 2816
  • On lifetime holidays
Re: Automatic bridges ?
« Reply #2 on: January 03, 2011, 03:08:05 PM »

I am sorry that I was not aware of the true use of this function, when manually establishing more than 490 bridges on EastBalt map, lol.
This tutorial  by canonuk should be sticked.
Logged

GilB57

  • Modder
  • member
  • Offline Offline
  • Posts: 377
    • Trucs & Bidules
Re: Automatic bridges ?
« Reply #3 on: January 04, 2011, 01:56:52 AM »

Great CanonUk  ;D

Thanks a lot !
I'll do that immediately ...
Logged

agracier

  • Modder
  • member
  • Offline Offline
  • Posts: 3048
    • The Great War in a Different Light
Re: Automatic bridges ?
« Reply #4 on: January 04, 2011, 03:11:33 AM »

I've (tried) to use this function many times, but each time it completely messed up my actors so that the map wouldn't load any more, necessitating a fresh start. Since then I've learned not to overwrite actors files unless absolutely certain that they are working as they should.

That said, I also seem to remember reading that this tool only works correctly if water is at 0m height and therefore bridges higher than that, say in mountainous areas, will not be generated or not generated correctly.

Perhaps that was a misunderstanding of how the generate bridges command works. If so, the above procedure with map_t might prove helpful ...
Logged

GilB57

  • Modder
  • member
  • Offline Offline
  • Posts: 377
    • Trucs & Bidules
Re: Automatic bridges ?
« Reply #5 on: January 04, 2011, 07:19:47 AM »

Well, I made tests and I don't manage to make it work that way (not a single bridge generated !!!) :(

It seems that map_T is involved in generating the bridges, but I don't know exactly how it works....
It appears that a pixel of "coastsea" under the road end (near river) can generate a bridge but I'm still trying to find the good way  :-\

Quote
I also seem to remember reading that this tool only works correctly if water is at 0m height and therefore bridges higher than that, say in mountainous areas, will not be generated or not generated correctly.

Yes, in fact bridges are ALWAYS generated at sea level so they can be generated UNDER the mountains  ;) so, river banks have to be at 0m height to have a good result.
Logged

asheshouse

  • SAS Team
  • member
  • Offline Offline
  • Posts: 3255
Re: Automatic bridges ?
« Reply #6 on: January 04, 2011, 09:36:12 AM »

I never used to find that manually placing bridges took very long.

The other factor is that in complex areas with road and rail you need to make "adjustments" to the true layout to be able to fit the bridges in. Minimum bridge length being 600m straight means you have accept that it is only a representation, not an accurate recreation.  Bridges having to be at zero level is the other problem, especially in higher areas like the Ardennes.

Ashe   
Logged

GilB57

  • Modder
  • member
  • Offline Offline
  • Posts: 377
    • Trucs & Bidules
Re: Automatic bridges ?
« Reply #7 on: January 04, 2011, 01:15:22 PM »

 8) It seems that I found the way to do it (tested in the Antwerp and Rotterdam areas) but it's right that some adjustements still need to be done (lenght & position of the bridges)  8)

You may consider my problem as solved !

I can now finish autopopulation !
Logged

GilB57

  • Modder
  • member
  • Offline Offline
  • Posts: 377
    • Trucs & Bidules
Re: Automatic bridges ?
« Reply #8 on: January 05, 2011, 10:49:42 AM »

Well.... it works now : after preparing my map_T.tga, the "createBridges" command generated 740 bridges in less than 1 mn (but I took a few hours to prepare the map_T.tga) in the good places & orientation (just need to adjust position and lenghts a little).


Mulheim bridges (Duisburg in background)

I saved the actors.static and reloaded the map to work on buildings, and... it crashed to desktop !!!  ???

If I try to load the map in standard FMB it also crashes to desktop.
If I try to load a mission made with the map, it works !

What do you think ?
A memory saturation (actors.static now more than 5800kb) ?
Something wrong with automatic bridges generation ?
Logged

asheshouse

  • SAS Team
  • member
  • Offline Offline
  • Posts: 3255
Re: Automatic bridges ?
« Reply #9 on: January 05, 2011, 11:25:59 AM »

My largest actors was 11.9Mb and it loaded ok so you should be ok with 5.8Mb.

Are you using the 4GB il2fb.exe?

Have you got at least one of each type of object, so that each of the in*.txt files when you split the actors has got something in it?

Try splitting the actors in half and see if one half will load?

Ashe 
Logged

agracier

  • Modder
  • member
  • Offline Offline
  • Posts: 3048
    • The Great War in a Different Light
Re: Automatic bridges ?
« Reply #10 on: January 05, 2011, 11:48:23 AM »

Great screenshot of Duisberg by the way ... very impressive looking ...
Logged

canonuk

  • member
  • Offline Offline
  • Posts: 130
    • Canons Skins - textures for Il-2
Re: Automatic bridges ?
« Reply #11 on: January 05, 2011, 12:45:25 PM »

GilB,

I'm having the same problems. When I told you how to generate bridges, I had just discovered it myself and hadn't got round to actually saving an actors.static.  Looking at the outWing.txt file from an auto-bridges map compared to a manual-bridges map, they look a bit different. I'm investigating a solution.
Logged
Pages: [1] 2 3   Go Up
 

Page created in 0.056 seconds with 24 queries.