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

P3D v2 AGNRectangularVegetation: Using ModelEntry GUID Rather Than Grouping id?

Messages
6,528
Country
us-illinois
Hi All:

Here is a restoration via a web page archive, of Jim's screenshots showing his excellent work above in this thread. ;)

I have some autogen near an approach path that makes it impossible to follow the 3° glideslope if I use something like Cottonwood 5-16m City and/or tb Elm1 8-18m City in that area. The trees are too tall of course, the friendly name is misleading as Cottonwood 5-16m City for example uses models as large as 30m (with a relative weight of 5). The shorter groupings are either too small and invisible or they contain "sets" which interfere with autogen buildings, roads, etc.

My solution was to decompile the autogen with agn2txt and replace the Cottonwood City GUIDs equally with a mix of the GUIDs for veg_tb_Cottonwood_12m, veg_tb_Cottonwood_14m, and veg_tb_Cottonwood_16m which are ModelEntries rather than Grouping IDs. I did the same with the Elm using similar sized models. Much to my surprise this worked and allows the 3° glidepath to be flown without the trees looking particularly strange or out of place.

You can open and edit/save the re-compiled autogen in the annotator and when you select one of the trees it simply tells you "veg_tb_Cottonwood_14m" instead of "tb Cottonwood 5-16m City". You can copy & paste these trees as well. The trees change seasons normally in the sim.

I only did this for a very small area under the approach path, there were less than 300 autogen objects involved and the rest of the PR uses standard groupings. This non-standard autogen gives me what I want in both P3D2 and FSX without need for any custom autogen descriptions.

This may have some potential too where using a specific tree size would be beneficial (you always end up with that gargantuan tree on the edge of your parking lot that hides all your vehicle placements for example), this could mean very precise control of your autogen where you need it in high detail areas of the PR, you could effectively paste exactly the tree you want almost as if placing specific objects with Instant Scenery - except they would follow the seasons.

Here are the available cottonwoods arranged in a grid from smallest to largest, all placed with the annotator, they show a fall variation in September and a winter variation in January:


cottonwoods01-jpg.60507
cottonwoods01.jpg



I'm curious if anyone can see a problem with hacking autogen like this? ...or have we been doing this all along and I'm just now catching on?

Jim
 

Attachments

  • cottonwoods01.jpg
    cottonwoods01.jpg
    177.3 KB · Views: 96
Messages
6,528
Country
us-illinois
Continued:

For my own purposes I can't see where a person really needs greater control without randomization, using the ModelEntry GUIDs in the annotator gives you more or less the same control you'd get in a placement .bgl.

Shortly after I posted this thread I decided I needed a "palette" to copy from in the annotator so I created "Autogen Park", which is for all intents & purposes a bogus 30cm PR with a bunch of tree labels on it that I annotated with ModelEntry GUIDs in the annotator. I didn't finish it yet (may never), as it turns out the Oaks were so friggin huge the autogen engine apparently didn't want to draw them so close together, some of them were no-shows, I need to modify my "PR" and spread them out a bit more, but otherwise I was able to precisely place the tree I wanted near each label, here's a shot:


agn_park001-jpg.60508
agn_park001.jpg



EDIT: They change with the seasons (the PR doesn't, lol):

agn_park002.jpg

agn_park002-jpg.60509
 

Attachments

  • agn_park001.jpg
    agn_park001.jpg
    239.1 KB · Views: 107
  • agn_park002.jpg
    agn_park002.jpg
    205.1 KB · Views: 100
Messages
6,528
Country
us-illinois
Continued:

Couple of developments on this, as Arno mentioned in post #4 you can also use specific RoofEntry ids rather than groupings for your AGNGenericBuildings just as you would use a ModelEntry id for AGNRectangularVegetation. This lets you specify the exact roof you want for each house. This works well when you annotate houses that aren't square or rectangular so maybe you'll make the house actually from a couple buildings intersecting one another at right angles, in that case you can specify the same roof for each which makes the house look a bit more unified. Here are a couple of my "luckier" examples:

bar_harbor_agn01.jpg

bar_harbor_agn01-jpg.60510



bar_harbor_agn02-jpg.60511
bar_harbor_agn02.jpg



Annotating trees using a ModelEntry id is fairly easy since you can hack some autogen and then copy & paste tiny veg rectangles that basically represent a single tree but when using the RoofEntry ids each house needs to basically fit the footprint on the photoreal so copying & pasting doesn't work. I've found that you can select an existing house by drawing a selection marquee across it then hit "B" for building and the new building you create will inherit the GUID of the previously selected building. That worked but it was a pain and I found myself panning all over the PR trying to find the building I wanted to give the annotations some variety. Finally I decided a hacked RoofDescriptions.spb was in order so I made one up specifically for annotating but not for use in the sim. I made custom groups for each of the available default RoofEntry ids and gave each one the GUID I ultimately wanted to end up with, then I replaced all the RoofEntry GUIDs with random ones. The idea is you annotate with the hacked RoofDescriptions.spb, then when you run the annotations in the sim using your normal RoofDescriptions.spb (or any RoofDescriptions.spb as long as it still contains all the default descriptions) the GUIDs from the hacked groupings become the GUIDs for the individual RoofEntry ids. It worked, lol. The end result is custom annotations without the need to supply custom descriptions. As long as the big name scenery developers always include unadulterated default descriptions in their supplied custom decscriptions there's no way this can get messed up by any FTX Central setting for example on the end user's PC.


Lastly here's a hack I just finished up on some vegetation. As you can see in the first screen the trees virtually hide all the building annotations. I set up a couple dummy scenery folders, one where I removed all the outlying annotations keeping only the city area and another where I inverted everything keeping the city area annotations and deleting the outlying areas. I decompiled the city area .agn files and did some massive GUID replacements to remove all the "tb Cottonwood 5-40m ALL" for example replacing them with an assortment of veg_tb_Cottonwood_12m, veg_tb_Cottonwood_14m, veg_tb_Cottonwood_16m, etc. I did the same for tb Elm1 8-18m City, tc Douglas Fir 5-25m City, tb Cottonwood 5-16m City, etc. I then appended the agn for the outlying areas into the hacked files which put them all back just as they were before I messed with anything. Here's the result, note the taller more voluminous trees surrounding the city remain intact yet you can now see the building annotations much better from a low angle.

bar_harbor_agn_before.jpg

bar_harbor_agn_before-jpg.60512

bar_harbor_agn_after.jpg

bar_harbor_agn_after-jpg.60513



Jim
 

Attachments

  • bar_harbor_agn01.jpg
    bar_harbor_agn01.jpg
    202.1 KB · Views: 87
  • bar_harbor_agn02.jpg
    bar_harbor_agn02.jpg
    212.6 KB · Views: 72
  • bar_harbor_agn_before.jpg
    bar_harbor_agn_before.jpg
    238.4 KB · Views: 92
  • bar_harbor_agn_after.jpg
    bar_harbor_agn_after.jpg
    240.7 KB · Views: 94
Messages
6,528
Country
us-illinois
Continued: ( I only needed to restore the jr_hacked_agndecsriptions.zip file for this post. ;) ...GaryGB )

