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

Misaligned Textures

Messages
38
Country
us-newjersey
Hello,

Sorry for all the questions here lately - I've been having trouble making a texture from material editor align properly. When the texture is displayed in SketchUp and MCX, the textures look aligned. When I load the converted bgl into the sim, one texture (the middle section in the front of the building) does not align correctly.

Misaligned texture in the sim: http://prntscr.com/7fylsi
Build shown correctly in MCX : http://prntscr.com/7fymu4

The middle section of the front is it's own texture and is not tiled, and the side textures are tiled. All textures are a power of 2 and no errors show up in the conversion in MCX.

Is there a reason why it does this?

Thanks everyone for your continuous help!
 
Start by re-importing the resulting BGL in MCX, does the texture mapping appear incorrect there? Does this happen with other objects as well, or is it just with this building?
 
Hello, thank you for the quick reply. I have imported the best file to MCX, and the texture mapping does appear to be incorrect. I have not seen this problem in other objects but I have only made one other object which is not a building so far .
 
I recommend you take some default buildings and hangars and run them through MCX to see how they're put together. They are really quite simple, basically a box with an image of each side projected onto the corresponding face. To me, it looks like you have taken a pattern texture, the corrugated hangar skin and matched it with a projected texture, the windows and doors. If that is the case, would you agree that it is more complicated than a single projected texture? Further, looking closely in the MCX image, it appears that you have modified the UV mapping for a portion of the pattern texture, to me it appears that the ribbing in the center section of the building is more closely spaced than so for the two outer sections; while in the sim image the ribbing looks evenly spaced throughout, effectively stretching it in the center section, while the holes where the windows might be are also stretched.

SketchUp was not designed for FSX and has capacities beyond those of FSX for rendering 3d models. FSX can't support multiple UV mappings for a texture - if you shape or distort a texture to fit a surface, you must use that same distortion in the entire model or create a new texture and draw call that has that distortion. SU does support multiple mappings and apparently MCX does as well. If you have created a unique texture for the distorted area, then you need to make sure MCX points to it in the Material Editor.
 
Hello:

'Aerilius' created a few plugin Ruby scripts to help deal with this type of scenario, yielding results that exceed Sketchup's own default quality / abilities:

Make Unique Texture ++

http://sketchucation.com/forums/viewtopic.php?p=367210#p367210


Export Collada with texture names - (1.2b) [30/9/11]

http://sketchucation.com/forums/viewtopic.php?p=357446#p357446


Texture Resizer - (1.5.6) — updated 15.05.2013

http://sketchucation.com/forums/viewtopic.php?t=40720


Snapshot – (1.0.1) — updated 09.10.2012

http://sketchucation.com/forums/viewtopic.php?p=432689#p432689


Hope this helps ! :)

GaryGB

 
Last edited:
Thank you guys for your help! I've installed the plugins but not sure if I've put them in the right place - I've imported the .rbz files within Sketchup. but where do I import the .rb files?
And what exactly do I do after installing them?
 
Thank you guys for your help! I've installed the plugins but not sure if I've put them in the right place - I've imported the .rbz files within Sketchup. but where do I import the .rb files?
And what exactly do I do after installing them?

Once the *.RBZ file is installed, one need not install further files; the *.RB file is from the era before an *.RBZ install option was available in Sketchup. ;)


On a practical basis, it may be that you have "co-planar" faces which were tolerated and retained in the MDL when imported by ModelConverterX (aka "MCX"). MSFS has difficulty sorting out draw order and texture display when objects are co-planar and at closer layering proximity distances.

FYI: Sketchup can create textured or un-textured faces as thin as 1/200th of an inch (and the "inch" is the default internal unit of Sketchup, BTW.)


By backing up a bit as =rk= suggested, we might troubleshoot what happened, and even end up with an easier workflow to create the geometry for the building with properly mapped textures.


The first question which comes to my mind is:

* do you have a 'seamless tile-able" texture which you would consider acceptable to use on the "front" of the building ?

If so, then applying that texture "material" will be easier to do once the texture is initially positioned / sized / anchored at the lower left hand corner of the building face with the Red pin ...in "Fixed Pins" Texture > Position mode.

After 'approximately' projected in "Fixed Pins" mode, one may fine-tune texture "material" mapping with any pin color as needed ...via "non-Fixed Pins" Texture > Position mode.


That being done, we would consider the material as being not just "Mapped", but now also as being properly "projected" for use on that face (...and any adjacent sub-sections of that face which are aligned within the same exact flat plane of that face).


If instead you have a photo which was taken at an angle to the front face of the building, more work would be required to use that image with satisfactory uniformity of sizing / spacing within the ribs of the metal cladding via multiple individually projected segments on the building face.


