• 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 v4 Import of new scenery objects into P3Dv4 is proving problematic

Messages
1,484
With help from the old timers here I've succeeded with importing my test object from 3dsmax 2018 into mcx, and finally, exporting the object into both an mdl file and bgl file. However, I have NOT yet succeeded in SEEING my object appear in P3Dv4. Along that line, I've uncovered some difficult issues with the scenery library in P3Dv4. I naturally assumed it would work as fsx did. However, now it appears there are two ways to import scenery (I don't yet know what seperates those ways). Using MCX to compile a bgl and setting up the normal files scenery and texture went as expected. Oddly, I couldn't find my object. Checked all the standard stuff, compiled for sparse setting, sim set for dense....triple checked the lat longs....remade my object so I knew it was big enough to see....double checked altitude was agl....disabled the orbix stuff in case their mesh was higher in altitude than default....nothing worked. No black object either, so it wasn't a texture thing.

So, I decided to delete that scenery library folder, and COULDN'T. It was frozen in the library. Turns out there is a method of install that puts the scenery location in a hidden folder on your C drive, and the placement file in MCX activates that method. I could disable that layer, using "options/addon", but the unchecked layer had to remain. Oddly enough, I couldn't see that layer in the scenery.cfg file. I found the folder with that scenery in C:\program data\Lockheed Martin\Prepar3Dv4 as an "addon". I deleted the file from there and received an error on first load of P3D. Then I deleted Scenery.cfg, and let P3D build a new one, which ended the errors, but also forced me to re-install the orbix stuff I have.

I did a bit of reading, and it appears this change in the Scenery config, Addon.cfg and new scenery compiling is new and confusing others as well. Its always something.

Finally, I compiled my test cube the old fashioned way by making a cube.xml file, and exporting with bglcomp. Then added the location manually into the scenery library which now behaved as expected. HOWEVER the object still does not appear in the sim. After that, I compiled the example of the oil rig, as shown in the sdk readme, and it also did not appear.

I'm sure this will be as well understood as it used to be, but more investigation is needed.
 
Messages
1,095
Maybe a list of steps you took might help pinpoint any problem with your workflow? Although I use MCX a lot, I have never used it to place an object, so I'm not entirely sure how that works, such as what determines the BGL file location.
The Learning Center details where add-ons should be located, and your install does seem to follow this. Note that you can disable an add-on in the way you tried, options/add-ons, but to actually remove the add-on autodiscovery, you would need to delete the add-on folder which holds the add-on.xml file from Documents\Prepar3D v4 Add-ons\Name of add-on. Using the add-on.xml method doesn't affect the scenery.cfg file in any way, as you've discovered, so recreating that, although it worked for you, wouldn't have removed the add-on.xml file.
Personally I think that the add-on.xml method is a huge step forward, but it does take some time to get your head around.
 
Messages
1,484
The addon concept is logical, I just never expected it. What I have done in the past is to experiment with scenery, but the ability to delete my experiments at some point always made me feel good. Now, if my experiments are no longer needed, they have to hand around forever? Disabled, but still in place ready to be re-enabled? Ok...I can accept that, its just brand new.

Still, my real interest is to display newly created objects in 3dsmax 2018 within p3dv4.

Steps taken:
1. Simple cube in 3dsmax, with texture in .bmp for appearance, and dds made in latest imagetool for the texture folder. Max material was the prepar basic material with the bmp as a map onto the diffuse channel.
2. Export cube using the prepar3dv4 sdk export tool from within max. Results in .x file.
3. Import .x file into mcx is successful, and export as bgl is also successful. My placement is done via the mcx placement tool.
4. All appears to have worked, no errors, and p3dv4 installs the scenery automatically on startup. That's when it made the new layer an "addon".
5. Only 1 problem: Object does not appear. Set at Sparse, with scenery at dense. Set at agl, so object can't be underground.

Next effort: on the assumption that I've been successful using basic xml files all along:
1. Exported a mdl file from mcx.
2. Copied the placement xml example for the "oilrig" from the sdk, and substituted the guid for my object.
3. compiled using bglcomp in the command panel, and acheived success, no errors
4. Placement should be SEATAC airport, as per legacy.
5. Place file in "scenery", texture has been in texture all along.
5. No Object appears

Final effort:
1. Compiled the oil rig xml example using bglcomp from the command window. At this point I made no changes to the example file.
2. Oil rig does NOT appear.
 
Messages
1,095
Ok, first I need to apologise for some of the information in my post, it drives me balmy when people post stuff which is not quite complete, and therefore results in people having just enough info to be dangerous... this refers to my advice that removing the add-on.xml file is a good idea. In your case, because I have no idea of the process which MCX uses to create it, I'm not sure what it contains, so deleting it might not be a good idea. You can certainly make any failed experiments disappear when you use the add-on.xml method, as simply as using the old scenery.cfg method. Normally, you'd just need to delete the add-on.xml file, which as I said is located in your documents\Prepar3D v4 Add-ons\ folder, where you should find a subfolder whose name is related to the add-on. This will contain an add-on.xml file. As I said 'normally'. In the case of a single stand-alone scenery you would just delete the sub-folder which contains the add-on.xml file, plus the actual folder which contains the scenery BGL and textures, or if there's a folder which contains different projects, just the relevant BGL and texture files.
In your case, I'm not sure what the add-on.xml file actually points to, it may not be a separate add-on.xml file for each little project, so you'd need to take care here.

Your development process looks good. I'm pretty sure that you can choose your own folder location when you export the scenery.
When you import the resulting BGL into MCX, does the object appear ok? Does it show up at the proper location? (using the Object Placement button again.)
If so, it could be an activation issue. I'm sure that someone here could help you with the exact MCX process, but I'd certainly be interested in seeing the add-on.xml file in your case....
Personally, I use Arno's Library Creator to create a library from my model(s) first, then place them using Whisplacer. I'm aware that Whisplacer isn't a great way to start, as it's tricky to install, and no longer supported. However I know that plenty of people place their library objects using ADE which may be a good option. First, though, it would be good to figure out why your apparently good methods are not working:)
 
