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

Can I place a MDL objects located in a BGL library file using SCASM?

Messages
46
Country
france
Hello everyone

The title says it all.

I have a BGL library file with four MDL objects, all the same but with different texture/color. This a BGL file created with Library Creator.

I would like to display (in P3Dv4) the red object in summer, the blue in winter etc. I don't see any possible way to do that with XML code. Only SCASM seems able to do that.

How can I use my MDL object with a FSX GUID from the BGL library file in SCASM ?

If it's not possible, is a placement with SODE my only solution ?

Thanks
 
Messages
274
Country
israel
You might be able to do it in the modeldef.xml or using LUA scripts
Also sode is an option

Sent from my iPhone using Tapatalk
 

=rk=

Resource contributor
Messages
4,478
Country
us-washington
If this is P3Dv4 and the model object is the same, you can use the conditional visibility feature of P3D to render different textures, according to season.
 
Messages
46
Country
france
Thanks guys

Rick, can you please tell me how to use the Conditionnal Visibility in P3D ?

Thanks
 
Messages
46
Country
france
Rick

I did add the condition to modeldef.xml

I did add the condition within the hierarchy editor of MCX.

How the hell do I save that in the mdl file ? I tried to export but Visibility gets back to "none"
 

=rk=

Resource contributor
Messages
4,478
Country
us-washington
You have to use the hierarchy editor to find the textured part and select the visibility condition there, before compile.
 
Messages
7,450
Country
us-illinois
FYI: Even if one used SCASM / ASM code with conditional display to call MDL objects packaged in BGLComp-XML scenery library object format BGLs compiled by SDK BGLComp (rather than as legacy non-MDL 3D objects packaged in scenery library object 'LibObj' format BGLs compiled by SCASM / BGLC, we could not be certain if future versions of P3D would continue to support such SCASM /ASM code, as L-M has made it clear they want to discontinue support of that type of scenery object code method.

It was only after an initial protest was made by the FS Development community when intended deprecation of SCASM code was announced for future versions of P3D, that L-M granted an 'extension' of SCASM / ASM -type G-Poly retro-compatibility in the currently available P3D run time rendering engines. :pushpin:

GaryGB
 
Last edited:
Messages
46
Country
france
Thanks guys

Rick, I want the FULL object to be visible / invisible depending on season. So I select the SceneGraphNode in the Hierarchy Editor in MCX and set the visibility condition on the right side. How the hell do I compile afterwards ?

Gary, I got your point. But if I want to do this, how should I do this ? What is the code I have to use in the scasm to refer to the MDL file ?

Thanks
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
After setting the visibility condition you can just export to mdl again and the condition should be stored. Which MDL format you export to?
 
Messages
46
Country
france
Hi Arno

I'm not sure to be honest, I'm not an expert here. I use you wonderful modelconverterx tool or trying at least....
 
Messages
46
Country
france
Arno

I think I made it work. The only point is that it's not really dynamic as simobject placement with SODE, meaning that the visibility condition is tested only once, when scenery is loaded, but no more after that. So you can't really use it for object that have to show up / diasppear at dawn or dusk for example.

One question about modeldef.xml, as it is not clear for me at all : this file is kind of a repository for visibility conditions and other stuff, but once these conditions are embedded in the mdl file modeldef.xml is not needed anymore, right ?

One suggestion to improve modelconverterx, if I may : when you set a visibility condition at the scenegrahnode level in the hierarchy editor, it's useless and it's not populating any modelpart below. Since an object can have many modelparts, it would be cool that changing the visibility conditions for the scenegraphnode, populates all the modelparts. What do you think ?

Do you have any insight from LM that they will accept more conditions than simple environnement conditions in any future versions of the SDK ?

Many thanks for your help and amazing tools

Greg
 
Messages
46
Country
france
Back to the initial question, I still don't understand if you can"call" an mdl file (by it's name or its GUID) in a SCASM file ... Any idea on this ? Except than converting the mdl in scasm code and inserting the code in the scasm.... SCASm has this cool feature that it can change sceney dynamically, starting with teh ifvarrange instruction ....
 

arno

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

You can apply the visibility condition on a parent node and then it will apply to all children. So no need to copy it to all modelparts.

Modeldef.xml is only used by xtomdl, once you made the mdl it's not needed to run the scenery anymore.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Back to the initial question, I still don't understand if you can"call" an mdl file (by it's name or its GUID) in a SCASM file ... Any idea on this ? Except than converting the mdl in scasm code and inserting the code in the scasm.... SCASm has this cool feature that it can change sceney dynamically, starting with teh ifvarrange instruction ....
It's a long time ago, but if I remember correctly SCASM won't work with FSX style library bgl files, they need to be old style libraries. SCASM is really old now, I would not start using it anymore.
 
Top