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

Help re FSX library objects

Messages
12
Country
unitedkingdom
As I am new to using scenproc, I have the following question.

If specific buildings are identified in the .shp file (e.g. by 'name'), such as Edinburgh Castle, is it possible to include such objects from the FSX object library in the scenproc configuration and have them shown in the correct location.
If so could you please give me an example of the syntax to use?
Thanks,
Stuart
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi Stuart,

First thing that comes to my mind is that if they are already placed through a BGL in the scenery, you mihgt not need to include them in your autogen as well. Such BGL placed objects will push away the autogen around them.

If you want to place them through scenProc, placing them as BGLComp XML objects, with the CREATEXMLLIBOBJ step would be easiest. To place them as autogen library objects you would need to add them all to the default.xml file. I think that doesn't make much sense for such a landmark.

Then to your question how to do that in scenProc. At the moment placing library objects, either XML or autogen, is done using a point feature, not a polygon. I would have to double check the code, but I think for a polygon it would take the center of the bounding box of the polygon as location. But the heading would be the problem, that would have to be derived in some way (for example by checking nearby roads, that can't be done from the polygon yet).

However it is on the wishlist to place such objects from polygons as well.
 
Messages
12
Country
unitedkingdom
Hi Stuart,

First thing that comes to my mind is that if they are already placed through a BGL in the scenery, you mihgt not need to include them in your autogen as well. Such BGL placed objects will push away the autogen around them.

If you want to place them through scenProc, placing them as BGLComp XML objects, with the CREATEXMLLIBOBJ step would be easiest. To place them as autogen library objects you would need to add them all to the default.xml file. I think that doesn't make much sense for such a landmark.

Then to your question how to do that in scenProc. At the moment placing library objects, either XML or autogen, is done using a point feature, not a polygon. I would have to double check the code, but I think for a polygon it would take the center of the bounding box of the polygon as location. But the heading would be the problem, that would have to be derived in some way (for example by checking nearby roads, that can't be done from the polygon yet).

However it is on the wishlist to place such objects from polygons as well.

Thanks Arno.
I am using only photo scenery at the moment which I don't believe includes any models.
Could you please give me an example of syntax/attributes, as this section is not yet covered in the manual.
Thanks,
 
Messages
1,521
Country
unitedstates
Hey Stuart,

Let's see if any of my experience with scenPROC is actually good enough to pass on to you, ha! (don't bet on it!). So you want to add a castle at certain location on top of some photoscenery you have.

For example, try something like this:

In your QGIS add a new layer, a shape vector layer and for Type select POINT. Create a point where you want the castle. Now you will have to know the exact coordinates to place that point to represent the castle. Save the layer as a .SHP file naming it whatever you will recognize as being the shp file for the castle (for the example below I call it 'castle'. In scenproc use a line like this:

CREATEXMLLIBOBJ|FROMFILE=castle.shp|{7549DBA5-8710-4C0F-BF62-324244D86C31}|0|0|0

For the above example the GUID I have there is not really for a castle, just an example. You will need to open up the default.xml file (like Arno suggested), and search for a castle. If you don't care what type of castle you see, so long as it's a castle just find a group of them in there and use the group's GUID. If it's a particular castle you will have to dig deep and see if there is a GUID for that single castle. There will also be a group GUID even though it is just a single castle. You will still need to use that group GUID in your scenPROC file.

Also above I have 'FROMFILE=castle.shp'. Depending on where you have this file located you may need to insert the entire path to where that file is located so scenPROC can fine it.

Hope this helps rather than huts!

Good luck,

Clutch
 
Messages
12
Country
unitedkingdom
Thanks Clutch,
I follow the above, but from what Arno says it is not possible to orientate the castle heading correctly.
I was wondering if the shp file identified the building (e.g. Edinburgh Castle), and therefore it was shown as an attribute of the general building layer, and was the only one included in the selection as type=castle, whether it might be possible to use:

"CREATEAGNLIBOBJ| FTYPE=POINT|type=castle|guid, and then choose the default library GUID for Edinburgh Castle, which exist in the default.XML?

Thanks again,
Stuart
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi,

I think Clutch confused a few things in his reply. When using CREATEXMLLIBOBJ you use the GUID as defined in the library BGL, not the one from the default.xml file. That file is only used for autogen library objects. So created with CREATEAGNLIBOBJ. I think for this kind of landmarks that are only placed at once specific location, using the CREATEXMLLIBOBJ step is easier. Creating a new autogen class for them seems a bit too much trouble for one object.

The approach Clutch mentions means that you make a new point feature to place the object. That would be a good approach, I think. In that case you can add an attribute to the point feature with the right heading.

Another way would be to use the step to derive the heading from nearby line features (like roads). In this blog post I explain how you can use that approach:

http://www.scenerydesign.org/2014/05/align-library-objects/
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi Stuart,

If you would have added an attribute with name type and value castle to the shape data you loaded that would work. Or does your data already have such a point feature?

The step also requires that you provide some more attributes, like the heading attribute and a possible offset. See the manual for the details.
 
Messages
12
Country
unitedkingdom
Arno,
Looking at attributes in Qgis, it does appear that my .shp file does have such attributes.

Do you have any scenproc manual which covers the subject of additional attributes for heading / offset etc. The manual version that I have simply has this in the section with no further description?:
10.4CreateXMLscenery
10.4.1CREATEXMLEFFECTS
CreateXMLeffects
10.4.2CREATEXMLLIBOBJ
CreateXMLlibraryobject

Stuart
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi,

Ah yes, the unfinished manual :). It seems both the XML and AGN library object sections are still unfinished.

Did you hover with your mouse over the step name in the GUI? The tooltip will also give you some help on what should be added.

Else I can dig out some examples tonight when I'm home.
 
Messages
12
Country
unitedkingdom
Arno, another question if you don't mind to a problem that I am having when generating autogen. It's not directly related to scenproc but given your experience you may be able to help.
The problem is that I have been able to generate autogen for trees and buildings covering a 10 mile radius around Edinburgh airport, but whenever I load the saved test flight in that area, and pan around, FSX fatally crashes.
Could the autogen crash when applied to an area already covered by an add-on airport with bgl objects? Is it possible that I would need to somehow add an exclude bgl covering the airport?
I am using UK2000 Edinburgh Free airport.
When autogen is turned off, and just the photo scenery, everything is fine with no crash.
Any thoughts?
Regards,
Stuart
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi Stuart,

Sounds a bit like that with all the extra objects FSX uses more memory and therefore has the crashes. Might help to reduce the autogen density a bit in that case. But I'm not a big expert on such crashes, since I fly to little in FSX myself to encounter them :).

PS. Not behind my FS pc at the moment, so I'll look for the samples later.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi,

Here is an example line from one of my scripts:

Code:
CREATEAGNLIBOBJ|obj=gas_station|{117278df-5ce4-4765-8369-02dd363b08db}|HDG|0|18;2

The first attribute is the filter that selects which point features to use. The second attribute is the GUID of the autogen library object class (from default.xml). The third argument is the attribute of the feature that contains the heading to be used. If you don't have an attribute in the features, you can also just type in the value you want. The fourth attribute is the heading offset to be applied to the heading. And the last attribute is the length and width of the library class, as given in the default.xml file.

For creating XML library objects the syntax is almost the same:

Code:
CREATEXMLLIBOBJ|obj=gas_station|{117278df-5ce4-4765-8369-02dd363b08db}|HDG|0|0

The only difference is that the GUID is not from default.xml, but from the MDL object to use. And the last attribute is the elevation of the object (from ground level).

Hope this helps,
 
Top