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

MSFS glTF support for ModelConverterX

Status
Not open for further replies.
if you're using Sketchup, (not sure about the others), to avoid the tearing, you must make each texture face a "make unique texture" this will stop it from tearing ,but afaik its only this way in MSFS, never had a problem in the other sims.
some smaller textures are ok to be left, as long ( I think) as they're not tiled, but from what i can see out of this, every texture that i have that's tiled, is tearing.
to the point where everything, down to doors, all should be made into a unique texture.....at the cost of having 10 times more textures in the scene...which is what I've always tried to avoid.
 
Hi,

I checked the resolution of the float 16, but I am afraid that if we tile the texture a few times we already loose quite some resolution. As a result of that the texture mapping might shift a few pixels due to the reduced resolution. I'm quite sure that causes the tearing effect you see.

So I guess the best solution would be to be careful when you use tiling on an object.
 
OK thanks Arno. The tiling explains how adding model segments helped fix some issues for me. There are still some single tile images that are distorting and maybe further segmenting will help or "make unique texture" will fix as above.
Oh well looks like I am up for a lot of rework , the more I go looking the more I find - and the nature of corrugated iron etc in many of our buildings just magnifies the issue...

Rob

This example the corrugated iron texture was remapped and fixed several things although is still slightly distorted

MSFSissuetextures.png


Below I have segmented up the roofs which fixed them but still have the joins to deal with. (also notice the gravel/grass distortions at bottom left)

MSFSissuesRoof.png



And this one below puts a double meaning to tiling :)
MSFSissuestiles.png
 
Last edited:
Hello:

IIUC, the latter example scenarios of UV mapping anomalies both involve Sketchup 3D model output that uses self-tiling texture 'image' Materials and not Sketchup "colors".


I believe that in both of the latter cases above, it may prove helpful to know: :scratchch


* What 3D file format was used to output the Sketchup project files for original import to MCX: ?

(ex: Collada *.DAE or Google Earth format *.KMZ vs. *.OBJ or other 3D file format via Sketchup Ruby plugin script)


* Was the 3D model Materials "optimized" by MCX' "Draw Call Batching" feature ?

* Was the 3D model then compiled into a MDL by MCX using FSX / P3D SDK XtoMDL ...before it was re-imported to MCX ?

* Was the 3D model showing UV mapping anomalies re-imported into MCX from the MDL format after it was compiled into a MDL by MCX using FSX / P3D SDK XtoMDL,

(...rather than directly imported from a 3D file format) ?


Regarding loss of "resolution" if self-tiling is used in Sketchup 3D models imported to MCX ...as alluded to by Arno:

* Does this refer to UV mapping coordinate precision or pixels/Meter of the self-tiling texture 'image' Materials ? :scratchch


Thanks in advance for any replies to these questions, which AFAIK, may assist in troubleshooting / optimizing work-flow for use of Sketchup via MCX ...for MSFS output. :)


GaryGB
 
Hi Gary,

I don't fully understand what you want to know. The issue seems to be that MSFS has reduced resolution when the texture coordinates are outside of the 0 to 1 range. This means that any tiling of the texture can be an issue. This is not related to sketchup only.
 
gary, arno.
Thanks for your help in this one. First.
I do believe that any tiling in this new sim must be kept minimal or not at all. Unique textures in sketchup, being the most basic, still i would think should hold true for all platforms. Thats a guess.
Time should clarify everything. Updates too.
I fuxed a broken in game editor yesterday by simply replacing the files in the steam folder
Lucky for me, i made a copy of my steam folder when msfs first installed. Was hoping for a sdk update.......
Thanks guys.
 
