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

Painted Lines - their secrets exposed!!

Messages
59
Country
switzerland
Need to have a catchy title...

Anyway, in order to be able to create my own painted lines patterns I tried to make some sense of the confusing mess that it is. The main goal was to figure out the mapping of the different line styles between the ground/target texture and the "optional material" texture. But I made some additional observations in the progress.

Here is the raw data for reference (explanation afterwards):
paintedlinesdata.png


1. To analyze the mapping on the material texture I generated a measurement texture (2048x2048) with a binary color pattern (see below). Every vertical column of pixels has a unique color sequence. Tracing down both edges of each line style I tried to find out the exact column in the texture. Because of downsampling this is sometimes not precise but just a best guess.
This resulted in the data in column "texture 2048" in the table.

2. Using a meter rule texture (see below) and a square apron I measured the width of each line style as well as the length until the texture repeats. Again, because of downsampling this might not be totally accurate when we get to centimeter level (especially the width).
This resulted in the data in column "world" in the table.

3. If lines should have a texture instead of just a solid color (frayed edges, weathered paint...) the resolution might become a deciding factor as well. Combining the data of "texture 2048" and "world" shows the resolution of the texture in the real world. Note that the pixels are never square (ratio), so this might have to be compensated for.
This resulted in the data in column "resolution" in the table.

4. The lines don't seem to get rendered straight out of the 2048 texture onto the ground. There seems to be an intermediate texture which already applies some downsampling in most cases. The downsampling factor again is "best guess" for most line styles. So far I have not evaluated whether this downsampling also applies lengthwise. But in any case this means that the 2048 texture is overdefined for most line styles. The effective usable resolution can be much lower.
When it comes to the rendering pass on the ground/target texture, the ground texture's resolution also enters the equation. My observation with the meter rule texture's rendering is, that the ground texture must have a pixel size of roughly 3-4 cm. I think there is a LOD with pixel size 3.75cm (20?, 21?). So I made an additional column to relate (effective) source texture pixels to ground texture pixels.
This date is in the "intermediate texture" and "effective resolution" columns in the table.

5. From the mapping data I generated a transparent layer showing the boundaries, that can be used when painting line textures - but haven't used it in practice yet. See below.

Have fun! (I hope this helps somebody)

Additional observations:​

  • The ortho-lines seem to be hardcoded yellow (or always refer to the default texture).
  • HOLD-SHORT lines have a special behaviour: no curving, length only in increments (ca. 0.9 + n * 1.8m)
  • The "asobo runway marks" alternative texture is only 64x64. The default texture is 512x512. So the mapping seems to scale nicely. If a solid linestyle in a particular colour with one of the given widths is needed a very simple 64x64 texture (or even smaller?) filled with that colour might just do the job.
  • About the intermediate texture downsampling: The pattern in every row consists of complimentary colours which means downsampling eventually results in a flat 50% gray. Downsampling naturally occurs when rendering on the ground texture. But: there is then a moiré effect visible, at least in the milder downsampling factors. With the lines there is often a suspicious jump to a very flat gray (very apparent in the red lines) which hints at the existence of intermediate textures. The screenshot below shows three examples:
    • WIDE_WHITE (pattern visible to the last pixel, hence the source pixel to ground pixel ratio of exactly 1.0)
    • some Style, where the last three pattern seem to have been downsampled to gray (potentially in intermediate texture). The 4th-last pattern shows the moiré. So possibly factor 8 downsampling.
    • WIDE_RED (clearly downsampled pre-rendering for the last 4 patterns - equals factor 16)

paintedlines_screenshot.jpg



Reference Pictures:
measurementtexture.png

The measurement pattern

lineoverlay.png

Transparent layer with line style positions (2048x2048). More sizes as attachments below.

squaremetertexture.png

Square meter measurement texture
 

Attachments

  • lineoverlay128.png
    lineoverlay128.png
    626 bytes · Views: 356
  • lineoverlay1024.png
    lineoverlay1024.png
    12.2 KB · Views: 296
  • lineoverlay512.png
    lineoverlay512.png
    4.7 KB · Views: 273
  • lineoverlay256.png
    lineoverlay256.png
    1.7 KB · Views: 278
  • lineoverlay2048.png
    lineoverlay2048.png
    38.9 KB · Views: 302
Last edited:
Thanks for writing this. So far I worked with the 512x512 texture that asobo provides and the SDK documentation:
PaintedLines References.png



And I save all my works at 512x512, with no downsampling effects:
OIIE-preview041.jpg
 
Thanks mottoth

That clears up two things for me:
  • I was looking at the wrong default texture. A while ago I had found and copied out a 2048px Version of what your screenshot shows, just without the red. So now I know where the red comes from.
  • Mapping in the source texture seems to scale just fine according to the texture size.

And I save all my works at 512x512, with no downsampling effects:
Well, you wouldn't notice them on simple straight lines with no internal pattern. For instance: According to my observations the red lines are rendered on the ground from a single pixel width on the intermediate texture (16px on the 2048 texture downscaled /16). Also the 64x64 alternative texture by asobo shows this nicely.

To illustrate, I generated a new texture:
diagonals.png


