Redshift Textures

Tips for creating and manipulating planet textures for Celestia.
Avatar
Topic author
ILikeSaturn
Posts: 38
Joined: 28.09.2020
With us: 4 years 1 month

Redshift Textures

Post #1by ILikeSaturn » 10.07.2023, 00:21

RStextures preview.png

newer textures preview.png

Yes, the texture for Earth with clouds actually looks like that in some newer versions of Redshift.

After almost a year trying to decode the textures from older versions of Redshift, an old astronomy software, and reprojecting them, I'm proud to announce the release of this texture set! Please note that this isn't an add-on, it's just only the textures. The add-on and the un-reprojected decoded textures can be found below this post.

redshift_textures.zip
(70.84 MiB) Downloaded 199 times

In the zip file, there are two folders, "old" and "new". The "old" folder has textures that are from Redshift 3, while the "new" folder has some textures spanning from Redshift 4 to Redshift 7 that replaced the old ones. Almost all of the textures are nearly 2k (although the poles have less detail), and some are scanned shaded relief maps. The weird seams at the poles are caused by the UV map being offset, just like in the software. Some textures are shifted, especially the new ones.

There are some duplicate textures (specifically Venus, Earth, the Moon, and Mars) that have a higher resolution than others, but it's because those 4 have higher levels of detail in the software. The texture for Saturn's rings isn't there because it uses 3 separate files with a format that I can't decode. However, I could recreate it. The texture for Earth's clouds is combined with the surface texture because the software used the JPEG format for the textures.

Also, here is a Python script for decoding and encoding the textures for Redshift. I might release some other tools soon.

Code: Select all

import sys
import io
import numpy as np

def ncode(jpg, tag, outputname):
    L1=b'\x00\x02\x3C\x00\x10\x00\x03\x00\x14\x00\x02\x00\x06\x00\x02\x00'
    L2=b'\x00\x04\x7A\x00\x21\x00\x03\x00\x28\x00\x02\x00\x0B\x00\x02\x00'
    L3=b'\x00\x08\x22\x01\x24\x00\x03\x00\x28\x00\x02\x00\x0B\x00\x02\x00'
    HD=b'\x00\x10\xE9\x01\x1E\x00\x03\x00\x28\x00\x02\x00\x0B\x00\x02\x00'
    M1=b'\x00\x04\x7A\x00\x21\x00\x03\x00\x28\x00\x02\x00\x0B\x00\x03\x00'
    M2=b'\x00\x08\x22\x01\x24\x00\x03\x00\x28\x00\x02\x00\x0B\x00\x03\x00'
    M3=b'\x00\x08\x22\x01\x24\x00\x03\x00\x28\x00\x02\x00\x0B\x00\x03\x00'
   
    if tag == "1":
        tag = L1
    elif tag == "2":
        tag = L2
    elif tag == "3":
        tag = L3
    elif tag == "hd":
        tag = HD
    elif tag == "m1":
        tag = M1
    elif tag == "m2":
        tag = M2
    elif tag == "m3":
        tag = M3
    else:
        tag = L3
       
    if outputname == "":
        outputname = os.path.splitext(jpg)[0]

    f = open(jpg, 'rb')
    hexlist = f.read()
    header = hexlist[:768]
    content = hexlist[768:]
    hexes = b''

    for hv in header:
        n = round(((hv + 1) / 4) + 0.28)
        o = 123 - hv
        if n % 2 == 0:
            o = 131 - hv
       
        if hv == 255:
            o = 132
       
        h = hex(np.uint8(o))[2:]
        if len(h)==1:
            h = '0' + h
           
        hexes = hexes + bytes.fromhex(h)

    encoded = hexes + content + tag
    e = open(outputname, 'wb')
    e.write(encoded)
    e.close()
    print("Encoded to file.")
   
