Jump to content
Sign in to follow this  
Guest luissa

Excluding autogen with Shp2Vec

Recommended Posts

>>2. Still a little uncertain about this "texture" attribute.>>>I guess for all vectors except for freeway trafic and gps>>water polys, there is a texture attribute with the identical>>value: {1B6A15BB-05FB-4401-A8D1-BB520E84904C}>>Hi,>>My interpretation is:>>- if the XML file has a reference to>{1B6A15BB-05FB-4401-A8D1-BB520E84904C} then it instructs>shp2vec that it should read a "texture guid" from the dbase>for each of the shapes to be processed. In SBuilder, I am>simply copying (and renaming) the XML files into the>../SBuilder/Tools/Shapes folder and do not care about the>{1B6A15BB-05FB-4401-A8D1-BB520E84904C}.Correct. The XML is telling Shp2Vec that it should make a Texture AttributeBlock and which Shapefile field to use to populate it.>>3. Still need to understand how the slpoex and slopey>relate>>to elevations in the shapefile. I see how to compute the>>values, but how is the slope value applied to the shape>>elevations. For example, should the polygon have the same>>elevation for all vertices, or the elevations set to the>>appropriate elevation computed using the slope scales (and>>which vertex is taken as the "base" value that the slope>>scales are applied to?).>>I did not test yet these SlopeX&Y. I am just exporting the>shape files with SlopeX=0 and SlopeY=0. Unless someone tells>us that slopped surfaces are not supported in FSX, I plan to>evaluate the SlopeX and SlopeY according the description in>the SDK. What I recall from high scoll geometry is that if I>have the ground projection of a polygon (eg no altitude for>the points) plus SlopeX plus Slope Y plus the altitude of a>single point, then tye exact position in 3D space of all>polygon points will be know.Sloped water surfaces are supported in FSX. The points of the polygon should be in the same 3D plane. The slopeX and slopeY are the pre-computed (to save runtime) normal to that plane. They are used in extrapolating the plane of the water surface onto the terrain grid.

Share this post


Link to post
Share on other sites

Thanks Doug and Luis.OK. Here is what I found. I created a simple 4 point hydro poly for my test.1. set all points to 500m. Hydro poly compiled fine, but in game I saw that flattens from default scenery were still in there. My first thought was to create a new texture in terrain.cfg and changing the flatten and render priority (I _think_ smaller number = higher priority?) but couldn't get this to work (couldn't see my new poly). But thinking about this, I don't think this is a viable method, since configuration management of terrain.cfg would be impossible if everyone was creating new textures with different priority. So instead, I created an "all hydro poly" exclude (this seems like the only way to exclude default scenery until a disassembler is built to determine the specific texture called out in the poly?). This worked.2. Set two points to 550m. Didn't do anything to ensure they were co-planer. Compiled. The tilt seemed to apply to my hydro poly even without SLOPEX or SLOPEY.3. Determined approx slope X based on my poly vertices (approx 13123m / degree). I was using FSX_KML to build my shapefiles. Found out this utility is not properly building the dbf file (the SLOPEX and SLOPEY need to be Float 13 characters). So I fat-fingured the dbf file to get the proper fields in there and my slope values. Compiled OK (after fixing some file format problems -- shp2vec needs dbf file in good format and doesn't report when it can't decode the file) and ran. Again the poly displayed correctly. So whatever SLOPEX and SLOPEY do, FSX can get along without them being set.scott s..

Share this post


Link to post
Share on other sites

