Sign in to follow this  
arno

Baffled by photoreal ground polygons

Recommended Posts

After attempting to lay down a 512 x 512 pixel photoreal polygon on a flattened airport area (using FSDS), I am baffled by the fact that during FSDS compilation (SCASM) the image divided itself into 4 quads, the top left 256 x 256 quad changed places with the bottom right, and the top right exchanged places with the bottom left. It does this with DXT1 and 24 bit images. Anticipating this "shuffling of the quads" (my phrase...sorry, its early ) fixes the problem, but I want to avoid needless work if possible.I posted first on the FSDS site if anyone wants to see the images, and the details, but there doesn't seem to be much discussion there right now.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Maybe a stupid question, but why split it into 4 segments anyhow?Just making one big polygon and putting the 512x512 texture on it sounds a lot easier to me. I have never seen that FSDS split it for me (in the source the polygon should become two triangles or course, but that should be all).PS. Or are you meaning FSSC instead of FSDS? Saw a similar post there.

Share this post


Link to post
Share on other sites

OOPS...I meant the FSSC site, not FSDS...sorry for the confusion....When I texture the polygon with a normal high resolution (1 m / pixel)photoreal 512 x 512 bmp, and compile it, it shows up in FS9 as an image corrupted as the picture in my original post showed. The workaround will be very tedious....color the 512 bmp, then place the 4 256 x 256 quads so that when they are "corrupted" in the compilation, they are in the wrong order in the bmp, but are correct in FS9. This would not be obvious with normal random textures like grass.

Share this post


Link to post
Share on other sites

Humm, strange. And you are using the background image object with visible in FS on to place it or another feature of FSSC?

Share this post


Link to post
Share on other sites

Yes, I have a very accurate placement of a background image which I reconciled to a new and more accurate placement of the 2 runways I got from an FAA(?) website. I then took my 1m/pixel images and fitted the 512 pixel images to the RUNWAY, (not the background image) and built out a mosaic of 1 m/pixel polygons from there. The results are quite spectacular, but of course only work on flattened ground. I will use alpha masks to cut off parts of images that run out over unflattened ground. I will show some results in another post, because my wife is drumming her fingernails waiting for me to log off.............(the suspense begins to build).........:-jumpy

Share this post


Link to post
Share on other sites

Altho these are only 16 color images that don't do justice to the clarity, I feel that these ground polygons are worth the effort. I haven't seen any impact on framerates.

Share this post


Link to post
Share on other sites

Yes, I know it looks great. I am also working on a project that has 1 meter photos under the aircraft. But I did not place them with FSSC, I made a simple SCASM grid manual.When you write:"I then took my 1m/pixel images and fitted the 512 pixel images to the RUNWAY, (not the background image) and built out a mosaic of 1 m/pixel polygons from there. The results are quite spectacular, but of course only work on flattened ground."I am a bit confused. Did you place the photo in the scenery by selecting "visible in FS" for the backgrond image or are they placed as other polygons?

Share this post


Link to post
Share on other sites

They are placed as other 512 bit textured polygons. Even with extreme care in placing them, there is a slight gap (approx 1/2 m) which cannot be fixed by overlapping them because the overlap shimmers when overflown......However, with some care they can be covered by a separate polygon with a higher level. The odd thing (the reason for my posting) is that the 1 m pixel displays properly in the FSSC window when 1m/pixel resolution is selected for the texturing, but they do not compile properly to FS9 until you change to 2m/pixel and also adjust the 4 256 x 256 quads as I described earlier. I assume this is a SCASM compile issue, and I hope you will try the same method to see if there is an easier workaround or fix than mine.The detail around the airport with 1m/pixel phots is just plain fantastic.

Share this post


Link to post
Share on other sites

I will have a look in FSSC, seems I have missed the feature you are using to place them as I never heard of that yet. I will try it and see what kind of SCASM code comes out.

Share this post


Link to post
Share on other sites

I appreciate your interest. Is Derek Leung off on some other project?

Share this post


Link to post
Share on other sites

John, try just making gmax polygons at 512x512. Place them using the "align" feature of gmax, and they nestle together perfectly. B

Share this post


Link to post
Share on other sites

I think Derek is still working on FSSC, but does not always have time to reply to all questions. You see him now and then at the FSSC forum.I think you just used the normal polygon option to place your texture. With these polygons you can not specify the mapping and FS then just tiles the texture as it likes. So I think that is what is giving your problem, it has an offset and is tiled for the rest.Maybe you can do it in GMax like Bob said. But don't forget to correct the source then to make it a ground polygon instead of a 3D object.

