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

Water CVX Uuid

MatthiasKNU

Resource contributor
Messages
962
Country
germany
Hello everyone!

I would need a little bit of help...
I am trying to create a CVX.shp with water areas. The water colors should match the ones from the sim.
But now I am struggeling about the Uuids.

How can I find out, which Uuid I have to use?

EDIT:
... and I have a second problem:
I tried to enter a random Uuid, which I took from the example files. Now the shp2vec-Tool is running and creating bgl, but when I open it in the TMFViewer, I get no data shown.
I have uploaded a sample file, so maybe it helps you to find my fault!
https://www.file-upload.net/download-13762498/4630.zip.html


Is there anyone who is able to help me?
Thank you in advance!
 
Last edited:
Hi Matthias:

My apologies in advance if I am misunderstanding something about the work-flow you may have used for some time.


NOTE: I am able to Append and display your *.SHP file attached above to SBuilderX and to Global Mapper.


If I open your CVX.BGL in SDK TMFViewer, it does not show any visible data on my screen.


I can de-compile your CVX.BGL via Patrick Germain's CvxExtractor:

https://www.fsdeveloper.com/forum/threads/cvxextractor-exporting-vector-data.432918/


You may wish to use CvxExtractor as well, with ex: output to *.SHP and *.BLN, and inspect / edit the data therein. ;)

*.BLNs can also be 'Appended' to SBuilderX.


BTW: A *.BLN extract shows an assigned Altitude of -9999 for all objects in your CVX.BGL



AFAIK, Uuids are labels used ONLY to distinguish unique objects from each other when processed via SDK SHP2VEC.

Although one can 'see' Uuids in BGLs compiled by SDK SHP2VEC, they reportedly are NOT used by FS at run time. :pushpin:

https://www.fsdeveloper.com/forum/threads/bglviewer-for-fsx-bgl-files.432840/



GUIDs are the actual FS SDK water class attribute used when processed via SDK SHP2VEC, and are used by FS at run time; they are referenced by the rendering engine according to the GUID definitions in the active Terrain.Cfg file.

The GUID is what defines the ex: Water Class Type that you are wanting to assign to the objects in your *.SHP file.


FYI: If you Append your *.SHP file attached above to SBuilderX, you can 'import' it using the Uuids as the internally assigned attribute, then edit the Properties for each object / group to instead use a GUID for the desired Water Class, and to edit any assigned Altitudes as desired.

You can then output a new *.SHP from SBuilderX that has the desired Water Class GUID, and use it in a GIS app, etc. :idea:


To simplify the task, one may re-assign GUIDs of 'selected' objects in SBuilderX via a "ON MANY LINES" method:

https://www.fsdeveloper.com/forum/threads/geographic-data-in-sbuilderx.446165/


PS: As you may know, the SDK documentation for CVX vector objects and associated GUIDs is here:

http://www.prepar3d.com/SDKv4/sdk/world/terrain/vector_shape_properties_guids.html

http://www.prepar3d.com/SDKv4/sdk/world/terrain/terrain_overview.html#The Shp2Vec Tool

http://www.prepar3d.com/SDKv4/sdk/world/terrain/terrain_overview.html#Vector Attributes


We must take note of an important caveat in the SHP2VEC SDK documentation:

"There should be one flavor of data per shapefile. Whereas most vector types only require 2D co-ordinates, ensure that vector data for AirportBounds and WaterPolys is 3D (that is, includes elevation data)."


It is stated elsewhere that Hydro Poly assigned Altitude should be a 13 decimal place floating point value.


But, AFAIK, SHP2VEC and FS rendering engine 'accepts' a Altitude value of as few as 7 decimal places for ex: 0 AMSL:

0.0000000 Meters = sea level in the FS 3D world.


So, for "Hydro Poly" CVX vector objects, one uses 3D (X,Y,Z) *.SHP files with assigned elevations / Altitudes.

IIUC, Altitude values of -9999 would not be compatible with SDK SHP2VEC for Hydro Poly CVX vector objects.


I hope this info may prove useful to your work-flow with this ...and future projects. :)

GaryGB
 
Last edited:
Hi Gary!
Thank you for your answer, but it's not exactly what I'm looking for...