Those "scripts" are merely what you get when you copy something in the annotator. Try it, draw a rectangle around a bunch of trees in the annotator, press Ctrl+C and then open up Notepad and paste what you copied. Save the Notepad doc as text then open it back up one day and Ctrl+A, Ctrl+C the entire document, start the annotator and paste them onto a photoreal. That's all I did to get the scripts I posted above. The positioning in that case means nothing to anything but the annotator which ultimately writes the FS positioning into the .agn files. To get that info yes, you'd need to decompile the .agn with agn2txt, I'm afraid Arno would have to help you decipher agn2txt's output, I think positioning is relative to the upper left corner of the autogen cell but I don't understand the numbers.

After refining this technique a bit my conclusion is that saving these tree varieties to a txt file as a "palette' to paste into the annotator isn't the best way to go about it. It's much easier to simply annotate with the hacked AutogenDescriptions.spb and RoofDescriptions.spb, more details of the hack in post #13 above.

So here are my hacked descriptions:
jr_hacked_agndecsriptions.zip

https://www.fsdeveloper.com/forum/a....60514/?hash=09bafa0abc94a7f3d15c947e4b742018

...and here's the "help file", lol:

You don't run these hacked descriptions in your sim, you only annotate with them (although I can't think of a reason they wouldn't also work in the sim). Basically the hacked descriptions do nothing but give you a Grouping id you can select to annotate with, the hack is that the GUID of that Grouping id embedded in the .agn file becomes the GUID of a ModelEntry or RoofEntry when you run the autogen in the sim using normal autogen descriptions.

Only AutogenDescriptions.spb and RoofDescriptions.spb have been modified, everything else is default FSX/Accel but I included them since you'll need the complete fileset to annotate with. These work for P3D v2.x as well IIRC.

Don't overwrite anything, make a folder in "Microsoft Flight Simulator X SDK\SDK\Environment Kit\Autogen SDK" named "hacked descriptions" and extract the .zip file there. When you start the annotator rather than open the usual "Microsoft Flight Simulator X\Autogen\AutogenDescriptions.spb" with the Autogen Configuration Editor, navigate to the "hacked descriptions" folder and open the hacked AutogenDescriptions.spb instead. Do the same for RoofDescriptions.spb.

You'll find new groupings available like "JR_veg_tb_Cottonwood_10m" and "!JR_Roof_Gabled_03" which are essentially Grouping id's made using a single ModelEntry or RoofEntry. All existing default groupings are still available, haven't been modified, and you can still use them to annotate with normally. The hack is completely additive and all hacked Grouping id's are prefixed with "JR_". These began life as default FSX/Accel and include no 3rd party descriptions which means you can annotate with whatever you like without worry that you're using someone's copyrighted descriptions.

When you annotate veg rectangles with these hacked "JR_" groupings they should be small enough to represent a single tree, the idea is you use them around houses or anywhere shorter trees are desired. If you annotate large veg rectangles or polys with these groupings you'll end up with large areas filled uniformly with exactly the same tree! Use the default groupings for the larger areas instead, they will give some variety.

The main purpose of the RoofDescriptions hack is to allow you to specify exactly which roof/gable textures an AGN building should have, the wall textures unfortunately are still left to chance. See post #13 above for more info/screenshots.

The RoofDescriptions groupings prefixed with "!JR_" seem to make proper use of the gable textures where the groupings lower in the list prefixed with simply "JR_" did not. You should set up a test somewhere laying out each grouping type numerically so you know that the building in the fourth row, 2nd from the left is "!JR_Roof_Gabled_08" for example, take some screenshots for previewing. Note that these building textures are all subject to changing depending on which addons an end user might have installed

Jim
 

Attachments

  • jr_hacked_agndecsriptions.zip
    1.1 MB · Views: 74
Last edited:
Top