Share this post


Link to post
Share on other sites

I did that for SNA2004. One thing to take into account, the flashing polys don't totally go away even if you make the polys separate objects other than 3d objects. The only sure thing is have a well placed flatten and minutely raise the GMAX polys a little until there is a balance between no mesh flashing through and wheels sinking only a little.Shez

Share this post


Link to post
Share on other sites

HHHMMMMM...seems like we have all done a flip flop on this one...thanks for the GMAX hints (which I will try) but by using 4 named stored selections in Paint Shop Pro, I can cut and paste the 4 quads into their diagonally opposite positions (so the compiler can promptly move them back) and fairly quickly create a "shuffled" bmp. I have about 20 to cover the area around my airport and that is completed.Covering the "gaps" with a polygon under or over the priority level 8 was what I was going to try next. Presumably, a sliver of one of the adjoining maps with 99% of the bitmap alpha masked to be perfectly transparent will do the trick.

Share this post


Link to post
Share on other sites

Yes, that is what has always bothered me, especially with concrete tarmacs where the lines always run East West or North South at some angle to the rest of the structures...so I decided to make custom bitmaps where the actual sizes would have NO tiling. I am surprised that no one has ever stumbled on this predisposition of these photoreal ground textures to re-arrange their 4 quads themselves along their diagonals in compile....or maybe they did and said s____this,I'm outta here.....

Share this post


Link to post
Share on other sites

extra polygons to cover gaps, when its not needed? Each to their own, but I'd look at that decision again if it were me!To change to a gmax approach now is nothing more than making a box at 512m x 512m, eliminating the lower 4 vertices, making a material from the images you already have made, and appling the material. The change Arno is reminding you to make is simple. Especially if you still have the fs2002 gamepack installed...just run the polygon model using the fs2002 gamepack, and check "keep files" in the makemdl options.The edit the line ADDOBJ to ADDCAT, and add a layer number...you can see this spelled out at ARNO's website under Gmax tweaks. Then just recompile using bglc. B

Share this post


Link to post
Share on other sites

Bob,I agree that is the easiest method and gives a very nice look. Of course the pain is the alignment of textures.Shez

Share this post


Link to post
Share on other sites

I just started with 1 m/pixel imagry. Then I made 512m x 512m polygons. my latest work called for a grid 2 across and 4 down...so, I took a 1024 across by 2048 pixel down rectangle of my bigger 1m /pixel image and defined that as the imagry that would lie on all the polygons. Then its child play to divide that image into its 512x512 pieces, and they lay perfectly with no adjustment over the polygons. The polygons lay perfectly against each other using the align tool, and once aligned into their pattern, I grouped them so I could move the entire group wherever I wanted.No fuss, no muss...the imagry lined up as good as before I carved up the 1024x2048 image. B

Share this post


Link to post
Share on other sites

It's just a known limitation of the polygon features. You would have to use a TexPoly instead of a Poly to be able to give the mapping. Only GroundMaker had that feature (was really a great tool, unfortunately support stopped).I would never consider using this sort of polygons to place phototiles, just for that reason. It is better to make a simple grid in SCASM or in a 3D object designer (and adjust the code for ground polygons).

Share this post


Link to post
Share on other sites

For the Fs2004 gamepack it seems adding a zbias_ to the ground polygons is enough to stop the bleed through (of course a flattened area below it is still required).

Share this post


Link to post
Share on other sites

Yep. I actually had already cut up my image so it became easy. The problem I am resolving is how to use AFCAD/SGX with ground tiles. This will be the best solution as the taxiway drawing is so easy and the edges are nice and rounded. I am slowly cracking it...Shez

Share this post


Link to post
Share on other sites

>The problem I am resolving is how to use AFCAD/SGX with ground>tiles. This will be the best solution as the taxiway drawing>is so easy and the edges are nice and rounded. I am slowly>cracking it...It is not possible get AFCAD/SGX polygons or taxiways on top of ground polygons made with GMax (or SCASM). You can still make the AFCAD file for the AI of course, but no visual objects will be shown (unfortunately).

Share this post


Link to post
Share on other sites

That is correct Arno. Forgot to mention this earlier, the material must begin with the name zbias_ or the flashing will occur.As to the polygons under SGX/AFCAD I refer to your answer in the other thread. I am going to try and use Terrabuilder to do this. AFW and GMAX do not work.RegardsShez

Share this post


Link to post
Share on other sites

my solution was to carve lines out of the material over the taxiways using gradient alpha channel and dxt3 compression.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this