Next: Some shared models appear red
Summary
Some shared models (such as Models/Residential/cube-apartment.ac) appear completely red, even though the underlying textures are not red.
Steps to reproduce
Create a custom scenery as follows:
Objects/w130s10/w129s10/840760.stg
OBJECT_SHARED Models/Residential/cube-apartment.ac -129.00595426 -9.01348255 -0.3739 0.0 0.0 -0.0
and start with:
--aircraft=ufo --lat=-9.013087 --lon=-129.004978 --altitude=72.17 --heading=239.9
Potential Reason
I believe this is happening because the model in question uses an .rgb texture that is grayscale
» identify cube-2?.rgb
cube-21.rgb SGI 32x8 32x8+0+0 8-bit sRGB 256c 654B 0.000u 0:00.000
cube-22.rgb SGI 32x8 32x8+0+0 8-bit sRGB 256c 699B 0.000u 0:00.000
cube-23.rgb SGI 16x16 16x16+0+0 8-bit sRGB 256c 798B 0.000u 0:00.000
Probably we assume RGB textures, so when a grayscale texture is loaded it is used as the first (R) channel.
Potential Fix
- Add support for grayscale textures
- Convert all grayscale textures to RGB (also might be a good time to convert .rgb to .png)
Quick search for all grayscale textures using find Models -name "*.png" -or -name "*.rgb" | xargs identify | grep 256c
Models/Agriculture/black-farmroof-tiles.png PNG 32x32 32x32+0+0 8-bit Grayscale Gray 256c 3390B 0.000u 0:00.000
Models/Maritime/Civilian/tanker.png PNG 512x512 512x512+0+0 8-bit sRGB 256c 18347B 0.000u 0:00.000
Models/Buildings/medium-glass-office-building.rgb SGI 64x64 64x64+0+0 8-bit sRGB 256c 5339B 0.000u 0:00.000
Models/Buildings/container.rgb SGI 32x32 32x32+0+0 8-bit sRGB 256c 1896B 0.000u 0:00.000
Models/Commercial/medium-glass-office-building.png PNG 64x64 64x64+0+0 8-bit Grayscale Gray 256c 3101B 0.000u 0:00.000
Models/Residential/cube-22.rgb SGI 32x8 32x8+0+0 8-bit sRGB 256c 699B 0.000u 0:00.000
Models/Residential/cube-23.rgb SGI 16x16 16x16+0+0 8-bit sRGB 256c 798B 0.000u 0:00.000
Models/Residential/cube-21.rgb SGI 32x8 32x8+0+0 8-bit sRGB 256c 654B 0.000u 0:00.000
Models/Geometry/Nimitz/h_deck_lm.png PNG 512x512 512x512+0+0 8-bit sRGB 256c 167347B 0.000u 0:00.000
Models/Geometry/Nimitz/hangar_lm.png PNG 256x256 256x256+0+0 8-bit sRGB 256c 9185B 0.000u 0:00.000
Models/Geometry/Nimitz/h_deck.png PNG 512x512 512x512+0+0 8-bit sRGB 256c 81549B 0.000u 0:00.000
System and version information
/sim/version/flightgear: 2024.2.0
/sim/version/simgear: 2024.2.0
/sim/version/openscenegraph: 3.6.5
/sim/version/build-date:
/sim/version/build-type: Dev
/sim/version/revision: none
/sim/rendering/gl-info/gl-vendor: Apple
/sim/rendering/gl-info/gl-renderer: Apple M4 Max
/sim/rendering/gl-info/gl-version: 4.1 Metal - 89.4
/sim/rendering/gl-info/gl-shading-language-version: 4.10
- SimGear: 998684d84b21bf1844a34869193045ca854e9989
- FlightGear: e626d7f32cefa8ccaf5f877742aa8f2516a84e1b
- FGdata: 67d22458
Edited by Fahim Dalvi
