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

Flickering, or Z Fighting and Flipped Textures in FSX

Messages
946
Hi,

I'm completing my KBHM airport project from the 1970s and 1980s, but there are some things occurring that just don't make any sense to me. I'm having quite a bit of flickering, or Z fighting and some of the textures have been flipped, but only AFTER the model has been imported into MCX. I know over lapping textures or faces will cause Z fighting but I don't see that anywhere in my model. In Sketchup, there is no flickering nor Z fighting occurring and the textures look okay. So, let me start from the beginning in Sketchup so that you have the complete picture. See my model below:


Model from Sketchup.jpg



I had the google map of the airport but I deleted it before exporting it so that the ground textures would not show up in the sim. Of course, I saved the project including the google map. But I had to make changes to the model to reflect what the airport looked like in the 70s and 80s. As I said, the airport project looks just fine in Sketchup without ANY flickering, Z fighting, nor flipped textures.


Here's the inside of the terminal on the 2nd leve in Sketchup:


Inside the terminal on the 2nd level.jpg


I'm showing this image because the area above the windows are the textures being flipped. In Sketcup, this is the way it looks and the textures are not flipped. They flip only after being imported into MCX.



The image below shows the textures being flipped after importing into MCX:


Inside terminal in MCX.jpg



This image is inside MCX and as you can see, the textures are flipped, and they represent the textures shown on the outside of the terminal. See below:



Image 1.5.jpg


This image shows the texture that was flipped to the inside of the terminal. I'm not suggesting that MCX caused this because I got about 50 or more warning items that came up after exporting from MCX, which I'll explain below.



Regarding the Z fighting, here are some images:

Image 6.jpg



Image 8_FSX.jpg
Image 9_FSX.jpg


Some of the Z fighting is worse when I'm farther away from the object. Even the jetway has Z fighting:


Image 5.jpg



All these things are also occurring in the sim, which is FSX. None of these things are occurring in Sketchup but they occur after being imported into MCX and exported from MCX into FSX. I don't understand why these things are not showing up in Sketchup where I could have corrected them, and yet they show up in MCX and FSX. When I export the model in MCX, I'm using the Convert and Place Object Wizard. The thing I need to mention is that when I export the model from MCX, I have about 30, or maybe 50 warnings indicating problems that I must have made in Sketchup. But Sketchup did not indicate any problems and everything looked fine. I would post the problems here but I don't know if MCX keeps a log or where they would be located. The warnings are something like:

9:03 PM XtoMDL Warning warning : Degenerate poly detected in file (C:\Users\Admin\Desktop\KBHM Terminal 1986 Project\Exported Projects From Sketchup\From MCX\scenery\ye03q254.x) mesh (Part1)
9:03 PM XtoMDL Warning warning : Face vertex 0 x=171.1042 y=-21.79193 z=4.572, and there are a bunch of these.

I've tried zipping and attaching my Sketchup project but the file was too large. The only thing I know to do is to upload my file to Media Fire. Just let me know and I'll upload it and post the link here. I have done a lot of searching and watched youtube videos but none of them gave me any solutions. And the manual does not explain what these terms mean and how to fix them.

Ken.
 
Last edited:

=rk=

Resource contributor
Messages
4,497
Country
us-washington
There is a very simple solution. In Sketchup, go to "View>Face Style>Monochrome," currently your view is "Shaded with Textures." In monochrome view, make sure all the visible polygons are white. Make note of any blue ones, those are the ones with the "flipped textures" and when you are back in Shaded with Textures view, you'll want to flip those, but also copy the textures from the inside faces, to the outside ones, you cannot work with textures in monochrome view. Matched faces especially matter in FSX, they shade and reflect differently. Any untextured face is invisible in FSX, but backside ones are easy to miss and you are working with visible interior geometry, which presumably you have not surrounded with outside faces, as some modellers do. This is the reason, by the way, that many FSX airplane windshields are "double pane," because both sets of faces point "outward."

It is a good idea to keep track of face alignment, because Sketchup is fairly arbitrary about setting faces in some instances. Here is an example of a model with mixed exterior faces.

413e88f6484f01d56a3518d3b4e8b00e631999c8.png
 
Messages
946
There is a very simple solution. In Sketchup, go to "View>Face Style>Monochrome," currently your view is "Shaded with Textures." In monochrome view, make sure all the visible polygons are white. Make note of any blue ones, those are the ones with the "flipped textures" and when you are back in Shaded with Textures view, you'll want to flip those, but also copy the textures from the inside faces, to the outside ones, you cannot work with textures in monochrome view. Matched faces especially matter in FSX, they shade and reflect differently. Any untextured face is invisible in FSX, but backside ones are easy to miss and you are working with visible interior geometry, which presumably you have not surrounded with outside faces, as some modellers do. This is the reason, by the way, that many FSX airplane windshields are "double pane," because both sets of faces point "outward."

