• 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.

[FS2004] Confusion with Terrain SDK and photoscenery problem

Messages
217
Country
azerbaijan
Ok, now I have a problem... with FS2004 Terrain SDK. You can see the results in the attachment.

1) The arrow shows a part of the airport (NW corner of the image) which is misplaced far to the south-east from where it should be. The read borders show the actual borders of the source image. I think I'm doing smth wrong with Resampler's .INF file settings, i.e. CellX and CellY values. Here is the actual data for the source file:

X axis: 9,600 px
Y axis: 9,600 px

North=40.45782158579722
West=50.064064264297485

South=40.43822657374694
East=50.089813470840454

And here is the contents of the INF file:

Code:
[Destination]
	DestDir			= "."
	DestBaseFileName 	= "panorama"
	BuildSeasons 		= 0
	UseSourceDimensions 	= 0
	NorthLat		= 40.45782158579722
	SouthLat		= 40.43822657374694
	WestLong		= 50.064064264297485
	EastLong		= 50.089813470840454

[Source]
	Type			= Custom
	SourceDir		= "."
	SourceFile		= "panorama.bmp"
	Lat			= 40.452922
	Lon			= 50.072649833333
	NumOfCellsPerLine 	= 9600
	NumOfLines		= 9600
	CellXdimensionDeg 	= 2.6822090148958333333333333333333e-6
	CellYdimensionDeg 	= 2.0411470885729166666666666666667e-6

2) I also cannot understand how resampler interprets the provided info for CellX and CellY. E.g., in Terrain SDK (Custom Terrain Textures.doc, p.11) it says:

Code:
; The ids of the LOD13 quadtree cells inside the corners of the scenery 
; area are:
; Northwest: U=6889 V=4269
; Southeast: U=6891 V=4272

; The lat/lon bounds in degrees of the scenery area are:
; North =   90 -     4269 *  (90 / 2^13) =  43.099365234375000
; South =   90 - (4272+1) *  (90 / 2^13) =  43.055419921875000
; East  = -180 +     6889 * (120 / 2^13) = -79.086914062500000
; West  = -180 + (6891+1) * (120 / 2^13) = -79.042968750000000

Can anybody explain where the figures for U and V are coming from and what they mean?!? I couldn't find any explanation in the docs. And I think this is somehow connected with my problem above...

What I understood from Creating Terrain.doc is that one should divide the distance/span between Lat and Lon values along X and Y axes to the total number of pixels of source image. That's what I did above:

CellX = (East Long - West Long) / 9600 px =2.6822090148958333333333333333333e-6
CellY = (North Lat - South Lat) / 9600 px =2.0411470885729166666666666666667e-6

But I still get the same results :(

photo-test.jpg


Thank you in advance!!!
 
Well, I actually solved the first part of the puzzle (question no. 1) by adding the same Lat/Lon values from [Destination] section to [Source] section as well. Now, the resampler tool takes the NW Lat/Lon from [Source] and outputs texture files with the same NW corner coordinates - same as in [Section].

Question no. 2 regarding U and V values is still valid! :(

Also, how can I improve the quality of output file?!? I understand that maximum resolution for FS9 rendering engine is 4.75m per pixel. However, I use a 0.22m x px image which looks quite good and impressive when viewed with regular image tools but NOT in FS. Is there a way to improve the final quality of the images(s), therefore?!?

Thank you very much!!!
 
The U and V values correspond to the LOD13 extents of the scenery ( or the QMID15 extents ).

The terrain of FS is divided into a quadtree subdivision system.

The number of longitude divisions for LOD13 is ((2^13)*3) or 24,576
The number of latitude divisions for LOD13 is ((2^13)*2) or 16,384

The upper NW LOD13 area is designated as 0,0 uv and the most SW area is 24575,16383 uv

What the SDK doesn't explain very well is the FS2004 resample has a flaw in that areas partially covered with imagery will show the imagery as water.

So the destination bounds need to be set so they reflect the 'safe' bounds... furthest LOD13 bounds which include complete imagery, with no black voids.

I made a tool that uses the .NET 2.0 runtimes

PhotoCalc

It will tell you the destination bounds that should be OK for having no voided areas.

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

As far as the quality... resample uses bicubic resampling ( if I recall right ). What it does is resamples the imagery to the LOD13 area pixel dimensions, then splits the image, and then makes a landclass BGL to place the phototiles.

You could pre-resample the imagery to a size that more closely matches the LOD13 area pixel size with a paint program. but I'm not sure the image quality would be any better.

Most of us have moved on to FSX, as it allows resampling to 7cm per pixel.

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

I also see your image area cover a some small area by FS2004 standards. I has only one unvoided Tile. For a project's BGL to display correctly, you may need an area that covers at least a 4-square tile area. All isn't lost, for you can display the tiles as a VTP terrain polygon, using a tool such as SBuilder for FS9.


Dick
 
Last edited:
Dick, thank you very much for reply!

U and V: After reading your post and digging deep in the forums here and there, I thought I don't really need them. Thanks to your tiny proggies, Terrain SDK, and Vincenty formulas I can get very precise coordinates for the source and output images anyway.

The problem I'm really concerned about is the quality of output textures for photoscenery I'm currently developing. I understand I have two options to improve their quality:

1) Cut the source along LOD13 boundaries and resample, or
2) "Paste" source image(s) over Gmax polygons and makemdl through FS2002 gamepack.

The latter option seems more attractive, although in this case I would also need to download DEM (mesh) data for the same area and convert them into Gmax format. That's what I do NOT know how to do... If true, you support is highly appreciated!

Thank you!
 
Last edited:
Hi bina.

SBuilder for FS9 has an option to build groundpolys and map the texture to them. I'm not very familiar with this method, but I believe you could load a DEM of some type to provide the elevation, and it also allows an offset for the groundpolys.

Maybe someone with experience could chime in. It allows up to 1.2 meter/pixel resolution.

Dick
 
I have used the SBuilder method several years ago to do a photo-scenery of the Washington, DC "mall" area.

It probably only really works well when the terrain is fairly flat. You use a mesh bsq file to create a mesh in SBuilder. Using the mesh, you auto-create flattens to fill the area. Then Sbuilder creates high res textures which it maps onto the flattens. It works OK but at times there are problems with visible edges.

I think also people use fs2000 resample for custom (photo) scenery?

scott s.
.
 
I will ask the question as straight as possible:

How do the professional scenery developers get quality photoreal textures (without resampler)?!?

This question does not allow me to sleep, to be honest. I tried both methods (above) to no avail yet. Maybe I am doing something wrong? But I believe the developers map quality textures on Gmax polygons - is this true?

Thanks!
 
There's a couple of GMax methods to use, but I think it is very popular to use GMax and then export with the FS2002 "gamepack", the idea being that for FS2002 the gamepack doesn't create mdl files for scenery but rather code which can be tweaked, and then compiled using a tweaked compiler bglc9. But I think other folks use FS2002/FSX gamepacks, though I'm not sure what advantage there might be.

scott s.
.
 
If your area is flat, then gmax polys are ideal. You can use a dem file to create a displacement map, and create very nice terrain in max, but the trouble is you'll have an Immense load on the fs9 (or fsx) engine. My first experiment was my last. slide show on good hardware.

What Dick meant by pre-preparing the image wasn't about slicing, it was about resolution. If the best resolution you can hope fore using resample is 4.8 m/px, Dick is suggesting you use a good paint program that has a better routing for resampling than resample.exe. Photoshop can use higher quality routines than bicubic....perhaps use Lanczos resampling routine, and resample your image in photoshop down to 4.8 m/px before submitting the image to the resample.exe routine.

Good luck,
Bob
 
Back
Top