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

FSX:SE Transparent model hiding another model? BGL overlap?

Messages
45
Country
australia
Hi all,

I've gotten cranky with the Statue of Liberty in front of the New York New York Hotel in the default FSX:SE Las Vegas scenery. I've interrogated the model file through importing the lasvegas.bgl into MCX. It appears that the day texture assigned to the model is pointing at the _LM.DDS texture, and there is no emissive texture assigned. The overall effect is a Statue of Liberty that is too dark during the day, and pretty much just a dark silhouette at night.

The incorrect texture assignments means that I can't just rework the textures, of which an object from the Mandalay Hotel also utilises.

1) So I tried to re-export the LasVegas.bgl as scenery after correcting the Statue of Liberty material assignment. This largely works well, but when flying up and down the strip I notice that some objects afterwards 'pop' out of view. This effect is a little bit like the wake effect in FSX where the wake of a ship disappears from screen when the ship passes off screen. I don't know why that happens now (it doesn't with the original lasvegas.bgl), probably something to do with my exporter settings? I also note that the original lasvegas.bgl is 11mb, and the new exported one is around 8mb. Seems like a drastic reduction and I'm worried something has broken in there. I've reverted to the original lasvegas.bgl file.

2) I tried a new approach. I amended the nvb13.dds and nvb13_LM.dds textures, adding an alpha channel to make the Statue of Liberty transparent. To be very clear, the model is still there, but is transparent/invisible. That works well.

3) I then made a copy of the Statue of Liberty model alone, everything else from the accompanying NewYork.mdl within the LasVegas.bgl was stripped away. I assigned new materials (copies of the nvb13.dds but called nvb13_sol.dds) and recompiled this as SOL.bgl. I added the SOL.bgl and new textures to my addon scenery.

4) I removed the lasvegas.bgl from the NAMW folder it resides in and booted up FSX. Great! The new Statue of Liberty is there, on it's own with no more Las Vegas around. When I restored the lasvegas.bgl to the NAMW scenery folder, all the Las Vegas buildings return but my new statue of liberty is no longer on screen. I've taken great care to ensure it's been placed in the right location.

5) As a test, I took my new Statue of Liberty, scaled it upwards 5% through MCX and placed it back into FSX. This was a test to see if somehow the old transparent Statue of Liberty was masking or hiding my new model. But still nothing. It's still doesn't appear on screen.

At this point I could use some help understanding what is occurring here. Is the wider NewYork model file somehow hiding my new bgl model? Is there a problem in FSX when bgl files overlap? Is there something wrong with my approach? Is there an alternative solution? And why do some building just disappear after what I described at point 1?

Lots of questions I know, but I'm hoping some concept becomes clear to me that either steers me to accepting defeat, or onwards to resolving this little bug.

Thanks everyone.

Trent
 
It is never recommended to modify the default .bgl's and that's a procedure I'm not going to address. It's understood that this is experimentation and for personal use, but of one thing I'm sure, you'll be better off if you follow this advice and if you don't, it's no big deal, mostly conveniences. So, the idea of modifying the default statue is great, you'd want to exclude the original and go from there.
I amended the nvb13.dds and nvb13_LM.dds textures, adding an alpha channel to make the Statue of Liberty transparent.
You'll probably want to reexamine this procedure. I'd recommend you study in detail, the differences between the two most common texture formats, .dds and .bmp. Alpha channels are only used in .bmp textures to indicate transparency, when they are flagged that way. Alpha channels can also control reflection and other nuances and they are a holdover from earlier versions of the sim. The .dds format supports transparency natively and this is also communicated to the simulator with specific textures, like the night texture. Invisibility is only an indication that a model is not rendering, the textures may not be available at all, regardless, it most certainly is still "there" and an exclude would remove the model, with no need to modify textures.
So I tried to re-export the LasVegas.bgl as scenery after correcting the Statue of Liberty material assignment. This largely works well, but when flying up and down the strip I notice that some objects afterwards 'pop' out of view. This effect is a little bit like the wake effect in FSX where the wake of a ship disappears from screen when the ship passes off screen. I don't know why that happens now (it doesn't with the original lasvegas.bgl), probably something to do with my exporter settings? I also note that the original lasvegas.bgl is 11mb, and the new exported one is around 8mb. Seems like a drastic reduction and I'm worried something has broken in there. I've reverted to the original lasvegas.bgl file.
This is almost certainly a consequence of your export settings, I would check and experiment with different compilers, but first, you'll want the LasVegas.bgl to be as original as possible. This means grabbing a model of the statue, and also a a model of the New York, or whatever the larger model is in the library, but without the Statue of Liberty model. Then when you compile each of these into distinct .bgl's, use the default textures for LasVegas.bgl, copy the relevant ones for the statue, edit and rename them.

