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

FSXA Render polys above vectors

Horst18519

Moderator
Resource contributor
Messages
2,385
Country
germany
This is one for the experts I guess.

I created some rivers as vectors and want them to be rendered below waterpolys, because it looks funny it both overlap.
It seems FSX always renders polys first and then vectors, no matter what renderpriority you assign. Can anybody confirm this?
Would be interesting to know if there's a way to "hide" vectors under polys. :teacher:
 
Hi Thorsten:

Perhaps water bodies made in an otherwise "invisible" custom photo-realistic land class layer (with 1 or 2 pixels set to activate a "blend" attribute) would allow "underlying" river vector water polys to show through that "top" layer along with default vector content and autogen OUTSIDE of the "opaque" area of the photo-realistic water body...as explored in this thread and other linked threads: :idea:

http://www.fsdeveloper.com/forum/showthread.php?t=21253

...and:

http://www.fsdeveloper.com/forum/showpost.php?p=225217&postcount=23


Although the context of the above linked discussion(s) involves primarily autogen, it seems possible that other uses could be made for the otherwise "invisible" custom photo-realistic land class layer (in addition to creating a base for autogen placement) ...such as making water bodies. ;)


Possibly custom photo-realistic water bodies created in a otherwise "invisible" custom photo-realistic land class layer could be kept "opaque", by NOT using a gray-scale "blend" gradient or feathering, in a blend mask layer with a photo-realistic multi-color texture image (as is usually done to give an appearance of water translucency and color to the water along the edges of water bodies) ? :confused:

IIUC, this might prevent the vector river from showing through when it is "underneath" the opaque photo-realistic water body; but on either side of the photo-realistic water body, the vector river would otherwise show through (...and thus be visible along its course, as would other default and/or custom vector content including autogen).


I'd be interested in knowing what you and others think about this approach, and whether it would require too much manipulation of any default and custom autogen annotations one wished to maintain / modify in areas adjacent to such custom photo-real water-bodies ? :scratchch


Hope this might prove to be a feasible option. :)

GaryGB
 
Last edited:
You mean using photo terrain for those waterpolys? For thousands of lakes I don't think this is an option. It might work if you're talking about 3 or 4 lakes, but in that case you could easily edit the rivers to delete those parts of them that intersect with the lakes.
Actually, this is what I will have to do: try to find a way of deleting those parts of my rivers that lie within a waterpoly. I couldn't find any other way of solving this issue.
 
Hi Thorsten:

What you describe is certainly a challenging scenario ! :eek:

IIUC, you meant that you are placing the river polys as vector textured polygons which "look" like water based on having a graphical multi-color image (often used for smaller rivers and streams in areas where the aircraft will be far above the ground), but which do not have the reflective moving waves attribute of FS "living water" ?

Or were you referring to the newer FSX water polygon type which requires all vertex elevations to be assigned a "floating point value" in order to conform with terrain shape ? :confused:



Another option: Mesh-clinging "legacy" water (pre-FSX type available via a modified FSX Terrain.Cfg) is used to make parts of rivers / streams in the immediate vicinity of larger water bodies (ex: lakes), so they could be continuous with / overlap with the full "living water" polygons of those larger water bodies. :idea:

The larger water bodies would also need to use mesh flattens underneath them (sounds a bit like FS water prior to FSX, eh ? :p ).

Then farther away "inland" from the larger water bodies, the rivers / streams could be placed as continuing vector textured graphical "water look-alike" polygon objects.


BTW: If an entire network of rivers / streams AND the larger water bodies (ex: lakes / seas etc.) were all created as full "living water" polygons having the reflective moving "waves" attribute etc., would this adversely affect FS performance in one's custom scenery ?

IIRC, when we are out flying over / looking towards larger areas of "living water" polygons in FS (and regardless of whether containing single or multiple water polygons per area), our FPS are usually higher, so I'd expect FPS would not suffer near larger expanses of such "living water" polygons. :scratchch


Of course, in the latter 2 optional scenarios making all adjacent water polys "living water", if ones source data is ex: *.SHP files with separate polygons for rivers / streams / larger water bodies, one would still face the dilemma of finding a way to merge the polygons into unified / overlapping regional water polygon objects to display properly at run time ! :duck:

[EDITED]

