Shp2Vec Vector Slopes

#21
https://www.fsdeveloper.com/forum/threads/shp2vec-vector-slopes.441761/post-794240

Thanks GaryGB

I understand that the above explanation applies to new landclasses. Correct?
Yes; the default Terrain.Cfg is 'ready-to-use', and this is true of that file after edited by properly written FS utilities.


https://www.fsdeveloper.com/forum/threads/shp2vec-vector-slopes.441761/post-794240

As far as I understand the vector shapes represented by each GUID are fixed (hard coded). Correct ?
IIRC, that would only be true for lines which are mapped to textures that have a specific pixel width overall or per repeating strip of texture image within the overall texture extents.


https://www.fsdeveloper.com/forum/threads/shp2vec-vector-slopes.441761/post-794240

Also, I don't think you can change the textures of the default Power Lines? Or their height ?

Let me know?

Thanks
The terrain texture for the utility corridor can be changed in a custom version of such a vector object with its own GUID.

The Power towers (aka "pylons") are 3D models mapped along the utility vector object poly-line vertices as a special type of meta-object sometimes referred to as "vector Autogen" ...when rendered at run time in FS.

These can also be custom, provided one changes the GUIDs from the FS default for the MDLs and the overall vector line meta-object within Terrain.Cfg.

GaryGB
 
#22
These can also be custom, provided one changes the GUIDs from the FS default for the MDLs and the overall vector line meta-object within Terrain.Cfg.

GaryGB
Interesting. Thanks. Can you point me to a documentation on this?
 
Last edited:
#23
Are you specifically and only wanting to change the Power tower (aka "pylon") 3D models mapped along the utility vector object poly-line vertices as a special type of meta-object sometimes referred to as "vector Autogen" ...when rendered at run time in FS ?

Or are you instead only wanting to change the local terrain texture draped onto the ground underneath the above utility vector object poly-line vertices and Power tower (aka "pylon") 3D models ...when that "vector Autogen" is rendered at run time in FS ?

GaryGB
 
#24
Are you specifically and only wanting to change the Power tower (aka "pylon") 3D models mapped along the utility vector object poly-line vertices as a special type of meta-object sometimes referred to as "vector Autogen" ...when rendered at run time in FS ?
GaryGB
Yes, and I think this is managed offline by the AutoObject in the Autogen settings correct?

Or are you instead only wanting to change the local terrain texture draped onto the ground underneath the above utility vector object poly-line vertices and Power tower (aka "pylon") 3D models ...when that "vector Autogen" is rendered at run time in FS ?

GaryGB
This is also something I am looking to test. It should be defined in the texture terrain CFG file, correct?
 
#25
Hello:

Yes ... and yes ! :)

BTW: Since your inquiry is ultimately intended to accommodate any recent changes to the FSX / P3Dv1.4x codebase in P3Dv4.x, you should refer to that Lockheed-Martin version of the P3Dv4.x SDK for any possible changes that may now apply: :pushpin:

https://www.prepar3d.com/support/sdk/

http://www.prepar3d.com/SDKv4/LearningCenter.php

http://www.prepar3d.com/SDK/Environment Kit/Terrain SDK/Terrain Configuration File.html


PS: I do not recall seeing in the L-M P3D SDK docs, a statement of the requirement that Autogen 3D objects must now have draw call batching enabled in both FSX and P3D; but IIRC Arno confirmed that this is the case, so be advised to implement that when processing MDLs via MCX. :alert:

GaryGB
 
Last edited:
#26
@GaryGB thanks for all the info

As far as I understand, you can add several textures/custom landclasses in the terrain cfg file.

Now, can you create a custom vector, and assign it a new GUID, textures and attributes such as flatten, etc? I have not seen this is possible..? E.g., a new elevated (flatten) road with a new texture
 
#27
@GaryGB
https://www.fsdeveloper.com/forum/threads/shp2vec-vector-slopes.441761/post-794480

thanks for all the info

As far as I understand, you can add several textures/custom landclasses in the terrain cfg file.

Now, can you create a custom vector, and assign it a new GUID, textures and attributes such as flatten, etc? I have not seen this is possible..? E.g., a new elevated (flatten) road with a new texture
https://www.fsdeveloper.com/forum/threads/shp2vec-vector-slopes.441761/post-794216

I suggest that initially, you may benefit from making an extra backup of your default 'active' P3Dv4.x Terrain.Cfg file.

Then install one of the OrbX FTX demo scenery packages and begin studying the numerous custom entries that are subsequently added. :idea:
I recommend installing the OrbX FTX NA Pacific Northwest demo:

