Skip to content
Laigter: automatic normal map generator for sprites!
C++ GLSL QMake
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gui Add about widget title. Add some missing translations. Aug 19, 2019
icons Added about dialog. Aug 18, 2019
images
shaders Cleanup for 1.5 version Aug 5, 2019
src Now laigter opens image in gui if passed with -d from cli. Aug 20, 2019
.gitignore implemented experimental command line export feature Aug 14, 2019
ACKNOWLEDGEMETS Actualizar LICENSE y ACK Jul 8, 2019
LICENSE Actualizar LICENSE y ACK Jul 8, 2019
README.md Update README.md Aug 15, 2019
compile_commands.json Se añaden archivos faltantes Mar 9, 2019
icons.qrc Added about dialog. Aug 18, 2019
images.qrc Se termina (mas o menos) un efecto parallax muy básico May 2, 2019
laigter.pro Change opencv include path for 64bits Aug 18, 2019
laigter_en.qm Finished translations for 1.5.1 bug fix release. Aug 19, 2019
laigter_en.ts Finished translations for 1.5.1 bug fix release. Aug 19, 2019
laigter_es.qm Add english translation Mar 17, 2019
laigter_es.ts Finished translations for 1.5.1 bug fix release. Aug 19, 2019
main.cpp Now laigter opens image in gui if passed with -d from cli. Aug 20, 2019
mainwindow.cpp Fixed a bug that caused textures loaded from cli not work properly. Aug 20, 2019
mainwindow.h Now laigter opens image in gui if passed with -d from cli. Aug 20, 2019
mainwindow.ui Finished translations for 1.5.1 bug fix release. Aug 19, 2019
shaders.qrc Cleanup for 1.5 version Aug 5, 2019
translations.qrc Add english translation Mar 17, 2019

README.md

Laigter

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 ingame. You can get binaries from itch.io: https://azagaya.itch.io/laigter

Laigter is available in english and spanish. It should automatically detect your PC language.

Prerequisites

You need Qt framework (online installer is the recommended way to get it) and opencv 3.2 or above. Opencv is not meant for tools like this, but is the one i'm used to. In the future it would be nice to do without it.

Contributing

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, or support it by paypal: Donate.

Now you can also ko-fi

If you wan't to contribute by coding, please contact me and we will see how can we work together! Many things are needed.

Screenshots

specular2 captura-piedra-5 captura-piedras-9 specular4

Compiling on Linux

Compiling on linux is pretty straightforward. Just use your package manager to install prerequisites:

  • Qt and Qt creator: from package manager or online installer.
  • OpenCV: libopencv-dev from package manager
  • OpenGL libray: libgl1-mesa-dev from package manager.

Thats it, you can open the .pro file with qtcreator and build or debug laigter.

Compiling on Windows

For windows, unfortunately, there are more steps to be done.

  • Install Qt: I strongly discourage the offline installer, use the online installer instead. In the components selection window you will need to select qt creator under "qt >> developer and designers tools" and the mingw 7.3 32bit or 64bit toolchain under "qt >> developer and designers tools >> mingw 7.3.0" and "qt >> qt 5.13.0 >> mingw 7.3.0". Do not choose the msvc toolchain. If you choose both the 32 and 64 bit versions, make sure that only one version is in the system path, otherwise you will have problems compiling. Tested with Qt 5.11, 5.12 and 5.13.

  • Install cmake: download and install cmake.

  • Install opencv: download and compile opencv 3.2. It must be version 3.2, it cannot be any other version; be warned.

Once you have installed cmake and downloaded opencv 3.2, folow this tutorial here:

https://wiki.qt.io/How_to_setup_Qt_and_openCV_on_Windows

But before clicking "generate" on cmake-gui, be sure to uncheck BUILD_opencv_python3 in case you have this flag and it is checked. I could not compile until I unchecked this. And also change EXECUTABLE_OUTPUT_PATH to C:\opencv-build\install\x86\mingw\bin wich is the path set on laigter.pro (or you could change the path on your laigter.pro to match your EXECUTABLE_OUTPUT_PATH).

After several minutes, fortunately your compilation will be sucessfull. If that's the case, you can open the project on qt-creator, compile and run it.

  • Deploy application: Once 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_13_0_MinGW_32_bit-Release\release\laigter.exe
copy /Y ..\build-laigter-Desktop_Qt_5_13_0_MinGW_32_bit-Release\release\laigter.exe .\deploy\laigter.exe

If for some reason the opencv libraries do not get copied, copy them also

copy /Y C:\opencv-build\install\x86\mingw\bin\libopencv_core320.dll .\deploy\
copy /Y C:\opencv-build\install\x86\mingw\bin\libopencv_imgproc320.dll .\deploy\

Compiling on MAC

I don't have a MAC, but a few tests i made on a friend's computer made me arrive to the following (maybe incomplete) steps:

  • Install pkg-config

  • Install Qt and Qt Creator: online installer is recommended.

  • Install opencv: in mac, like in linux, i could only install opencv4. After installing, you should add to includepaht in Qt Creator the path to opencv (i think it was: /usr/local/Cellar/opencv/4.0.1/include/opencv4/)

  • Add defines: add this line to imageprocessor.hpp #define CV_DIST_L2 DIST_L2. IDK why it's necessary on MAC and not on Linux.

  • As in windows, imgcodecs.hpp and imgproc.hpp should be included in imageprocessor.hpp (again, idk why in linux is not needed).

And thats all the test i could make before i had to return the MAC.

You can’t perform that action at this time.