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

Blend Masks and Autogen

Messages
30
Ok...

Last three days have been a crash course on scenery design for me... and I'm stuck.. I hope somebody can lend a hand.

Objective:

Create a photorealistic airport in FSX.

Started out with Sbuilder. Made a exclusion rectangle to exclude just the default airport background. with Sbuilder, added landclass around the area of the airport that matched the type of vegitation I saw in the sat image. This step was to make it easier to blend (with a blend mask) the photo texture and the surounding default LC. Using Sbuilder, converted the georeffed sat image and converted it to a photo map. With photoshop, edited the photo bmp that Sbuilder exported, to make my blend map in a tiff 24 bit greyscale image. Used Sbuilder to compile the bgl's.

Ok, now everything worked out great. I got the custom ground texture I wanted, it blended in with the surounding default landclass that I added and I was a happy camper...

Now, I started adding autogen vegitation with the SDK anotater to the custom photoreal bgl... Now here is my problem.....

It appears that eventhough I am overlapping the autogen well past the transitional "grey areas" of the blend map, I can't get any autogen to show up on the fringe edge of where the blend map and the default land class meet. So it appears to me that for some reason either, A... The LC wont allow autogen to be created too close to it's edges where it meets the begining of the non fully transparent part of the blend map, or, B.... Even though I have anotated autogen on the custom map, it won't create autogen on the areas of the custom map that becomes "Too" transparent.

So what I'm ending up with is... An airport area, that looks like it has a narrow perimeter of no autogen. I will guesstimate that this narrow band is roughly 50-100 feet wide.

How can I fix, or get around this limitation?

Any help would be appreciated greatly.

JB
 
There are times where a developer may find they are the first to encounter a problem. The only thing I can think of is "How big is the gray area?" and could it be cut down?

If it's that much of a distraction, you could place vegetation as scenery objects in the area. But these aren't seasonal compliant.

The gray area is 15 pixels out of a 1536x1024 pixel map. And thats from pure black to pure white...

And placing non seasonal objects is not an option since this field is in Alaska..

You think the issue might be the fact that I saved the mask as a 24 bit greyscale tiff, instead of an 8 bit tiff?


Thanks for the reply...

JB
 
Have you tried annotating with no blend mask present then reapplying it after you're done?.

Jim


So just to make sure we are on the same page...

You mean to take the image file and compile it with no blendmask. Then open annotater and add the autogen. Save the agn file.. Then erase the image bgl, recompile the bgl with the image and the blend mask and then start the sim without any change to the agn (autogen)file?

If that works... why would that be?

I assumed that when I annotate autogen, it is recording the agn data onto a reference file that mirrors the texture file that the annotator was loaded with? Now if thats the case, why would transparent areas on the image file not allow the annotater to record the autogen?

Again, sorry for my ignorance.

JB
 
Ok Did some tests

Did a battery of tests and here are my results... Screenshots to follow when I get back from the family outing today.

Notes on the tests...

I am using the landclass "Narrow Conifers" as this landclass yields a very dense autogen and any missing autogen will be more apparent since density is high. Autogen settings are set to extremely dense to see more clearly the test results.

Annotating on a different image without a blend mask makes no difference. As soon as you switch and load the image with blend mask, blank autogen areas apear along the borders of the default LC and the photo map...

making a pure red photomap for a test constant, I applied it inside an area of default landclass (Narrow Conifers) without a blend mask to observe the results at the hard borders of the default LC and the photomap... I then went into annotator and along the north, south, east and west borders drew a autogen polly with default autogen group Narrow Conifers on each border crossing from inside the photo map, across the border and well into the default landclass to observe the effect on autogen at the borders of the two areas.

I found, that there is a 95% consistency that autogen will not be created on the default landclass side as it aproaches the photo map...This area on the default LC side is roughly 20-40 feet wide. Autogen on the photomap side is created right up to the edge of the border.

It appears that the default landclass has a buffer to exclude autogen a very short distance from the photo boundry.

I'm not sure why... but my first guess is that it's related to LOD... and autogen is being created from data at the the lowest LOD level, thus not utilising the data from the smaller pixels in the higher resolution level...

Screenshots to follow when I get home...

Please try this test yourselves to confirm...And remember to use the same Landclass and autogen density...