It is a good idea to keep track of face alignment, because Sketchup is fairly arbitrary about setting faces in some instances. Here is an example of a model with mixed exterior faces.

413e88f6484f01d56a3518d3b4e8b00e631999c8.png


Hi Rick,

Thanks for your help but the image shown in Sketchup that I was referring to in MCX has not been flipped. I turned on the monochrome and everything is correct. See the image below:


Monochrome Turned On.jpg



The image above the windows are highlighted, and they're in blue, which is correct. If I were to flip these faces, the outside texture image would be on the inside and the blue would be on the outside. In MCX, the problem is that the outside texture image is being shown on both sides of the face, making the outside texture image appear on both outside and inside. The outside texture is correct so the inside should be blue. But in MCX, both sides of the faces show the texture that is on the outside. If there were no texture, the inside should be blue and the outside should be white. There were a few other faces that have been flipped but they were not causing any problems in MCX. But I did flipped them back to white as you said.

Ken.
 
Last edited:
Messages
7,450
Country
us-illinois
Hi Ken:

It would be best to post a link to your Sketchup project exported as a *.KMZ inside a ZIP file on MediaFire.

GaryGB
 

=rk=

Resource contributor
Messages
4,497
Country
us-washington
Hi Rick,

Thanks for your help but the image shown in Sketchup that I was referring to in MCX has not been flipped. I turned on the monochrome and everything is correct. See the image below
Yes, it looks like you got it right, assuming the white polygons are a built up interior, "outward" facing polys, then yes, Gary is probably right. Flipped faces is a perfect explanation for what you're experiencing and I can't think of anything else that has caused this for me with MCX.
 
Messages
946
Yes, it looks like you got it right, assuming the white polygons are a built up interior, "outward" facing polys, then yes, Gary is probably right. Flipped faces is a perfect explanation for what you're experiencing and I can't think of anything else that has caused this for me with MCX.

What I should have done was to extrude the faces towards the inside so that they're not just one thin face but also have a texture on the inside as well as the texture on the outside and the outside texture not show up on the inside. I also want to find out why there is so much Z-fighting in both MCX and FSX. Another thing I should mention is that I also noticed that the ground texture used to place my project is compressed, and I don't know how I did that. I didn't think about it when I uploaded my file to Media Fire but the file I linked above does not contain the ground texture and I guess I should have included that.

Ken.
 

rhumbaflappy

Administrator
Staff member
Resource contributor
Messages
5,949
Country
us-wisconsin
Hi Ken. I found this video for a plugin for sketchup that might help.
 

=rk=

Resource contributor
Messages
4,497
Country
us-washington
First off, I'd like to I observe your efficient a way to share model files, as Google .kmz that both MCX and Sketchup import effortlessly along with their embedded textures, I'll have to borrow that trick. Now I show the "fresco" type texture on both sides of the model, so it is on the outside as intended, as well as inside as unintended and the image below tried to show both sides of that rotunda. Is the problem just that it it inside, or are we seeing different things?


both sides.png


Also, I have absolutely no Z flash here, your image looks like you have distinct coplanar faces. Is there a possibility the uploaded model does not have those coplanar faces?
z steadiness.png


By the way, those condensers look really great. Do you think I could use them sometime in the future, if I gave you proper credit? Totally understand if you say no and I won't even press it, if you don't actually mention it, I won't use them at all.

Hi Ken. I found this video for a plugin for sketchup that might help.

This one will be great for me because as you can see, I'm always trying to leverage OPM (other people's models).

😝
 
Messages
7,450
Country
us-illinois
Hi Ken:

I agree that the Didier Bur (aka "dbur") Sketchup plugin Ruby Script cited above would be one of the best to quickly fix the greater number of reversed Face issues within your 3D model

However, some "gotcha's" apply here.

Notice that Mar 5, 2023's MCX shows flickering of a white Face bleeding through the interior of the inner circular area.

kbhm-terminal-1986-3-13-2023_test_kmz_flickering-mcx-jpg.87167



That same view in Sketchup 2017 does not show the flickering, but if Camera is set to Perspective Mode, Camera Focal Length is set to 12mm, and you inspect the interior Faces of the walls immediately inside the Face of the inner circle area, you will see that a White Face is somehow bleeding through to the top of the Face of that inner circle, as described above.

Normally one might see this if (2) adjacent parts of a 3D model were grouped into separate groups.