Messages
7,450
Country
us-illinois
Hi Bob:

I realize you work with 3DSMAX and P3Dv4.4, and that there is a learning curve for the new P3D 'Addon XML' work-flow.

However, for initial learning in the context of a familiar work-flow, P3D's Scenery Library GUI still works like the one in FSX. ;)


Perhaps a couple of my own experiences with MCX imports / exports may still be helpful for the scenario in this thread ? :idea:


I have sometimes had FSX not display a custom 3D scenery object because I did not update the Geo-location info in Sketchup with actual coordinates of the object, and had inadvertently left intact, the 'default' Geographic coordinates of Sketchup (Boulder Colorado ...HQ of the original developer of Sketchup before it was purchased by Google and later sold to Trimble).

Because I almost always export Google Earth .KMZ files from Sketchup, MCX "inherits" any Geo-location as 'placement' info.

When I further fail to update the Geo-location info in MCX Object Placement Wizard with actual coordinates of the object I import as a *.KMZ, I am initially baffled as to why my object is missing (...until I slew to Boulder Colorado in the USA ! :eek:)


If I then fire up Instant Scenery, find the "hybrid" Library containing the object, and attempt to place it where it belongs in FS, I am unable to do so, and Instant Scenery pops up a message box:

"The library you selected only works in a specific area (or city) ...You are trying to place an object outside of that area"

Now we see why "hybrid" BGLs output by MCX and ADE may be a 'mixed blessing': :banghead:

GEO-LOCK-ation arising from 'embedded' Geo-location info inherited by MCX as placement that is not updated before export.


CAVEAT: Always update MCX' default Geographic coordinates in MCX Object Placement Wizard before 'scenery BGL' export.

This is required even if MCX imports a 3D model in a file format which does not embed Geo-location info. :pushpin:


"Geo-Locked" MDLs can of course be avoided by export to MDLs and making Library BGLs with Library Creator XML, or by decompilation, XML editing, then re-compilation via BGLComp of Geo-Locked BGLs originally exported as scenery by MCX.



I have also had FSX not display a custom 3D scenery object because I did not force MCX Material Editor to update the \Texture folder path info (...which is also explicitly stored within the MDL).