Hmmm... if only we had a easier way with (freely available) tools to merge data points of poly-lines and polygons for use in FS Development in scenery objects such as land class / water bodies, and ex: use of OSM data *.SHP files for autogen annotation with Arno's tools.

But... maybe there are 3rd party solutions out there already ! ;)


http://levien.zonnetjes.net/?q=shapefiles

http://gis.stackexchange.com/questions/25004/open-source-software-to-merge-large-shape-files

http://gmapsplugin.com/learning/editshapefiles.html > 5. Edit Shapes > Merging Shapes:


http://gis.stackexchange.com/questions/21360/merging-2-polygon-adjacent-to-each-other-using-r

...and:

http://rgm2.lab.nig.ac.jp/RGM2/func.php?rd_id=maptools:unionSpatialPolygons


...or:


http://gis.stackexchange.com/questi...d-extracting-by-boundary-from-sql-server-2008 > "use the modules merge shapes and intersect polygons from SAGA GIS"

...and:

http://www.saga-gis.org/en/index.html > http://www.saga-gis.org/en/about/software.html > http://sourceforge.net/apps/trac/saga-gis/wiki/Module Descriptions



...or:

http://gis.stackexchange.com/questi...-large-amount-of-polygon-features-in-a-script

...and:

http://postgis.refractions.net/documentation/

...or:

http://lists.osgeo.org/pipermail/qgis-user/2010-June/008817.html


[END_EDIT]


[EDITED_AGAIN]

...and/or:

http://grass.osgeo.org/gdp/html_grass63/v.extract.html

[END_EDIT_AGAIN]


I hope further discussion of such topics as this, might help identify some more ways for FS Developers to utilize custom and 3rd party coordinate / vector data when generating various types of FS content ! :)

GaryGB
 
Last edited:
Well, the last thing you write is actually what I have to do: calculate the overlapping areas and delete the river vectors in that area, so that rivers and lakes don't overlap anymore.

That still leaves the problem that FSX rivers have not water FX/reflections, but I don't think this will ever be solved as it is hard-coded into FSX.
Like you say: you could always use polys instead of lines for rivers, but then you'll have all kinds of flatten issues along with ugly rivers because you can't use the usual river textures, so this isn't really an option.

Really a shame that we have so much good shp material these days, but not good flightsim engine to really make use of it...
 
Well, the last thing you write is actually what I have to do: calculate the overlapping areas and delete the river vectors in that area, so that rivers and lakes don't overlap anymore.

That still leaves the problem that FSX rivers have not water FX/reflections, but I don't think this will ever be solved as it is hard-coded into FSX.

Perhaps rhumbaflappy's ideas here might prove interesting: :idea:

http://www.fsdeveloper.com/forum/showpost.php?p=140813&postcount=7

...and:

http://www.fsdeveloper.com/forum/showthread.php?t=18894&highlight=splashing



Also, possibly some of the links in my "Edited" post above may prove helpful:

http://www.fsdeveloper.com/forum/showpost.php?p=545790&postcount=4


Like you say: you could always use polys instead of lines for rivers, but then you'll have all kinds of flatten issues along with ugly rivers because you can't use the usual river textures, so this isn't really an option.

What about using the legacy mesh-clinging water type after extracting XY and/or XYZ vertices from *.SHP files as ASCII *.XYZ / *.CSV files, *.BLN files (-this latter file type can be "appended" to SBuilder), or converting to KML for use with Google Earth GUI / FSXKML ?


[EDITED_AGAIN]

Additionally, IIRC, one can directly edit the vertices in a KML file; perhaps insertion of properly sequenced coordinates / vertices there from external sources once a "dummy" starter poly-line / polygon has been created initially prior to opening the edited KML file in FSXKML might be an option too ?


