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

Placing Large Polygons over Terrain

fs1

Messages
302
Country
argentina
I have a quick question. What is (if any) the way to place a very large polygon over the terrain ?

I would like to cover a large area (let's say 30nmx30nm with a polygon or even larger), simulating a harvest or a big flood, etc.

This polygon will be overlayed on the mesh on this pretty large area.

Is this possible via the SDK ? Is there a size limitation?

Thanks
 
Last edited:
In fact, my question is: Is it possible to place a large polygon to a terrain ? I know polygons can be placed, but any size limit?
Thanks
 
I have never tried a polygon that big so I don't know if it works. But it's only software so no harm if you give it a try and see what happens right?
 
Thanks. I will try.

Can you do Blending with the existing terrain as well with Polygons?
 
Hi Federico:

Please tell us what type of textured polygon you want to create:

* a flat or variable ground surface shape (either of which would be terrain mesh-clinging textures), utilizing 3rd party injection of a visual 'equivalent' for run-time rendering of a compiled, BGL-derived:

* 3D object: SCASM / ASM "legacy" pre-FS9 type Vector Textured Polygon "Ground Polygon" with assigned (VTP) Layer number

* 2D object: SHP2VEC Vector Polygon textured default land class, replacement of default world land class, or Resample custom photo-real local land class



Also, if a land class type or Resample-type custom photo-real textured polygon (technically a special type of land class):

* do you want Night and/or Seasons displayed on the textured polygon ?

* do you want Autogen displayed on the textured polygon ?


...or are you wanting to create a textured polygon which is a:

* flat ground surface shape, terrain mesh-clinging, utilizing 3rd party injection of a visual 'equivalent' for run-time rendering of a compiled, BGL-derived:

* 3D object (flat): MDL-based SimObject for FSX and/or P3D9 Textured with: default land class, replacement of default world land class, custom imagery


Alternatively, are you simply wanting to display a textured polygon AGL (thus NOT terrain mesh clinging) with 1 or more transparent layers such as: :scratchch

http://www.fsdeveloper.com/forum/threads/volumetric-grass-tutorial.435771/


...and/or with an altitude-dependent LOD and/or multi-layer 3D planar object display toggle such as:

http://www.fsdeveloper.com/forum/th...m-and-export-as-fs2002-gp.436378/#post-734544


[EDITED]

CAVEAT: FSX and P3D use a spheroidal / ellipsoidal "curved Earth" 3D world model, and 'terrain-mesh-clinging' now means even "FLAT" terrain polygons, RWYs and other scenery objects actually have curved surfaces with all triangular terrain surface object faces pivoted to variable slope angles at adjoining edges ...to align with the shape of the Earth 'geoid' at run time when rendered from Geographic LAT-LON / WGS84 source data compiled into ASM code within BGLs. :pushpin:

Also, there are scenery object visibility and texel density per quad cell rendering and performance issues to be considered which compels use of MIPMAPs, LODs etc. in association with a terrain quad tree to control run time rendering as a function of visual display radius according to linear distance and/or altitude from the user aircraft to a scenery objects OctTree. :alert:

Also, the maximum span size of a ground surface area (polygon) may not exceed 100 Meters in either the X or Y direction if it is going to align with the local flat segment of a quad Area Point or "mini-quad" (which defines the maximum flat segment size of the FS spheroidal / ellipsoidal "curved Earth" 3D world model); anything larger would have a gap between the superimposed plane of the textured polygon and the FS terrain / local ground surface.

[END_EDIT]

GaryGB
 
Last edited:
Thanks GaryGB

I want a 2D ploygon, that can be alpha blended on the existing terrain.

I saw their is a multiple source example in the SDK. This, I guess, is compiled in a BGL (I guess the Blend is done in the BGL and then loaded by the FSX already blended)

I want something like that but that can be blended in the Runtime.

Thanks !
 
Last edited:
Interesting... :)

I believe that what we are discussing here is a FS SDK Resample land class and/or local photo-real texture set, with water and blend masking (which are implemented via multiple "Alpha channels" in the texture mapped to known and calculable FS terrain grid vertices with MIPMAPs and LODs that correspond to Quad levels and Area Points. ;)

IIUC, you are trying to utilize 3rd party injection of a visual 'equivalent' for run-time rendering of compiled, BGL-derived scenery content independent of- (and presumably without adverse interference to-) ...the SimConnect sub-system ? :scratchch


PS
: You might find these related sub-topics interesting:

http://www.fsdeveloper.com/forum/threads/get-polygons-elevated-easily.92729/

http://www.fsdeveloper.com/forum/threads/seasonal-objects-as-effects.18180/

http://www.fsdeveloper.com/forum/threads/effect-lods-are-they-even-possible.330034/

http://www.fsdeveloper.com/forum/threads/people-as-effects-problem.432696/

http://www.fsdeveloper.com/forum/threads/cant-find-textures-to-orbx-scenery.433093/

