Supsta—A Texture Preprocessor

    Joined
    Jan 22, 2014
    Messages
    1,047
    Reaction score
    299
    Supsta—Scheme's Unnamed Program for Starmade Texture Artists—aims at making the life of texture artists easier. It provides an abstraction layer between single textures and StarMade's texture format.
    Please note that this currently is a program for advanced users.

    So what does it do?
    You start by creating a new project, which is as simple as invoking the following command:
    Code:
    supsta new project_name /path/to/StarMade
    This will create a new project at the location project_name (which can, in fact, be a path). /path/to/StarMade obviously is the directory with the StarMade.jar. Supsta now will generate the basic project layout, including a directory textures, where it will generate dummy files for every block face in StarMade (using the block config from your StarMade installation), separated into one directory per block.
    Code:
    $ find schemes_textures/ -type d | sort
    schemes_textures/
    schemes_textures/assets
    schemes_textures/schemes_textures
    schemes_textures/schemes_textures/128
    schemes_textures/schemes_textures/256
    schemes_textures/schemes_textures/64
    schemes_textures/textures
    schemes_textures/textures/0C Cloaker
    schemes_textures/textures/10x RadarJammer
    schemes_textures/textures/Activation Module
    schemes_textures/textures/Alien Flowers
    schemes_textures/textures/Alien Vine
    schemes_textures/textures/AND-Signal
    schemes_textures/textures/AntiMatter Cannon
    schemes_textures/textures/AstroTechnician
    schemes_textures/textures/AstroTechnobeam
    schemes_textures/textures/Awesomite L1
    schemes_textures/textures/Awesomite L2
    schemes_textures/textures/Awesomite L3
    schemes_textures/textures/Awesomite L4
    schemes_textures/textures/Awesomite L5
    schemes_textures/textures/Bastyn Crystal
    schemes_textures/textures/Black Hull
    schemes_textures/textures/Black Paint
    schemes_textures/textures/Blue Hull
    schemes_textures/textures/Blue Light
    schemes_textures/textures/Blue Paint
    schemes_textures/textures/BOBBY AI Module
    schemes_textures/textures/Bronze Bar
    schemes_textures/textures/Brown Hull
    schemes_textures/textures/BROWN PAINT
    schemes_textures/textures/Brown Patch
    schemes_textures/textures/Build Block
    schemes_textures/textures/Cactus
    schemes_textures/textures/Cenomite L1
    schemes_textures/textures/Cenomite L2
    schemes_textures/textures/Cenomite L3
    schemes_textures/textures/Cenomite L4
    schemes_textures/textures/Cenomite L5
    schemes_textures/textures/d1000 Missile Array
    schemes_textures/textures/d1000 Missile CPU
    schemes_textures/textures/Damage Beam Computer
    schemes_textures/textures/Damage Beam Module
    schemes_textures/textures/Damage Pulse Computer
    schemes_textures/textures/Damage Pulse Module
    schemes_textures/textures/Decorative Computer (Green)
    schemes_textures/textures/Decorative Computer (Orange)
    schemes_textures/textures/decorative panel 1
    schemes_textures/textures/decorative panel 2
    schemes_textures/textures/decorative panel 3
    schemes_textures/textures/decorative panel 4
    schemes_textures/textures/Decorative Screen (Blue)
    schemes_textures/textures/Decorative Screen (Red)
    schemes_textures/textures/DELAY-Signal
    schemes_textures/textures/Dis-Integrater (Explosive)
    schemes_textures/textures/Docking Enhancer
    schemes_textures/textures/Docking Module
    schemes_textures/textures/EMP Effect Computer
    schemes_textures/textures/EMP Effect Module
    schemes_textures/textures/Exogen L1
    schemes_textures/textures/Exogen L2
    schemes_textures/textures/Exogen L3
    schemes_textures/textures/Exogen L4
    schemes_textures/textures/Exogen L5
    schemes_textures/textures/Explosive Effect Computer
    schemes_textures/textures/Explosive Effect Module
    schemes_textures/textures/Extranium L1
    schemes_textures/textures/Extranium L2
    schemes_textures/textures/Extranium L3
    schemes_textures/textures/Extranium L4
    schemes_textures/textures/Extranium L5
    schemes_textures/textures/Faction Hub
    schemes_textures/textures/Faction Module
    schemes_textures/textures/Faction Permission Module
    schemes_textures/textures/FactoryInput
    schemes_textures/textures/FactoryInputEnhancer
    schemes_textures/textures/Fertikeen Ore Ingot
    schemes_textures/textures/Foliage
    schemes_textures/textures/Glass (Plextanium)
    schemes_textures/textures/Gold Bar
    schemes_textures/textures/Grass Flowers
    schemes_textures/textures/Grass Patch
    schemes_textures/textures/Gravity Unit
    schemes_textures/textures/Green Hazard Stripes
    schemes_textures/textures/Green Hull
    schemes_textures/textures/Green Light
    schemes_textures/textures/Green Paint
    schemes_textures/textures/Grey Hull
    schemes_textures/textures/Hanging Light Yellow
    schemes_textures/textures/Hardened Hull (Black)
    schemes_textures/textures/Hardened Hull (Blue)
    schemes_textures/textures/Hardened Hull (Brown)
    schemes_textures/textures/Hardened Hull Green
    schemes_textures/textures/Hardened Hull (Grey)
    schemes_textures/textures/Hardened Hull Orange
    schemes_textures/textures/Hardened Hull (Purple)
    schemes_textures/textures/Hardened Hull Red
    schemes_textures/textures/Hardened Hull (White)
    schemes_textures/textures/Hardened Hull (Yellow)
    schemes_textures/textures/Hattel Crystal
    schemes_textures/textures/Hital Ore Ingot
    schemes_textures/textures/Hyperflux Coil Thruster
    schemes_textures/textures/Ice
    schemes_textures/textures/ICE CORAL
    schemes_textures/textures/ICE CRAG
    schemes_textures/textures/Ice Crystal
    schemes_textures/textures/Ice Crystal (Wedge)
    schemes_textures/textures/ICE GRASS
    schemes_textures/textures/ICE PLANET SURFACE
    schemes_textures/textures/ICE SPIKE
    schemes_textures/textures/Insanium L1
    schemes_textures/textures/Insanium L2
    schemes_textures/textures/Insanium L3
    schemes_textures/textures/Insanium L4
    schemes_textures/textures/Insanium L5
    schemes_textures/textures/Ion Effect Computer
    schemes_textures/textures/Ion Effect Module
    schemes_textures/textures/Jisper Ore Ingot
    schemes_textures/textures/Lava
    schemes_textures/textures/Long Weed
    schemes_textures/textures/Mars Tentacles
    schemes_textures/textures/Mattise Crystal
    schemes_textures/textures/Medical Cabinet
    schemes_textures/textures/Medical Supplies
    schemes_textures/textures/Metal Grill
    schemes_textures/textures/Metal Mesh
    schemes_textures/textures/Metate L1
    schemes_textures/textures/Metate L2
    schemes_textures/textures/Metate L3
    schemes_textures/textures/Metate L4
    schemes_textures/textures/Metate L5
    schemes_textures/textures/Mini Cactus
    schemes_textures/textures/Nacht Ore Ingot
    schemes_textures/textures/Negacide L1
    schemes_textures/textures/Negacide L2
    schemes_textures/textures/Negacide L3
    schemes_textures/textures/Negacide L4
    schemes_textures/textures/Negacide L5
    schemes_textures/textures/Negagate L1
    schemes_textures/textures/Negagate L2
    schemes_textures/textures/Negagate L3
    schemes_textures/textures/Negagate L4
    schemes_textures/textures/Negagate L5
    schemes_textures/textures/Nocx Crystal
    schemes_textures/textures/NOT-Signal
    schemes_textures/textures/Octogen L1
    schemes_textures/textures/Octogen L2
    schemes_textures/textures/Octogen L3
    schemes_textures/textures/Octogen L4
    schemes_textures/textures/Octogen L5
    schemes_textures/textures/Orange Hull
    schemes_textures/textures/Orangutanium L1
    schemes_textures/textures/Orangutanium L2
    schemes_textures/textures/Orangutanium L3
    schemes_textures/textures/Orangutanium L4
    schemes_textures/textures/Orangutanium L5
    schemes_textures/textures/OR-Signal
    schemes_textures/textures/overlays.png_10
    schemes_textures/textures/overlays.png_12
    schemes_textures/textures/overlays.png_14
    schemes_textures/textures/overlays.png_4
    schemes_textures/textures/overlays.png_6
    schemes_textures/textures/overlays.png_68
    schemes_textures/textures/overlays.png_8
    schemes_textures/textures/Parsen Crystal
    schemes_textures/textures/Parstun Ore Ingot
    schemes_textures/textures/PARTICLE PRESS
    schemes_textures/textures/Personal Computer (Blue)
    schemes_textures/textures/Piercing Effect Computer
    schemes_textures/textures/Piercing Effect Module
    schemes_textures/textures/PlexBeacon
    schemes_textures/textures/PlexDoor
    schemes_textures/textures/PlexLander
    schemes_textures/textures/PlexLifter
    schemes_textures/textures/PlexLight
    schemes_textures/textures/PlexStorage
    schemes_textures/textures/Plextanium L1
    schemes_textures/textures/Plextanium L2
    schemes_textures/textures/Plextanium L3
    schemes_textures/textures/Plextanium L4
    schemes_textures/textures/Plextanium L5
    schemes_textures/textures/PlexUndeathinator
    schemes_textures/textures/PowerCell
    schemes_textures/textures/PowerCellFactory
    schemes_textures/textures/PowerCoil
    schemes_textures/textures/Powerdrain Beam
    schemes_textures/textures/Powerdrain Beam-Computer
    schemes_textures/textures/Powersupply Beam
    schemes_textures/textures/Powersupply Beam-Computer
    schemes_textures/textures/Protein 10000A
    schemes_textures/textures/Protein 1000B
    schemes_textures/textures/Protein 20000A
    schemes_textures/textures/Protein 2000B
    schemes_textures/textures/Protein 30000A
    schemes_textures/textures/Protein 3000B
    schemes_textures/textures/Protein 40000A
    schemes_textures/textures/Pull Effect Computer
    schemes_textures/textures/Pull Effect Module
    schemes_textures/textures/Pulsator
    schemes_textures/textures/Pulse Computer
    schemes_textures/textures/Punch-Through Effect Computer
    schemes_textures/textures/Punch-Through Effect Module
    schemes_textures/textures/Purple Hull
    schemes_textures/textures/Purple Paint
    schemes_textures/textures/Purple Top Stuff
    schemes_textures/textures/Purple Vine Stuff
    schemes_textures/textures/Purptacles
    schemes_textures/textures/Purspire
    schemes_textures/textures/Push Effect Computer
    schemes_textures/textures/Push Effect Module
    schemes_textures/textures/Push Pulse Computer
    schemes_textures/textures/Push Pulse Module
    schemes_textures/textures/Quantacide L1
    schemes_textures/textures/Quantacide L2
    schemes_textures/textures/Quantacide L3
    schemes_textures/textures/Quantacide L4
    schemes_textures/textures/Quantacide L5
    schemes_textures/textures/Quantagen L1
    schemes_textures/textures/Quantagen L2
    schemes_textures/textures/Quantagen L3
    schemes_textures/textures/Quantagen L4
    schemes_textures/textures/Quantagen L5
    schemes_textures/textures/Quantanium L1
    schemes_textures/textures/Quantanium L2
    schemes_textures/textures/Quantanium L3
    schemes_textures/textures/Quantanium L4
    schemes_textures/textures/Quantanium L5
    schemes_textures/textures/Rammet Crystal
    schemes_textures/textures/Red Hull
    schemes_textures/textures/Red light
    schemes_textures/textures/Red Paint
    schemes_textures/textures/Red Planet Terrain
    schemes_textures/textures/Red Shroom
    schemes_textures/textures/Rock
    schemes_textures/textures/Rock Red Planet Terrain
    schemes_textures/textures/Salvage Cannon
    schemes_textures/textures/Salvage Computer
    schemes_textures/textures/Sand
    schemes_textures/textures/SCHEMADYNE 1000
    schemes_textures/textures/Schemadyne Advanced
    schemes_textures/textures/SCHEMADYNE ADVANCED
    schemes_textures/textures/SD B:1 Expander
    schemes_textures/textures/SD B:1 Memory
    schemes_textures/textures/SD B:1 Processor
    schemes_textures/textures/SD-BB Missile Array
    schemes_textures/textures/SD-BB Missile Computer
    schemes_textures/textures/SD Cockpit
    schemes_textures/textures/SD G:1 Expander
    schemes_textures/textures/SD G:1 Memory
    schemes_textures/textures/SD G:1 Processor
    schemes_textures/textures/SD HCT xm3.4 Power
    schemes_textures/textures/SD KB Missile Array
    schemes_textures/textures/SD KB Missile CPU
    schemes_textures/textures/SD pc1.3 Power Tank
    schemes_textures/textures/SD R:1 Expander
    schemes_textures/textures/SD R:1 Memory
    schemes_textures/textures/SD R:1 Processor
    schemes_textures/textures/SD Shield Disperser
    schemes_textures/textures/SD W:1 Expander
    schemes_textures/textures/SD W:1 Memory
    schemes_textures/textures/SD W:1 Processor
    schemes_textures/textures/SD Y:1 Expander
    schemes_textures/textures/SD Y:1 Memory
    schemes_textures/textures/SD Y:1 Processor
    schemes_textures/textures/Sertise Ore Ingot
    schemes_textures/textures/Ship Core
    schemes_textures/textures/Silver Bar
    schemes_textures/textures/Sintyr Crystal
    schemes_textures/textures/Soil
    schemes_textures/textures/Stone Fragment
    schemes_textures/textures/Stop Effect Computer
    schemes_textures/textures/Stop Effect Module
    schemes_textures/textures/Succumite L1
    schemes_textures/textures/Succumite L2
    schemes_textures/textures/Succumite L3
    schemes_textures/textures/Succumite L4
    schemes_textures/textures/Succumite L5
    schemes_textures/textures/Tall Flowers
    schemes_textures/textures/Tall Grass Flowers
    schemes_textures/textures/Tall Shroom
    schemes_textures/textures/Threns Ore Ingot
    schemes_textures/textures/Trigger (Area)
    schemes_textures/textures/Trigger (Area) Controller
    schemes_textures/textures/Trigger (Step On)
    schemes_textures/textures/Turret Docking Enhancer Unit
    schemes_textures/textures/Turret Docking Unit
    schemes_textures/textures/Vappecide L1
    schemes_textures/textures/Vappecide L2
    schemes_textures/textures/Vappecide L3
    schemes_textures/textures/Vappecide L4
    schemes_textures/textures/Vappecide L5
    schemes_textures/textures/Varat Crystal
    schemes_textures/textures/Water
    schemes_textures/textures/Weapons Computer
    schemes_textures/textures/White Hull
    schemes_textures/textures/White Paint
    schemes_textures/textures/Wood
    schemes_textures/textures/Yellow Hazard Stripes
    schemes_textures/textures/Yellow Hull
    schemes_textures/textures/Yellow Light
    schemes_textures/textures/Yellow Paint
    schemes_textures/textures/Yhole
    schemes_textures/textures/Yhole Nucleus
    schemes_textures/textures/Zercaner Ore Ingot

    You now can start editing those files. In case you're using the GIMP or Photoshop, there is no need to export a file to PNG, you can simply save them in their native format (XCF and PSD, respectively). If you're satisfied with one or more textures, just invoke supsta compile, which will read those files, scale them appropriately (from your working size to the texture pack resolutions you want to support) and put them in their respective locations in StarMade's texture files.
    The following invocation will not only compile the project, but also horizontally flip normals (which you will need in case you're generating normal maps with a program like Blender), install the texture pack (no need to copy it manually), and watch the project for further changes. Each change triggers a new compile.
    Code:
    supsta compile -Hwi project_name

    There was a StarMade update that introduced new blocks? Just run supsta upgrade, it will upgrade your project to the new version.

    Why should I use this?
    Because it provides an abstraction layer to the StarMade texture format, which will render you invulnerable to possible changes in the texture format (like it happened with Minecraft), but more importantly, because it will relieve you of many manual steps that you had to take without it:
    • Resizing: For example, you can use 1024x1024 as a resolution while you work on the texture, but target multiple resolutions (like 64, 256)—Supsta will scale your textures accordingly.
    • XCF and PSD support: Just work with the file format you're comfortable with, no exports to PNG are necessary. PNG is still recognized, of course.
    • Supsta can automatically install the textures to the correct directory, so you don't have to copy them manually for testing.
    • No need to initiate any interaction. Supsta can watch a directory, and compile the texture pack as soon as a change happens.
    • Normal maps can be horizontally flipped, relieving you of the need to do that yourself, in case your external program (like Blender) will render them in the opposite direction.
    • Automatically create a ZIP file, allowing instant publishing (not yet implemented—invoking this will raise an error).

    Awesome! How do I get it?
    1. Prerequisites: You need to have Ruby and the GIMP installed. Both must be in your PATH environment variable. Linux users can just install the packages ruby and gimp and are good to go—no need to configure anything there.
    2. Download the latest version.
    3. Installation: Extract the tarball to a location of your choice. Open up a terminal (cmd on Windows), cd to that location and run:
      Code:
      bundle install
      This will download the Gems (in layman's terms: Ruby addons) that are required to run this program.
    4. Since it's not yet ready to be released as a gem, you will either have to adjust your RUBYLIB, or use bundle to execute the program as well.
      Code:
      bundle exec bin/supsta
      Meaning: In the above examples, replace supsta with this.

    General project information:
    • Programming language: Ruby
    • Platforms: Multi (only tested on Linux, but no platform specific code was used)
    • License: GPLv3 (the code is painful, though)
    • Status: Alpha
    • Project page: Project page on Google Code (there's not much there, yet)
    • Type: CLI only
     
    Last edited:
    Joined
    Jan 22, 2014
    Messages
    1,047
    Reaction score
    299
    I've resumed working on this again. Since I'm rewriting most of it from scratch, the next version of the application will not be compatible with old projects (which doesn't matter, since nobody has been using it anyway¹).
    ¹ On that matter: A bug that prevented it from running when following the above installation instructions has been fixed. :P

    The simple directory layout will stay pretty much the same. However, the internal project layout will become much more complex. For example, filters and combinations of textures with others will be supported. Example: When making changes to the occlusion map of the basic hull texture, I had to copy it manually to every texture file. The new program will take care of that and automatically update all the textures as the occlusion map changes.
    An appropriate CLI would be very hard to learn, thus with all of the ongoing changes it will also be equipped with a GUI, deprecating the CLI.
    The project manager (main window).
    Bildschirmfoto von »2014-10-26 19:06:05«.png

    New project dialog.
    Bildschirmfoto von »2014-10-26 18:14:55«.png

    Project wizard.
    Bildschirmfoto von »2014-10-26 18:46:29«.png

    The project window, with the target/texture/filter tree on the left and the log on the right.
    Bildschirmfoto von »2014-10-26 18:16:09«.png
     
    • Like
    Reactions: DukeofRealms