In Google Earth's 3D model, IRL, the inner wall is ~1 Foot thick, so "adjacent" Faces cited above, are only 1 Foot apart for that part of the 3D model.

Typically, one might eliminate such flickering / bleed-through simply by exploding those adjacent 'groups' so all content is in the same 'group' and/or in the root "Layer-0" of the Sketchup workplace.

But, curiously, I see no such issue involving 'grouping' of those (close ?) adjacent parts. o_O

This brings to mind the inverse of a 3D app "camera clipping plane effect".

I wonder if it may have to do with how MCX' 3D preview is interpreting and rendering this 3D model's nodes ? :scratchch

kbhm-terminal-1986-3-13-2023_test_kmz_flickering-sketchup-2017-make-jpg.87168


So, due to how the 3D model is structured with multiple Faces behind Faces, you may need to revise certain Faces that are to be textured, and decide which are to Face outwards versus inwards.

GaryGB
 

Attachments

  • KBHM Terminal 1986 3-13-2023_Test_kmz_Flickering-MCX.jpg
    KBHM Terminal 1986 3-13-2023_Test_kmz_Flickering-MCX.jpg
    305.6 KB · Views: 242
  • KBHM Terminal 1986 3-13-2023_Test_kmz_Flickering-Sketchup-2017-Make.jpg
    KBHM Terminal 1986 3-13-2023_Test_kmz_Flickering-Sketchup-2017-Make.jpg
    116.5 KB · Views: 236
Last edited:
Messages
946
Hi Ken. I found this video for a plugin for sketchup that might help.

Thanks Dick. I never thought that face orintations were that important. But most of the time when I draw my faces in Sketchup, I always face the white side towards the camera.

Ken.
 

=rk=

Resource contributor
Messages
4,497
Country
us-washington
I found the "coplanar texture" in MCX.

found.png


However, in Sketchup, it is not two polygons in coplanar arrangement, it is one polygon that is textured on both sides.

Backside Texture.png


This flashing might be a new way MCX renders back side texturing.
 
Messages
7,450
Country
us-illinois
I found the "coplanar texture" in MCX.

View attachment 87169

However, in Sketchup, it is not two polygons in coplanar arrangement, it is one polygon that is textured on both sides.

View attachment 87170

This flashing might be a new way MCX renders back side texturing.

Indeed, I had tested importing the *.KMZ into Sketchup 2017 Make by toggling [Options] > "Merge Coplanar Faces" On/Off.

The result was the same (aside from 'not' merging Coplanar Faces having resulted in a lot of Triangulated Faces)

Upon viewing the proximity of the opposing Faces of the (2) wall interiors, and the white Face of the opposing wall at a (small) distance underlying the circle Face area, it seemed as though a bleed-through was occurring from that opposing inner wall Face that was being seen as flickering ...from outside the circle area Face.

AFAIK, this may have occurred during revisions to the circular walls of this building, which I suspect may have been the basis for Ken's recent prior thread:

https://www.fsdeveloper.com/forum/threads/changing-the-number-of-segments.456802/


IIRC, Arno recently did some work on MCX having to do with how double sided Faces are interpreted / rendered.

I wonder if the default "genuine" 2-sided Faces created by Sketchup for all Face 'planes' (unlike 3DSMAX / GMAX which requires manually creating the back Face) ...may now be subject to greater visibility as a discrete Face in MCX 3D preview that flickers as it bleed-through depending on its Face Normal orientation and/or proximity to an adjacent Face with a different Face normal orientation ? :scratchch

However, I'm not sure I understand how / why a Face that is NOT grouped separately, and is at the same layer level as the outside circle Face, but is in a different node of the 3D model ...ends up bleeding through from that distance away if it does actually have reversed normals. :oops:

This suggests that MCX is rendering things at deeper depths within a multi-(sur-)Face 3D model based on a greater 3D Z-sorted "depth of field".:yikes:

GaryGB
 
Last edited:
Messages
946
Hi,

I just figured out something here. Regarding the textures on the outside of the terminal that are showing up inside the terminal, I'm not really sure if they were actually flipped. In my original project Sketchup file, these textures are not showing up inside the terminal. See the image below:

Correct Image From Inside Sketchup.jpg




Now, notice what happens to those textures when I export my original project file as a kmz file and import that kmz file into Sketchup:

From kmz File.jpg




Now, the outside textures are on both the outside and inside. So, Sketchup seems to be where the problem is originating. I don't see anything in the original model that could have caused this. So, when all of you import this kmz file into Sketchup, the outside textures are going to show up on the inside as well as on the outside. The outside textures did not show up on the inside in my original project file, as my photo shows. So now I know the problem originated here in Sketchup and I don't understand why it exported them that way when it did not look that way in my original project file.