Before I import a 3D model source file into MCX, the first thing I do is create the target folder chain for the 3D scenery object.

This is of course the 'Top folder' (with a project Area layer name as desired to be seen in FS Scenery Library GUI).

That 'Top folder' also must have a nested \Scenery and \Texture sub-folder as with prior versions of FS.


When I import a 3D model source file into MCX, after the 3D preview is displayed in the main work-space, the first thing I do is open Material Editor (7th to right on top icon toolbar)

Next, I click the [Textures] tab, and immediately update the intended output Texture Folder Path.


MCX can now internally convert (via SDK ImageTool) ...all mapped texture / system 'color' Materials ...to *.DDS texture format files.


In MCX Material Editor on the [Textures] tab, I then 'select' the stack of textures top-to-bottom

To prevent Material texture file name conflicts, I click the [Prefix all with model name] button

Now I verify that the texture file format selector is set to: DDS

Next, I click the 'pull-down' arrow next to [Save Textures] button and 'check' both of the following check boxes:

* Ensure size power of two

...and:

* Overwrite existing textures


NOTE: The 'overwrite' function only overwrites texture files output into a texture sub-folder path already assigned above.

MCX also writes that \Texture sub-folder path (rather than MCX' internal default 'system work folder' path) ...info into the MDL.


Finally, I click the actual MCX Material Editor [Save Textures] button itself.

MCX will write the converted mapped Materials into the assigned \Texture sub-folder path and update that path in the MDL.


BTW: MCX also automatically adds MIPMAPS to converted mapped Materials output into the assigned \Texture sub-folder.

This feature set in MCX Material Editor saves having to separately use ex: SDK ImageTool in one's work-flow for a 3D model.


In MCX Material Editor, I can now click on the [Properties] tab and modify any Material attributes / functions as needed.


Once the MDL is configured as desired, I can output it as a MDL and/or as a scenery BGL (...MCX' default = Geo-Locked :alert:).


NOTE: Before scenery BGL export, I verify / update location in MCX Object Placement Tool (5th to right on top icon toolbar)

Finally, for scenery export, I browse to the \Scenery sub-folder paired locally with the \Texture sub-folder path assigned above


[EDITED]

IMHO, browsing to that path is important, as MCX would otherwise output to its internal default 'system work folder' path.


CAVEAT: MCX' [Export Scenery] requires browsing to a local drive letter and folder rather than to a "networked" UNC path.

MCX does not yet successfully resolve network 'UNC' path info if one attempts to export to an UNC path (MCX crashes).

Curiously (but thankfully), MCX does otherwise successfully resolve network 'UNC' path info during 3D model import.:scratchch


PS: Perhaps Arno could add an option to MCX Menu > [Export Scenery] button > Save As dialog > Save as type: pick-list: ?

* [FS version] Scenery Object Library BGL file (*.bgl) <--NO placement code, NO Geo-locking code

... as an alternative to the current 'Geo-locked' "hybrid" BGL containing both MDLs and placement we get from using:

* [FS version] BGL file (*.bgl) <--With placement code, With Geo-locking code


This proposed alternative may eliminate a need for end users to perform a separate work-flow via Library Creator XML :coffee:

IIUC, MCX [Export Scenery] feature currently seems to (internally) use routines in MCX' Convert and Place Object Wizard.

[END_EDIT]


Hope this info may prove helpful to exploring some of MCX' various features, capabilities and 'gotchas'. :)


GaryGB
 
Last edited:
Messages
1,484
Thanks to you both Toprob and Gary. Your efforts to help me reminds me how great this community is. And thanks for suggesting I describe my process in detail. Helped me focus a bit. While I'm trying to let myself learn about the new scenery addon concept, I'm also musing about my effort to import scenery the old way. Today I very carefully reviewed my old xml file content, made sure I used the current style guid, made sure I called the mdl file correctly, made sure, made sure, made sure.

And...........success!!!!!

Now I have confidence there is no real impediment to my toolset and my workflow....I can expand into use of library files, placement xml, and the lot. Thanks again all who offered help, and I'll be referring to this thread as I expand my skills.
B
 

Attachments

  • success.png
    success.png
    832.5 KB · Views: 429
Top