And applied it for the 16 basic line styles (ordered as in the table at the top - minus the HOLD_SHORT_MARKED):
diagonal_screenshot.jpg

The stripes on the red lines (the two on the right) are totally horizontal. Which seems to prove the point that they are rendered from a single pixel's width.

I guess a 512 Texture is enough in most cases. Most line styles downsample by 4 or more anyway from the 2048 texture. The difference is most noticable on WIDE_WHITE where the source to destination ratio is pretty much 1.0 for a 2048 texture. The one on the right, top 2048, bottom 512.
resolutioncomparison.jpg


For some reason the 2048 seems only twice as good on this occasion - should be 4x. Need to think about that. Possibly lengthwise downsampling is to blame?
 
Added more overlay-layers for different sizes to the original post. On the smallest ones the font is not legible anymore. But then I guess you would normally design at higher resolution and scale down.
 
Ah great, just realized: They did actually document something! Wasn't expecting that...
Anyway - the numbers I found out were pretty much bang on. And the pixel ratios etc. might still be helpful.
 
Can I creat a custom 4k taxture, so that I can use on a apron instead of a Arial scenery?
 
Ah great, just realized: They did actually document something! Wasn't expecting that...
Anyway - the numbers I found out were pretty much bang on. And the pixel ratios etc. might still be helpful.
Where did they document that ?
 
Thanks for writing this. So far I worked with the 512x512 texture that asobo provides and the SDK documentation:
View attachment 69030


And I save all my works at 512x512, with no downsampling effects:
View attachment 69031
I have been creating a file in illustrator with all the measures in the table above and everythings okay until i reach the bottom part of it. LEFT U and RIGHT U are giving me the width of the line and but if it tells me 956/1024 and 956/1024 it tells me there is no width, im a bit confused. Anyone understand that?
Capthhjura.PNG
 
LEFT U and RIGHT U are giving me the width of the line and but if it tells me 956/1024 and 956/1024 it tells me there is no width, im a bit confused. Anyone understand that?
I think I understand: The positions are given in fractions from 0/512 to 512/512. This allows for 513 possible positions BETWEEN columns of pixels.
The color value in between the two columns is the interpolated color.
  • This explains the gray areas for the red lines in my test texture. I misinterpreted this as a downsampling of 16 pixels to 1 pixel in an intermediate texture. But it really is the interpolated value between black and white stripes.
  • So for the red lines just fill the two pixel columns to the left and right of the given position. Slim black and slim yellow I haven't seen in the editor (yet).
  • Be careful about what you put in the pixel column just outside the given edges. It will probably bleed into the painted line.
 
I understand the U component of the texture.
But how is the V component of the texture? Is it always from the top to the bottom or just a fraction of the height?
Thanks in advance for your answer
 
I'm not sure why it is given as a fraction. The number after the slash is the length of one repeat of the line in "real world"-meters. Which is important to know for dashed lines etc.

So the fractional value gives you the information how long 1 meter is as fraction of the texture height.
 
I'm not sure why it is given as a fraction. The number after the slash is the length of one repeat of the line in "real world"-meters. Which is important to know for dashed lines etc.

So the fractional value gives you the information how long 1 meter is as fraction of the texture height.
What I meant to ask was: Is the texture for the line always the full height of the texture?
If the texture is for example 512*512, is the line then always 512 high?
 
If I understand you correctly: As far as I observed that is the case (the whole height of the texture is used for one X meters long segment of the line)

There are of course the special cases of the various hold short flavours.
a) they don't curve
b) the effective drawn line length is in steps of 1.8m after an initial 0.9m - so that there are always full dashes displayed (dash 0.9, interval 0.9)

So these are really probably only usable for actual hold short lines.
 
Does anyone Know why textures come in backward? How do you get them to come in facing the correct way?
 
Thanks for writing this. So far I worked with the 512x512 texture that asobo provides and the SDK documentation:
View attachment 69030


And I save all my works at 512x512, with no downsampling effects:
View attachment 69031
Do you have any closeup image? Does it looks as good as this far? Because I'm not being able to get any good resolution in painted line/ground markings. When I get close.. it's looks like a nightmare.
 
The target texture on the ground seems to have a resolution of roughly 4cm/pixel. Increasing texture size for painted lines or apron materials beyond what is necessary does nothing but waste resources at the moment.
The question is, if in the future there will be a sim update that increases the ground resolution.

I aim for a resolution of 2-3cm/Pixel with my textures. For lines it's a bit more complicated, because every line has a different target size (also in both dimensions). For continuous lines without internal structure only the width is relevant - and if your lucky you can get the correct width with a really low resolution.
 
if you don't mind me asking, where is this 512x512 texture? I have been looking everywhere I think it is, but can only find the 2048. I think finding that 512 texture will allow me to edit the colors for the painted hatched areas. Thank you
 
if you don't mind me asking, where is this 512x512 texture? I have been looking everywhere I think it is, but can only find the 2048. I think finding that 512 texture will allow me to edit the colors for the painted hatched areas. Thank you
here: Official\OneStore\fs-base\texture\taxiway_marks.dds
 
Back
Top