Ken.
 
Messages
946
First off, I'd like to I observe your efficient a way to share model files, as Google .kmz that both MCX and Sketchup import effortlessly along with their embedded textures, I'll have to borrow that trick. Now I show the "fresco" type texture on both sides of the model, so it is on the outside as intended, as well as inside as unintended and the image below tried to show both sides of that rotunda. Is the problem just that it it inside, or are we seeing different things?

See my thread below. Yes, you will see that texture on both sides of the face in this kmz file. It showed up the same way when I imported this kmz file into Sketchup. But my original project file does not show that outside texture on the inside, and that's what's strange about it.


View attachment 87165

Also, I have absolutely no Z flash here, your image looks like you have distinct coplanar faces. Is there a possibility the uploaded model does not have those coplanar faces?
View attachment 87166

By the way, those condensers look really great. Do you think I could use them sometime in the future, if I gave you proper credit? Totally understand if you say no and I won't even press it, if you don't actually mention it, I won't use them at all.



This one will be great for me because as you can see, I'm always trying to leverage OPM (other people's models).

I'm not really sure because I got some of these texture from google earth in 3D mode. You can go to google earth, turn on 3D mode grab the side of the units that looked the best and applied them to your model. The top circular parts of the units do not look good at all and are all jagged. Just draw a circle, extruded it to the correct height, and applied the colors that matched. Draw 6 rings using the Move Tool for the blueish color and 6 rings for the black ones, and they'll look much better than the lidar on google earth. For the most part, this area of the parking deck are images from google earth and I'm not sure if there would be copywrite issues.

Ken.
 
Last edited:
Messages
7,450
Country
us-illinois
Hi Ken:

When 'interior' Faces end up textured, it is usually a sign that we goofed when applying textures, and accidentally applied a texture to the outside of a group, rather than applying textures to individual Faces within a group.

These can be maddeningly challenging to get rid of when we do this (I've been there / done that), and typically fixing it requires a bit of manual labor sampling a default white Face texture with the Materials Tool, and applying it to the outside surfaces that should not be textured, to restore "normalcy" to the object Faces within that group.

Some times the workload can be reduced by using this plugin Ruby script:


A good way to avoid this is to draw outlines of all building walls on the ground plane, then extrude resulting Faces with the Push/Pull Tool.

That way we end up with properly oriented Faces, and a "Manifold Solid" that is more likely to cast proper FS shadows.

Along that same line of thinking, you really would benefit from no longer removing the bottoms of buildings. ;)

You may wish to just try "hiding" those bottoms, and then 'locking' them. :idea:

GaryGB
 
Last edited:

=rk=

Resource contributor
Messages
4,497
Country
us-washington
My suggestion is that the problem is not necessarily Sketchup, per se, but maybe .kmz is not the best file transfer format after all. It is my guess that that format does not allow untextured faces, or backside faces, so whatever is on one side, goes to the other. It seems like every model I'd ever downloaded in the old 3d layer days was always textured on the inside, it might be your culprit if you are using that format to transfer to MCX. Just an idea and it's easy enough to check, if you want. The format I like to use is Collada, I know Bill likes .obj.
 
Messages
7,450
Country
us-illinois
*.KMZ distributes a numeric version-independent Sketchup 3D model with mapped textures as a Collada *.DAE and *.KML Geo-location in a ZIP.

By re-naming a *.KMZ to a *.ZIP, one can extract the contents as is done with a normal ZIP file.


Compared to Google Earth *.KMZ, there is more control in [Options] for a basic Collada *.DAE and/or *.OBJ using Sketchup exporters.

And, IIRC, there should be no issues of a *.KMZ -packaged Collada *.DAE not allowing 2-sided Faces unless toggled off in a custom Exporter.


It certainly may merit testing by Ken to see if the *.OBJ format has more fidelity to an original 3D model ...as described here:

Hi Ken:

Assuming you refer to Aerilius' ColladaWithTextureNames_v1.2b

https://sketchucation.com/forums/viewtopic.php?f=323&t=40397


...AFAIK, until Arno adds a Sketchup a *.SKP import / export feature in MCX, we need to repeatedly re-name Materials.


After further testing, I now recommend instead that you try the following procedure:


Modify some 'default' MCX Options to these settings:

MCX Menu > Options > Exporter Settings > XWriter:

DrawCallBatching = False


MCX Menu > Options > Object Model Settings > Optimize:

CollapseAttachedObjects = False