Ok here is a screen of the phototile with no blend mask. The Autogen was added to this bgl. As you can see there is no seam up the middle.

bitmap32655-vi.jpg


Here is an image after just switching from the bgl without the blendmask to the bgl with a blend mask.. remember, the agn file was created by placing autogen on the entire photomap without the blendmask. This screen shows the same bgl with the blendmask, but with the agn file from the previous screenshot. Notice right up the middle heading away from camera you will see an autogen seam, where the blendmask ends and the default LC starts.
bitmap32653-vi.jpg



This next photo is of the border between the default LC on the left and the Photomap with no Blendmask, on the right. I used annotator here and drew a poly from inside the photomap to inside the default LC, to observe the effects of the border on one poly of autogen. Notice the seam right up the middle...
bitmap32651-vi.jpg


Ok this next picture, I used a flat red photomap in red placed on top of default autogen. Notice the seam up the middle... also because of the red, you can clearly see that the photomap (red area) contains autogen right up to the border of the map... Where the default LC autogen stops like 20-40 feet before the border. Also look farther up the image... notice that one section of the seam is at a lower LOD and that the point where the default LC autogen stops, is at this point where the lower lod actually contains red...
bitmap32693-vi.jpg


And the last image is just a closer look at the seam... I have moved the camera further foreward where the LOD bumped up to a higher resolution, thus showing clearly, that there is no default LC autogen within that 20 foot border on the left side... But also notice that the photomap contains autogen right up to the border of itself.
bitmap32699-vi.jpg


JB
 
Last edited:
Hi JB.

In FS9, the autogen annotator could overlap the LOD13 grid, into the default landclass autogen area. If this is true for FSX, then just overlap your autogen to eliminate any gaps.

Out of curiosity, what is your INF and your LOD definition?

Dick
 
Hi,

Very interesting. I'am dabbling with photoscenery at the moment for the next version of the Faroe Islands scenery. So I made a test using that scenery. I am using a near-transparent (in-pratice-transparent) background simply as a container for autogen placement (a not-quite-black blend mask covers the whole image).

Take a look at the attached shot. On the left the narrow conifers lc placed with the Autogen Annotator on the background image. On the right - but starting a little away - the lc placed on the default terrain. This lc reaches into the area covered by the image, and the AA-lc crosses the border too (neither of course visible on the "other side").

You may discern a narrow bare strip runnning along the border. But it is very narrow (max 10m) and is not discernable when seen from other angles.

To me it looks like the lc placed on the default goes right to the border while the lc on the image thins out close to it.

Peter
 

Attachments

  • 20081025_test0.jpg
    20081025_test0.jpg
    31.2 KB · Views: 681
Hi JB.

In FS9, the autogen annotator could overlap the LOD13 grid, into the default landclass autogen area. If this is true for FSX, then just overlap your autogen to eliminate any gaps.

Out of curiosity, what is your INF and your LOD definition?

Dick

Dick,

I have had no luck trying to overlap the autogen in FSX..

Listed Below is the Inf info for the first two screens from above, which was using the blendmask

[Source]
Type = MultiSource
NumberOfSources = 7

[Source1]
Type = BMP
Layer = Imagery
SourceDir = "."
SourceFile = "L15X5241X5246Y18291Y18294_su.BMP"
Variation = June,July,August
Channel_BlendMask = 7.0
NullValue = 255,255,255
SamplingMethod = Gaussian
ulyMap = 61.9725246111111
ulxMap = -151.210327138889
xDim = 2.14576642071732E-05
yDim = 1.00845540364561E-05

[Source2]
Type = BMP
Layer = Imagery
SourceDir = "."
SourceFile = "L15X5241X5246Y18291Y18294_sp.bmp"
Variation = May
Channel_BlendMask = 7.0
NullValue = 255,255,255
SamplingMethod = Gaussian
ulyMap = 61.9725246111111
ulxMap = -151.210327138889
xDim = 2.14576642071732E-05
yDim = 1.00845540364561E-05

[Source3]
Type = BMP
Layer = Imagery
SourceDir = "."
SourceFile = "L15X5241X5246Y18291Y18294_fa.bmp"
Variation = September
Channel_BlendMask = 7.0
NullValue = 255,255,255
SamplingMethod = Gaussian
ulyMap = 61.9725246111111
ulxMap = -151.210327138889
xDim = 2.14576642071732E-05
yDim = 1.00845540364561E-05