(Excerpt from Rhumbaflappy's example KML file: "Lake Lawn Airport Parking.kml" -previously posted here at FSDeveloper, IIRC)

Code:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
	<name>Lake Lawn Airport Parking.kml</name>
	<Style id="sh_ylw-pushpin">
		<IconStyle>
			<scale>1.3</scale>
			<Icon>
				<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
			</Icon>
			<hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
		</IconStyle>
		<LineStyle>
			<color>ff0000ff</color>
		</LineStyle>
		<PolyStyle>
			<fill>0</fill>
		</PolyStyle>
	</Style>
	<Style id="sn_ylw-pushpin">
		<IconStyle>
			<scale>1.1</scale>
			<Icon>
				<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
			</Icon>
			<hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
		</IconStyle>
		<LineStyle>
			<color>ff0000ff</color>
		</LineStyle>
		<PolyStyle>
			<fill>0</fill>
		</PolyStyle>
	</Style>
	<StyleMap id="msn_ylw-pushpin">
		<Pair>
			<key>normal</key>
			<styleUrl>#sn_ylw-pushpin</styleUrl>
		</Pair>
		<Pair>
			<key>highlight</key>
			<styleUrl>#sh_ylw-pushpin</styleUrl>
		</Pair>
	</StyleMap>
	<Placemark>
		<name>Lake Lawn Airport Parking</name>
		<description>Lake Lawn Airport Parkingr</description>
		<styleUrl>#msn_ylw-pushpin</styleUrl>
		<Polygon>
			<tessellate>1</tessellate>
			<outerBoundaryIs>
				<LinearRing>
					<coordinates> [B][COLOR="Red"]<-- This 'vertex" section can be edited as desired after KML file is initially created with a simpler [U]ex[/U]: triangle or square shape[/COLOR][/B] 
						-88.60109306814151,42.62809801371336,0 -88.60067170754311,42.62810632724259,0 -88.60067734376999,42.62981583514961,0 -88.60110901457153,42.62980747186403,0 -88.60109306814151,42.62809801371336,0 
					</coordinates>
				</LinearRing>
			</outerBoundaryIs>
		</Polygon>
	</Placemark>
</Document>
</kml>


[END_EDIT_AGAIN]


Really a shame that we have so much good shp material these days, but not good flightsim engine to really make use of it...

I'll bet we can find some more solutions with further inquiry ! :)

GaryGB
 
Last edited:
Like I said, small rivers don't look good if they're rendered as polys. They need to be a vector line to use the vector textures. And no vector lines can use "real" water with reflections in FSX.
 
Hi Thorsten:

[EDITED]

So, then do I understand correctly that you prefer to make smaller streams / rivers as vector textured polygons in order to have the appearance provided as a multi-color / water class texture attribute from default or custom vector "graphical water look-alike" object types listed in Terrain.Cfg ?

And if you had the option to add a transparent "living water" attribute on top of the "smaller" graphical streams / rivers rendered from vector textured polygons, would you even want to add that "water with reflections" attribute if you could do so (without being required to also incur accompanying ex: ugly vector "shorelines" that are often too wide for how they look in real life at average flying altitudes) ? :confused:

[END_EDIT]

GaryGB
 
Last edited:
I never really understand what you write. :o

But I think whatever I would like to have, I can't have it. If Holger Sandmann can't solve those issues I shouldn't waste too much time on them either.
 
I never really understand what you write. :o

Hi Thorsten:

Sorry if my initial "rough drafts" (posted here as I attempt to grasp, clarify, and share my ideas) ...are difficult to follow.

I sometimes forget that this is a forum visited by folks from all over the world, for which English is only a second language; my apologies for this oversight (again). :tapedshut


Oh, and I probably should not have asked pointed questions that might compel a reply from you < ...ever notice how un-popular forum "surveys" are ? > :ziplip:


And IMHO, there is no need to feel uncomfortable sharing that honest and well-intended feedback with me here, as occasionally when I go back and read my own posts, I also have a hard time following them, and sometimes say to myself: "W.T.H. was I thinking" ! :D


So often I am in the early stages of trying to figure out ways to do things in FS either via "routine methods", or via "work-arounds", that my thinking out loud committed to text (often via Dragon NaturallySpeaking as I ramble on in front of my computer) ...may be rather abstruse, even for one who speaks English natively. :o



But I think whatever I would like to have, I can't have it. If Holger Sandmann can't solve those issues I shouldn't waste too much time on them either.

I'm confident that you may be able to achieve some new insights on how to get what you want with your water bodes in FS. ;)


No doubt Holger has worked very diligently over the years to understand and innovate FS Development ideas and techniques, some of which he has occasionally (and very generously) shared with the FS Community.

I believe that even though he recently appears more focused on commercial application of his knowledge, he probably does not ever allow himself to feel that he "understands it all", and IMHO, he therefore likely does not feel that he has no need to continue searching for new ways to achieve work-arounds in FS Development.

And I believe that despite his present commercial interests, he would encourage others to continue searching for new ways to achieve work-arounds in FS Development as well.



So, I'm in agreement with Arno as he posts in his forum signature, a friendly tease of a viewpoint we might all express when frustrated by a developmental challenge: :idea:

"If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done." :rolleyes:


Hope you find new ways to make working with your project a bit easier ! :)