>Thanks Doug and Luis.>>OK. Here is what I found. I created a simple 4 point hydro>poly for my test.>>1. set all points to 500m. Hydro poly compiled fine, but in>game I saw that flattens from default scenery were still in>there. My first thought was to create a new texture in>terrain.cfg and changing the flatten and render priority (I>_think_ smaller number = higher priority?) but couldn't get>this to work (couldn't see my new poly). But thinking about>this, I don't think this is a viable method, since>configuration management of terrain.cfg would be impossible if>everyone was creating new textures with different priority. >So instead, I created an "all hydro poly" exclude (this seems>like the only way to exclude default scenery until a>disassembler is built to determine the specific texture called>out in the poly?). This worked.Use TmfViewer to open the default cvx*.bgl. Right-click on the feature to be excluded and choose Identify Vector Features. This will give you information (such as the actual texture) that can be useful for more surgical exclusions.>2. Set two points to 550m. Didn't do anything to ensure they>were co-planer. Compiled. The tilt seemed to apply to my>hydro poly even without SLOPEX or SLOPEY.>>3. Determined approx slope X based on my poly vertices>(approx 13123m / degree). I was using FSX_KML to build my>shapefiles. Found out this utility is not properly building>the dbf file (the SLOPEX and SLOPEY need to be Float 13>characters). So I fat-fingured the dbf file to get the proper>fields in there and my slope values. Compiled OK (after>fixing some file format problems -- shp2vec needs dbf file in>good format and doesn't report when it can't decode the file)>and ran. Again the poly displayed correctly. So whatever>SLOPEX and SLOPEY do, FSX can get along without them being>set.If by "get along" you mean "won't crash" - sure. But if you are going to the effort to create the sloped polygon it might be considered advisable to finish the job and provide the data that the terrain system was programmed to make use of. Your call.-Doug @ ACES

Share this post


Link to post
Share on other sites
Guest luissa

>Sloped water surfaces are supported in FSX. The points of the>polygon should be in the same 3D plane. The slopeX and slopeY>are the pre-computed (to save runtime) normal to that plane.>They are used in extrapolating the plane of the water surface>onto the terrain grid.HelloMany thanks for confirming this. I need to check if we can make a slopped surface without showing water using one (which?) of the entries in Terrain.CFG.Kind Regards, Luis

Share this post


Link to post
Share on other sites

>>Use TmfViewer to open the default cvx*.bgl. Right-click on the>feature to be excluded and choose Identify Vector Features.>This will give you information (such as the actual texture)>that can be useful for more surgical exclusions.>Wow. This works great. It even shows my SlopeX and SlopeY data for confirmation. This FSX version of TMFViewer is so much nicer.scott s..

Share this post


Link to post
Share on other sites
Guest JuiceRabbit

>>each polygon must be saved to KML format in Google Earth ,>then imported into FSX KML.>>note that you can edit later your poly in google Earth with>the tab "properties".>>In FSX KML, you "Add" each file and notify type or class for>each poly in the "description" tab :>I think this also works....If you create a "folder" in google earth, you can put your polys in that single folder. Then you just need to save the folder as a KML and add the single KML file in FSX_KML.

Share this post


Link to post
Share on other sites
Guest UlfB

Thanks Pascal,I've tested to use Google Earth and FSX KML to change landclass and create roads. Easy to use and fast enough for small areas.Thanks for the heads up :-)Ulf B

Share this post


Link to post
Share on other sites

We had already seen in a very long and exhaustive test that xml (BGLComp) excludes will not reliably remove autogen.In spite of being documented in the BGLComp manual, xml excludes (ExcludeAllObjects) will only remove autogen in entire quad 15 chunks. So, they are not very useful for this purpose.We have been advised to use vector (Shp2Vec) excludes - FLX - instead.However, I have now found that, in certain instances, they are not reliably removing autogen either.In most instances - exclude polygons over default terrain - all autogen objects seem to be removed correctly.But, on land class polygons (PKX), there are objects that remain with no way to exclude them.Here is a design project:http://forums.avsim.net/user_files/163132.jpgAn exclude polygon is drawn on top of the PKX. This is the result:http://forums.avsim.net/user_files/163133.jpgNo matter the land class chosen for the PKX, there will always be instances of single trees that remain.This behavior has now been confirmed by the developers and filed as a bug for further investigation.Of course, there are work-arounds:1. Draw the land class polygon in such a way that there is a hole where the exclude applies. This exclude will therefore only cover the underlying land class and will work correctly.2. Instead of an exclude, draw a land class polygon for a texture without autogen, for example, grass, or another.Or anything that you can imagine, as there must be other solutions.Dick Ludowise has imagined a very neat trick of a small invisible ground tile compiled with Resample that will, like all custom textures, eliminate autogen.Best regards.Luis