def dcode(file):
    f = open(file, 'rb')
    hexlist = f.read()
    header = hexlist[:768]
    content = hexlist[768:]
    hexes = b''
    for hv in header:
        a = 123 - hv
        b = 123 + hv
           
        if b == 255:
            a = -1
       
        d = int(((hv) / 4) + 1)
        if (d % 2) == 0:
            a = a + 8
           
            if (131 - (a + 256)) != 0:
                a = 131 - hv
       
        if hv == 255:
            a = 132
           
        h = hex(np.uint8(a))[2:]
        if len(h)==1:
            h = '0' + h
           
        hexes = hexes + bytes.fromhex(h)

    decoded = hexes + content
    e = open(file + ".jpg", 'wb')
    e.write(decoded)
    e.close()
    print("Decoded to file.")
   
def usage():
    print("Usage: RSTxUtil -d [file]\n")
    print("Usage: RSTxUtil -e [.jpg file] [tag] [output file with no extension]")
    print("Tags for encoding:\n1: LOD 1\n2: LOD 2\n3: LOD 3\nhd: LOD 3 but with a bigger resolution\nm1: LOD 1 (mesh)\nm2: LOD 2 (mesh)\nm3: LOD 3 (mesh)")
    sys.exit(1)

def main():
    if (len(sys.argv) < 3):
        usage()
    if (sys.argv[1] == "-e" and len(sys.argv) == 5):
        ncode(sys.argv[2], sys.argv[3], sys.argv[4])
    elif (sys.argv[1] == "-d"):
        dcode(sys.argv[2])
    else:
        usage()

if (__name__ == "__main__"):
    main()


Texture Sources:
Old:
Venus: Surface map made by NASA and University of London Department of Astronomy
Earth: Map made by Hammond Inc.
The Moon, Mars, and some moons of other planets: Scanned from USGS shaded relief maps
Earth and Venus' clouds, Jupiter, Saturn, Uranus, Neptune, Amalthea, Titan, and Hyperion: Artist's impressions
Pluto: Map by Marc Buie
New:
Venus: Map based on Magellan data
Earth: NASA's Blue Marble w/ bathymetry
Mars: Map based on Viking data
Io, Europa, and Ganymede: Maps based on Galileo and Voyager data
Mimas, Enceladus, Tethys, Dione, Rhea, Iapetus, and Phoebe: Cassini data
Last edited by ILikeSaturn on 10.07.2023, 20:23, edited 8 times in total.
ILikeSaturn Image
Currently working on Project VEAR.
My website: TinyURL.com/ILikeSaturn

Avatar
Topic author
ILikeSaturn
Posts: 38
Joined: 28.09.2020
With us: 4 years 1 month

Post #2by ILikeSaturn » 10.07.2023, 13:46

Addon:
innerplanets.png
outerplanets.png

redshift_textures_addon.zip
(19.05 MiB) Downloaded 186 times

This addon will basically replace (not modify) the planets and some of their moons, so if you're not using it, you must remove it from your extras folder.
Because of Celestia's limitations, the cloud maps and newer textures are represented as alternate surfaces.

Decoded textures:
redshift_textures_decoded.zip
(9.48 MiB) Downloaded 171 times

The decoded textures before I reprojected them. These textures look like globe gores. Here's what it would look like for Earth, without the weird artifacts:
redshift texture uv.jpg
Last edited by ILikeSaturn on 10.07.2023, 20:25, edited 4 times in total.
ILikeSaturn Image
Currently working on Project VEAR.
My website: TinyURL.com/ILikeSaturn

Avatar
Sirius_Alpha
Posts: 223
Joined: 21.03.2019
With us: 5 years 8 months

Post #3by Sirius_Alpha » 10.07.2023, 19:11

It would benefit you to add some screenshots to help give people an idea of what they're downloading. :)
Exoplanet nerd. I maintain a monthly-updated exoplanet catalogue here:
https://celestiaproject.space/forum/viewtopic.php?f=23&t=18705

Avatar
Topic author
ILikeSaturn
Posts: 38
Joined: 28.09.2020
With us: 4 years 1 month

Post #4by ILikeSaturn » 10.07.2023, 20:16

Sirius_Alpha wrote:It would benefit you to add some screenshots to help give people an idea of what they're downloading.
Thank you for pointing that out, I forgot to add some screenshots and previews since I was in a hurry, but I now added some.
ILikeSaturn Image
Currently working on Project VEAR.
My website: TinyURL.com/ILikeSaturn


Return to “Textures”