Regards,

GaryGB
 
Last edited:
Well written. ;)

I'll do some more testing, sometimes the solution to a problem lies at a very different place than where you look.
 
The terrain.cfg file controls the rendering priority of vectors and polys. Streamlines are given priority over shorelines. Shorelines are given priority over waterpolys. Logically, streamlines also have priority over waterpolys.

You need to end the streamline data at the edges of the waterpolys in a GIS program, or in something like SBuilderX. Changing the terrain.cfg would lead to problems.

Dick
 
Changing the terrain.cfg is not a problem because I'll have to do it anyway. (adding new entries, that is, not editing the default ones obviously)
But unfortunately it doesn't help changing the renderpriority values in the terrain.cfg, even if you edit the default values there. That's why I think it is hard-coded into FSX to always render vectors after polys.

I think you're right that the only solution is indeed to use a GIS program to delete the overlapping parts of the rivers.
 
The main problem remains: you can either use vector lines (with line textures) or polygons (with poly textures). If you want to use river textures (3plus1 for example) on a poly FSX will crash. If you want to render a line below a poly FSX will disregard this attempt.
 
The main problem remains: you can either use vector lines (with line textures) or polygons (with poly textures). If you want to use river textures (3plus1 for example) on a poly FSX will crash. If you want to render a line below a poly FSX will disregard this attempt.
Hi Thorsten:

In my edits above, I was just clarifying some of the ideas I had expressed above for the benefit of others who may also read this thread, and who might appreciate / gain / share some new ideas for development in the future. :twocents:


Sorry I don't have a prepared solution for your challenging, but interesting development scenario described in your OP above.


Perhaps Dick Ludowise and/or Arno (or others) who are more familiar with command-mode operations using one of the ex: freeware GIS software packages discussed in the linked URLs in my posts above ...may come up with a routine which could (-just as a very general conceptual workflow example): :idea:

1.) Convert (copies of) river vector poly-lines (IIUC, "lines" of specified widths) into polygons

2.) Temporarily merge (copies of) river polys with larger water body polygons

3.) Remove vertices for larger water polys from the "merged" river / water poly object(s), thereby "closing" ends of river polys

4.) Convert "edited" river polys back to poly-lines for use as FS vector rivers

5.) Generate original larger water polys (without rivers) as preferred FS water type



If you want to use river textures (3plus1 for example) on a poly FSX will crash.

PS:

Thorsten: Could you please explain what you meant by: "If you want to use river textures (3plus1 for example) on a poly FSX will crash" ? :confused:

Was "3plus1" referring to a particular default or custom river texture name, or to a method of content generation used for creating vector rivers versus polygons ? :confused:

Thanks in advance (...even though your statement above was in English, I didn't understand what you were referring to !) :o


Hope this might help stimulate more ideas leading to a successful solution for your project ! :)

GaryGB
 
Last edited:
Hi Thorsten,

I cannot check it because I do not have FSX and necessary programs available at this time, but would not FSXKML (you so kindly explained the workings of for my benefit) be the (ahum, relatively simple, cough) solution for your problem in that you could redraw the rivers using GE and FSXKML once you have excluded the default ones from the area?
If you are working on (say) a Finnish scenery, there are definitely less rivers present than there are lakes and if using partially transparent photoscenery for the rivers (but tagging them with lake or channel water polygons or something other than shp rivers, you would keep the reflective and wave properties intact. Even if not using photoreal scenery ( only for the river trajectories) this could work, I think?
Or perhaps I misunderstood your intentions?
 
Yes, FSXKML is a very powerful tool when you want to do this kind of stuff, most of all if you're working on something like Germany or Finland, with so many rivers and lakes. But imagine you have hundreds or even thousands of rivers and as many lakes. Usually the vector data is not as precise as making rivers end exactly at the borders of the lakes, so both overlap. That's the issue I was talking about. I don't think it would help trying to add some photo layer.
 
Back
Top