Share this post


Link to post
Share on other sites
Guest bustervk

>Luis is correct, you can exclude the default flatten with an>exclusion polygon and add you new flatten in the same cvx>file. Here is an example at EGCC. The inner yellow polygon is>the default flatten, the cyan polygon is the exclusion and the>outer yellow polygon is the new flatten.>>George>>exclusionsq0.jpg>>imageshack.pnghi George,Only one question: is the default airportfile which we see with the TMFviewer in the cvx.bgl always a "default flatten" file?ThanX in advancebyeBert>

Share this post


Link to post
Share on other sites

>Only one question: is the default airportfile which we see>with the TMFviewer in the cvx.bgl always a "default flatten">file?If you right-click on the yellow polygon in TmfViewer it will tell you what it is. Usually it will be an "Airport Bounds" object, aka flatten.George

Share this post


Link to post
Share on other sites
Guest bustervk

George, in your 3 steps example of EGCC after the exclusion, do you have completely excluded then the original airport (in this case EGCC) and then you start building the new airportThanx againbert

Share this post


Link to post
Share on other sites

Bert,The EGCC scenery already existed, it is from the UK2000 series. All I did was to remove the default flatten and create a new one which better fits the scenery.However, in the case of EGNV, the flatten height is so wrong, the replacement flatten works even with the default scenery.George

Share this post


Link to post
Share on other sites
Guest bustervk

hi Pascal,May i ask with tags you have use in FSX_KML to exclude the trees.i.e forex1 ag and ex2 ag in yor example.thanx in advanceBert

Share this post


Link to post
Share on other sites

I seem to have a problem with my latest Exclude/Flatten. It seems to flatten only one Qmid 11 area.The first shot shows the the exclude for the default AB, the second shows the flatten and the third shows what I see in FSX. Only the area cross-hatched in red is flat.The coordinates of the flatten are:34,0-2.82374960722917,54.93165436176490,57.910000-2.82191412088579,54.93176652079590,57.910000-2.80691782587727,54.93086452832490,57.910000-2.80551232819402,54.93286269802750,57.910000-2.80318725679731,54.93260230257290,57.910000-2.80281292901261,54.93319844602230,57.910000-2.80055762844594,54.93517434205960,57.910000-2.79897191971024,54.93618085277730,57.910000-2.79776477729295,54.93605804499410,57.910000-2.79636399644663,54.93709459016570,57.910000-2.79720684084381,54.93746748341880,57.910000-2.79720684084381,54.93807015119080,57.910000-2.79748442044934,54.93860249465340,57.910000-2.79601079264516,54.93944312152500,57.910000-2.79448160858837,54.94054064589060,57.910000-2.79628031975447,54.94318378805140,57.910000-2.79699853971889,54.94466063781060,57.910000-2.79979334775742,54.94386667099340,57.910000-2.80049712874102,54.94420760523050,57.910000-2.80119088975703,54.94516364713840,57.910000-2.80239079390158,54.94509541972760,57.910000-2.80269687496509,54.94587034661140,57.910000-2.80469486545533,54.94578718886300,57.910000-2.80709527764543,54.94609026507050,57.910000-2.81265973525952,54.94536553178130,57.910000-2.81393184968184,54.94530948227340,57.910000-2.82068377481309,54.94409122927780,57.910000-2.82031807919211,54.94293978412160,57.910000-2.82178820690389,54.94091655652140,57.910000-2.82204984491752,54.94031672444120,57.910000-2.82151330318953,54.93893485436930,57.910000-2.82142209471998,54.93744703303660,57.910000-2.82019425587559,54.93718873031580,57.910000-2.82374960722917,54.93165436176490,57.910000Any ideas gratefully received.Georgehttp://www.geo-davison.demon.co.uk/EGNC1.jpghttp://www.geo-davison.demon.co.uk/EGNC1A.jpghttp://www.geo-davison.demon.co.uk/EGNC2.jpg

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...