It is hard for me to follow your description, probably because all of these things including ship wake behavior, are very distinct, to me, but two things come to mind to explore. One is draw distance, which is a setting that can be controlled globally, but can be affected locally when a models calculated size, or center changes. This value can be somewhat arbitrary, in relation to the edits being performed, but can be managed. For example, animated models have a very specific range they can be viewed, for logical reasons of resource allocation. This is usually no problem, in the case of a flag, or perhaps, wake effect. For an animated train model, this could be a problem as it recedes. The solution is to add the tracks to the animated model, this increases the effective size and brings the model within the required range throughout it's cycle.
The other situation that comes to mind is z flashing, that will be typified with the object vanishing and reappearing, in relation to changes in POV. This can be mitigated sometimes by adjusting the exporter z bias setting, or by removing the conflict between textured surfaces.

Ultimately, the procedure would be to make your copy of the original statue and LasVegas.bgl, deactivate the scenery layer for the original LasVegas.bgl, activate your new scenery layer with the new New York.bgl and statue in it.
 
Thanks =rk= for your initial thoughts. I'm making some progress here I think.

This picture below displays the problem I have. The Statue of Liberty does not have an emissive texture applied, so it shows up very dark at night. All of the buildings in the below screenshot come from the lasvegas.bgl. This library contains 34 models, one of those is the New York New York Hotel below (most of what you can see below, made up of several individual parts itself).

SOL1.jpg


I decompiled the lasvegas.bgl to extract the 34 models and the placement xml file.

I edited the NewYork.mdl stripping everything out except for the Statue of Liberty. I assigned it new texture files, quite separate to the original. I also removed all the object/GUID entries from the placement xml file except for the NewYork one. Code below:

Code:
<!--
    decoded by bglxml on 2020-02-03, 20:54:50
-->
<FSData version="9.0" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:noNamespaceSchemaLocation="bglcomp.xsd" >

<!--
    Object type: 0x0000002B
    offset: 0x0000004C
    group count: 1
    unknown1: 0x00000005
    table size: 0x00000010
-->
<!--
    LatInfo: 0x00000000, offset: 0x0000005C, length: 0x00B757B2, count: 1 //Note: this was 34, I changed it to 1.
-->
    <!-- guid="df8148de4588aa30ab369fbee28f2e54" -->
    <ModelData sourceFile="df8148de4588aa30ab369fbee28f2e54.mdl" />

</FSData>

I ran this new placement xml through bglcomp to generate a SOL_bgl file. I removed the existing lasvegas.bgl file and was left with the below. Everything working as expected. Bingo!

SOL2.jpg


However, when I add back lasvegas.bgl, I get the following:

SOL3.jpg


The original Statue of Liberty model is invisible because I've deleted it's textures. It's still in the original lasvegas.bgl, you just can't see it. However, my new Statue of Liberty model (with it's new textures) doesn't appear.

It's occurred to me that this is most likely a GUID conflict, as both my new SOL_bgl and the original lasvegas.bgl share the same GUID. No good.

So, I thought it would be a very straightforward exercise to create a new GUID within MCX, re-export the Statue of Liberty model, update the placement xml with the new GUID and run it through bglcomp.

No cigars however. I cannot understand why this won't work? BGL files are created, but when I use them in the scenery folder, nothing appears. Testing is always done without the lasvegas.bgl present.

I've tried both FS9 and FSX style GUIDS. No luck. I've tried calling the mdl file by the GUID name (fs9 style) or by other names. No luck.

I would love any insight into what I may be doing wrong, or perhaps an explanation as to why GUID numbers cannot be changed on the placement file that I've extracted. That would leave me to place the model manually, but I would prefer to use the original placement file if possible, after all, I've demonstrated it works above.

Thanks in advance!

Trent
 
Well as we say here in Australia, I'm a bit of a goose!

I misunderstood why I couldn't see the SOL model when I changed the GUID and assumed the compile was failing somehow (despite generating a SOL.bgl file).

The problem was that I mistakenly thought that the placement data was somehow embedded in the xml code I provided earlier...somehow in that hex data. That was all silly speculation and actually, there is no placement data in that file at all.

The reason I compiled it successfully with the original GUID is that the placement data for the original GUID is located in another file - OBX17190.bgl.

As soon as I changed the GUID, then there was no equivalent placement data stored in any OBX files (because it is a new GUID) and I guess it was placing it at 0 degrees North, 0 degrees East. Presumably.

In a revised placement xml file, I included the coordinates from the OBX17190.bgl file and hey presto, we get the below. Fireworks even! It's all easy in hindsight isn't it!

If anyone is interested in this fix, I'll upload it to flightsim.com in the coming days.

Trent

SOL4.jpg
 
Back
Top