Laigter: automatic normal map generator for sprites!

Related tags

Game gamedev normalmap
Overview

laigter-banner

Laigter Build Status

Overview

Laigter is a tool that automatically generates maps for dynamic lighting effects in games. It allows normal, parallax, specular and occlusion map generation. Also, it allows the user to preview how the effect will look in-game.

Laigter is available in Spanish, English, French, Brazilian-Portuguese, Catalan, Danish and Greek. It should automatically detect your PC language.

Discord Server

Download

Download from itch.io

Download from the Release page

Contributing

The easiest way to contribute is trying Laigter and giving me your feedback. Please open an issue when you find a bug, and try to specify the way to reproduce it. Also, suggestions, feature requests, and new ideas are welcome. Please open issues for all that!

On itch.io, you can download the tool for free, or choose to pay any amount to support the project.

You can also support the development on Patreon: Become a Patron!

Or support it by PayPal: Donate.

Now you can also ko-fi

If you want to contribute by coding, please contact me and we'll see how we can work together! Many things are needed. Also, please read the Contributing guidelines.

Screenshots

screenshot1 screenshot2 screenshot3 screenshot4 screenshot5 screenshot6 screenshot7 screenshot8 screenshot9 screenshot10

Compiling

Compiling on Linux

Getting the Dependencies

Compiling on Linux is pretty straightforward. The following dependencies are required:

  • Qt 5.14 or above (modules Concurrent, Core, Gui, Widgets) and optionally Qt Creator.
  • OpenGL development libraries.

If you install Qt from the online installer, you don't need to install the Qt-related packages below.

Install prerequisites by entering the following command in a terminal (depending on your distribution):

Debian/Ubuntu
sudo apt install qt5-default qt5-qmake libgl1-mesa-dev
Fedora
sudo dnf install qt5-devel mesa-libGL-devel
Arch Linux/Manjaro
sudo pacman -Sy qt5-base

Get the source

Then get the source either via git clone:

git clone https://github.com/azagaya/laigter

or download the package via:

  1. Get the package here
  2. Extract the package in your desired location

Then finally cd into the Laigter directory: cd laigter

Building

Using Qt Creator

That's it, you can now open laigter.pro with QtCreator and build or debug Laigter.

Using the terminal

After installing dependencies, you can also build from the terminal with:

mkdir build
cd build
qmake ../
make -j$(nproc)

Compiling on Windows

Getting Qt

For Windows, the steps are similar:

  • Install Qt: I strongly discourage the offline installer, use the online installer instead. In the components selection window, you'll need to select Qt Creator under Qt > Developer and Designer Tools and the MinGW 64-bit or 32-bit toolchain under Qt > Developer and Designer Tools > MinGW 7.3.0 and Qt > Qt 5.14.0 > MinGW 7.3.0.

Do not choose the MSVC toolchain. If you choose both the 64-bit and 32-bit versions, make sure that only one version is in the system path, otherwise you will have problems compiling.

Tested with Qt 5.14.

Get the source

You may get the source cloning the repository. For that, I recommend using Git for Windows. With it, you can clone Laigter:

git clone https://github.com/azagaya/laigter

You may also download the package directly if you don't want to use Git:

  1. Get the package here
  2. Extract the package in your desired location

Building

Open Laigter project in Qt Creator installed with the online installer, and run the project. No extra steps should be needed.

Deploying the application

If you want to deploy the application for Windows, you will need the windeployqt command. Something like the following should be enough:

mkdir .\deploy
windeployqt --dir .\deploy ..\build-laigter-Desktop_Qt_5_14_0_MinGW_32_bit-Release\release\laigter.exe
copy /Y ..\build-laigter-Desktop_Qt_5_14_0_MinGW_32_bit-Release\release\laigter.exe .\deploy\laigter.exe

Compiling on macOS

On Mac, is very similar than on Linux.

Prerequisites

First, install Qt. I recommend using the online installer for Mac.

Get the source

Then get the source either via git clone:

git clone https://github.com/azagaya/laigter

or download the package via:

  1. Get the package here
  2. Extract the package in your desired location

