IN ALPHA - There may exist breaking bugs and a lack of features. This application is in very early development. Use at your own risk.
A Qt-based desktop application for painting 2D normal maps. This tool allows users to paint normal maps on top of an image, visualize normal directions in real-time using a 3D sphere, and export the results. This is still under development.
LATEST RELEASE - v0.0.2
- Load and display an image as a painting reference.
- Paint normal maps with customizable brush directions.
- Real-time 3D normal visualization using a spherical interface.
- Scale the painting canvas to match the loaded image.
- Sample existing normals by hovering over painted pixels.
- C++
- Qt6 (Widgets, OpenGL)
- CMake
- GLM (for 3D math)
Ensure you have the following installed:
- Qt6 SDK (Install via Qt Installer: Qt Downloads)
- CMake (
>= 3.10
) - A C++17-compatible compiler (MinGW-w64, MSVC, or Clang)
- GLM Library (Install via package manager or manually)
-
Clone the repository:
git clone https://github.com/your-username/2d-normal-map-painter.git cd 2d-normal-map-painter
-
Configure and build using CMake:
You must configure your CMakeLists.txt so that
CMAKE_PREFIX_PATH
points to your local Qt installation.// This is an example and may need to be updated. CLion has been responsible for executing cmake so far. mkdir build && cd build cmake .. cmake --build .
-
Run the application:
./2d_normal_map_painter
Optionally, you can use an IDE like CLion. Just make sure the Makefile is pointing to the correct Qt6 directory on your computer.
- Load an Image: Click
File > Open Image
to select a base texture. - Paint Normals: Click and drag to paint normal values on the canvas.
- Sample Normals: Hover over painted pixels to view normals on the sphere.
- Select Color You Are Sampling: Press [ENTER] on keyboard to select a normal from the normal map.
- Adjust Scale: Resize the image and canvas dynamically with [Scroll Wheel].
- Pan Image: Pan the image by pressing in the scroll wheel and dragging.
- Save Normal Map: Click
File -> Save Normal Map
to save your image.
Contributions are welcome! To get started:
- Fork the repository.
- Create a feature branch (
git checkout -b feature-name
). - Make your changes and commit (
git commit -m "Description of change"
). - Push to your branch (
git push origin feature-name
). - Create a pull request and describe your changes.
--- Essential ---
- Scale / Pan normalmap image with the mouse wheel.
- Add save functionality for normal maps.
- Scale / Pan for lighted preview.
- Implement undo/redo support.
- Handles for the Normal Sphere Selector for all used normals. Allow clicking them to select a direction, or cycling through them with keyboard.
- Allow moving the Normal Sphere Selector handle with arrow keys or touchpad.
- Line drawing
- Slider to adjust Normal Map overlay transparency.
- Improve Ui Layout.
- Resize Top / Bottom halves
- Potentially create a more intuitive and useful layout.
--- Adding functionality beyond pixel art ---
- Brushes.
- Brush size adjustments.
- Blend modes
- Performance optimizations.
This project is licensed under the MIT License.
For any questions or issues, feel free to open an issue in the repository.
🔗 Happy coding! 🚀