https://orbxdirect.com/product/pnw-demo


After that is installed and configured to be "active", search the 'working' copy of Terrain.Cfg file for this query string:

"FTX_PNW_Road"


PS: Some vectors are linked to a FSX Terrain.Cfg file "flattenoffsetmeters" parameter value as discussed here: :alert:

https://www.fsdeveloper.com/forum/threads/how-to-exclude-default-mesh.434438/post-714482

GaryGB
 
#28
Thanks @GaryGB. I have been playing with the terrain CFG parameters in memory and see what you mean.

Code:
// Roads - concrete / 1 lane / divided median
[Texture.116]
Name=Roads_Concrete_1_Lane_Divided_Median
Color=FFC00000
guid={D77FF8C9-0242-4254-9165-6B1E392274F1}
LegacyId=1134
Textures=hiway_1_lane_su.bmp,hiway_1_lane_hw.bmp,hiway_1_lane_su.bmp,hiway_1_lane_su.bmp,hiway_1_lane_su.bmp,hiway_1_lane_lm.bmp
Layout=3_PLUS_4
StripWidthMeters=10
Size=2
FlattenMode=flat
FlattenPriority=21000
LandClassRemapType=none
ExcludeAutogen=Yes
RenderToTexture=Yes
RenderPriority=102155
Water=No
There is, however, something doubtful and wanted to confirm it. Regarding the default roads, although flatten, they don't seem to react to changes in their z component (altitude). They seem to be mesh-clinged. Could this be true?
 
Last edited:
#29
https://www.fsdeveloper.com/forum/threads/shp2vec-vector-slopes.441761/post-794582

Thanks @GaryGB. I have been playing with the terrain CFG parameters in memory and see what you mean.

Code:
// Roads - concrete / 1 lane / divided median
[Texture.116]
Name=Roads_Concrete_1_Lane_Divided_Median
Color=FFC00000
guid={D77FF8C9-0242-4254-9165-6B1E392274F1}
LegacyId=1134
Textures=hiway_1_lane_su.bmp,hiway_1_lane_hw.bmp,hiway_1_lane_su.bmp,hiway_1_lane_su.bmp,hiway_1_lane_su.bmp,hiway_1_lane_lm.bmp
Layout=3_PLUS_4
StripWidthMeters=10
Size=2
FlattenMode=flat
FlattenPriority=21000
LandClassRemapType=none
ExcludeAutogen=Yes
RenderToTexture=Yes
RenderPriority=102155
Water=No
There is, however, something doubtful and wanted to confirm it. Regarding the custom roads, although flatten, they don't seem to react to changes in their z component (altitude). They seem to be mesh-clinged. Could this be true?

Note that, as explained in the thread quoted above:

https://www.fsdeveloper.com/forum/threads/how-to-exclude-default-mesh.434438/#post-714482

...the FlattenOffsetMeters parameter value can be assigned to each vector object individually in FSX et seq. via its definition in Terrain.Cfg

FYI: In versions of FS prior to FSX, a single specified Flatten Offset in Meters value was applied to all ex: Road and Stream vector objects throughout FS.


IIRC, when FlattenMode=offset, the vector objects are terain-mesh-clining, but will either be lowered into- (or be raised above-) the terrain surface along the course of its vertices by by the "Offset" amount in Meters while staying contiguous to- and parallel to- the surface plane of the local terrain mesh and any elevation-modifying CVX vector flattens or platform objects.

* A negative value (ex: -1) would flatten lower the local ground surface by 1 meter

* A positive value (ex: 1) would raise the local ground surface by 1 meter


See: http://www.prepar3d.com/SDK/Environment Kit/Terrain SDK/Terrain Configuration File.html#texture.n

GaryGB
 
Last edited:
#30
Note that as explained in the thread quoted above:

https://www.fsdeveloper.com/forum/threads/how-to-exclude-default-mesh.434438/#post-714482

...the FlattenOffsetMeters parameter value can be assigned to each vector object individually in FSX et seq. via its definition in Terrain.Cfg

FYI: In versions of FS prior to FSX, a single specified Flatten Offset in Meters value was applied to all ex: Road and Stream vector objects throughout FS.


IIRC, when FlattenMode=offset, the vector objects are terain-mesh-clining, but will either sink into- (or be raised above-) the terrain surface along the course of its vertices by by the "Offset" amount in Meters while staying contiguous to- and parallel to- the surface plane of the local terrain mesh and any elevation-modifying CVX vector flattens or platform objects.

See: http://www.prepar3d.com/SDK/Environment Kit/Terrain SDK/Terrain Configuration File.html#texture.n

