• 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 Creating custom autogen trees

Horst18519

Moderator
Resource contributor
Messages
2,370
Country
germany
Does anyone have any experience with vegetation autogen in FSX? It is easy (and documented in the SDK) to add your own custom buildings, but it seems tough to learn something about adding your own trees. Looks like you need to add your library bgl and textures to scenery/global, then you also have to add your own autogen description file to the agn folder. But for some reason that does not seem to be enough to get your own vegetation. At least it doesn't work here even though I did all that and made sure GUIDs are correct and unique and mdls and textures are where they are supposed to be.

Anybody an idea if I need to include my autogen descriptions in the default autocendescription.spb file? For the annotator it is ok to load your own file, but maybe FSX doesn't like that.
 

arno

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

No, I never tried it. I think you need to expand the default autogen.xml file, but I am not sure.
 

Horst18519

Moderator
Resource contributor
Messages
2,370
Country
germany
Yeah, the SDK is not bad when it comes to that. Unfortunately it doesn't cover vegetation, which is one of the reasons I think it's not possible - apart from the fact that I tried it still, without success.
I guess the only way would be to create tree "buildings" and place them with building footprints rather than vegetation footprints.
 

RicherSims

Resource contributor
Messages
567
Country
dominica
Sorry for the late reply, been away from FS development for a few weeks for my graduation. Otherwise I would have let you know earlier.

It is possible.
My current project GrenadaX makes use of completely unique agn tree models.
A quick pass through this album will show you how I experimented with different model combinations.

You are right about most things. It involves making your own models and textures, compiling them into a BGL with unique GUIDs, adding each GUID to a tree reference and then adding each tree reference into a group. You then save that into the existing autogen descriptions file (using the autogen config editor) and ensure that both the annotator and FS use the updated version.

You do not however need to put your bgls and textures into scenery/global (especially if your trees are scenery specific) as the GUID will allow it to be found in any active scenery folder.
And you do not need a separate autogen description file in your own scenery folder. You only need to expand the original. (Making backups of course!
icon4.gif
)
There are a few finer details here and there, but that is the general idea. If you are stuck at any one place, let me know with a reply here, or message me on facebook at the link in my sig (as I check that more often).
 

Horst18519

Moderator
Resource contributor
Messages
2,370
Country
germany
Thanks, that's in fact very useful. I already given up on the idea.
Don't know why I failed with my attempt as I actually did as you described. I guess the problem was that I wanted to use my own autogen descriptions file. I never liked editing default files, but I guess here's no way avoiding it.

I'll keep you updated on my progress. :)
 
Messages
55
Country
spain
Could someone confirm if the only way to add custom vegetation is modifying the default.xml? isn't it possible to add your own .xml with the new classes?
 
Messages
130
Country
germany
A tree is nothing else than a model. In my private map editor I implemented a small export function with the following function:
  • click a polygon on the map in which the trees shall appear.
  • define the relation amount of different tree models to be created. That is to define for example 30% birch, 50% fir, 20% aspen. This implies a set of GUIDs of self modeled trees or a list of GUIDs of existing internal trees.
  • define a density value (maximum number of trees per square)
  • define a maximum and minimum vegetation height.
The output is a big placement XML file which can be integrated in a project as usual. Every generated tree has a single placement and scale entry in the XML file. The dimensions are generated as random numbers with in a defined minimum and maximum range. It works pretty well for defining wooded areas. So i can confirm, that custom vegetation can be done like every other object in the scenery.
Mike
 
Messages
55
Country
spain
A tree is nothing else than a model. In my private map editor I implemented a small export function with the following function:
  • click a polygon on the map in which the trees shall appear.
  • define the relation amount of different tree models to be created. That is to define for example 30% birch, 50% fir, 20% aspen. This implies a set of GUIDs of self modeled trees or a list of GUIDs of existing internal trees.
  • define a density value (maximum number of trees per square)
  • define a maximum and minimum vegetation height.
The output is a big placement XML file which can be integrated in a project as usual. Every generated tree has a single placement and scale entry in the XML file. The dimensions are generated as random numbers with in a defined minimum and maximum range. It works pretty well for defining wooded areas. So i can confirm, that custom vegetation can be done like every other object in the scenery.
Mike

That program sound like music to my ears. Have you plans to share it? ;)

If I understand you correctly, you are using a tree library, isn´t it? In that case I have two doubts:

a)Would be the same performance as using autogen?
b)Is it possible to get seasonal changes using libraries?

The reason for which I´ve started to investigate the custom autogen is because I thought until now that the object libraries don´t support seasonal changes and I suspect that they have worser performance.
 
Messages
7,450
Country
us-illinois
A tree is nothing else than a model. In my private map editor I implemented a small export function with the following function:
  • click a polygon on the map in which the trees shall appear.
  • define the relation amount of different tree models to be created. That is to define for example 30% birch, 50% fir, 20% aspen. This implies a set of GUIDs of self modeled trees or a list of GUIDs of existing internal trees.
  • define a density value (maximum number of trees per square)
  • define a maximum and minimum vegetation height.