First, a more detailed explanation:
With my Africa project, I am facing a problem along the coasts. Due to the "bad" default scenery of P3D it can happen that the default landclass extends further into the sea than the photo scenery.
So far I have solved this by pulling the Blendmask 1000 m off the coast.
But because my script can't create smooth color transitions, there are ugly transitions from my scenery to the sea. i.e.:
unbenannt-1gykxs.jpg


Now I was looking for a solution, and I think the only solution is to create a cvx file.
To make sure that the color transitions match the color transitions, I wrote a Python script that reads the default worldwc.bgl converts it to a shapefile.
I cut this shapefile with the actual water areas of OSM.
And now I want to convert this shapefile to a bgl.
The whole thing should be fully automatic, since it will be very large areas.

But somewhere I have to specify the GUIDs, which water texture is which polygon. But I couldn't find a list of the GUIDs that assign the individual water textures.

I then looked at the sample files from the SDK that actually only contain one column of Uuid. But, as you write, the Uuids are not needed.

I have so far assigned the water species according to the table here:
http://www.prepar3d.com/SDKv4/sdk/world/terrain/terrain_overview.html#Water Classification

But how do I get the water types into the cvx.bgl?

I hope I could explain my problem a little better...

EDIT:
Btw. As long as I do not enter for each polygon an Uuid, I get the following message from the shp2vec-tool:
"Bad UUID
Error adding poly from HGX4630.shp"
But where do I get the UUID from?!

EDIT:
I added the altitude values and converted it to a X,Y,Z-Shapefile, without success:
https://www.file-upload.net/download-13762804/4630.zip.html
 
Last edited:
Hi Mathias:

SHP2VEC requires that source data for each object must have both a GUID (terrain attribute value) and a Uuid.

AFAIK, ScenProc, SBuilderX and other FS utilities will automatically insert the assigned GUID and a Uuid in source code.

IIUC, the field structure for *.DBF files may also vary according to the scenery object type and associated GUID.


Perhaps your *.DBF file may require editing to modify GUID or Uuid syntax for each individual object ?

FYI: I did see in Global Mapper that properties for 1 small example object in the latter *.SHP do have both a GUID and a Uuid, but I did not have time to inspect the *.DBF file.


Sorry I am out of time to look into this further today, but I must depart shortly, as I am traveling for the next 2 days, and will be away from my development computer until early this coming week.


PS: To identify WaterPoly / Hydro Polygon GUIDs / Uuids to be used, in addition to reading this SDK document:

http://www.prepar3d.com/SDKv4/sdk/world/terrain/terrain_overview.html#Vector Attributes


...in conjunction with the HPX7824 Hydro Polygons details on this page:

http://www.prepar3d.com/SDK/Environment Kit/Terrain SDK/Terrain and Scenery.html


...and the linked details of the HPX7824 Hydro Polygons attribute XML code:

http://www.prepar3d.com/SDK/Environment Kit/Terrain SDK/Sample Files/HPX7824.html


...it would be very informative to inspect the active copy of your FS Terrain.Cfg file


I recommend using CvxExtractor to de-compile a default CVXxxxx.BGL for the area of interest and output a ESRI *.SHP; you should then be able to examine the *.DBF file in an appropriate file viewer / editor to see how it is structured.


Also, if you compile a example CVX vector WaterPoly to BGL with SBuilderX and immediately examine output files in:

[SBuilderX install path]\Tools\Shapes sub-folder


...you may inspect the source file for that WaterPoly CVX BGL output to see how such a data set is properly structured.



Additionally, you may wish to review this tutorial by Luis Feliz-Tirado (...see especially the section on SHP2VEC):

Terrain Design for Flight Simulator X

https://library.avsim.net/search.ph...r_flight_simulator_x.zip&CatID=root&Go=Search


...and these threads:

https://www.avsim.com/forums/topic/81298-excluding-autogen-with-shp2vec/

https://www.avsim.com/forums/topic/81330-shapefile-projection-conversion/



Otherwise, if you are instead wanting to make local Water Class, you may wish to review the discussions in this thread:

https://www.fsdeveloper.com/forum/threads/waterclass-in-ade.431874/


...and the section on Water Classification in the SBuilderX Help file. ;)


GaryGB
 
Last edited:
Back
Top