GaryGB
I understand this, but still not sure about the default case where FlattenMode=flat, in the default CVX roads. The roads do not seem to be flatten at all.

I changed the 'z-componenent' of them, and the roads and the correspondent terrain below, do not seem to react at all. This does not happen, for example, with other flatten polygons, like water where changing their 'z-component' do affect their altitude.

I do this in memory, so I can just confirm this with online (in sim) experiments.

Is this a common behaviour of the default CVX roads?
 
Last edited:
#31
https://www.fsdeveloper.com/forum/threads/shp2vec-vector-slopes.441761/post-794588

I understand this, but still not sure about the default case where FlattenMode=flat, in the default CVX roads. The roads do not seem to be flatten at all.
AFAIK, when FlattenMode=flat the objects should be mesh-clinging with NO spikes, pits, or other "undulations" of local terrain surface allowed underneath the textured area of the vector object.

IIUC, that does not mean, however, that the vector objects will take on the same attribute of Airport Background and Hydro polys, wherein the elevation can (must !) be assigned with a floating point number of at least 6 decimal places (SDK says at least 13 decimal places) of 'precision'.

Basically, this seems to be "parametric terrain smoothing", rather than true "flattening" ...by polygons.


If this does not seem to be working 'correctly' for you, please attach herein, a screenshot of an example area with a specific CVX vector object (ex: Road) with a copy of the Terrain.Cfg definition for that specific vector object in question.


Also, please explain in greater detail what you mean by:

https://www.fsdeveloper.com/forum/threads/shp2vec-vector-slopes.441761/post-794588

I changed the 'z-componenent' of them, and the roads and the correspondent terrain below, do not seem to react at all. This does not happen, for example, with other flatten polygons, like water where changing their 'z-component' do affect their altitude.

I do this in memory, so I can just confirm this with online (in sim) experiments.

Is this a common behaviour of the default CVX roads?
GaryGB
 
Last edited:
#32
See the TMFViewer for the KLGA

KLGA1.PNG


I have these GUIDs in my CFG file as FlattenMode=flat:

Code:
// Roads - concrete / 4 lanes / undivided median
[Texture.148]
Name=Roads_Concrete_4_Lanes_Undivided_Median
Color=FFC00000
guid={F972B800-9F74-47A7-86F6-A5C389D90799}
LegacyId=1166
Textures=hiway_4_lane_su.bmp,hiway_4_lane_hw.bmp,hiway_4_lane_su.bmp,hiway_4_lane_su.bmp,hiway_4_lane_su.bmp,hiway_4_lane_lm.bmp
Layout=3_PLUS_4
StripWidthMeters=20
Size=2
FlattenMode=flat
FlattenPriority=21000
LandClassRemapType=none
VectorAutogen={81F596DE-70CF-DC43-BFCC-6F64A456DB23} (Medium road with light poles and telephone poles)
ExcludeAutogen=Yes
RenderToTexture=Yes
RenderPriority=102305
Water=No

// Roads - asphalt / 2 lanes / undivided median
[Texture.145]
Name=Roads_Asphalt_2_Lanes_Undivided_Median
Color=FFC00000
guid={325DD470-B342-4D15-AC54-F67ED9F5914F}
LegacyId=1163
Textures=hiway_2_lane_asphalt_su.bmp,hiway_2_lane_asphalt_hw.bmp,hiway_2_lane_asphalt_su.bmp,hiway_2_lane_asphalt_su.bmp,hiway_2_lane_asphalt_su.bmp,hiway_1_lane_lm.bmp
Layout=3_PLUS_4
StripWidthMeters=13
Size=2
FlattenMode=flat
FlattenPriority=21000
LandClassRemapType=none
VectorAutogen={B4011B59-8B6B-C446-B79D-A9DA97AC3C05} (Small road with telephone poles only)
ExcludeAutogen=Yes
RenderToTexture=Yes
RenderPriority=102200
Water=No

Then I do change all altitudes (vector 'z' component) for all CVX that have FlattenMode=flat, I change their height to 500.

I see some CVX that change altitude, but not the default roads:

KLGA2.PNG


This is just an experiment, roads do not change height. Should I expect to see the roads (FlattenMode=flat) elevated? Or not ?

Thanks
 
#33
My question is also, what should be the value of FlattenMode so I can have the mesh be modified by the 'z component' of each vector point? Thanks
 
Last edited:
#34
https://www.fsdeveloper.com/forum/threads/shp2vec-vector-slopes.441761/post-794594

See the TMFViewer for the KLGA < see original post above >

I have these GUIDs in my CFG file as FlattenMode=flat: < see original post above >