Then finally cd into the Laigter directory: cd laigter

Building

That's it, you can now open laigter.pro with QtCreator and build or debug Laigter.

And that's all the tests I could make before I had to return the Mac.

Using Laigter with command line

Laigter can be used from the command line with following options:

-?, -h, --help Displays help on commandline options.

--help-all Displays help including Qt specific options.

-v, --version Displays version information.

-s, --software-opengl Use software opengl renderer.

-g, --no-gui Do not start graphical interface.

-d, --diffuse <diffuse texture path> Diffuse texture to load.

-n, --normal Generate normals texture.

-c, --specular Generate specular texture.

-o, --occlusion Generate occlusion teture.

-p, --parallax Generate parallax textures.

-r, --preset <preset file path> Preset file to use for texture generation.

Examples for command line

Some basic example for common usages:

<PathToLaigter>/laigter.exe --no-gui -d "<pathToDiffuseTexture>.png" -n Exporting a normals texture of the specified diffuse texture using the default profile.

<PathToLaigter>/laigter.exe --no-gui -d "<pathToDiffuseTexture>.png" -n -c -o -p Exporting normals, specular, occlusion and parallax textures of the specified diffuse texture using the default profile.

<PathToLaigter>/laigter.exe --no-gui -d "<pathToDiffuseTexture>.png" --r "<pathToPresetProfile>" -n -c -o -p Exporting normals, specular, occlusion and parallax textures of the specified diffuse texture using the specified preset profile.

macOS

Symlink the binary. Replace /Applications with the path to Laigter.

sudo ln -s /Applications/laigter.app/Contents/MacOS/laigter /usr/local/bin

Now that the laigter binary is symlinked to a location in the PATH environment variable, you can run Laigter from anywhere:

laigter --no-gui -d "<pathToDiffuseTexture>.png" --r "<pathToPresetProfile>" -n -c -o -p

License