And if you have a photo which was taken more directly on axis to the front face of the building, minimal work would be required to use that image with satisfactory uniformity of sizing / spacing within the ribs of the metal cladding via multiple (or even 1) individually projected segments on the building face.


Another way to simplify creation of the building and the apparent support columns extending outwards from the front face of the building is:

1.) Keep the main building and the apparent support columns in separate "groups"

2.) "Hide" the apparent support columns "group" (temporarily)

3.) Texture the front face of the building either in 1 or several faces as needed to accommodate use of your texture

4.) "Un-hide" the apparent support columns "group"

5.) "Intersect" the 2 groups for a precise 'weld' ...when they are both subsequently "exploded". :idea:


Hope this helps ! :)

GaryGB
 
Last edited:
If I may add an idea...
...another way to simplify creation of the building and the apparent support columns extending outwards from the front face of the building is:

1.) Keep the main building and the apparent support columns in separate "groups"

2.) "Hide" the apparent support columns "group" (temporarily)

3.) Texture the front face of the building either in 1 or several faces as needed to accommodate use of your texture

4.) "Un-hide" the apparent support columns "group"

5.) "Intersect" the 2 groups for a precise 'weld' ...when they are both subsequently "exploded". :idea:

I like everything about this except the last step.

There is no need to explode the groups and weld them to the building. In fact there is a good reason not to.

Without the columns, the front of the building (assuming the doors and windows are painted on the texture and not geometry) would only be 3 polys. Intersecting the columns would easily triple that.

Now, for this face on one object it would not really matter, however efficient modeling practices should always be used, IMO.

You can export models from Sketchup with Groups and Components intact and MCX will respect them when it compiles the model. They are a great way to keep poly counts down.

Hope this helps.

cheers,
Lane
 
GaryGB,

Thanks very much for your informative reply! The front of the building is divided into 3 textures, the middle one being the different one with the "Princeton Airport" texture applied to it. I've grouped the support columns together, and the 3 faces of the front of the building together. I hid the support column group, but I did not need to further texture anything else on the front of the building. I then unhid the columns group, selected both groups, intersected them with the selection and then exploded them. After the explosion, I did lose some textures from the front of the building : http://prntscr.com/7ga823 Did I follow the process correctly?
 
If I may add an idea...


I like everything about this except the last step.

There is no need to explode the groups and weld them to the building. In fact there is a good reason not to.

Without the columns, the front of the building (assuming the doors and windows are painted on the texture and not geometry) would only be 3 polys. Intersecting the columns would easily triple that.

Now, for this face on one object it would not really matter, however efficient modeling practices should always be used, IMO.

You can export models from Sketchup with Groups and Components intact and MCX will respect them when it compiles the model. They are a great way to keep poly counts down.

Hope this helps.

cheers,
Lane
Lane, thank you for the reply! I have tried your suggestion and did not intersect/explode the model. The doors and windows are geometry and have not been painted on the window. I left the groups intact, exported to the collada file and used MCX, and still, the exported BGL does not have the textures properly aligned :/
 
Ok, I will make one final endorsement for simplicity. It is not just to make it simple for simple minds, it is because FSX has difficulty rendering complex scenery. Remember my advice about default buildings and textured cubes. If you do research, you will discover the majority of FSX buildings have two textures, one for the entire outside of the building for day renders and one for the entire outside of the building for night renders.
Using geometry for your doors and windows does not appreciably increase the realistic immersion of the simulation as much as it requires the render engine to draw that many more polygons. Three distinct textures for the front of the building is already triple the draw calls of a typical building, where is the advantage, easier to make?
Understandably this is your first building and the sim should easily tolerate some excess with it. Presumably you will eventually create the entire airport and 5 or 10 high demand buildings will hamper the sim. I know, I've been there; my first beautiful airport with all it's gargantuan detail slows the simulator to a crawl and it is roughly about the same size I imagine your airport will be; so, try to keep it simple, or wish you had.
 
If I may add an idea...


I like everything about this except the last step.

There is no need to explode the groups and weld them to the building. In fact there is a good reason not to.

Without the columns, the front of the building (assuming the doors and windows are painted on the texture and not geometry) would only be 3 polys. Intersecting the columns would easily triple that.

Now, for this face on one object it would not really matter, however efficient modeling practices should always be used, IMO.

You can export models from Sketchup with Groups and Components intact and MCX will respect them when it compiles the model. They are a great way to keep poly counts down.

Hope this helps.

cheers,
Lane

It certainly is desirable to minimize vertex counts wherever and whenever possible. :)

[EDITED]

For technical details on this, and the importance of 'welding' T-verts, duplicating Materials, and Drawcall Batching, see ACES' Adrian Woods (torgo 3000) Blog:

"Performance Art 3: Polygons don't matter"

http://blogs.technet.com/b/torgo3000/archive/2007/06/19/performance-art-3-polygons-don-t-matter.aspx

https://www.linkedin.com/in/adrianwoods


BTW: Although numerous vertices "normally" can incur limits on geometry in MSFS MDLs, surprisingly, one may minimize vertex expense via "smoothing" (both static / dynamic scenery objects as well as aircraft / objects are 'SimObjects'): :pushpin:

http://www.fsdeveloper.com/forum/threads/gmax-smooth-modifier.424824/

http://www.fsdeveloper.com/forum/threads/xtomdl-vertex-limit-problems.7831/

https://www.google.com/#q=hard edge in UVW Mapping split vertices


FSX reportedly also no longer 'requires' one to weld vertices at 4mm mesh intervals:

http://wing-fell-off.blogspot.com/2006_09_01_archive.html


NOTE: This sub-topic of how to reduce MDL complexity in a meaningful way that affects FS run time performance rather than mere numeric statistics about geometry, has also been addressed in a couple of recent interesting threads:

http://www.fsdeveloper.com/forum/threads/triangles-vertices-and-drawcalls.434086/#post-711139

http://www.fsdeveloper.com/forum/threads/decrease-polygon-edges-lines.434139/


And indeed, modeling can be done as Lane described above, IMHO, as long as the OP does not begin seeing "Z-buffer fighting" when the super-imposed faces of the "non-intersected" columns group are inspected from the outside of the building at various viewing distances, angles, and altitudes above the model. :alert:

[END_EDIT]

Obviously, that may ultimately depend upon how the textured 3D model actually renders upon inspection in FS at run time, as even with sophisticated video cards and driver settings set to large / triple Z-buffering for OpenGL, one may see such graphical anomalies as "flickering / Moire' patterns" when the Sketchup 3D display engine renders the model within the Sketchup workspace ...as seen from different vantage points using the "Orbit" tool. ;)

In numerous comparable 3D modeling scenarios with superimposed, 'grouped' objects juxtaposed at close proximity to another 'grouped' object, more often than not, I tend to see "Z-buffer fighting", so I suggested that workflow be tried by the OP (...at least until he gets the front wall of the building modeled / textured satisfactorily without graphically anomalous co-planar faces). :idea:

GaryGB
 
Last edited:
GaryGB, Thanks very much for your informative reply! The front of the building is divided into 3 textures, the middle one being the different one with the "Princeton Airport" texture applied to it. I've grouped the support columns together, and the 3 faces of the front of the building together. I hid the support column group, but I did not need to further texture anything else on the front of the building. I then un-hid the columns group, selected both groups, intersected them with the selection and then exploded them. After the explosion, I did lose some textures from the front of the building : http://prntscr.com/7ga823 Did I follow the process correctly?

"Explosions" in a 'closed solid' 3D building model can indeed "blow out some windows" ! :rotfl:


But seriously, the windows that lost their texture maps were likely 'co-planar' textured sub-faces on the surface of the building, which were a fraction of an inch too far above the plane of the building front wall segments.

Thus, it is common for a texture material to be lost when the edges of the face get "assimilated" by the underlying larger face (and "resistance is futile"
...unless we create the window faces properly aligned within the same plane of the building wall).

borgface.jpg



FYI: One may carefully hover the "Tape Measure" Tool over the approximate midpoint of the nearby Edge of the wall segment onto which one wishes to draw a rectangle for ex: a window.

Once the Sketchup "inference engine" pop-up tool-tip confirms the cursor is precisely over the 'mid-point' of the edge, one can click / hold / drag the cursor for the "Tape Measure" Tool out to the side, to set 1 or more "Construction line" (aka "C-Line" or "Guide line") locations used for drawing a face for a window with the "Rectangle" tool.

Done properly, the window face will be in exact alignment with the flat plane face of the wall segment, and the window 'face' (and its texture) will not be lost when 'grouped' objects are Exploded / welded.


BTW: Lane has a nice mini-tutorial of how to use the Tape Measure to draw / place Construction (aka "Guide") Lines ...here: :teacher:

http://www.fsdeveloper.com/forum/threads/moving-and-duplicating-elements-in-sketchup.434157/



In keeping with =rk='s admonition to "keep-it-simple", one might also consider the workflow often used in 3D sim / game development wherein complex geometry and multi-part textures are minimized to less complex geometry with 'combining / merging' of texture layers into a few (or even 1) texture.


Sketchup can be used to composite multi-part texture faces, and then merge them all into 1 texture for ex: a wall, by using the "Combine Textures" feature with the "Erase Interior Edges" option.

NOTE:

1.) When each face on the "wall" is finished to your satisfaction, select the largest wall textured Face, Right-click, and choose "Make Unique Texture".