Then I do change all altitudes (vector 'z' component) for all CVX that have FlattenMode=flat, I change their height to 500.

I see some CVX that change altitude, but not the default roads: < see original post above >


This is just an experiment, roads do not change height. Should I expect to see the roads (FlattenMode=flat) elevated? Or not ?

Thanks
No, as it would appear from your tests above, FlattenMode=Flat is for Road objects to be terrain-mesh-clinging without modifying local terrain mesh elevation substantially from the original value assigned in a mesh BGL, aside from "smoothing" undulations underneath the textured Road polygon area.

Hydro polys apparently behave differently (,,,perhaps due to their capacity to have assigbed elevations like Airport Background polys ? )

https://www.fsdeveloper.com/forum/threads/shp2vec-vector-slopes.441761/post-794598

My question is also, what should be the value of FlattenMode so I can have the mesh be modified by the 'z component' of each vector point?

Thanks
Have you tried (temporarily) changing Road vectors definitions in Terrain.Cfg:

...from:

FlattenMode=Flat

...instead to:

FlattenMode=Offset
FlattenOffsetMeters=500

...for purposes of testing ? :scratchch

GaryGB
 
Last edited:
#35
That worked. Thanks.

But now, how can assign a different altitude for each point?

The offset works for the entire segment.

I tried FlattenMode Slope, Offset, Flatten and None, only Offset works.

Why water polys vectors (which I think have FlattenMode Slope) do change and roads vectors do not?

What is wrong with road vectors ? Is there any flatten priority problem?
 
Last edited:
#37
https://www.fsdeveloper.com/forum/threads/shp2vec-vector-slopes.441761/post-794605

That worked. Thanks.

But now, how can assign a different altitude for each point?

The offset works for the entire segment.

I tried FlattenMode Slope, Offset, Flatten and None, only Offset works.

Why water polys vectors (which I think have FlattenMode Slope) do change and roads vectors do not?

What is wrong with road vectors ? Is there any flatten priority problem?

Please refer again to this post above:

https://www.fsdeveloper.com/forum/threads/shp2vec-vector-slopes.441761/post-794200


Also see:

The Shp2Vec Tool

https://msdn.microsoft.com/en-us/library/cc707102.aspx#TheShp2VecTool


...and:

Vector Shape Properties GUIDs
https://msdn.microsoft.com/en-us/library/cc526968.aspx


The specific GUID(s) used with Airport Background objects ('textured Flattens' with several types of additional features as "meta-objects"), are what determines not only the texture used at run time, but the functional attributes as well, including whether the object may have 3D (X,Y,Z) vertex attributes.

Considering the criteria required to utilize a Airport Background object as a type of "land" object that uses 3D (X,Y,Z) vertices, you may wish to test whether you might substitute a specified Road texture be used rather than a default mapped Airport surface type... by creating a new entry in the Terrain.Cfg with appropriate GUIDs. :idea:


See:

Terrain Configuration File > Texture

https://msdn.microsoft.com/en-us/library/cc526967.aspx#texture.n


NOTE: Refer to "landclassremaptype" section ex:

"Roads - concrete / 1 lane / divided median( LandClassRemapType=cultural)"


https://www.fsdeveloper.com/forum/threads/shp2vec-vector-slopes.441761/post-794616

https://www.fsdeveloper.com/forum/threads/shp2vec-vector-slopes.441761/post-794603

Hydro polys apparently behave differently (,,,perhaps due to their capacity to have assigned elevations like Airport Background polys ? )
Question: where is this defined?

Thanks
Please refer again to this post above:

https://www.fsdeveloper.com/forum/threads/shp2vec-vector-slopes.441761/post-794200


Note especially, the section of the SDK SHP2VEC documentation with regard to "ATTRIBUTEBLOCKGUID":

https://msdn.microsoft.com/en-us/library/cc707102.aspx#TheShp2VecTool



https://msdn.microsoft.com/en-us/library/cc707102.aspx#Airport_Boundaries_

"Vector Attributes

The following table gives the GUIDs that apply for each type of vector data. Refer to the example XML files on how they are used."



"The table below links to typical XML files, which are all used in Shp2Vec Example 1, except the exclusions vector data, which is used in Shp2Vec Example 2."

Vector Data................ Sample....Notes

Airport Boundaries.....FLX7824...Although this area is titled Airport Boundaries, these are used for a number of purposes, including
................................................................flattening a surface and excluding certain types of data, in addition to defining airport boundaries.