CollapseModelParts = False

CollapseNodes = False

MergeDuplicateChildren = False

RemoveEmptyNodes = False



Export the 3D model from MCX as a Wavefront OBJ ( *.obj ) file.


In Sketchup, import that sfondo_kdfw_sett07.OBJ file via a different plugin Ruby script:


TIG's Import OBJ with Materials v2.2



Open the sfondo_kdfw_sett07.OBJ.mtl file also output by MCX in NotePad or other text editor

Use that ASCII text info as a guide for re-naming Materials in Sketchup


Note: These procedures are based on objects in the demo / trial version of FSDT KDFW ...intended for use in FSX. :pushpin:

Dallas-Fort Worth for FSX and FS9

https://www.fsdreamteam.com/products_kdfw.html


I cannot predict what your results will be if you attempt output of native P3D MDLs for use as SimObjects via P3D SDK. :alert:


You may also wish to consider whether FSDT would regard it as OK to 'port' FSDT KDFW edits to P3D ...rather than FSX:

http://www.fsdreamteam.com/forum/index.php?action=printpage;topic=17183.0



The *.OBJ 3D file format imported to Sketchup will result in (4) Faces mapped with texture Materials super-imposed over the FSDT C32 ground markings (which must be put on layers to temporarily disable display to do edits.)


Adjust your work-flow in Sketchup with a number of "Put On Layer" steps, according to the number of texture Materials super-imposed over FSDT C32 ground markings after import of the fondo_kdfw_sett07.OBJ output by MCX.


In Sketchup, after finished with all desired edits, re-enable all layers to display the texture Materials super-imposed over FSDT C32 ground markings (...now edited to ex: C39)


Export that 3D model via yet another plugin Ruby script:


TIG's OBJ Exporter v3.0


[EDITED]

Re-import that *.OBJ 3D file into MCX by following this sequential work-flow, initially using TIG's Import OBJ with Materials v2.2 via:

1.) Sketchup Menu > Extensions > OBJ Importer > Import OBJ [with Textures ]

a.) (...Sketchup Dialog Opens) > OBJ Importer Units: Meters > [OK]

b.) (...'Processing [?????] of [?????] Lines' appears on status bar at bottom of work-space)

c.) (...Sketchup Dialog Opens) Flip OBJ YX Axes ? > click: [No] button

d.) Move / Position imported 3D Model at (0,0,0) coordinate Origin of Axes on ground plane

NOTE: You should now see this:

fsdt-kdfw-c32-ground-markings-mcx_obj_export_sketchup_import_via_tig_obj_import_with_textures-jpg.54807



2.) Perform desired edits as described above, and save to a temporary 'work' *.SKP file


3.) Export the edited temporary 'work' *.SKP file from Sketchup using TIG's OBJ Exporter

a.) Sketchup Menu > File > OBJexporter

b.) (Sketchup Dialog Opens) > OBJexporter: Convert ALL Texture Files to PNG ? > click: [No] button

c.) (...OBJexporter progress appears on status bar at bottom of work-space)

[END_EDIT]


Open sfondo_kdfw_sett07.OBJ.mtl file also output via Sketchup by TIG's OBJ Exporter in NotePad / other text editor

Use that ASCII text info as a guide for re-naming Materials in MCX


In MCX, restore the Material Templates to the imported 3D model


In MCX, verify all mapped texture Material names match the original texture Material names of FSDT sfondo_kdfw_sett07.MDL when those MCX Material Templates were created.


In MCX, if your payware version of sfondo_kdfw_sett07.MDL has ModelParts with animations, restore them as well.


Perhaps Tom might know how to help you restore any original animations to sfondo_kdfw_sett07.MDL ? ;)


Hope this helps with your learning process. :)


GaryGB

PS: Note in the above, I recommended use of *.OBJ for greater fidelity than was achieved (at that time) via MCX' Collada*.DAE I/O processing.

To achieve that greater fidelity, I specified the use of:

TIG's OBJ Exporter

TIG's Import OBJ with Materials

...and:

MCX with pre-configuration of certain Options

GaryGB
 
Last edited:
Messages
946
Hi Ken:

When 'interior' Faces end up textured, it is usually a sign that we goofed when applying textures, and accidentally applied a texture to the outside of a group, rather than applying textures to individual Faces within a group.

That's what I usually do but I have sometimes caught myself texturing outside the group. As a matter of fact, that's what I did with those jetways. So, I textured all faces inside the group white and also textured it white on the outside of the group. But I'm still getting Z fighting. It's especially when it's viewed from the runway. But when you get closer, the Z fighting seems to disappear.

Ken.
 
Top