Jump to content
Sign in to follow this  
alpha117

More than one scenery in the same add-on.xml?

Recommended Posts

Hi All, 

Just wondering if this is 'good' practice to have more than one airport in the same add-on.xml.

 

Also, what is the maximum add-on.xml's you can have?

 

 

thanks

 

 


Clive Joy


beta.gif

Posted Image

Share this post


Link to post
Share on other sites

Hello Clive,

this is not only possible, but recommended. There have been reports of texture corruption if you have too many add-on.xml files. LM says that they will fix that in 4.2, but personally I still find it better to organize your content properly. For example, grouping all aircraft into one XML per developer or by role (props, turbo, jets, military), scenery by continent (or country, if there are many airports) and all other content either by developer (for example if you have several differnent texture replacements or shaders) or by purpose.

Try to keep the total number of scenery related XML files below 20.

That being said, personally I think the issue that leads to texture corruption is not the total number of XML files, but rather the way that you add the scenery components. You can either add on component of type "Scenery", targeting the top folder of the scenery area, or you can decide to add two different componente, one "Scenery", the other "Texture", and target the corresponding subfolders of the scenery area. I have had better results with the first method (and they way that I read the spec, this is what you are supposed to do too). My theory is, that individual lookup paths for "Textures" aren't cached, so when the sim need to load one, it starts searching for it, which takes too much time, resulting in half-loaded or missing textures in the frame.

Best regards

 


LORBY-SI

Share this post


Link to post
Share on other sites

Thanks Oliver, 

That's made it clearer 

 


Clive Joy


beta.gif

Posted Image

Share this post


Link to post
Share on other sites

Hello Oliver,

Where a scenery addon contains effects, scripts, simobject sub folders etc will using the option "targeting the top folder of the scenery area" automatically identify these additional folders also ?

Share this post


Link to post
Share on other sites
25 minutes ago, srcooke said:

Hello Oliver,

Where a scenery addon contains effects, scripts, simobject sub folders etc will using the option "targeting the top folder of the scenery area" automatically identify these additional folders also ?

Hello Stephen,

No. A "Scenery Area" as per the spec in the Learning Center is a folder containing subfolders "scenery" and "texture". The sim will not look for other content on its own accord.

Best regards


LORBY-SI

Share this post


Link to post
Share on other sites
8 hours ago, Lorby_SI said:

Hello Clive,

this is not only possible, but recommended. There have been reports of texture corruption if you have too many add-on.xml files. LM says that they will fix that in 4.2, but personally I still find it better to organize your content properly. For example, grouping all aircraft into one XML per developer or by role (props, turbo, jets, military), scenery by continent (or country, if there are many airports) and all other content either by developer (for example if you have several differnent texture replacements or shaders) or by purpose.

Try to keep the total number of scenery related XML files below 20.

That being said, personally I think the issue that leads to texture corruption is not the total number of XML files, but rather the way that you add the scenery components. You can either add on component of type "Scenery", targeting the top folder of the scenery area, or you can decide to add two different componente, one "Scenery", the other "Texture", and target the corresponding subfolders of the scenery area. I have had better results with the first method (and they way that I read the spec, this is what you are supposed to do too). My theory is, that individual lookup paths for "Textures" aren't cached, so when the sim need to load one, it starts searching for it, which takes too much time, resulting in half-loaded or missing textures in the frame.

Best regards

 

Oliver,

What is your opinion of how to handle scenery that is successfully installed by the scenery installer, but that includes in the .xml a separate scenery reference, and a separate texture reference. Should one change those .xml's so that the scenery component is targeted to the top scenery area folder? Example: FlightBeam KDEN .xml reads:

<?xml version="1.0" encoding="utf-8"?>
<SimBase.Document Type="AddOnXml" version="4,0" id="add-on">
  <AddOn.Name>Flightbeam - KDEN</AddOn.Name>
  <AddOn.Description>Flightbeam - Denver Intl. Airport for Prepar3D</AddOn.Description>
  <AddOn.Component>
    <Category>Scenery</Category>
    <Path>C:\Program Files\Lockheed Martin\Prepar3D v4\Flightbeam\Flightbeam - KDEN\scenery</Path>
    <Name>Flightbeam - KDEN scenery</Name>
    <Layer>242</Layer>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Texture</Category>
    <Path>C:\Program Files\Lockheed Martin\Prepar3D v4\Flightbeam\Flightbeam - KDEN\texture</Path>
  </AddOn.Component>
</SimBase.Document>

 

Should I delete the "texture" category entry, and then change the "scenery" category reference to:

<?xml version="1.0" encoding="utf-8"?>
<SimBase.Document Type="AddOnXml" version="4,0" id="add-on">
  <AddOn.Name>Flightbeam - KDEN</AddOn.Name>
  <AddOn.Description>Flightbeam - Denver Intl. Airport for Prepar3D</AddOn.Description>
  <AddOn.Component>
    <Category>Scenery</Category>
    <Path>C:\Program Files\Lockheed Martin\Prepar3D v4\Flightbeam\Flightbeam - KDEN</Path>
    <Name>Flightbeam - KDEN scenery</Name>
    <Layer>242</Layer>
  </AddOn.Component>
  </SimBase.Document>

 

Is it better to make this change, or just leave them installed as-is?

 

Regards,


Steven_Miller.png?dl=1