http://www.fsdeveloper.com/forum/threads/destructible-scenery.436005/


GaryGB
 
Last edited:
Yes, I am trying to do this taking advantage of some SDK trick, the problem is that I guess that the BGL is blended offline so this is not an option.

Also effects and 3D objects are not overlayed on the terrain? If too many slopes they aren't attached tightly to the existing mesh?

I may have to look into other options - hooking for example which I am trying to avoid.
 
Last edited:
Yes, I am trying to do this taking advantage of some SDK trick, the problem is that I guess that the BGL is blended offline so this is not an option.

The 1-bit B+W Alpha channel defines Water masks, and the 8-bit grayscale Alpha channel of the texture file defines Blend mask areas.

I'm not so sure any "blending" attributes are written into Resample compiled BGLs; IIUC, the info inside the mapped texture is utilized instead.:scratchch

[EDITED]

NOTE: Final output source file format for TIFF Masks must actually be 8-Bit gray-scale; see:

http://www.fsdeveloper.com/forum/th...-scenery-achievable.440912/page-4#post-789447

[END_EDIT]


Also effects and 3D objects are not overlayed on the terrain? If too many slopes they aren't attached tightly to the existing mesh?

I may have to look into other options - hooking for example which I am trying to avoid.

AFAIK, 3D objects and Effect (*.Fx) files are typically "placed" at assigned altitudes or are otherwise by default rendered at 0 Meters AGL via the parameters specified in FS SDK BGLComp XML source code compiled to BGLs.

3D objects and/or Effect (*.Fx) files when attached via a "AttachPoint" to a MDL-based 3D object are also typically "placed" at assigned altitudes or are otherwise by default rendered at 0 Meters AGL via the parameters specified in FS SDK BGLComp XML source code compiled to BGLs.

3D objects are by default rendered at 0 Meters AGL when mapped / placed via the LOD-13 quad 'cell' Area Point vector offset coordinates specified in FS SDK Autogen Annotator XML source code, which is most often further compiled to *an.AGN files located in paired \Texture sub-folders

3D objects and Effect (*.Fx) files when attached via a "AttachPoint" to a MDL-based 3D object, are by default rendered at 0 Meters AGL when mapped / placed via the LOD-13 quad 'cell' vector offset coordinates specified in FS SDK Autogen Annotator XML source code, which is most often further compiled to *an.AGN files located in \Texture sub-folders locally paired with the \Scenery sub-folders containing the BGL files which define and place the textured land class polygons.


NOTE: IIUC, for 3D objects and Effect (*.Fx) files attached via a "AttachPoint" to a MDL-based 3D object to be made available for mapping / placement via the LOD-13 quad 'cell' terrain grid vertex 'vector' offset coordinates specified in FS SDK Autogen Annotator XML source code (most often further compiled to *an.AGN files in paired \Texture sub-folders), they must first be configured for use via *.XML or *.SPB files in the FSX / P3D \Autogen sub-folder and via Terrain.Cfg in the FS main root folder.

GaryGB
 
Last edited:
The 1-bit B+W Alpha channel defines Water masks, and the 8-bit grayscale Alpha channel of the texture file defines Blend mask areas.

I'm not so sure any "blending" attributes are written into Resample compiled BGLs; IIUC, the info inside the mapped texture is utilized instead.:scratchch

Can you explain this?

I guess that if you look for the texture in the compiled BGL will be already blended in the multiple source example?

I don't think the BGL has all sources in it, just the destination
 
Hi Federico:

To be more clear, in the case of FSX SDK Resample photo-real aerial imagery BGLs, the placement instructions and the aerial imagery itself are all packaged inside of a 1-piece BGL (without any textures being separately-located in a \Texture sub-folder such as we had in FS9 and earlier), and would thus ordinarily not be accessible to the end-user until a public-domain decompiler is made available.

However, it is my understanding that you may have found a way to access the textures independently once they are loaded into memory (outside the BGL) by the FS data-loading threads and/or rendering engine, so I have mentioned above, the way that water and blend masking is implemented via the terrain grid-mapped Alpha channels in aerial imagery and/or discrete Mask texture files when one's source files are submitted to the FSX SDK Resample compiler...in the event that you are actually able to utilize this information in some way by accessing the photo-real textures in working FS task session memory. ;)


As you may already know, 'entire' aerial imagery and or terrain mesh BGL files are not actually loaded into memory, but instead 'pointers' are created and loaded for different hexadecimal code regions of the BGL file, and FS terrain data pre-loading threads for the run time rendering engine retrieve / load only what is needed to render locally within the visual display LOD radius based on the present Geographic coordinates of the user aircraft.


