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

Slope parameter in Water Polys

Messages
74
Country
germany
Hi,
maybe it is my fault, but I am not sure whether I understand the MS documentation about SlopeX and SlopY in Water Polys. The "Terrain and Scenery.html" says that this is meters per degree Latitude/Longitude ... but in which direction? Does a positive value mean, that a river is flowing from N to S / form E to W or is it just the other way round? Maybe someone has already found out? And is the effect cumulative, i.e. if a river goes from NE to SW we have to split the real world difference in altitude between the SlopeX and SlopeY value? And do we have to give the altitude for the polygon according to the lowest or to the highest point of the river??
 
Hi,
maybe it is my fault, but I am not sure whether I understand the MS documentation about SlopeX and SlopY in Water Polys. The "Terrain and Scenery.html" says that this is meters per degree Latitude/Longitude ... but in which direction? Does a positive value mean, that a river is flowing from N to S / form E to W or is it just the other way round? Maybe someone has already found out? And is the effect cumulative, i.e. if a river goes from NE to SW we have to split the real world difference in altitude between the SlopeX and SlopeY value? And do we have to give the altitude for the polygon according to the lowest or to the highest point of the river??

I don't remember off the top of my head. Load a familiar river from the default scenery using TmfViewer, right-click on the river and choose Identify... You might need to test a number of polygons (our rivers are not one big polygon, but rather a collection of smaller sloped surfaces). Sample a few and the answer should quickly become apparent.

The polygon vertices are 3D with respect to mean sea level and all vertices for each polygon are planar.

-Doug
 
Hi,
I tried to use your advice to check river polgony in TmfViewer - but the result is not very clear. :( I used cvx4814 which has the river Seine in Paris - rather well known to me. If you follow the course of the river and klick one point after the other, you get very different values (sometimes scaleX is positiv, sometimes it is negative and the same is true for scaleY. And these changes do not really correspond to the direction of the river at this specific point.
TmfViewer does not give you the altitude of a polygon or of the points defining it. If you check the HPX7824.shp-file in the Example1 file of the SDK and extract the values for the points defining the polygons (from the corresponding .dbf-file you can see which of the records has a slope) you will notice that they are in effect not all on the same altitude, the Z-value for the points changes from point to point. And checking the location of these points in TmfViewer, I did not find any explanation for these different values, they seem not to correspond to the possible flow direction of the river.
So how we can understand the correct way to draw a river for FSX ???

BTW, another point not quite clear in the documentations is on which side of a shoreline the water should be. The text says that the shorelines should be drawn clockwise, but that is probably only true for seashore and lakes; from checking the points in HLX7824.shp I have the impression that the shorelines are drawn in such a way that the water is always on your right side, i.e. for islands you should draw them in counterclockwise direction.
 
Hi,
I tried to use your advice to check river polgony in TmfViewer - but the result is not very clear. :( I used cvx4814 which has the river Seine in Paris - rather well known to me. If you follow the course of the river and klick one point after the other, you get very different values (sometimes scaleX is positiv, sometimes it is negative and the same is true for scaleY. And these changes do not really correspond to the direction of the river at this specific point.
TmfViewer does not give you the altitude of a polygon or of the points defining it. If you check the HPX7824.shp-file in the Example1 file of the SDK and extract the values for the points defining the polygons (from the corresponding .dbf-file you can see which of the records has a slope) you will notice that they are in effect not all on the same altitude, the Z-value for the points changes from point to point. And checking the location of these points in TmfViewer, I did not find any explanation for these different values, they seem not to correspond to the possible flow direction of the river.
So how we can understand the correct way to draw a river for FSX ???

BTW, another point not quite clear in the documentations is on which side of a shoreline the water should be. The text says that the shorelines should be drawn clockwise, but that is probably only true for seashore and lakes; from checking the points in HLX7824.shp I have the impression that the shorelines are drawn in such a way that the water is always on your right side, i.e. for islands you should draw them in counterclockwise direction.

The slopes are a pre-computed normal vector for a planar 3D polygon. I took a look at the source code for our water sloper and it appears that the coordinate system is plain old WGS84 - positive X is east, positive Y is north. Positive Z is up.

Many of the river polygons in our source data are very large (geographically) and very complex (lots of islands). The prospect of having that large polygon be planar would yield a very unsatisfying result. So we break the river polygon up into sub-polygons, each of which is (essentially) planar. These sub-polygon vertices are 3D and are intended to blend with the elevation data such that the collection of sub-polygons, explicitly placed in 3D space, model a believable river surface.

This is not an easy problem. This is the first version of FS where we have attempted water in this fashion. To have attempted sloping water via the FS9 process would have been a disaster, due to the drastic increase in the quantity of polygonal rivers AND the complexity and size of those rivers. The current results, shipped with FSX, is admittedly rough in some areas, but taken as a whole is much preferable to the FS9 method. Our current algorithm for creating sloped water needs some work (the compiler - Shp2Vec - is fine), which unfortunately was not able to be accomplished in time for shipping. It is currently being looked at.

Your shoreline approach of "water to the right" sounds just fine. This holds for all types of polygonal water.

-Doug
 
Hi,
I still find something strange with these parameters. I checked the Nile river at several points. North of Cairo it will usualy give you a value of slopeX of about 151 and slopeY about 133. Now according to the documents, this value is a meters/degree value. In my understanding that means that if you go from 30° N (somewhat to the S of Cairo) to 31° N the river should slope down about 151m. But in reality the river at Cairo is about 20m above MSL, and that is about the terrain elevation in the sim at this point. Visually the river is ok, and I think most of the rivers are ok in the MS world, so I think the description in the SDK cannot be correct.
Anyway the way you describe the process of producing the slopes in the original MS design, it seems almost impossible to do something like that when trying to add some sloping water body to the MS world. So I guess we have the choice between using a non-flattening ground clinging legacy GUID for the texture (as was suggested in another thread of this forum) or we do as I have done before: split the river into sections and set them on slowly diminishing altitudes (you will not notice the difference of 1m in altitude even if you try to land on the river with a water plane). Since most of the large rivers are not steep, that can be done.
Edited on 11-23: With TCalcX I found that the river in Cairo is at an (unrealistic) level of less than 3m MSL, so what with the slope ???
 
Last edited:
FWIW I experimented with a 4 point polygon with slope in the Z coordinates. It was approximately planar, though I did not check it mathematically. The polygon displayed with slope in the sim, even with SlopeX and SlopeY set to 0.
The actual slope was about 13,000 meters / degree in the x direction. That is about a 12% slope I think.

scott s.
.
 
FWIW I experimented with a 4 point polygon with slope in the Z coordinates. It was approximately planar, though I did not check it mathematically. The polygon displayed with slope in the sim, even with SlopeX and SlopeY set to 0.
The actual slope was about 13,000 meters / degree in the x direction. That is about a 12% slope I think.

scott s.
.

There is no enforcement of perfectly planar. In fact a fairly high percentage of the default sloped water polygons are not perfectly planar. Our sloper will merge adjacent triangles with similar slopes for efficiency.

The Slope parameters are used for extrapolation of polygon vertex elevation onto the mesh grid where the vertex does not fall precisely on a grid point. Depending on the in-game mesh settings, the use of SlopeX=SlopeY=0 can range from imperceptible to very perceptible in-game anomolies. We would not have wasted the disk space, memory footprint and loading time if there was not a tangible benefit.

-Doug
 
Back
Top