i7-6700k Gigabyte GA-Z170X-UD5 32GB DDR4 2666 EVGA FTW ULTRA RTX3080 12GB

Share this post


Link to post
Share on other sites
30 minutes ago, somiller said:

Is it better to make this change, or just leave them installed as-is?

Hello Stephen,

I would change it, but that is just me. It depends on the addon and if there is some kind of management program. There are packages that always revert their files back to the original state (Ultimate Traffic Live and ORBX FTX Central for example) and trying to work against them is pointless.

This is my interpretation of the spec = the Learning Center.

In "Prepar3D->World->Scenery Library" it describes the entries in the scenery library as "scenery areas". And those definitely contain \scenery and \texture. Has always been like that, probably so every addon developer doesn't have to invent unique texture file names - which would have been the case if you had to drop all the texture files into the main texture folder of the simulator - which is basically what happens if you establish separate add-on components of type "texture".

Then, the "SDK->Add-ons->Add-on Packages" says:

Quote

Category  ---- Scenery - Refers to a component that adds an additional scenery area to Prepar3D's world.
                 ---- Texture - Refers to a component that adds an additional texture directory that Prepar3D can use to resolve textures.

In my mind this is very clear. Category "Scenery" add-ons are added as an area, including \scenery and \texture in one directory, just like it always was. You are only supposed to use category "texture" if you really mean it, if you want to add or replace texture files on the global texture lookup path.

I am not at all surprised that there are issues if you add every sceneries "texture" folder to the global lookup separately. There must be a ton of conflicts with filenames, and of course it takes the sim forever if it has to parse through all of these folders when searching for (any) texture. The sim cannot know that this add-on component of type "texture" belongs to the scenery - it "thinks" that these are textures that can be applied anywhere!

Just my 2 cents.

Best regards


LORBY-SI

Share this post


Link to post
Share on other sites

Oliver,

You provided a very well explained solution (as always). Now it makes so much sense since you referenced to potential for filename conflicts...that explains how some folks are getting the wrong textures on some objects.

I think I'll go ahead and consolidate my scenerys and change them all to reference the top scenery area directory, and eliminate the separate texture component reference.

I'm curious whether this could have a potential to slightly improve performance?

 

Regards,


Steven_Miller.png?dl=1

i7-6700k Gigabyte GA-Z170X-UD5 32GB DDR4 2666 EVGA FTW ULTRA RTX3080 12GB

Share this post


Link to post
Share on other sites
9 minutes ago, somiller said:

I'm curious whether this could have a potential to slightly improve performance?

 

I think so, yes. But that again is just me.

Texture loading is a time critical process. I suspect that the global texture folder lookups are not cached, so P3D hunts through all those addon components of type "texture" every time - and it has to go through all of them for every lookup, even if it is just a default tree foilage, because it is always the last texture of the same name that is loaded (so you can override default textures with an external addon). If you have enough of those external paths, then textures will probably begin to break up, because it just takes too long.

If that will influence FPS I don't know. It seemed logical, so I avoided these situations from the start.

Best regards


LORBY-SI

Share this post


Link to post
Share on other sites

Oliver,

Great, thanks. I just did a test on KDEN's .xml and everything seemed to work okay after eliminating the category "texture" and changing the category "scenery" reference folder to top scenery area folder. I am going to consolidate, and clean up the rest of my addon .xml references and see whether I notice any difference.

Regards,


Steven_Miller.png?dl=1

i7-6700k Gigabyte GA-Z170X-UD5 32GB DDR4 2666 EVGA FTW ULTRA RTX3080 12GB

Share this post


Link to post
Share on other sites

Oliver,

Here's a .xml for fsDreamTeam KCLT that I'm not sure about. Notice the <Type>GLOBAL</Type> reference in the "texture" reference. If the "texture" reference is removed, along with the "type" reference, will that cause problems? I haven't checked them all, but I would assume all FSDT .xml's use that "type" reference.

<?xml version="1.0" encoding="utf-8"?>
<SimBase.Document Type="AddOnXml" version="4,0" id="add-on">
  <AddOn.Name>FsDreamTeam KCLT</AddOn.Name>
  <AddOn.Description>FsDreamTeam Charlotte Douglas International Airport scenery</AddOn.Description>
  <AddOn.Component>
    <Category>Scenery</Category>
    <Path>C:\Program Files (x86)\Addon Manager\FsDreamTeam\KCLT\Scenery</Path>
    <Name>FsDreamTeam Charlotte Douglas</Name>
    <Layer>237</Layer>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Texture</Category>
    <Path>C:\Program Files (x86)\Addon Manager\FsDreamTeam\KCLT\Texture</Path>
    <Type>GLOBAL</Type>
  </AddOn.Component>
</SimBase.Document>

 

Thanks,

 


Steven_Miller.png?dl=1

i7-6700k Gigabyte GA-Z170X-UD5 32GB DDR4 2666 EVGA FTW ULTRA RTX3080 12GB

Share this post


Link to post
Share on other sites

Hello Stephen,

sorry, but the spec doesn't say what that "type" tag is for. But as this texture folder is contained in the scenery area, I can't see why you would want those textures to be applied to your sim on a global scale. I would rather be concerned with FSDTs Addon Manager program - it is possible that you can't change those files, because the AM overwrites them every time it is run. But I don't really know, I haven't installed my FSDT sceneries in P3D V4 yet.

Best regards


LORBY-SI

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...