Copyright (C) 2019 Pablo Ivan Fonovich

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Comments
  • Zoom out broken in 1.10.1

    Zoom out broken in 1.10.1

    A second separate issue I had with 1.9.2 was the zoom out was not functional. I could only zoom in or reset the zoom level. This issue does not exist for me in 1.9.1.

    bug help wanted 
    opened by Solstice245 32
  • Make a new Mac Big Sur-specific icon for Laigter

    Make a new Mac Big Sur-specific icon for Laigter

    Not sure if it is important but, in the next MacOS version, The Laigter icon will probably look out of place on the new version. I feel a new Mac specific icon should be designed for this new version.

    This is what the default MacOS Big Sur Icons are going to look like.

    Problem is, I only have Windows/Linux.

    opened by creepertron95 27
  • Look for another Image processing library (or use Qt's functions)

    Look for another Image processing library (or use Qt's functions)

    The idea is to replace opencv for a lighter and easier to compile in multiple platforms library. In theory, we just need a distance transform function, and common color manipulation features.

    If anyone cames up with any idea, please comment!

    enhancement question 
    opened by azagaya 16
  • experimental cli export feature

    experimental cli export feature

    These changes implement an experimental cli export feature wich allows for selectively generating any number of the supported types of generated maps from a given diffuse texture (and optionally a given pressets file) and exiting without loading the main window.

    Unrelated to the above mentioned feature, I made a bat script to simplify deploying on windows and added one line to gitignore to ignore the deploy directory

    enhancement 
    opened by Gnumaru 16
  • Changing settings stops working after going into

    Changing settings stops working after going into "Preview" / Click missplaced on retina screens.

    In version 1.10 on OSX, as soon as you go into the Preview mode you can no longer change any of the settings. Updating the values does nothing. If, however, you go into the Presets panel after and simply click Apply, you're then able to again change the settings and have them applied until the next time you go into Preview.

    bug help wanted 
    opened by cassiussa 14
  • [Feature Request] values besides sliders

    [Feature Request] values besides sliders

    I think it would be nice to have values besides the sliders because it helps to remember which value worked nicely. It'd also be useful to configure the light height exactly like in the engine you are using. It could also just be a switchable feature.

    enhancement gui 
    opened by Lodugh 14
  • Compile instructions do not work for Fedora Linux.

    Compile instructions do not work for Fedora Linux.

    I went through the compile instructions and made sure all dependencies are installed. When I went to build, everything appears to build okay. However, when I go to run laigter.pro, I get this:

    ./laigter.pro: line 24: QT: command not found
    ./laigter.pro: line 26: TARGET: command not found
    ./laigter.pro: line 27: TEMPLATE: command not found
    ./laigter.pro: line 33: DEFINES: command not found
    ./laigter.pro: line 40: CONFIG: command not found
    ./laigter.pro: line 42: QMAKE_CXXFLAGS_RELEASE: command not found
    ./laigter.pro: line 44: SOURCES: command not found
    ./laigter.pro: line 67: HEADERS: command not found
    ./laigter.pro: line 93: FORMS: command not found
    ./laigter.pro: line 105: unix{: command not found
    ./laigter.pro: line 106: syntax error near unexpected token `PREFIX'
    ./laigter.pro: line 106: `    isEmpty(PREFIX) {'
    

    How on earth would I fix this? I would really like to get this working in Linux, my entire workflow is there. It would be a royal PITA if I had to boot into Windows every time I wanted to use this app.

    I've never had this issue compiling C++ applications, but this is my first time using QT, so.

    opened by behelit2 13
  • Some suggestions

    Some suggestions

    Some suggestions for future updates...

    1. Currently you can add lights, but cannot delete them afterwards. Need the ability to delete added lights

    2. Creating, Edit and Saving of project settings so we can comeback and edit what we have made. From programmers viewpoint... you would just save a text file of the path to the image and all the settings.

    FYI, tried the presets, but couldn't figure out how to get it to work. After creating a preset, I click save and Apply. Nothing happened. From a programming/user standpoint... this is kind of hidden away. I think just have a New, Open and Save project file would make more sense for users.... or make the Presets more front and canter and easier to use. Some suggestions for future updates...

    1. Currently you can add lights, but cannot delete them afterwards. Need the ability to delete added lights

    2. Creating, Edit and Saving of project settings so we can comeback and edit what we have made. From programmers viewpoint... you would just save a text file of the path to the image and all the settings.

    3. If you keep the export canvas function, a) change icon to something else beside an animation/video icon; b) The ability to edit the dimension (WxH) of the canvas.

    enhancement feature request 
    opened by pixelinkmedia 11
  • Preview export seemingly not working properly

    Preview export seemingly not working properly

    opened by Solstice245 10
  • Export transparent pixels as transparent in the normal map (premultiply alpha)

    Export transparent pixels as transparent in the normal map (premultiply alpha)

    Hi

    Not sure if there is such a feature in laigter, but I would use one if available. I need this, because I want to pack all my normal maps into an atlas, and I strip all transparent pixels to fit all my sprites into one 2048x2048 page. Then I deal with the striped sprites in my app.

    is it available, if not may I request an option in export to premultiply alpha onto exported normal maps?

    Thank you.

    opened by dariuspranskus 9
  • Remove generated files from Git

    Remove generated files from Git

    I noticed the repository includes some generated files such as compile_commands.json and *.qm. We should look at removing them from the repository, and generate them at build-time instead.

    opened by Calinou 8
  • Alpha settings in presets?

    Alpha settings in presets?

    Good morning!

    Firstly, thank you for such an amazing tool!

    I was trying to use the CLI mode to generate a bunch of Normal maps. In the GUI, I can toggle the Alpha checkbox and generate them fine, but in the CLI, I can't seem to find a setting that will work. My limited knowledge of C++ has struggled to find a way to load a preset with that setting.

    Am I doing something stupid? Any suggestions you have would be highly appreciated

    opened by MikeRocke 2
  • Some GUI issues: small laptop screen usability, GUI redraw bugs

    Some GUI issues: small laptop screen usability, GUI redraw bugs

    Hi,

    First, thanks for this nice software!

    I have some redraw bugs: when I click any widget on the GUI, it does nothing, I have to click elsewhere (for example inside the view) to force a redraw.

    There is another issue quite annoying when I'm on my laptop, which has a small 1366x768 screen, the application window does not fit in (too tall), and it cannot be reduced. It could be nice to remove that limitation, and add a scrollbar when the height is reduced.

    I also have widget with drawing bug (sliders), but it seems to be fixed if I switch to the "dark blue" theme.

    OS: Up to date Linux Fedora Laigter version: Up to date Flathub version (1.10-beta)

    opened by cronvel 3
  • Custom Theme Support

    Custom Theme Support

    Hi, I was wanting to suggest custom themes now that the theme selector is implemented. I have a few suggestions.

    1. Allow user to have custom window colors and custom icon themes.

    2. The dialog that appears after selecting the theme manager icon, That dialog is titled Form. I think should be labeled something like Theme Manager

    3. I made a quick sketch of my ideas. lgtr-theme

    opened by creepertron95 1
  • Weird Behaviour (See Screencast)

    Weird Behaviour (See Screencast)

    See the attached zip file, it contains a video recording of the issue (sorry, i have no microphone)

    Details:

    1. Launching the app displays the window but with no content, you must first "click" inside or "move to another container (i3wm)" for the contents to finally show.
    2. In order to see the changes when selecting widget, there must be first a "click" (not necessarily in the main window).
    3. Sliders are working (you can see the real-time effect as the value gets updated)
    4. Selecting on a tab like "Export" and "Texture", you must first make the "trigger click" for the widgets to get updated.

    laigter.zip

    System Information: OS: ManjaroLinux x86_64 Kernel: Linux 5.5.16-1-MANJARO WM: i3

    opened by flamendless 0
  • Numeric input, presets and file handling

    Numeric input, presets and file handling

    This is an awesome tool and I will keep using it in my current prop workflow. Therefore I would like to ask for a few minor enhancements to probably speed up the general process.

    • Every Slider should have a numeric input field besides it. I believe I saw something like that in the beta with a number inside the slider? But it seemed to be the main reason for crashes. Normal input field would be better anyways. (Unreal Engine does it right)

    • Presets don't make any sense right now, Preset controls should be a palette in main window not a dialog

    • Preset save files should be seperate for every tab on the left in main window (Normal, Spec, ...) for maximum flexibility

    • "Tile" tab could go up with the other tabs so there is space for the Preset controls

    • Presets for export on the right should have a similar logic like the on the left

    • batch export (creates filenames with postfixes automatically) is pretty solid, exporting single passes however (only the normal map for instance) gets frustrating because of that

    • two Export buttons on top, one for current view mode (creates no postfix, can overwrite) and one for batch export

    • Export to... doesn't work for me, get message "OK", no files in folder (all boxes checked, except Preview) > should be removed anyways for a new batch export dialog

    enhancement gui 
    opened by e170385 2
Releases(1.10.7)
A flutter package for making game levels map like candy crush or similar games using flutter with ability to be horizontal or vertical

Game Levels Scrolling Map A package for making game levels map like candy crush or similar games using flutter with ability to be horizontal or vertic

Mohamed Sayed 12 Oct 26, 2022
So_Long project is a 2D game that can read/parse any given map.

SO_LONG So_Long project is a 2D game builded with <MLX> that can read/parse any given map. COMPILE cd path/to/SO_LONG && make or for bonus part cd pat

Mhamed Ajjig 4 Nov 15, 2022
An Unreal Engine 4 Dungeon Generator

DungeonGenerator A (hopefully) handy Unreal Engine 4 Dungeon Generator Read the full docs here: https://github.com/orfeasel/DungeonGenerator/blob/main

Orfeas Eleftheriou 69 Dec 28, 2022
An Unreal Engine 4 SDK generator using SdkGenny

UE4Genny UE4Genny is an SDK generator for Unreal Engine 4 games. It aims to provide a functional SDK that requires little to no editing after generati

null 98 Jan 2, 2023
Generate Height map with Generator (OpenGL and imgui) and Construct Splat Map with generated height map using Algorithm

Generate Height map with Generator (OpenGL and imgui) and Construct Splat Map with generated height map using Algorithm(DPS, BFS, Gradient Descent ... etc) . At Renderer, with height map and blend map which are generated in front of this stage, render high quality terrain with OpenGL

Snowapril 35 Mar 22, 2022
A fantasy map generator based on Martin O'Leary's "Generating fantasy map" notes

Fantasy Map Generator This program is an implementation of a fantasy map generator written in C++ based on the methods described in Martin O'Leary's "

Ryan Guy 630 Dec 16, 2022
Harsh Badwaik 1 Dec 19, 2021
Windows 10 interface adjustment tool supports automatic switching of light and dark modes, automatic switching of themes and transparent setting of taskbar

win10_tools Windows 10 interface adjustment tool supports automatic switching of light and dark modes, automatic switching of themes and transparent s

Simon 1 Dec 3, 2021
Load Aseprite files for animated sprites in raylib.

raylib-aseprite Load Aseprite .aseprite files for animated sprites in raylib. Features Load Aseprite files directly for use in raylib Draw individual

Rob Loach 30 Dec 20, 2022
Risc-V RV32IMAFC + 80s ERA SoC (bitmap + GPU, sprites, tilemaps)

A simple (no interrupts or exceptions/traps), Risc-V RV32IMAFC CPU, with a pseudo SMT (dual thread) capability. The display is similar to the 8-bit era machines, along with audio, SDCARD read support, UART and PS/2 keyboard input.

Rob S 17 Jun 3, 2022
This project is a small 2D game with minilibx. You'll learn about textures, sprites and tiles.

(੭。╹▿╹。)੭ so_long This project is a small 2D game with minilibx. You'll learn about textures, sprites and tiles. Preview How play the game To play thi

ChloeKim 10 Aug 16, 2022
Threat Emulation and Red Teaming Framework, The Hacking Software for normal people.

The Remote Hacker Probe is a Threat Emulation and Red Teaming Framework built to be easy to use. The Remote Hacker Probe is Feature Rich! Including, K

QuantumCored 179 Jan 5, 2023
Gauss Stylization - Interactive tool for normal driven stylization

Interactive tool for normal driven stylization. A set of preferred normals can be chosen arbitrarily from the Gauss sphere, including semi-discrete sets to model preference for cylinder- or cone-like shapes.

Ugo Finnendahl 16 Dec 6, 2022
Remote hacker probe - Threat Emulation and Red Teaming Framework, The Hacking Software for normal people.

The Remote Hacker Probe is a Threat Emulation and Red Teaming Framework built to be easy to use. The Remote Hacker Probe is Feature Rich! Including, K

Fahad 180 Dec 27, 2022
A simple program that converts images into normal maps

Advertisement If you are a Blender user, this addon I created might be interesting for you: NormalmapGenerator This is a program to generate normal-,

Simon Wendsche 359 Dec 14, 2022
Bit-Map is a simple bit map.

Bit-Map Bit-Map is a simple bit map. Usage Create a map uint8** bitmap; uint64 map_size = 32; // bit number pfs_create_bitmap(bitmap,

Pink 2 Feb 18, 2022
A lightweight C++14 parsing library for tmx map files created with the Tiled map editor

tmxlite Description A lightweight C++14 parsing library for tmx map files created with the Tiled map editor. Requires no external linking, all depende

Matt Styles 325 Dec 26, 2022
An automatic crafting rotation generator for ffxiv.

ffxiv-crafting-guide This is an automatic crafting rotation generator for ffxiv, written in C++. Introduction Given your character status and recipe i

Renko 11 May 22, 2022
Procedural world generator written in C++. Uses SFML for map rendering.

World Generator Archived as the code is a big mess and it'd be easier to start from scratch than to clean up this code. A procedural world generator i

moneyl 32 Nov 22, 2022
Facebook AI Research's Automatic Speech Recognition Toolkit

wav2letter++ Important Note: wav2letter has been moved and consolidated into Flashlight in the ASR application. Future wav2letter development will occ

Facebook Research 6.2k Jan 3, 2023