................................................................The .dbf file contains two columns, UUID and GUID. Enter the following GUIDs in the GUID column
.................................................................to achieve flattening, or Autogen or land class exclusions. Airport boundaries are one example of
.................................................................the use of Flatten + MaskClassMap + ExcludeAutogen."


https://msdn.microsoft.com/en-us/library/cc707106.aspx

"Sample: FLX7824.xml

FLX7824.xml
<?xml version="1.0"?>
<metadata xml:lang="en">
<FlightSim>
<Geometry clipLevel="11"></Geometry>
<AttributeSet>
<AttributeBlock name="AirportBounds" guid="{359C73E8-06BE-4FB2-ABCB-EC942F7761D0}">
<Field name="Uuid" type="GUID" />
</AttributeBlock>
<AttributeBlock name="Texture" guid="{1B6A15BB-05FB-4401-A8D1-BB520E84904C}">
<Field name="Guid" type="GUID" />
</AttributeBlock>
</AttributeSet>
</FlightSim>
</metadata>"


GaryGB
 
Last edited:
#38
Thanks GaryGB, you are always very resourceful :)

So as far I understand and you explained, these sloped vectors can be achieved offline by placing a polygon with the "Airport Bounds" attribute and a custom texture defined in the CFG file.

I guess you can also add traffic, adding the different (or specific traffic) attributes you mentioned. Correct ?
 
#39
https://www.fsdeveloper.com/forum/threads/shp2vec-vector-slopes.441761/post-794657

So as far I understand and you explained, these sloped vectors can be achieved offline by placing a polygon with the "Airport Bounds" attribute and a custom texture defined in the CFG file.

I guess you can also add traffic, adding the different (or specific traffic) attributes you mentioned. Correct ?
AFAIK, yes; however there are numerous considerations which may apply to implementing texture display priority between vector objects within a BGL and in Area layers of the Scenery Library stack of layers as well as other factors which may impact display priority.


Some important considerations, IMHO, with regard to vector display priority, vertex elevation (aka "Z") parameters, texture / land class mapping etc: :idea:


https://scruffyduck.screenstepslive.com/s/help_docs/m/20268/l/199760-priority-matters

http://www.ptsim.com/forum/viewtopic.php?p=2953&sid=a5504f227e1497548b2eea3da3ca3b50


https://www.google.com/search?biw=1173&bih=588&ei=OEWpWo3PD-qfjwTHobjwBw&q=SBuilderX+freeway+traffic+site:www.ptsim.com&oq=SBuilderX+freeway+traffic+site:www.ptsim.com&gs_l=psy-ab.3...219303.221533.0.222812.8.8.0.0.0.0.73.496.8.8.0....0...1.1.64.psy-ab..0.0.0....0.-rzgNragCJ8

https://www.google.com/search?biw=1173&bih=588&ei=kEWpWpYvxqKPBMKguiA&q=SBuilderX+freeway+traffic+site:www.fsdeveloper.com&oq=SBuilderX+freeway+traffic+site:www.fsdeveloper.com&gs_l=psy-ab.12...35441.38119.0.43335.8.8.0.0.0.0.65.476.8.8.0....0...1.1.64.psy-ab..0.0.0....0.3v1KlCj3ioA


CAVEAT: ADE does not feature the ability to implement "Freeway Traffic" due to use of a IIUC, "custom build" of XML2SHP (IIRC, now within a DLL).

Note as well that ADE has deprecated the ability to create 'custom' Generic Buildings, so one may instead opt to use SBuilderX to create both scenery types.

https://www.fsdeveloper.com/forum/threads/can-i-create-traffic-in-ade-yes-no.441711/

https://www.fsdeveloper.com/forum/threads/vehicle-taxiways-or-roads-raise-terrain-elevation.297867/


https://www.google.com/search?biw=1173&bih=588&ei=ykupWoPhDefJjwS0xpn4BA&q=FSX+ADE+create+Generic+Buildings+Helli+Hauck+site:www.fsdeveloper.com&oq=FSX+ADE+create+Generic+Buildings+Helli+Hauck+site:www.fsdeveloper.com&gs_l=psy-ab.12...42964.44787.0.49084.6.6.0.0.0.0.74.385.6.6.0....0...1.1.64.psy-ab..0.0.0....0.GnuBsf2mcI4


BTW: Some info on the methods implemented by Scenery Solutions Ultimate Terrain X (aka "UTX"), and an example Terrain.Cfg with UTX object entries:

http://files.100megabyte.com/ultterrain/UtxUsaDemo.pdf

www.qlrp4ut.com/UTXTerrainCfgs/TERRAIN.CFG

Hope this helps a bit more. :)

GaryGB
 
Last edited:
Top