[Source4]
Type = BMP
Layer = Imagery
SourceDir = "."
SourceFile = "L15X5241X5246Y18291Y18294_wi.bmp"
Variation = April
Channel_BlendMask = 7.0
NullValue = 255,255,255
SamplingMethod = Gaussian
ulyMap = 61.9725246111111
ulxMap = -151.210327138889
xDim = 2.14576642071732E-05
yDim = 1.00845540364561E-05

[Source5]
Type = BMP
Layer = Imagery
SourceDir = "."
SourceFile = "L15X5241X5246Y18291Y18294_hwi.bmp"
Variation = October,November,December,January,February,March
Channel_BlendMask = 7.0
NullValue = 255,255,255
SamplingMethod = Gaussian
ulyMap = 61.9725246111111
ulxMap = -151.210327138889
xDim = 2.14576642071732E-05
yDim = 1.00845540364561E-05

[Source6]
Type = BMP
Layer = Imagery
SourceDir = "."
SourceFile = "L15X5241X5246Y18291Y18294_lm.bmp"
Variation = Night
Channel_BlendMask = 7.0
NullValue = 255,255,255
SamplingMethod = Gaussian
ulyMap = 61.9725246111111
ulxMap = -151.210327138889
xDim = 2.14576642071732E-05
yDim = 1.00845540364561E-05

[Source7]
Type = TIFF
Layer = None
SourceDir = "."
SourceFile = "L15X5241X5246Y18291Y18294_su_B.TIF"
SamplingMethod = Gaussian
ulyMap = 61.9725246111111
ulxMap = -151.210327138889
xDim = 2.14576642071732E-05
yDim = 1.00845540364561E-05

[Destination]
DestDir = "."
DestBaseFileName = "Photo01"
DestFileType = BGL
LOD = Auto
UseSourceDimensions = 1
CompressionQuality = 100


Next is the Inf info for the middle two pics, or the photomap with no blend mask



[Source]
Type = BMP
Layer = Imagery
SourceDir = "."
SourceFile = "L15X5241X5246Y18291Y18294_su.BMP"
Variation = All
NullValue = 255,255,255
SamplingMethod = Gaussian
ulyMap = 61.9725246111111
ulxMap = -151.210327138889
xDim = 2.14576642071732E-05
yDim = 1.00845540364561E-05

[Destination]
DestDir = "."
DestBaseFileName = "PhotoTest01"
DestFileType = BGL
LOD = Auto
UseSourceDimensions = 1
CompressionQuality = 100



Below is the Inf info for the red photo map test from the above pics with no blend mask


[Source]
Type = BMP
Layer = Imagery
SourceDir = "."
SourceFile = "RedTest.bmp"
Variation = All
NullValue = 255,255,255
SamplingMethod = Gaussian
ulyMap = 61.9725246111111
ulxMap = -151.210327138889
xDim = 2.14576642071732E-05
yDim = 1.00845540364561E-05

[Destination]
DestDir = "."
DestBaseFileName = "PhotoRedTest"
DestFileType = BGL
LOD = Auto
UseSourceDimensions = 1
CompressionQuality = 100


JB
 
Hi,

Very interesting. I'am dabbling with photoscenery at the moment for the next version of the Faroe Islands scenery. So I made a test using that scenery. I am using a near-transparent (in-pratice-transparent) background simply as a container for autogen placement (a not-quite-black blend mask covers the whole image).

Take a look at the attached shot. On the left the narrow conifers lc placed with the Autogen Annotator on the background image. On the right - but starting a little away - the lc placed on the default terrain. This lc reaches into the area covered by the image, and the AA-lc crosses the border too (neither of course visible on the "other side").

You may discern a narrow bare strip runnning along the border. But it is very narrow (max 10m) and is not discernable when seen from other angles.

To me it looks like the lc placed on the default goes right to the border while the lc on the image thins out close to it.

Peter


See my pics above... you will see that the missing autogen seams are actually on the default LC side, not the phototile...

JB
 
Hi JB,
See my pics above... you will see that the missing autogen seams are actually on the default LC side, not the phototile...

