Navigation » Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter SDK » [Problem] Planet textures become corrupted

Orbiter SDK Orbiter software developers post your questions and answers about the SDK, the API interface, meshing, etc here.

Reply
 
Thread Tools
Old 02-08-2010, 02:04 PM   #1
T.Neo
SA 2010 Soccermaniac
 
T.Neo's Avatar
 
Default Planet textures become corrupted

I'm having an extremely annoying problem with planetary textures, that nothing seems to help.

I'm doing a cloud layer for Mu Arae c and the textures become pixelated, as if the number of colours has been reduced.

Planet with texture:


Original texture, before converting to .TEX


Please mind the .JPEG compression artefacts, although I assure you that the actual corruption is far worse then any .JPEG compression.
T.Neo is offline   Reply With Quote
Click here to register an account today!

Old 02-08-2010, 02:55 PM   #2
orb
Orbinaut
 
orb's Avatar
 
Default

Cloud TEX files are DXT5 compressed, and DXT5 is lossy compression algorithm. Input color upon compression is converted from 24 to 16 bit on the output, so color depth is indeed reduced (but alpha is still 8-bit).

JPEG remains in 24-bit color depth with quantization artifacts.

Try to increase brightness of source texture a bit. This may improve output texture quality.
orb is online now   Reply With Quote
Old 02-08-2010, 04:20 PM   #3
martins
Orbiter Founder
 
Default

Quote:
Originally Posted by orb View Post
 Cloud TEX files are DXT5 compressed, and DXT5 is lossy compression algorithm. Input color upon compression is converted from 24 to 16 bit on the output, so color depth is indeed reduced (but alpha is still 8-bit).
That isn't actually quite correct, if you check the reference you provided.
For each 16-pixel block, there are two 8-bit alpha values stored (plus a lookup table to assign the alpha and colour values to pixels). 6 intermediate alpha values are implicitly defined by linear interpolation. So each 16-pixel block can have 8 distinct (but not independent) alpha values. Similar for colour data, although here the discretisation is more severe, because you only get 4 distinct linearly dependent colour values per 16-pixel block.

So in answer to the original question: yes, the DXT compression can lead to that sort of artefact. It usually is most apparent in smooth colour gradients.
martins is online now   Reply With Quote
Thanked by:
Old 02-08-2010, 05:28 PM   #4
orb
Orbinaut
 
orb's Avatar
 
Default

Thanks for clarification.

Now when I read that article thoroughly, it makes more sense, why it's more distorted than I'd thought it should be. Still, those 4 colors for 16 pixel area are RGB 5:6:5, so 16bpp.

Last edited by orb; 02-08-2010 at 05:31 PM.
orb is online now   Reply With Quote
Reply

  Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter SDK

Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump