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

Does an image to be used for a material have to be square?

Messages
1,710
Country
australia
First time attempting to add an image to the material library. Its dimensions are 1296 x 920 yet when I select it to add I get a message that it needs to be a multiple of and will be 'modified.
1296 and 920 are both divisible by 4.
I have used non 'square' images before for scenery objects.

Do images for material libraries need to be square? I am attempting to cover a small rectangular area of ground with my own 'texture' image taken from another part of the satellite image used by MSFS ie

sechelt_shoreline_texture.png
 
The dimensions 1296 by 920 satisfy the image requirement, you should probably show your error message.
 
Hi Rick
In recreating the 'error' maybe its just information as it displays "texture size is not a multiple of 4 and will be compressed' (see below).
I took that as meaning the image will be compressed and will look compressed when placed via an apron? Is that how it would work or will it be uncompressed when placed?
Do I need to do what to use this image? Do aprons have to be square?


material_will_be_compressed.jpg
 
The message is alerting you that the image will be subject to the compression algorithm, so any of your placement details that are accurate beyond 6 decimal places will likely be appended or truncated to just 6. This might matter if you have an animation of a monk transcribing the Lord's Prayer onto the head of a pin which has been placed at the end of one of your docks. You could go to the trouble of making the image perfectly square if it allows you to avoid the alert, but it will still compress the image.
 
I'm thinking the 'compression' simply means the image will be squished to a square, as the UV for the placement is square by default. That means it will be distorted by the sim. If you square it yourself, then you control it's appearance.
 
Looks like you're talking about a texture for the material library, not a texture from, say, Blender. The material library textures need to be square, because they are mipmapped (Don't ask me to explain that in a post like this, please, but it's the "compression" algorithm rk was referring to, I think.) and baked to the surfaces. I found this the hard way when putting custom apron markings down. Regular textures exported from Blender just need to have each of their dimensions divisible by 4. The Normal, Roughness and Metal are packed textures, but apparently you aren't using those here.
 
1296 x 920 works for me:
material.png


I don't know why you just didn't try it in the sim.
 
Regular textures exported from Blender just need to have each of their dimensions divisible by 4.
Thanks. BOTH dimensions are divisible by 4.

The image was a 'screen grab' from MSFS of another nearby part of the area which I wanted to use to cover an area which has 'ghosts' of docks and piers (apart from the 'ghosts' the areas look quite similar.
I simply used the dev camera to fill the screen with that area, pressed the Ps key and imported into Paint Shop Pro and cropped it to the size of 1296 and 920 and saved it as a png.

I haven't tried to place it yet and was following a video tutorial my mamu where he uses a downloaded pbr image of pavers, added it to the materials library in his project and then used that as the material an apron he added. The only difference was his image is square and mine is rectangular.

I assumed that the compression is being used to 'squish' the width to be 'square'/same as the height but that won't help me when I use it as it will be distorted IMHO.

I have noticed that DevMode writes a file named sechelt_shoreline_texture.png.FLAGS in the folder containing my image and inside that (text) file is -

_DEFAULT=+PRECOMPUTEDINVAVG+QUALITYHIGH

Maybe there is a better method to cover an existing ground texture in MSFS which appears to be a satellite image using an image file?
 
Maybe as Dick suggests I need to make my image square but will that make it difficult to 'map' over the area as the area I want to map over is also rectangular.
AND if I erase the edges (in Paint Shop Pro) with a 'falloff' (so that the edges are transparent (alpha channel) with 'hardness' set low to blend from full transparent to not will that work here to blend in?

[added later]
I cropped my image to be square (920 x 920) and tried again and this time no error/warning and so it would appear the image used needs to be square.

Maybe, as the area with the 'ghosting' (docks from a satellite view used in MSFS) is small I could crop a screen shot of the other area and ensure it is square. Or simply 'grab' a small area adjacent to the 'ghosts'.

Here is an image from MSFS DEvMode showing the nearby area I intend to use to cover the area marked with an arrow where the 'ghosts' of the docks appear?

shoreline.jpg
 
Last edited:
Textures have to be power of 2. Only 2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384

For modeling they have to be any combination of those numbers. Does not need to be square

For the materials inside the SDK, the images have to be square. If your image is not originally square I usually change the canvas size in Photoshop or GIMP and leave the remaining space transparent.
 
If your image is not originally square I usually change the canvas size in Photoshop or GIMP and leave the remaining space transparent.
Thanks. That makes heaps of sense. I have certainly learned something today.
 
That's it exactly: the materials, as opposed to scenery objects, are really 2D images that get plastered onto a flat (more or less) surface and only printed (baked) once in a while. In other words, they become an ad hoc texture at the resolution needed for the distance of the surface from the viewpoint. Mipmapping is pre-reducing the resolution of a texture and storing a series of those reductions along with the original texture. In that way, no "computing" needs to go on for 2D stuff as you get nearer or farther to/from it - just grab a smaller/larger map. If you look at some material images in the sim you will find that there are 6 or more "reduced" resolution mipmaps stored along with the original. Let's take your 1296 x 920 original resolution and divide both by 2: 648 x 460, and again: 324 x 230, and again: 162 x 115, and again: 81 x 57.5 (oops) and again: 40.5 x 28.75 (double oops) and so on. That's only 5 mipmap reductions, and we're already getting into floating point math rather than just right-shifting some bits. If the original texture (full-scale) is square and a power of 2, then the division is super simple. You might try a rectangle that's 1024 x 256, though. I'll bet you don't get an error there.
For 3D objects, though, the shader needs to handle several surfaces that are not all at a single angle to the camera, so in that case, we use LODs to handle the problem of farther away->less detail needed. LODs are up to the scenery creator. There, I believe, the divisible-by-four requirement is more related to the data being handled in 32 or 64 bit chunks. I dump any third-party scenery that has only one level of detail for its buildings. If you buy an airport and can turn on the debug Levels of Detail and still see the printout on the horizon from 50 miles away, dump it.
I may be wrong, but if I were writing the code for something like this, those are the things I would think about.
However, you have a very clever method here that needs to be explored more: you need to get rid of the aerial map crud with something that looks like the surrounding terrain. Grabbing some nearby undisturbed turf and transplanting it to cover the bad stuff make a lot of sense. Thank you for that; I will certainly explore it. I'll stick to rectangles whose sides keep dividing by two for a long time, though.
 
Lastly.
Am I using the best and/or easiest method of covering existing ground scenery (ie covering a shoreline which was obviously created for MSFS using satellite imagery (and so also comes with 'ghosts' of objects in the water such as docks, piers etc) using the addition of a (scenery object) APRON and applying my image to it?
 
Good question. Thanks for raising the issue. I don't have an answer, but I also have that problem. Keep sharing your thoughts.
 
Lastly.
Am I using the best and/or easiest method of covering existing ground scenery (ie covering a shoreline which was obviously created for MSFS using satellite imagery (and so also comes with 'ghosts' of objects in the water such as docks, piers etc) using the addition of a (scenery object) APRON and applying my image to it?

Sorry about being dumb about tiled materials, but couldn't you just solve this with a projected mesh? Doing so sets you free of image library constraints and you can compose a blend transition if you want. Seems practical but maybe because it's what I'm familiar with.
 
I will check projected mesh as I have no idea.

[added later]
Wow projected mesh appears to be so easy well for my project anyway.
 
Last edited:
but couldn't you just solve this with a projected mesh?
I have now tried that but have trouble getting the brightness to match the adjacent ground texture.
I opened my project in DevMode and used the Developer camera and 'moved' to the area where I wanted to remove the 'ghosting'. I took a screen snapshot then using my image editor cropped the image to just the adjacent area without the ghosting and created a 'plane' object in Blender using that image and setting roughness to 1 and Specular to around 0.1 and it looked about exactly as it does in MSFS.
When I add the object to my project the brightness level is noticeably brighter than the area I used for my screen snapshot. It seems that MSFS brightens images.
Is there a way/solution?

projected_mesh_problem.jpg



projected_mesh_blender.jpg
 
OK, after a morning of experimentation using your method of grabbing a nearby patch of ground and putting it over an ugly, I report the following:
1. I agree that there is no way, other than trial and error with an image editor for the source image, to alter the final coloration of the Projected Mesh material. I even tried playing with the color curve (sRGB, non-color, Filmic log, etc.) of the blender nodes, but the patch simply doesn't change.
2. Creating a Material Library entry from a rectangular cut from a screenshot from the sim does not give an error if I use dimensions that are a power of 2. More experimentation needs to be done there, though.
3. I used a polygon to outline an area that I wanted to patch with a nearby ground texture. I made a library entry and created a new Material. I dragged that material to the Material slot of the Polygon and then activated Coloration. I played with the coloration to the best of my ability and made a reasonable match, but I'm no artist. I feathered the edges of the polygon to 4 meters to blend it in better.
4. I did not make the image "tileable" in the usual manner, so I got a tiling artifact, but that can be fixed.
5. I'd just make a square Material image anyway and let the polygon do the heavy lifting. If you want it to pass close inspection, you'll have to make a packed-texture image for those other effects. From a distance it doesn't matter.
Thanks for getting this going. I have more work to do.
Editing the patch color by enabling coloration-small.jpg
SimView of area to be covered.jpg
 
Back
Top