Gary - thanks for the suggestions. My workflow is Sketchup export Collada DAE into MCX. Then apply MSFS material properties and export glTF. I can re-import those glTF back into MCX and there are no UV issues. (I'm not up on Draw Call batching ). Never has any of these issues with P3D. And yes all the material are custom images. Have tried some other mdl exports/imports but have never had a problem with MCX. The trouble starts when complied in the SIM.

None of the distorted images above involved tiling - they all involve a collection of faces that are all within a single texture tile.
I've certainly identified self tiling problems and have fixed those by adding more geometry in the model .

Arno - any ideas what might be causing distortion within a tile ?
I'm comparing normal areas with distorted areas looking for clues.
In the shot below , the top 3/4 of the pathway looks generally OK . The same texture , same method , same modelling was used for the bottom section buts it widely distorted?

Maybe there are some bad habits I've doing in Sketch Up that never caused an issue in P3dV3-5 and are now coming home to roost in MSFS?
Will keep trying to look for differences in normal/abnormal areas I guess...

I "repaired" some bollard posts today by re-applying yellow texture to the posts which worked fine on the body of the post , but the black markings on a small section at turned into another random variation when compiled in the SIM.

Rob

MSFSissuetileswhole.jpg
 
You are still talking about tiles - are you using any tiling on the model or not? If not, they are not called tiles, it's just texture mapping. In these models, does every mapping process stay within the bounds of the object - i.e. there is no wrapping involved at all? I am not talking about individual polygons, I am talking about the entire model.
 
Are the white lines geometry or part of the texture? It looks to me that you have a UV mapping problem vs the geometry because I can see bleed on the edges.
 
Tom - you are correct its down to texture mapping issues now, as Arno has identified the actual tiling issues getting to this point. I don't believe there is any wrapping if I'm understanding correctly.
Paul - the white lines are part of the texture - which is actually ceramic tiles 400mmx400mm. I was trying to avoid the mention of the words "ceramic tiles" (!) in the texture but that what it is , and it at least provides a convenient grid in which to view the distortion.

Am finding that texture resetting and remapping in Sketchup is fixing many issues , but in this example and others, I've remapped several times to no avail.

It might help if I provide more information below:

EDIT 5th October 2020 : RESOLVED : the texture tearing examples below were resolved by building new clean geometry and re-texturing - I suspect there may have been fine untidy model geometry that was acceptable for P3D but not for MSFS.
Other more subtle texture distortions were fixed by purely re-texturing (still a mystery why).

More info for those interested:
The tearing examples below were occurring on the diagonal lines of the quads. I started manually adding diagonals to triangulate the quad faces, mostly (but not all) on the opposite diagonal as the tearing. (Sketchup export option , triangulate faces didn't help as each quad needed its own specific diagonal to work...). I fixed 90% this way by trial and error and the last 10% the tearing just changed as I changed the diagonal. Even then all faces has a slight offset in one of the U.V.
Worse still I started seeing some dynamics occurring where , as one face was fixed , the adjacent one broke...
After hitting this random state of diminishing returns I tried to reproduce the problem in a clean parallel build of this problem area within the model - and to my delight discovered it worked perfectly.

At least MSFS allows glTF model changes to be viewed in real time (not counting the modelling tool export/imports times of course). glTF Model changes can be dropped into "My Projects" and within a second or so appear in the SIM using the scenery editor.


END of EDIT


Below is the relevant part of the texture:
MSFSTexture.png







Below is the sketchup model view:
MSFSSketchup.png




Below is the MCX view
MSFSMCX.png





Below is P3DV5

MSFSP3DV5.png




And below is MSFS - the model is riddled with these sorts of issues
MSFS.png
 
Last edited:
I've been having UV mapping (?) issues converting P3D V4/5 models into glTF for MSFS. The MCX preview is 100% correct but in the SIM most of the large surfaces (not all) along building sides are fine although finer objects have various combinations of distorted textures ala UV mapping distortions. There doesn't seems to be a pattern. Some textures seem to be rotated at right angles i.e. instead of aligning longitudinally along a light pole or steel beam - they are at 90 degrees/sideways. Where two arched roofs with a corrugated texture meet at right angles , there are various different angles of corrugated iron near the joins. Some other textures appear to be flipped. In some instances the textures seem distorted in a curved pattern in small areas?

Have discovered a fix by going back into the Sketchup model , resetting the textures and repositioning. Also , in the case of a long corrugated iron roof over a walkway , segmenting the model up into smaller segments.

Prefer not to rework the model as above, and given the model displays perfectly in MCX, are there some checks/steps I could do when before exporting?

Have just downloaded the latest MCX and used the "MSFS glTF" export for the first time but that did not help

Rob.

if you're using Sketchup, (not sure about the others), to avoid the tearing, you must make each texture face a "make unique texture" this will stop it from tearing ,but afaik its only this way in MSFS, never had a problem in the other sims.
some smaller textures are ok to be left, as long ( I think) as they're not tiled, but from what i can see out of this, every texture that i have that's tiled, is tearing.
to the point where everything, down to doors, all should be made into a unique texture.....at the cost of having 10 times more textures in the scene...which is what I've always tried to avoid.

Hello:

A Sketchup plugin Ruby script by Aerilius called "Make Unique Texture++" may help by writing out a re-mapped texture material as a separate and discrete image which contains the baked-in "distortions" (aka "stretching"). :idea:

https://www.google.com/search?source=hp&ei=fo0WW-auFqeD5wKB9JfoBg&q=site:www.fsdeveloper.com+GaryGB+Aerilius+Unique+texture&oq=site:www.fsdeveloper.com+GaryGB+Aerilius+Unique+texture&gs_l=psy-ab.3...2165.27049.0.27346.39.37.2.0.0.0.157.3239.31j4.35.0....0...1c.1.64.psy-ab..2.4.449...0j0i131k1.0.FtqBwtnPkvs

Once created, those Faces can also be merged with others in the same geometric surface plane via Sketchup's

GaryGB

It is important to utilize "ImageMagick" in conjunction with the above plugin rather than Sketchup's default graphics engine ...to maintain original texture image quality. :alert:





AFAIK, one degrades original texture image quality with each graphical image edit / save by use of *.JPG (the default file format used 'internally' by Sketchup).

IIUC, technically there are ways to force mapped *.JPG texture image Materials into a non-lossy mode when editing via some graphics applications, however, I would advise against using the JPEG file format entirely.

Also, I would advise only using Alpha channels for transparency, rather than attempting to use "Color Key" coded transparency in *PNG files.


I use *TIF with loss-less LZW compression for all texture image Materials in Sketchup.


BTW: Sketchup 2017 has broken the "Combine Textures" feature for vertical Faces, so I recommend using a different version for that particular task. ;)


PS: You may wish to use *.OBJ 3D file format for I/O to/from Sketchup / MCX via TIG's plugins for OBJ Import/Export to maintain multi-texture image Material UVW maps: :pushpin:

https://www.fsdeveloper.com/forum/t...ngs-using-sketchup-and-mcx.446617/post-835965

[EDITED]

NOTE: That thread linked above deals specifically with 3D models in the form of sloped G-Polys, and involves:

* Configuring MCX to maintain original 3D model multi-texture image Material UVW map "layers" intact

* Import to MCX of a MDL from a FSX / P3D BGL

* Export from MCX in *.OBJ 3D format

* Import to Sketchup from a MCX-output *.OBJ 3D format

* Editing in Sketchup, (1) "layer" of several overlapping layers of multi-texture image Material UVW maps

* Export of edited 3D model from Sketchup in *.OBJ format

* Import to MCX of a 3D model from Sketchup in *.OBJ format

* Export by MCX of a 3D model as a SDK XtoMDL / SDK BGLComp -compiled, G-Poly scenery object


I have not yet tested if MCX' 'Options' configuration parameter values also need to be set for glTF output. :scratchch

[END_EDIT]

GaryGB
 
Last edited:
Thanks Gary - some more leads to help troubleshoot.
I'm just perplexed that this model, with it 2600 faces in SU and 190K triangles does not miss a beat in P3D V4/5 , and has so many broken textures in MSFS.
Its certainly worth the troubleshooting as the rework is huge.
Will post back if I find a smoking gun or two as you would think this is not an isolated instance.
 
Hey Arno, I think I've found a bug in MCX.

I can convert to glTF fine from 3DS, but then if I try and take the glTF and say move the z axis up or down, and re-export, I get weird shading issues.

So:

3DS -> glTF = OK
glTF -> glTF = Texturing

I've just been able to replicate it a few times and not sure what it has been doing.

Here's what happens with the shading/texturing glTF to glTF
20201001162338_1.jpg

Fixed by going 3DS straight to glTF
20201001220737_1.jpg

The reason I was having to do this was because I needed to use MCX to set the boat draft in the water and optimize textures for draw calls in MCX, so my process was 3DS -> MCX for Texture Conversion and Optimization -> Test in Sim -> open glTF again, set draught (example -0.5), and then it would go all shady dark.

Also when exporting the glTF it doesn't seem to be writing the XML code for the GUID anymore (although I'm using a different process I think), and also when loading glTF back into MCX it's not reading the GUID from the XML side car. For it to read and write that would save tons of time. I worked on the dev version to write out but not read so the GUID's would change (I'll have to look up which version number it was)

I'm still also needing to manually flip textures vertically even if I convert to PNG first, and when reading in the glTF models into MCX they are showing up inverted on that side.
 
Hi,

I'll try to reproduce this.

Are you exporting as MSFS glTF? I have recently added plain glTF without MSFS specific extensions as well. That last one doesn't write the xml file, even when the option is set to true.

I'll double check for reading the glTF, it should process the xml file if it's there.
 
I had been using the earlier version from about Sep 13, it says 1.5.0.0 in the properties, but updated to the most recent build today.

I'll have a look again tomorrow at the glTF as I need to re-build all the models again or at least turn crash modeling on. I'll double check some of my info may be out of date ;)
 
All development releases are version 1.5, so you always need to check the build date that's shown on the title bar as well.
 
Hi,

There was a bug with the normal indeed, it's fix in the next development release. And I have also implemented the feature to read the Guid from the XML file.
 
Using the drawcall minimizing feature, it gives the option to use texture sheets larger than the usual 4096 sheets, I'm wondering if MSFS can use sheets larger than this, given that the option is available, and if so - what would be the advantage or disadvantage of using the largest possible? seems like it would be better - if the sim will use them...?
 
Status
Not open for further replies.
Back
Top