Skip to content
A GPU-accelerated texture painter written in Godot 3.0
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Properties
assets Big refactor, the Textures node is now a singleton for easier access Jul 19, 2018
autoloads Dialogs is now a CanvasLayer to draw on top of everything else withou… Jul 21, 2018
export fixed the seam fixer on my machine. finally. May 21, 2018
images Fix bug in shadow map where WorldEnvironment would influence the dept… Jul 8, 2018
views Moved all the states into their own folder Jul 20, 2018
.gitignore Add SharpZipLib dependency Jul 15, 2018
LICENSE Create LICENSE May 13, 2018
README.md Update README.md Mar 14, 2019
Texture Painter.csproj Add proper saving Jul 16, 2018
Texture Painter.sln Adding new file format using C# and zip files Jul 15, 2018
default_env.tres
icon.png First commit May 13, 2018
icon.png.import Fix bug in shadow map where WorldEnvironment would influence the dept… Jul 8, 2018
icon.svg First commit May 13, 2018
icon.svg.import Fix bug in shadow map where WorldEnvironment would influence the dept… Jul 8, 2018
project.godot Moved the Textures singleton into the autoloads folder Jul 20, 2018

README.md

Godot Texture Painter

This is a prototype for a PBR texture painter in Godot 3.0. It's meant to be mostly a proof-of-concept, to show that it's possible at all - but I might turn it into a full blown application one day (but no promises!).

Paint

The painting algorithm is GPU-accelerated, so you can paint on extremely large textures with huge brushes on very high poly models without lag.

You can paint albedo, roughness, metalness and emission. Also, you can right click to place decals, and use the slider on the top right to change the brush softness. Other controls are displayed on the GUI.

Here's a video of it in action.

Note: does not work in Godot 3.1 yet. I'll try to fix it when I have some more time.

How it works

The program works using two kinds of textures: mesh and paint textures. They are organized in the scene tree like this:

Tree

Mesh textures store information about triangle position and normal on a per-pixel basis, which is used as input for the paint shader to do GPU accelerated painting. This already reveals a fundamental limitation of the algorithm, though: since a texture can store only one value per pixel, a texel can only be at 1 point in space at the same time. As such, the algorithm only works for models that have non-overlapping UVs (so every texel appears exactly once on the model).

Paint textures store the actual texture you see on the model, and it is generated by mixing the output from the paint shader with the previous frame. There are 4 of them: albedo, roughness, metalness and emission. I might make a 5th one, for painting normals, although that will be a little more difficult to implement.

Limitations/Known Issues

  • You can only paint on models that have non-overlapping UVs.
You can’t perform that action at this time.