• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Auto place ground textures on tiles

Messages
337
Country
ireland
Hi all,

Have a pretty tricky problem but hopefully someone here can shed some light. I make all my photoreal ground using 1024x1024 tiles at 20cm/pixel. This results in a huge amount of tiles but the quality is fantastic both in fs2004 and fsx.

However my latest airport requires 416 tiles, a significant amount. My previous airports have had around 250 with no performance impact at all. However in gamx this means that I have to manually place each texture on a tile i.e. I have to go the material editor 416 times and do each tile.

Is there some sort of a script that would automate this process? The thought of doing this 416 time is not so good.

I will have 416 textures in a folder named: 1 to 416 so looking for some script that would use this folder location and I would only have to create 1 tile in gmax and then run the script that would create all 416 in one swoop.

Maybe this is not possible but I know you can make scripts to rename certain objects in gmax so perhaps there is some solution?

Thanks for your time

Terry
 

tgibson

Resource contributor
Messages
11,343
Country
us-california
I don't know about a script, but if the tiles are all the same size and mapped the same you can do what is desribed below (but I don't really know if it will help any):

1. Create the first tile and map it as usual.
2. Bring up the Material editor and switch the texture to the next file name.
3. Use File/Save As and save it as a new name.
4. Repeat 414 times. :)

You can then arrange all tiles in the proper locations and export.
 

hcornea

Resource contributor
Messages
2,388
Country
australia
Someone made me a tool that read tfw files, and placed a series of X-file created asm tiles this way.

I have stopped using the tool and I don't think I have it anymore.

Using tfw linked GEoTiffs would be the most efficient way for someone to write a tool for you.

The "ideal" tool would:

1) read each Geotiff/tfw file from a directory
2) create a plane (correct size from the tfw fie, with enough vertices) and map the Geotiff to that
3) asm tweak and create placement code place (based on the coordinates in the tfw file)
4) compile into a combined groundpoly file.

You would have a very large number of asm-compiled drawcalls this way, and I think you will be starting to reach buffer exhaustion and the exponential dropoff in performance that accompanies it.

The workflow would involve: gridding your imagery in Globalmapper or similar into 1024 x 1024 Geotiffs with tfw, run the tool, convert the source files to dds/xbmp.

For FSX, there would be much better performance using resample for the terrain, and a custom groundpoly for surfaces.
 
Messages
337
Country
ireland
Thanks for the replies but I don't think either will solve the problem. It really is a pain doing the same thing 416 times. I am approx 30% done at the moment
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,885
Country
netherlands
Hi,

I wrote a little tool in the past to place the ground tiles for the NL2000 Schiphol scenery. But it was quite specific for that airport, I don't think it will work for other locations.

I have thought about adding such a functionality to ModelConverterX before. But it could become quite tricky, because to get the placement right you need to make sure that the projection of the imagery is dealt with correctly. Do you know the projection in your case? I think it should not be too hard to make a tool that can output such slices. Maybe even taking the big imagery as input and slicing it for you.

I agree that in general using resample seems better for FSX. Much easier to work with and better performance as well.
 
Messages
337
Country
ireland
Hi Arno,

The thing is this imagery is for fs2004 and fsx. I have managed to do all 416 one by one in gMAx (took about 4 hours).

Yes my imagery is laid out in a rectangular grid of 32 x 13 tiles. I have all 416 1024 textures in a folder named EIDW_001 to EIDW_416
 

hcornea

Resource contributor
Messages
2,388
Country
australia
Arno, if you tell the developer that imagery MUST be Geodetic WGS84, then it is up to them!

Not sure how hard it is to read Geotiff headers, but tfw files seem to be easy!
 
Messages
1,510
Country
unitedstates
I was going to say map the first one with the first .bmp and then drag the UVW map modifier off the stack and onto each of the remaining 415 tiles (which may prove to be a task in itself). Then export it with the FS2002 gamepack and change the .bmp names in the .asm before compiling with bglc.

With an excel spreadsheet to generate a column of numbers and "block select mode" in a good text editor for example it'd be easy enough to change this:

TEXTURE_DEF TEXTURE_BUILDING , <255,255,255,255>, 362.400899, "001.BMP" ; 0
TEXTURE_DEF TEXTURE_BUILDING , <255,255,255,255>, 362.400953, "001.BMP" ; 1
TEXTURE_DEF TEXTURE_BUILDING , <255,255,255,255>, 362.400910, "001.BMP" ; 2
TEXTURE_DEF TEXTURE_BUILDING , <255,255,255,255>, 362.400953, "001.BMP" ; 3
TEXTURE_DEF TEXTURE_BUILDING , <255,255,255,255>, 362.400921, "001.BMP" ; 4
TEXTURE_DEF TEXTURE_BUILDING , <255,255,255,255>, 362.400953, "001.BMP" ; 5
TEXTURE_DEF TEXTURE_BUILDING , <255,255,255,255>, 362.400894, "001.BMP" ; 6
TEXTURE_DEF TEXTURE_BUILDING , <255,255,255,255>, 362.400958, "001.BMP" ; 7
TEXTURE_DEF TEXTURE_BUILDING , <255,255,255,255>, 362.401029, "001.BMP" ; 8

...to this:

TEXTURE_DEF TEXTURE_BUILDING , <255,255,255,255>, 362.400899, "001.BMP" ; 0
TEXTURE_DEF TEXTURE_BUILDING , <255,255,255,255>, 362.400953, "002.BMP" ; 1
TEXTURE_DEF TEXTURE_BUILDING , <255,255,255,255>, 362.400910, "003.BMP" ; 2
TEXTURE_DEF TEXTURE_BUILDING , <255,255,255,255>, 362.400953, "004.BMP" ; 3
TEXTURE_DEF TEXTURE_BUILDING , <255,255,255,255>, 362.400921, "005.BMP" ; 4
TEXTURE_DEF TEXTURE_BUILDING , <255,255,255,255>, 362.400953, "006.BMP" ; 5
TEXTURE_DEF TEXTURE_BUILDING , <255,255,255,255>, 362.400894, "007.BMP" ; 6
TEXTURE_DEF TEXTURE_BUILDING , <255,255,255,255>, 362.400958, "008.BMP" ; 7
TEXTURE_DEF TEXTURE_BUILDING , <255,255,255,255>, 362.401029, "009.BMP" ; 8

I just have no idea whether each poly would come out in the proper order in the .asm?

Jim
 
Top