• 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

looking at the SDK, I´ve seen this:

(about AutogenDescriptions_mid.xml / AutogenDescriptions_min.xml)

"Yes. If new groupings or models are added, then they should be referenced in all three descriptions files, otherwise gaps could appear in the scenery during certain seasons, or might occur depending on which descriptions file the user has specified in the configuration file. "

So, It seems necessary to add the new class in all those files (AutogenDescriptions.xml/ / AutogenDescriptions_mid.xml / AutogenDescriptions_min.xml).

"I have a bad felling about this". This method will bring all kind of problems when several addons begin to modify them.

BTW, what is the difference between these files?. I´m checking them (the SDK´s xml version) right now and to me they are almost equal.
 
Last edited:
I answer to myself after I re-read correctly this phrase from SDK:

"These are variations of the AutogenDescriptions file that reduce the rendering complexity of the vegetation. Which file is used depends on the AutogenDescriptionsFilename setting in the [Terrain] section of the FSX.cfg file. "

It seems each file defines an autogen complexity level (min = low, mid=medium, etc). So when you want to create a new class/group you must define in those files what objects will appear in each level.
 
No undoing will occur if you add and remove only your own classes and models.

For example, after decompiling a users file from .spb to .xml, one could use an automated method to add your own classes via a text-based search.
Any classes that were added by another developer will remain.
On uninstall it is simply a matter of restoring a backup or removing the text again via search.
There are tools as well to recompile from xml->spb.

While I have not completely automated the process yet, I have done it before.
 
Well, finally I got it:

I´ve been playing with some cubes as vegetation autogen and their seasonal variation:

Spring:
spring_zps587d83f9.jpg


Summer:
summer_zpsf9ffd601.jpg


Winter:
winter_zps97e9585c.jpg



I can also confirm, at least to me, It only works modifying the default .xml (AutogenDescriptions.xml/ / AutogenDescriptions_mid.xml / AutogenDescriptions_min.xml). I´ve tried to call the objects with my own .xml without success.

The workflow is very basic:

1) Create a library objects with all seasonal variations. I´ve done it with Arno´s library creator:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<FSData version="9.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="bglcomp.xsd">
<ModelData sourceFile="spring.MDL" />
<ModelData sourceFile="summer.MDL" />
<ModelData sourceFile="fall.MDL" />
<ModelData sourceFile="winter.MDL" />
<ModelData sourceFile="hard_winter.MDL" />
</FSData>

Each model has his texture, I´ve set them without shadows and vertical normal in MCX.

2)I call the models from the .xml´s in the tag <Autogen.SeasonalModels>
Code:
<ModelEntry id="{45d5eb92-bdc4-455c-8444-7cff5c9c9e53}">			
	<FriendlyName>TestTree</FriendlyName>			
	<IntersectionThreshold>0.000</IntersectionThreshold>			
	<MinScale>0.900</MinScale>
	<MaxScale>1.100</MaxScale>			
	<SeasonEntry>
		<ModelGuid>{951a9432-e216-40a3-8655-b6832aa0349d}</ModelGuid>
	</SeasonEntry>
	<SeasonEntry>
		<Season>FALL</Season>
		<ModelGuid>{b96118ea-269f-4fca-bf1e-e5fee68eb3bd}</ModelGuid>
	</SeasonEntry>
	<SeasonEntry>
		<Season>MILD_WINTER</Season>
		<ModelGuid>{91d315d7-5bca-4393-9904-83481d302768}</ModelGuid>
	</SeasonEntry>
	<SeasonEntry>
		<Season>HARD_WINTER</Season>
		<ModelGuid>{5f67ca19-7574-4319-963f-0eeb9a76cf79}</ModelGuid>
	</SeasonEntry>
	<SeasonEntry>
		<Season>SPRING</Season>
		<ModelGuid>{dc34c3b3-82e4-4cc7-b702-aec21c316732}</ModelGuid>
	</SeasonEntry>
</ModelEntry>

I have not found in the SDK what is the tag <IntersectionThreshold>. As you can see the summer variation is setting as default season.

3)And last create a group in the tag <Autogen.AutogenGroupings> to call the model:
Code:
<Grouping id="{a2ec468e-0521-48d3-b374-cf3d0b9e7510}">            
	<FriendlyName>GRUPOPRUEBA</FriendlyName>            
	<ReferenceEntry>
		<TargetGuid>{45d5eb92-bdc4-455c-8444-7cff5c9c9e53}</TargetGuid>
		<RelativeWeight>10.000</RelativeWeight>
	</ReferenceEntry>            
</Grouping>

I call the model using his GUID.

One more thing, I´ve created the GUID´s of group and ModelEntry using http://www.guidgen.com/.

Later you can add all these objects in the Anotator without problems.

I put the library and the textures in my own folder, inside addon sceneries, and works correctly.