The output is a big placement XML file which can be integrated in a project as usual. Every generated tree has a single placement and scale entry in the XML file. The dimensions are generated as random numbers with in a defined minimum and maximum range. It works pretty well for defining wooded areas. So i can confirm, that custom vegetation can be done like every other object in the scenery.
Mike

Hi Mike:

What you seem to be describing is an XML placement code generator for use with BGLComp to compile a "standard-type" FS scenery library object placement BGL.


If so, such standard object placements are not placed via the FS "Autogen-type" scenery object placement pipeline, and thus will not display seasonal texture changes.


I really like the described control over a mix of specified tree types to randomly be placed at coordinates within a defined polygon area. ;)

Can your "map editor" be adapted to output the special "Autogen XML code" for use with ex: Arno's ScenProc autogen-related intermediate work files and/or the utilities from "Vogel" discussed in this same forum ? :confused:


GaryGB
 
Last edited:
Messages
130
Country
germany
I am not that specialist for sceneries. But I think the performance issue depends on the tree model its self. That means, resolution and number of planes. My self constructed trees look really ugly. So the internal tree models would be the best choice. Whereby, I have no idea how FSX manages seasonal textures. My utility bases on an application with a map display. The map is needed to define the polygon. I use the Google Earth snapshot capability. The snapshot is made with a push on a button and the resulting image is aligned automatically in the map view. The export utility calculates the positions within the polygon based on the density value and takes care, that the trees are not too close together.
What I can do to share the utility is to create a DLL or library module, which can be integrated in an existing application. If someone likes to integrate it, I can help.
Mike
PS:
I sign all documents with 'don't rush me... '
 

RicherSims

Resource contributor
Messages
567
Country
dominica
Sounds like a nifty program indeed.

As per simulondo's question of performance, is it right to assume that the sim handles hundreds of autogen objects better than hundreds of object placements?

And secondly, could someone else prove or disprove whether a separate XML to define autogen classes could be used by the sim? (As far as I could tell, the only classes the sim uses are those in the "autogendescriptions" and "default" files.)
 

arno

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

Yes, autogen objects are more efficient than bglcomp placed objects. Especially for vegetation that is true.

I still have to try myself how to add custom vegetation models. But I hope to make a tutorial about it.
 
Messages
130
Country
germany
@GaryGB
basicly it would be possible. I need to findout the required format. If it works, I will post it here.

Mike
 
Messages
130
Country
germany
What I found out so far is, that Autogen does not support individual placing of a single tree, which would be necessary to place the trees in a defined polygon. The only way I can offer is the use of BGL objects. Probably another scenery specialist can find out how to use Autogen with the required attributes. The attachment shows a polygon area with one single type of library tree
{5B8141EA-AF74-4D36-8909-7A18B7100686}
Each tree in the polygon has an entry in the auto generated SPRUCE_PLACEMENT.XML :

<SceneryObject
lat="47.864904" lon="10.621322"
alt="0"
pitch="0"
bank="0"
heading="0"
altitudeIsAgl="TRUE"
imageComplexity="NORMAL">
<LibraryObject name="{5B8141EA-AF74-4D36-8909-7A18B7100686}"
scale="1.00" />
</SceneryObject>

SPRUCE_PLACEMENT.XML is then compiled with BGLCOMP and the resulting BGL file is copied to
\Addon Scenery\scenery.

Regards
Mike
 

Attachments

  • map.JPG
    map.JPG
    690.7 KB · Views: 738
  • Veg.jpg
    Veg.jpg
    450.5 KB · Views: 727

arno

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

With autogen you can just draw a polygon as well and it will be filled with your vegetation. That's the nice part of the fsx polygonal autogen vegetation.

Placing an individual tree is indeed harder, although you can use rectangular vegetation for this. Just make the rectangle small and you get one tree.

From my experience autogen is much better for the performance. We tried to place trees al over the Netherlands with XML code (over 1 million trees) and the performance was terrible. Now we use autogen and the performance is great. And as a plus you have working seasons too.
 

RicherSims

Resource contributor
Messages
567
Country
dominica
Arno, if you have any questions when making such a tutorial, hit me up. I had most of it figured out. I just wish I had the time to write down most of what I learn.
**Looks eagerly at calender for Easter Vacation**

Doing a search for "autogendescription" last night revealed that all the other larger scenery developer groups who added their own custom autogen had to modify (and backup) the original .spb/.xml files. So it looks like the sim only reads classes from that one file.
The SDK provides all the tools to do it manually. But they, of course, having the resources to do so, came up with software to automate the process.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
It might become an issue if we all start modifying the same files. We could end up undoing each others changes.
 
Top