Yes, your edited post with pics certainly proves that.

Peter
 
Hi JB.

I can confirm 2 things. The default Landclass autogen is excluded to a slightly larger extent than the area covered by the photoreal image. The annotated autogen appears to be clipped to a slightly smaller extent than the image ( this is different than FS9, where autogen was displayed for the entire LOD13 extent ).

This means that using the FSX photoreal techniques, there is no way to eliminate an excluded border around your image.

I'll see if there is a way to "fake" a FS9 photo image BGL and if that will display the annotated area without clipping.

EDITED+++++++++

An fs9 dummy bgl doesn't help at all... in fact messes up the display pretty bad, and the FSX photoreal bgl displays over it and reverts the autogen to the same problem.

A final solution might be to hack the BGL somehow to extend the clipping bounds?

Dick
 
Last edited:
Hi JB.

I can confirm 2 things. The default Landclass autogen is excluded to a slightly larger extent than the area covered by the photoreal image. The annotated autogen appears to be clipped to a slightly smaller extent than the image ( this is different than FS9, where autogen was displayed for the entire LOD13 extent ).

This means that using the FSX photoreal techniques, there is no way to eliminate an excluded border around your image.

I'll see if there is a way to "fake" a FS9 photo image BGL and if that will display the annotated area without clipping.

EDITED+++++++++

An fs9 dummy bgl doesn't help at all... in fact messes up the display pretty bad, and the FSX photoreal bgl displays over it and reverts the autogen to the same problem.

A final solution might be to hack the BGL somehow to extend the clipping bounds?

Dick

Thanks Dick,

So we can assume that any solution will have to be a hack ?

If you find anything, please lemme know. As this has put a stop on my project I am working on.

JB
 
nullvalue and blend mask are not compatible

nullvalue and blend mask are not compatible...in my testing at any rate.
I have not used the annotator tool but I have used the water and blend mask. I have never gotten blend mask or water mask to work when there is a nullvalue specified. It usually leads to the red cast I see in some of your screen caps.
Sean
 
Sean,

Please read the entire post. Those red areas were done on purpose to make it easier to see. The reason your blend masks dont work with a null value, is because some pixels in your image are the same RGB values as the null value in the inf file. If you place a null value, you have to make sure that the pixels you dont want to be transpparent are not the same as the null value.

JB
 
I guess you could try making your blend mask a more 'natural' shape (i.e. a squiggly line instead of a straight one)- I have done this for other photoscenery although this was simply to make the transition from photo to default less obvious (straight lines look out of place in nature)- If the autogen exclusion is along a wavy line, it should make it harder for the observer to spot?
 
I guess you could try making your blend mask a more 'natural' shape (i.e. a squiggly line instead of a straight one)- I have done this for other photoscenery although this was simply to make the transition from photo to default less obvious (straight lines look out of place in nature)- If the autogen exclusion is along a wavy line, it should make it harder for the observer to spot?

Thats a good call.. although my original Blendmask is very abstract as it is... and the gaps are still very recognizable... It just outlines the photo map with a blank strip of autogen... I think the temp bandaid would be to add some vector roads where they might be.. and then draw the mask again tracing the roads.. so it looks somewhat natural...

It wouldn't be a big deal, if the LC I chose wasn't so densly populated with autogen.. but I chose the LC based off what in the default FS world would match the photo closely...

There has to be something the bgl compiler is doing to create these buffered spaces... if that can be found, then maybe that sensitivity can be adjusted.

JB
 
Hi guys,

interesting, I've never noticed this issue before but can confirm that it exists. It's just that I usually don't run the sim with full autogen density (and tend to have wavy edges) so it really isn't very obvious.

Two approaches I can think of to minimize the issue:

1) for the photoreal annotation, use an autogen group that includes clusters of trees rather than just individuals. I'd assume that at least some of the trees in the clusters would end up in the gap.

2) one could place a vector with an invisible (fully transparent) texture in the gap and assign vector autogen to this vector using the appropriate autogen types. That's more awkward though as it requires changes to the terrain.cfg file. Moreover, it's possible that vector autogen doesn't allow for seasonal changes; haven't fully tested that yet.

Cheers, Holger
 
Back
Top