Now, I must to learn c++ to create my own installer to modify the xml´s :(
 
Last edited:
Thanks for sharing. I am eager to try it out myself.

Good to know spb and XML can be easily converted. Then a installer only would have to take care of that indeed.
 
Right; that is the basic workflow.

Also note that the AutogenConfigEditor.exe will do all that XML editing for you automatically when you are first creating your new groupings and model entries (I find I get confused between copying and pasting grouping GUIDS and model GUIDS quite frequently:confused:).
One need only take the resulting new XML code to add to the end user's autogendescriptions file.

I experimented with teaching myself scripting a few years ago to automate my tasks. Worked well.
It's about time I dust of my programming skills and get back into Delphi Pascal (and maybe even C++ :rolleyes:)

 
Right; that is the basic workflow.

Also note that the AutogenConfigEditor.exe will do all that XML editing for you automatically when you are first creating your new groupings and model entries (I find I get confused between copying and pasting grouping GUIDS and model GUIDS quite frequently:confused:).


Yep, but sadly the autogenConfigEditor doesn't work in my W7 64bits :(

On the other hand, I've been testing with other names for the xml definitions (AutogenDescriptions_xxx.xml and AutogenDescriptionsXXX.xml) but they don't work. It seems that FSX only will read vegetation definition in the AutogenDescriptions.xml or AutogenDescriptions.spb (but only one of them per time).

Another potential "problem" is the decompile .spb files. The only way I´ve found it´s this tool: .

Too much difficulties for this task.
 
I've been testing with other names for the xml definitions (AutogenDescriptions_xxx.xml and AutogenDescriptionsXXX.xml) but they don't work. It seems that FSX only will read vegetation definition in the AutogenDescriptions.xml or AutogenDescriptions.spb (but only one of them per time).

Another potential "problem" is the decompile .spb files. The only way I´ve found it´s this tool: .

Too much difficulties for this task.

The "official" relocated website for excellent and generous contributions to our FS Community by Lamont Clark (aka "lc0277"), is now at:

http://lc0277.gratisim.fr/


Lamont's "other" software (including spb2xml : Decompiler for SimProp Binary (SPB) binary files to XML) ...is at:

http://lc0277.gratisim.fr/software.html


Hope this helps ! :)

GaryGB
 
True.... a potential problem, as any automated method would have to go through that spb2xml tool.
But since I'm fairly sure it can be done via scripting, it shouldn't be to hard to do via C++ (if you have the patience :whiteflag).

As for the autogenconfigeditor not working on your PC, might it be that it can't find a copy of "default.xml" in its own directory? I recall vaguely that that might be the cause of some errors.
 
Any news to the AutogenDescriptions.xml/.spb edit/modify issue?
My installer will have to modify this files when installing my scenery.

It would be easy just to remove the .spb file because FSX uses the .xml version instead but this is not an elegant solution.

Many companies just rename and copy their own files which is crap of course.

Regards,
Heinrich
 
I haven't looked at it yet, but plan to do so soon, as I want to experiment with new vegetation types etc.
 
Just when I thought I had mastered Autogen...

Created all my models, created a custom tool to decompile-add/remove-recompile my own entries to the end users autogendescriptions.spb./xml files.
Successfully released my product with custom autogen.

Now I'm back to update it with a few seasonal models... THE MODELS WONT CHANGE WITH THE SEASONS!!! ARGGG!!!

The methodology is identical to that of the SDK and the code is identical to Simulondo's! Yet only the summer model is showing up no matter the season.

What could I be missing?
 
Did you add all seasonal models to your vegetation definition in the xml?
 
Yes. Fall, spring, and winter. All have different GUIDs.
 
Last edited:
Can you maybe show the part of the XML where your custom autogen is defined? Maybe we can see what is wrong from it.
 
The model entries.

Code:
<ModelEntry id="{77e9e830-4f8d-45a4-9826-0646b85c5424}">
            <FriendlyName>rs_ag_tgpygrass1</FriendlyName>
            <MinScale>1.000</MinScale>
			<MaxScale>1.000</MaxScale>            
            <SeasonEntry>
                <ModelGuid>{a2e9d243-9997-4600-a74a-50f2e48df658}</ModelGuid>
            </SeasonEntry>
            <SeasonEntry>
                <Season>FALL</Season>
				<ModelGuid>{4EE00D65-967B-46D5-B6E6-86DC0CDF11FA}</ModelGuid>
            </SeasonEntry>
            <SeasonEntry>
                <Season>MILD_WINTER</Season>
                <ModelGuid>{E03B12E7-2482-458E-8239-9EC1CC1921A5}</ModelGuid>
            </SeasonEntry>
            <SeasonEntry>
                <Season>HARD_WINTER</Season>
                <ModelGuid>{E03B12E7-2482-458E-8239-9EC1CC1921A5}</ModelGuid>
            </SeasonEntry>
            <SeasonEntry>
                <Season>SPRING</Season>
                <ModelGuid>{E78C2A54-2350-43E8-94CB-00C98C364167}</ModelGuid>
            </SeasonEntry>
</ModelEntry>

The grouping.

Code:
<Grouping id="{e8aebdf5-0d8c-4d8b-9924-42e67288fd86}">
            <FriendlyName>rs_ag_tgpy_grass1</FriendlyName>
            <ReferenceEntry>
                <TargetGuid>{77E9E830-4F8D-45A4-9826-0646B85C5424}</TargetGuid>
            </ReferenceEntry>
        </Grouping>

P.S: I've verified that this is the file FSX is using. If I change the summer GUID to some other object, the autogen changes, but once again, remains the same throughout all the seasons.
 
Last edited:
Hummm weird. The code looks fine indeed. That's the same I did with my own models when I tested the seasons.
 
It MUST be an in sim issue. I'll test on another machine and get back to you all later with results.
 
Came back to it and I believe I may have remembered the issue. It's that triangle limit you discovered in this thread, Arno.
http://fsdeveloper.com/forum/threads/autogen-and-drawcall-batching.425904/#post-637594
My object seems to be too complex to be autogen.
Also, it appears, that even if one of the seasonal models are complex and the others are simple, no season will be displayed. I may be wrong, but that is what my tests show. (One seasonal model with 5000 triangles, the others with 100).
 
Back
Top