View Full Version : Question: photoreal groundpolygon where to start
RobdeVries
28 Feb 2007, 17:52
Hello,
I'd like to ask you for a little bit of help on designing photoscenery or more precise a photoreal ground polygon for an little airport.
I've been pondering on making Tieton State in Washington State as an addon for MegaScenery's Pacific North West photoscenery and the default FS9 scenery.
Recently I noticed that Google (not to be published) or USAPhotomaps has some fairly high res pics of Tieton State and I'd like to put them into sim as bgl. More or less like Richard Goldstein did with his Georender series or Bob B with his great airport addons.
My big question is of course what steps does one have to take from picture to photoscenery/photoreal ground polygon. What tools are needed, do and don't etc..
I'm all new to this and am patient and eager to learn only I'm not very technical..:rolleyes: I did a search here but a lot of questions and answers are of course contextual and do not depict the whole picture.
Many thanks in advance.
Rob de Vries
The Netherlands
RobdeVries
02 Mar 2007, 08:56
Mmm. I though it was the right forum to post such a question. 35 views but no response. Does nobody have a clue?
Thanks in advance,
Rob
bob5568
02 Mar 2007, 13:27
Rob, please be patient.
Are you designing for fs9 or fsx?
Tieton State would be a nice project for you!
Bob
bob5568
02 Mar 2007, 14:06
Sorry, I see on rereading you specify fs9.
Tieton State would be a nice project for you! To make a photoreal ground poly in fs9, my best results come from designing in gmax.
first you want great source photo, and you want that photo to be projected in wgs84 datum, geographic projection. Converting the photo is simple if you have a GIS tool, or a hassle if you don't. I can help here if you need it.
Once you have a good source photo, you need to be able to relate the geographic coverage of the photo to pixels, and also to meters.
Again, easy to do with either a good gis tool, or with very acurate information about landmarks contained in the photo. One source of information is the airport/facilities directory, which shows runways in length units, meters or feet, and you'll find using the runway ends to be a pretty good set of landmarks.
I usually make an excell spreadsheet in which i list the 3 units of distance between a horizontal set of landmarks and a vertical set of landmarks. 1. distance in degrees 2. distance in meters 3. distance in pixels
With that, you can now calculate 4 ratios that are useful, 1. degrees/pixel (horizontal), 2. degrees/pixel (vertical), 3. meters/pixel (horizontal), and meters/pixel (vertical).
That's the hard work.
Now, you look at your photo and let your artist side take control for a minute, decide where the outside edge of your project is based on the photo.
Crop the photo to that extent.
Now a little planning is needed. You'll need to eventually make textures of parts of this image, so the overall image extent is easiest if it consists of an even multiple of the texture sizes, 256x256 pixels, or 512x512 pixels or 1024x1024 pixels, or rectuangular combinations. So I make a choice of texture size, I usually use 512x512. Then I'll make a multiples chart in excell, by listing the product of 512 x 1,2,3,4,.... Then I know the extent I've chosen for my image, and I'll choose the closest multiple as the ideal extend of my image. Now, if you want, you can go back and crop the image bigger or slightly smaller to match, or you can just add dead image pixels to the image, we'll deal with making it look nice later. If you choose to just fake the image into the right size, just add canvas, do not "resize" the image, which resamples it. Leave the new "border" blank. Whatever the default shows it is fine. That part wont make it to the final result. The end result is a photo with a width and height that's a multiple of the texture size.
Your photo width in pixels, times your horizontal m/pixels tells you the width of the gmax polygon, similarly your photo height in pixels times your vertical m/pixels tells your the height in meters of your gmax polygon. Now go to gmax and make a plane using the meters from this exercise. set your width and height subsections to the multiples of your texture, so that you have individual polygons for each square of the texture you plan to drap on the polygon.
Make your textures from the main image now. You cut up the texture per your plan.
Now you multitexture the plane. I do a wierd way of this, others are more elegant. I go into poly mode and "detach" each of the poly sections, texture each one with the material appropriate for that segment. Then when all done, I "attach" the polys together. This automatically makes the material a multi-material.
Now you have a square plane with an awesome high res image of your airport and surroundings but with an ugly border.
What I do now is build a cutting tool in gmax. The tool takes the shape of the real extend I desire to see displayed in fs9, and then extends beyond the edge of the plane. I do this tool in quadrants as gmax can be fussy about complex shapes doing boolean cuts. So, I make a 2d line over the edge of the place I want to end the polygon, and when I get about a quarter of the way around, I just turn the line to go beyond the edge, and then continue around until the shape covers 1/4 of the area of the plan that I'd like to dispose of.
Now, I extrude the shape. Now I go into "border" mode, and highlight the open edge of the extrusion and click "cap". Now the tool is a solid. Position the tool in z, so that it intersects the plane. Now select the plane, and tell gmax you are making a boolean object. Select the tool as part "b" and select "cookie cutter", and then subtract b from A. Voila...your plane has 1/4 of it shaped irregularly, and still decorated with high res imagry. Now repeat for the other 4 quarters, and you have a beautiful ground polygon ready for export.
Export needs to be done with the fs2002 makemdl, with a makemdl.cfg line inserted that instructs Keepfiles=1. (I may have that inaccurate, this is typed from memory, I'm not at my dev computer) You need to establish a ref point for the plane prior to export, which will have a lat/long that agrees with fs world. This can be the end of a runway. The natural ref point won't be there but you can more the ref point using the motion button on gmax, and the affect pivot only setting. Provide that coordinate pair to the export screen in makemdl.
Once you export, you will have an asm version of the export file, and an asm_0 version as well.
Find the code call "addobj......", and change that to addcat.....and you can add a comma and a level here. Then delete the shadowcall statement. Arno has a seperate post on this site that details this tweak.
Then recompile using bglc.exe
Now you add your bgl file, and enjoy the result.
Bob
PS...forgot to mention that you still need to make fs textures of the gmax material squares. convert them to dxt1 using imagetool.
michaelblackbird
18 Mar 2007, 05:47
Hello
Very interesting topic and explanation.
Bob, you spoke about a GIS tool to transform the picture in WGS84.
I want to convert a Lambert II (from IGN - France) projection in WGS84. What tool will you choose ?
Bye
Michel
Hi Michel,
It is not really an easy tool to use, but I would use FwTools. It is basically command line driven, but it is very powerful. The only problem for some users might be the lack of a GUI.
I have used it to convert images from the Dutch Rijksdriehoeks coordinate system to WGS84 as well.
bob5568
18 Mar 2007, 12:48
Hi Michael, I'm spoiled now, as I finally decided to spend some money on tools. I bought Global Mapper, it costs about $250 US, but among its features, it does projection conversions beautifully.
Assuming Arno's suggestion is freeware you may want to try that out first. If you image is smallish, I could reproject it for you.
Bob
michaelblackbird
21 Mar 2007, 15:57
Hello
Unfortunetly, my images are too heavy I think, thanks for trying to help me.
But I know someone (working in a GIS company but without experience in developping for FS) that have this software Global Mapper. I've seen it and it seems easy, but I don't know how to start.
I want also to use other aerial pictures to do a photomesh scenery bigger than an airport. And I don't know again how to use it with Terrabuilder.
Could you give us a little explanation to start wit hthe good features. I thought about the Capture Screen contents to image (BMP)....???
Anyway many thanks
Bye
bob5568
21 Mar 2007, 21:56
simple to operate global mapper, just open your file and click on "tools", then "configure"
Then click on the tab marked "projection", you'll see the projection is a choice and datum, choose geographic and wgs84, and your done, hit ok..and you've got your image converted.
I do use the capture screen content to image control commonly, it allows you to generate a world file that you'd need if you wish to compile using the geotiff format.
Best,
Bob
michaelblackbird
23 Mar 2007, 17:21
Hello
Thanks
Have you find how to know coordinates of one of the four corners ?
bob5568
23 Mar 2007, 21:18
Michael, you have to know that to start with...either with a reference from a map or a world metadata file you might have delivered from the source file location.
Best,
Bob
michaelblackbird
08 May 2007, 05:39
Hello
OK now I have a bitmap corrected but not with global mapper. I've applied a rotation with PSP. I didn't find how to transform lambert II to WGS84 projection.
I've made in gmax the multisquare poly, detach each square. But I have difficulties to apply material in the correct way. I've "won" for 2 objects (2 square polys) but by undirect ways and I can't redo it :confused: .
Can you explain in detail the right method to wrap each texture please on each plane object.
Bye
michaelblackbird
19 May 2007, 05:08
I've found
Just after apply a new material to the object I've click on the UVW Map modifier and the texture is applied correctly.
It's a long way to do all the objects..... :)
MoToCroSs986
22 May 2007, 00:56
simple to operate global mapper, just open your file and click on "tools", then "configure"
Then click on the tab marked "projection", you'll see the projection is a choice and datum, choose geographic and wgs84, and your done, hit ok..and you've got your image converted.
I have used global mapper like you have said, which corner do you need to know the log/lat for? Do you use degrees minutes or decimal degrees. What is the file type that you start with?
Thanks
bob5568
22 May 2007, 02:36
Not clear on what you need...if you import usgs photos into global mapper, they are already georeferenced.
If you have a picture you wish to georeference, you can align the pic to any knowns...could be an airport runway for instance. If you import an image without reference information, the rectify (georeference) dialogue is supposed to come up automatically. Of course you need sufficient knowns of point locations to pin the image down.
Skydvdan1
22 May 2007, 10:56
Hi Michael, I'm spoiled now, as I finally decided to spend some money on tools. I bought Global Mapper, it costs about $250 US, but among its features, it does projection conversions beautifully.
Assuming Arno's suggestion is freeware you may want to try that out first. If you image is smallish, I could reproject it for you.
Bob
Can Global Mapper convert from NAD83 to WGS84? Can it create Geotiffs?
bob5568
22 May 2007, 15:39
yes to both questions.
Skydvdan1
22 May 2007, 16:56
yes to both questions.
Now the question is can I part with $279. How is the learning curve?
bob5568
22 May 2007, 18:44
I had no trouble with it. Within a few hours at most, you'll be successful with anything you're likely to need. Good help is included.
The money is an issue. I avoided spending it for over a year, but in the end I'm glad I did.
Bob
Skydvdan1
30 May 2007, 22:44
yes to both questions.
What is the process of converting NAD83 to WGS84 imagery? Do I just have to re-georeference the geotiff?
Skydvdan1
04 Jun 2007, 16:06
Any words on the conversion?
Hi,
You need to reproject the image. Not sure if that is what you mean with re-georeference it. It is not like you add other coordinates, you actually will have to wrap the image to the new projection.
bob5568
04 Jun 2007, 19:33
Dan, the process to reproject is simple from within global mapper, just select an alternate datum and click on reproject.
Bob
Skydvdan1
05 Jun 2007, 12:30
Dan, the process to reproject is simple from within global mapper, just select an alternate datum and click on reproject.
Bob
I thought I tried that and it didn't work. The input data was in NAD83 and when I was done it was still NAD83 instead of WGS84.
bob5568
05 Jun 2007, 15:55
I'll be home tonight, perhaps we can experiment together and find out what went wrong for you. At this time of year, we're the same time zone (I'm in seattle area).
Let me know if this would suit you.
Bob
Skydvdan1
05 Jun 2007, 19:36
I'll be home tonight, perhaps we can experiment together and find out what went wrong for you. At this time of year, we're the same time zone (I'm in seattle area).
Let me know if this would suit you.
Bob
Yes please. How do you want to get together on this? Windows messenger? PM? Phone?
(100 posts, WooHoo!!)
Skydvdan1
05 Jun 2007, 21:08
My next question is how do you keep your geo data in your tiff after running it thru photoshop? Photoshop strips out the reference part of the geotiff.
bob5568
05 Jun 2007, 22:23
we can use windows messenger if you wish, how bout 8pm?
I'm bob.bernstein@comcast.net
bob5568
05 Jun 2007, 22:28
go to http://www.remotesensing.org/geotiff/geotiff.html
and download "libgeotif"
I'll show you how I avoid losing the geotif file after edit.
Bob
If you have FwTools installed by accident, it will also include the tools need to copy the GeoTIFF tags from one file to the other (so that you can get them in again after editing with PhotoShop).
I did this a little while ago on some tiles I worked on, guess it would be a good idea if I updated the Wiki article with that information as well.
I have updated the Wiki article (http://www.fsdeveloper.com/wiki/index.php?title=Working_with_FwTools_and_GeoTIFF_f iles) with a little section on how to save the geo info from a GeoTIFF and put it back after editing.
michaelblackbird
15 Jul 2007, 07:28
Hello
After another stop in developping my scenery, I've now finished to wrap all the textures on all littles square of the plane, attached them, installed makeMDL (FS2002 version) and when I want to export gmax tell me that the makemdl was not found. The path is good. I've added the Keepfiles=1 in the makemdl.cfg
If I use makeMDL for FS2004, the mdl is created
thanks
Hi,
Are you sure you started GMax with the correct shortcut? Just replacing the MakeMDL version is not enough. The FsModelExp.dle file is also different for example.
Another issue could be the decimal character in Windows, that should be set to dot, while some countries have it default as comma.
michaelblackbird
16 Jul 2007, 16:46
Thanks Arno
My shortcut is simple as that J:\GMax\gmax.exe, so I've missed something :)
I don't have anymore the CD of FS2002 Pro to find FsModelExp.dle, but I will ask to friends.
I've found explanation on how to configure multiple gamepacks : http://www.oregon-coast.net/Tutorials/Multi_Gamepacks/index.htm
The decimal point was fixed a long time ago to be '.' and not the comma.
Bye
Marc Läderach
30 Jul 2007, 11:21
Hi all, hi Bob
For our next version of FreeZ, we're rebuilding our ground completely. We were able to get some air photos of the airport.
The Photos(TIF) have a resolution of 4096x4096 and a size of 1km x 1km. If my calculation is right, that would mean 0.25m/pixel.
We resized(makes it a difference between resizing and cropping?) the TIF's to 1024x1024 and added it to the plane in gmax. Everything went fine, but the quality of the texture is terrible. I actually don't have a picture of it online, but I'll upload one in a hour or so.
Do you know, what could have caused the bad quality of our ground textures?
I hope, you can help me getting this done ;)
Best Regards
Marc Läderach
Hi Marc,
Low quality textures can have a lot of reasons. It can be in the texture or in the model.
First, if you resize from 0.25 meter per pixel to 1 meter per pixel that will of course reduce how the image looks. But 1 meter per pixel should still look fine.
So it could be that the texture format you are using causes the problem. Or maybe the texture scale is wrong, which could result in a lower mipmap being displayed. But that is all just guessing now, a picture might help to indicate what is wrong.
bob5568
30 Jul 2007, 18:18
Hi Marc,
Arno pointed out a couple issues he's dealt with...very valid.
Something I find is that photoreal can look unnaturally washed out when transitioning to default. I was told once why this is the case in fsx, but I've forgotten the details. I tend to doctor my source image to enhance it's contrast by a significant amount. A sharpen filter can be a nice touch also. Note that this is not technically a resolution issue, but I suspect poor contrast may be confused with resolution, thus offering this tip.
Note, that if you alter a geotif in a graphics program, you'll likely have to restore the geotif tags. This only is an issue if you were counting on geotif in your inf file.
Best,
Bob
Marc Läderach
30 Jul 2007, 18:30
Hi arno
Of course, we're losing a bit of the quality, but I think it would be too big with 64 squares... And 1 pixel/m should still be enough.
Actually i couldn't resize the TIF without resampling it - I don't think, that's possible?!
We're using DXT1, so it shouldn't be a problem at all. From 5000ft the textures are very sharp, even from 3000ft they aren't looking so bad.
I made 8 screenshots to show you, what disturbs me when I'm taxiing on the ground:
http://lszh.aviation-art.ch/files/pictures/fsd/5000ft_South.jpg
http://lszh.aviation-art.ch/files/pictures/fsd/5000ft_North.jpg
http://lszh.aviation-art.ch/files/pictures/fsd/3000ft_South.jpg
http://lszh.aviation-art.ch/files/pictures/fsd/3000ft_North.jpg
http://lszh.aviation-art.ch/files/pictures/fsd/1750ft_South.jpg
http://lszh.aviation-art.ch/files/pictures/fsd/1750ft_North.jpg
http://lszh.aviation-art.ch/files/pictures/fsd/Ground_South.jpg
http://lszh.aviation-art.ch/files/pictures/fsd/Ground_North.jpg
It just looks very blurry and unsharpen. Even the standard-FS9 textures look more sharpen than our textures.
I hope the screenshots help you.
Best Regards
Marc Läderach
bob5568
30 Jul 2007, 18:47
EDIT...perhaps I made a hasty assumption...are you using resample.exe method of high res photoreal? If so, the response below makes sense. If you are already using methods of creating a decorated polygon, please disregard my response.
Marc, you failed to mention the blurry issue is when you are on the ground. That's standard. Resample.exe photoreal textures look like crap when you're on the ground....standard reality for all of us. Arno can tell you why its so different putting textures on a polygon, but from experience, its totally different.
Just plaster that same image on a polygon, and place it using bglcomp.exe...and you'll see the quality you are looking for. That's why this high resolution imagry wasn't the holy grail for ground polys...that's why so much effort has gone into making it possible to still do ground polys in fsx.
Best,
Bob
Marc Läderach
31 Jul 2007, 03:34
Hi Bob
We created a plane with 16 polygons in gmax and added the textures to the appropriate polygon. After that we exported it using FS2002 SDK, altered the asm-file and recompiled it. Everything worked fine, expect that it looks so blurry on the ground.
I really hope, that it's possible to get it a bit sharper or just look more realistic.
Best Regards
Marc Läderach
Hi Marc,
Looking at the screenshots I do not really find them blurry. Of course when you zoom in a lot, you will see that each pixel is 1x1 meters. That is what I am seeing in your most zoomed in screenshots. But the images themself still look sharp for the resolution that they have. Zoomed in that part you would need more than 1 meter per pixel to still get a sharp result.
bob5568
31 Jul 2007, 16:01
Hi Marc, sorry for my flawed assumption...I see that you are indeed decorating polygons.
I guess the path I would take is to explore alternate resolutions to determine how the goals you have fit the images. If it was me, I'd take a subset of the project, and go back to full size imagry, cut the image appropriately and design some polygons with true .2 m/pixel resolution. do enough to assess. Could be based on the features you are attempting to display that you need this level of detail.
You also may want to consider building some polygons that have more specific purpose to lay over the basic 1 meter polygons...such as a set of polygons just for the road that seemed flaxy in your screenies.
Bob
Marc Läderach
02 Aug 2007, 05:39
Hi Arno and Bob
When I'm on the ground, I just have the feeling, that the apron and the runways are "floating", that I would fall, if I would move onto the grass. When I have a look at the FS9 standard textures, they have a sort of "points" (noise?). When I use the standard textures, I really feel, that I'm on solid ground.
Also on straight lines, you can see the steps very clear which doesn't look very nice. How would you avoid that? Would you "draw" them in gmax to add it for another layer?
Best Regards
Marc Läderach
bob5568
02 Aug 2007, 13:42
Marc, I just glanced thru this thread to see for sure if you are designing for fsx or fs9. If fsx, did you break up your polygon into 100m peices?
As far as the bad jaggies, I think this can be improved with higher resolution or drawing more polygons with individual decoration, like you suggested.
If fs9, there was something that made it feel "floaty", but I can't quite remember what it was...mips perhaps? something....I don't remember.
Hi Marc,
You would have to add your own noise layer if you want noise over the texture. It is only done by default for mesh textures (which is what the default grass is).
I don't think you can draw lines with textures like this. Even at a resolution of 20 cm or so it will not look like smooth line in FS. So I prefer to draw them on top as polygons.
Marc Läderach
06 Aug 2007, 19:47
Hi Arno and Bob, sorry for this late answer...
I tried to put a noise layer on it, but the frames sank drastically (the texture was too big). What size would you take for this texture and what size should I set in gmax (I set 10m for 256x256 which was far too much).
Thanks for your help, you're great! ;)
Best Regards
Marc Läderach
Hi Marc,
For the airports I used a noise texture with, I just had a small texture (128x128 or 256x256) with random noise in the alpha channel. I then repeated that over a polygon that covers the entire field.
As this is only one polygon it should not really influence the performance. I could never measure any difference for one polygon and one texture extra.
Marc Läderach
09 Aug 2007, 02:40
Thanks Arno, I will give it another try!
Best Regards
Marc Läderach
vBulletin® v3.8.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.