[Mod] Texture Generator [texgen]

Post Reply
User avatar
LMD
Member
Posts: 1385
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

[Mod] Texture Generator [texgen]

by LMD » Post

Texture Generator (texgen)

Dynamically generates a texture pack for your current game in the textures directory.

Features
  • Compatible with virtually all mods and games
  • Easy texture pack generation, no complex installation
  • Server-side (mod-based) texture pack; textures can be accessed by other mods
Instructions

Just fire up the mod and configure it to your liking. It might throw an error message as it updates its mod.conf to depend on all enabled mods. Simply retry after that.

Downloading palettes

You can use the /download_palette <url> chatcommand to download a PNG palette file, for example /download_palette https://lospec.com/palette-list/zughy-32-1x.png.

See /help download_palette for details on its usage.

Requires the server priv. Only available if texgen is added to secure.http_mods.

WARNING: Enabling this feature poses a minor security risk.

Configuration

Code: Select all

<!--modlib:conf:2-->
average

Replace each texture with a single pixel of its weighted average RGB color
  • Type: boolean
  • Default: false
invert

Invert the RGB colors
  • Type: boolean
  • Default: false
monochrome

Convert RGB to monochrome (greyscale)
  • Type: boolean
  • Default: false
palette

dithering

Dithering method to use
  • Type: string
  • Default: floyd_steinberg
  • Possible values:
    • sierra
    • stucke
    • sierra_lite
    • jarvis_judice_ninke
    • floyd_steinberg
    • none
    • two_row_sierra
    • burkes
    • atkinson
name

Name of the palette to use (without extension)
  • Type: string
  • Default: apollo
  • Possible values:
    • soggy-newspapers
    • apollo
    • zughy-32
    • aap-64
    • pico-8
    • resurrect-64
saturate

Increase or decrease saturation by a factor
  • Type: number
  • Default: 1
  • >= 0.1
  • <= 10

Code: Select all

<!--modlib:conf-->
Links
  • GitHub - sources, issue tracking, contributing
  • Discord - discussion, chatting
  • Minetest Forum - (more organized) discussion
  • ContentDB - releases (downloading from GitHub is recommended)
License

Code written by Lars Müller (appgurueu) and licensed under the MIT license; builtin Minetest media licensed under various free Creative Commons licenses as well as the Apache 2 license (see LICENSE.txt in the builtin folder for details and attribution).

The palettes are (for copyright reasons shuffled) versions of palettes available on Lospec:
  • Adigun A. Polack's "AAP-64"
  • AdamCYounis' "Apollo"
  • Lexaloffle Games' "PICO-8"
  • Kerrie Lake's "Resurrect 64"
  • Walking's "Soggy Newspapers"
  • Zughy's "Zughy 32"
My stuff: Projects - Mods - Website

User avatar
TestificateMods
Member
Posts: 88
Joined: Sat Apr 11, 2020 02:09
GitHub: t-affeldt
In-game: Testificate

Re: [Mod] Texture Generator [texgen]

by TestificateMods » Post

I am surprised no one has commented on this before. I had a blast testing this tool all day. 😁👌
I didn't have high hopes for the textures to look good but I was positively surprised.

This is really useful for generating missing textures when texture packs don't go well with the "default" style.
For example, when using Soothing32 this lets me apply the same palette (Zughy 32) to all of the missing textures. It obviously doesn't correct for the differences in art style but matching the palette already helps quite a bit and the tool really is super easy to use.

For Soothing32 it worked especially well with dithering set to "none" as this slightly reduces texture complexity, better fitting the minimalistic art style.

I also tried loading texture packs as mods and then using them as a base for generation. This can make up for mismatching art styles. The SimplePixel supports some mods that Soothing32 doesn't. Adjusting SimplePixel to Soothing32's color palette worked really well as they both follow a minimalistic style but with different palettes.

Generating textures was really straight-forward. I am a a huge fan of the auto-detection even if it requires a restart. It's then only a matter of manually deleting some files that shouldn't be adjusted (like screenshots from the doc mod) and overriding the remainder with the desired texture pack. Is there any way to prevent specific files from getting converted? That would help automate this process a little better.

Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 10 guests