GithubHelp home page GithubHelp logo

texgen's Introduction

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 both secure.http_mods and secure.trusted_mods.

WARNING: Enabling this feature poses a minor security risk.

Configuration

Note that Minetest will only load media from subfolders as of version 5.4.0, so if you enable texgen.use_dirs, the textures may not show on older Minetest versions.

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

use_dirs

Whether to use subdirectories for each mod inside the textures folder

  • Type: boolean
  • Default: false

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"

texgen's People

Contributors

appgurueu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

texgen's Issues

doesn't use texture pack from texture_path

I finally took the time to play with this mod!
But something confused me.

I was expecting the mod to use the texture pack provided by texture_path (in my case rpg16)
Instead it uses the textures from the mods. And then rpg16 textures simply acted as a normal texturepack.

original with rpg16 (notice the cliff, dirt, stone and grass on the left)
Asuna rpg16

with texgen and rpg16
Asuna texgen rpg16

with texgen and blank texture_path (my palette doesn't contain gray/brown, and is more muted than rpg16)
minetest_W5CICpjmcv

I am wondering if I am missing some setting, or if this is done on purpose. Or maybe it is a limitation?

I tried this workaround: turn the TP into a mod that depends on the same mods as texgen. And make texgen depends on it.
But that doesn't seem to work. I am assuming the textures modified are the one used when an item is registered?

a few other notes/ideas

  • consider adding mod folders to the textures folder. It would make the texturep pack more organised and greatly facilitate its edition!
  • generate an example for each dithering method
  • add the necessity to add the mod to secure.trusted_mods and secure.http_mods in the readme
  • allow some hue/color/shade limit per texture? that would be an interesting stylistic tool, but it might get tricky with textures that contain multiple hues (mixed materials, flowers, ...)
  • respect hue over shade. Example, because my palette doesn't contain grays, a lot of textures switch from green to purple, sometimes with jarring "streaks"
    moon_3_realistic
    in this case you can see that the exact same gray (#a9a9a9) becomes a different color (floyd steinberg dithering)
    Discord_F6sY8BOCfQ
    I did a few tests and it seems different dithering mode will give different results. To me the main issue is the "streaking" pattern, that seems like more of an artefact than anything. I assume the algorithm is trying to fill contiguous areas?
    I'll try more dithering options to see if one of them fixes that issue.
  • pat yourself on the back. You deserve it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.