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

Landclass definitions in RAW file

Horst18519

Moderator
Resource contributor
Messages
2,385
Country
germany
Gentlemen, I have another (maybe stupid) question:

I have a RAW-file with Landclass definitions for my current project (provided by another dev). The file is 8-bit, so I expected the RGB values would equal the number of the 1-255 landclass definitions. But that does not seem to be the case. For example Glacier Ice (143) has the RGB values "164,164,164". Is there a misunderstanding on my side or do I need to calculate the RGB values (or need to work with another color scheme)?
 
Hi Thorsten,

I guess there could be a palette involved that maps each of the numbers from 0 to 255 to a specific colour. Normally this is done to give things a colour that is more logical (like forest being green and not some shade of grey or other weird colour). But I don't know exactly what the default palette is.
 
Hello

The landclass raw file (as supplied to the resampler) is a set of 257 x 257 bytes (66 049 bytes) that represent the class indices of a large quad. To view them in image programmes you should set no header and no palette.

Kind Regards,

Luis
 
I think I didn't get that. :confused:

The image shows just fine in Photoshop (in greyscale), I just wonder which value I have to "paint" to tell which landclass I want (tundra, glacier,...).
 
Hi,

Yes you can see it in Photoshop as a Black & White image. The class index for UPLAND_TUNDRA is 9, so if you paint with that B&W value will make it to be TUNDRA. In cases when the raw file is very sparse it will probably look like white. In fact it will show 254 (TRANSPARENT CLASS) which is close to pure white (255).

Kind Regards,

Luis
 
That is what I expected. But the raw image actually shows 19/19/19 where TMFViewer shows "9" Tundra. All values seem to be shifted, but not by the same value. Sometimes it's 10 more, sometimes 30 more, then 15,...
 
The funny thing is: If I compile it it works just fine. I review the result with TMFViewer and all landclasses are ok, it's just I cannot figure which values I must use to get the landclass I want. Plus it seems impossible to use uneven numbers. If I fill an area with 5/5/5 the area shows 4/4/4 afterwards. Weird. :confused:

I just cannot get to understand this 8bit stuff. The annoying thing is that I only have to change a few areas of the image (add some lc here and there and change the tundra parts to another lc), but I just can't get it done.
 
Hello,

You need to setup PhotoShop to understand the stream of 66049 bytes as an image. There is no header information in the file and so these settings need to be precisely adjusted. I send the settings for Paint Sho Pro.

Kind Regards,

Luis

ps: if you want to try the testing version of SbuilderX to read RAW files please write me
 

Attachments

  • Image1.gif
    Image1.gif
    14.9 KB · Views: 590
That sounds tempting, I was missing this feature. :)

I've figured it out though. I might've failed to specify my problem, because everything was ok, I had my image in PS, I could export it, I could resample it, all ok - just the greyscale numbers were weird. Until I found out that I need to switch from greyscale to indexed bitmap. Suddenly all my RGB values showed the LC numbers! :) :teacher:

It's so easy once you found the trick.
 
Back
Top