3.) Select that "Unique" textured Face and all others on any sub-faces (which must be in the exact same plane of that wall), then Right-click, and choose "Combine Textures", with 'permission granted' at the prompt to ""Erase Interior Edges".


Alternatively (or subsequently), one can use the "Export > 2D image" option to make a single (1)-piece texture for that wall.

NOTE: If transparent Materials are used for windows, that Material must be kept separate from the wall.



Better yet, consider using Aerilius' "Snapshot" Ruby plugin script cited above to create a "1-piece texture".

The 1-piece texture material with merged images of the windows, baked distortions etc. can then be applied to the entire wall face in 1 draw call, without the extra geometry being required to create a 'image' of a window on the wall.


The same "merge" procedure would also eliminate the need for a separate wall face segment just for inclusion of the "Princeton Airport" logo texture.


By either of the 2 methods above, graphically, you will end up with a single (1)-piece texture that can be mapped onto that wall in Sketchup, which helps reduce "draw calls" for textures on a 3D model (important for FS run time rendering performance). :pushpin:



Of course, as Lane has pointed out, this could also be done in advance of importing textures into Sketchup ...via one's Graphics application:

http://www.fsdeveloper.com/forum/threads/sketchup-to.434274/#post-712673



An excellent tutorial on this method by Bill Womack (aka "spotlope") is here: :teacher:

FSDevConf - Scenery Texturing for Realism



Hope these ideas help a bit more ! :)

GaryGB
 
Last edited:
Thanks for all the tips everyone. Nothing is working out so far so I think I'll just start from scratch again...
How exactly do I get that one piece texture and map everything on it now?
 
If I were creating this building I would create the front as one face, starting with a flat plane and leave the awnings and column extrusions for later. Something like...
Capture.JPG


As I have outlined it results in 3 polys. For me, that would be it for that face as I would paint the doors, windows and signs (or the "outs") on the texture.

Realizing that others may need different options, there is help.

Go ahead and draw the rectangles on the face for the "outs" and texture them.

If you then select everything on that face (easier to do if you have previously hid everything else) and right click on it you have the option to "combine textures". If you click Yes you will be asked if you want to "erase interior edges" and you do.

Here is a simple wall I made, with edges shown (that do not show in the sim)...
Capture-2.JPG


Exported to MCX it has 62 polys and 4 drawcalls.

After "combining all textures" it looks like...
Capture-3.JPG

Exported to MCX it has 2 polys and 1 drawcall, much better performance -wise.

If you look closely at the 'after' picture you can see some anomalies where the brick meets the glass, I would undo the combine and adjust the windows to fix that, if I was going to keep this model.

Note that the 'texture combine' only works with elements that are all on the same plane, so if you have pushed or pulled the doors and/or windows for a 3D effect it will not work. IMO haveing a small offset for a 3D effect is a waste as it looks nice in SU yet is hard to notice when in the cockpit of an airplane in the sim and can be decently replicated with some shading work on the textures.

At this point I would then make this wall a group and build the column extrusions on top of it and later add the awnings.

As for the Z-fighting of the faces of the columns and the wall plane behind them, pulling the columns out 6" or so should be enough to prevent it.

In my experience, if the faces are so close that you see the Z-fighting you are better off simply painting the extrusions on the main texture.

For this building, the columns are so small that at the point where you would see the Z-fighting I think you would be far enough away from the building as to not notice it.

Hope this helps.

cheers,
Lane
 
Here, I made you a model, you are free to use it as you please. It is one draw call and 14 polygons. I used a picture from the web and projected that onto the front face, then continued that same projection to all other faces. You can take it apart and examine it and then make a bigger texture that has all the faces on it and project each one.
 

Attachments

As for the Z-fighting of the faces of the columns and the wall plane behind them, pulling the columns out 6" or so should be enough to prevent it.

In my experience, if the faces are so close that you see the Z-fighting you are better off simply painting the extrusions on the main texture.

For this building, the columns are so small that at the point where you would see the Z-fighting I think you would be far enough away from the building as to not notice it.

I'm inclined to agree; based on the real world photo image in Rick's ZIP, it appears the extension of the columns may be nearly 2 feet out from the front wall plane of the building, so that might reduce the risk for Z-buffer fighting anomalies seen at closer proximities. :scratchch

GaryGB
 
Last edited:
Hi Rick:

Would you please be so kind as to also export a Sketchup-8 format SKP file and attach it here ?

Your present attachment is only compatible with Sketchup-2015.

Thanks ! ;)

GaryGB
 
Last edited:
Here; although you are welcome to reverse compile the original one through MCX and import to SU that way. This should work and it is also freely useable.
 

Attachments

Hi Rick:
Thanks for that; I wanted to be sure others using the (faster) Sketchup-8 would be able to follow the ideas and "worked examples" in this thread. :idea:

GaryGB
 
Back
Top