And while it is true that FSX SDK resample may not have all data from ones source files for regions surrounding the specific visible photo-real area of interest defined by the INF file X and Y parameter value coordinates, the quad tile-based terrain grid system requires that 'some' overlap of surrounding region tiles may still need to be present at the edges of one's area of interest, and those surrounding tiles may simply be masked with transparency attributes to prevent them from being seen, as may be visualized when opening one or more adjacent and super-imposed photo-real BGL's in FSX SDK TMFViewer. :idea:

http://msdn.microsoft.com/en-us/library/cc707102.aspx#PerformanceTipsforAerialImagery


Does this explain what you are asking about ? :scratchch

GaryGB
 
Last edited:
Thanks, I appreciate your explanation. Very detailed.

The problem I am having is that I need to work with default FSX textures (photorealistic and none ones).

The main question is: for a certain Lat/Lon or a certain pixel, let's say. Can you load several textures with different priorities ? If so, those textures are blended at runtime or compiled offline into the final one?
 
Hi Federico:

IIUC, you are referring to default FSX 'land class' textures ? :scratchch

If so, tiles of default 'normal' land class are blended at run time to accommodate any changes imposed by end users to their scenery display configuration and scenery content; this also accommodates impact of custom textured vector polygons and land class (including FS SDK Resample custom photo-real as a special type of land class) which is further blended according to the Blend mask in texture files.

AFAIK, it is possible for land class tiles to be pre-blended before run time without an option for run time modification by other land class tiles or vector content (other than Blend masks allowing underlying layers to show through to the top); this is what is so 'special' about locally-mapped FS SDK Resample custom photo-real tiles as a special type of 'land class'. :idea:


Perhaps a review of these links might be further informative
:

http://www.fsdeveloper.com/forum/threads/ptsim-larger-maps.424686/#post-628531

http://www.avsim.com/topic/78039-photo-mesh-and-landclass-sceneries-and-sampling/

http://www.fsdeveloper.com/forum/threads/about-landclass-tile-ground-dimensions.435767/#post-728393

http://download.microsoft.com/downl...obal Terrain Technology for Microsoft ESP.pdf

http://www.microsoft.com/Products/Games/FSInsider/developers/Pages/GlobalTerrain.aspx


GaryGB
 
Last edited:
Thanks Gary.

Still, with all of the resources the SDK offers (thanks for posting all of them and your explanations! :)), I don't see a way to inject a alpha blended bitmap that can overlay/lie on top of the existing terrain.

I will be exploring other alternatives ?
 
Hi Federico:

The FS rendering engine can still super-impose a number of textures layers which, IIUC, utilize Alpha channel transparency ...on top of either default or custom land class, and FS SDK Resample photo-real as "Decals" which are translucent throughout, and which have transparency blending attributes at their edges in the area they are "injected".

[EDITED]

IIUC, TileProxy utilizes a 'transparent' photo-real BGL layer used for Autogen annotation (and water masking ?) superimposed on top of another underlying custom photo-real layer created dynamically using streamed / cached imagery tiles downloaded from online imagery tileservers.

[END_EDIT]


The weather-related effects from rain, snow, and shadows for representing sloped terrain shape, (optional) ground shadows for time of Day, shadows from moving airborne user aircraft, etc. are all examples of what can sometimes end up appearing on top of anything we might otherwise have 'thought' we had total control over. :idea:


The point is, there are ways to get textured content that uses transparency attributes on top of just about anything on the ground, if we can just understand how the FS rendering engine does it at run time. :wizard:


Because the FS2002 method of SCASM / ASM based "Ground Polygons" end up mesh-clinging without shadows and flickering when coded properly with a sufficient number of interposed VTP layer numbers between those "G-Polys" and other numbered VTP scenery layers above and below them, we can use them with a fairly predictable result.

AFAIK, they are not able to be "attached" to a MDL and/or SimObject (but perhaps others here know a way to do this ?)



If your 3rd party un-documented methods could inject "Ground Polygons" that were subject to FS environment variable, SDK parametric, and/or end-user configurable 'control' in FSX / P3D as they are in FS2002 and FS2004 ...that would be especially interesting to see. :scratchch



I have the impression that you may still be able to find a way to achieve your goal of injecting layers of terrain scenery content with textures that utilize Alpha channel transparency, with further research into this. ;)


PS: Some links on Ground Polygons (aka "G-Polys") and considerations as to their placement and segmenting into maximum 100 Meter span sized pieces as either individual polys or as a group of textured polys using a central RefPoint:


https://www.google.com/search?q=site:www.fsdeveloper.com+ground+polygon+"100+meter"++Arno&ie=UTF-8&oe=UTF-8&hl=en&client=safari


GaryGB
 
Last edited:
The weather-related effects from rain, snow, and shadows for representing sloped terrain shape, (optional) ground shadows for time of Day, shadows from moving airborne user aircraft, etc. are all examples of what can sometimes end up appearing on top of anything we might otherwise have 'thought' we had total control over.

Gary, you are right. This could be the way to go.

Thanks for all your insights !
 
Back
Top