Resources for finding/making UV color palette?

I’m still working my way through Learn 3D Modelling for Beginners so it might be in a lesson I haven’t gotten to yet, but I’m learning Blender so I can make 3D assets for making video games (Godot, specifically) and I’ve read that UV textures/color maps are the way to go. But I’m a bit lost/confused how one finds or makes a UV color palette.

Does anyone have any tips, suggestions, links, etc?

3 Likes

Well, there’s no one better-equipped to answer this than Vertex Rage himself, but I’ll still try to lay out the basics for you.

At a high-level, you can piece the exact procedures together from the early part of the Texture Painting course, and the Spitfire section of the beginner course you’re in right now. Those two sections will show you 90% of what you need. It would look something like this:

  • Create a material and apply it to the entire model
  • In the Shading Workspace, assign a texture input to the material
  • The colour palette itself is just an image - could be made with GIMP, or even MSPaint if you want. Set your colour palette image as the material’s texture (don’t use single pixels per colour; the absolute minimum you should use is 3x3, and you should probably go larger than that)
  • Build a UV Map for your model, adding seams not only for stretch-minimized unwrapping, but also to separate UV faces that will be of different colours (not strictly necessary, just for your own convenience).
  • Crush the UVs down to small shapes that will fit within the colour squares of your palette and grab/drop them onto the appropriate colours, which you should immediately see on your model even as you are moving the UVs around. Do not reduce the UVs down to an absolute pinpoint, as this can cause problems with the game engine itself. @bOBaN knows much more than I do about the exact implications; all I know offhand is, it’s a no-no XD

I haven’t tried importing any models that use a colour atlas like this (outside of the Godot 3D course, which is a bit outdated in this particular regard), so I don’t know exactly what you may or may not need to tweak with the Importer in the engine. That said, it should be relatively straightforward, as the Engine Contributors have put some work into streamlining the process for stuff like this. Hopefully you can just import the .blend file itself, as this already works fine when using dedicated materials instead of a colour atlas.

If you do need to export the model first, be aware that Godot 4.3 introduced a native .fbx importer, so you no longer “need” to use .glTF/.glb for imports into Godot. If one format doesn’t work right away, it’s worth trying the other before even bothering to do any troubleshooting. Good luck, and I hope you share what you make!

6 Likes

Ok, so to keep the computer appeased I’d want to use a power of 2, so say a 64x64 square for each color. That would give me 64 colors in a 512x512 UV sprite. And if I wanted a gradient then I’d use up three or four squares for each gradient.

But what about metallic/rough textures? Those aren’t colors—though I’ve learned they can be represented as a black/white color ramp to showcase how metallic/rough the texture is. Do you know how I can map those to a UV color palette?

3 Likes

This is something I neglected to mention, but absolutely correct. I’m pretty sure a rectangle also works as long as each individual dimension is a power of 2.

Properties like this fall under “Physics-Based Rendering” (PBR for short), to give you another term to help with your research =)

If you’re talking about emulated PBR, where things like shine marks are simply painted on (as is done in the Texture Painting course), you can largely handle this in your colour palette via gradient, as you alluded to. If you can’t get all the PBR permutations you want in a single colour square, you may have to stitch together a megapalette out of several smaller ones, but if it’s all the same image, that won’t matter at all.

If you’re talking about procedural PBR, as in actually dragging sliders around on a PrincipledBSDF node for example, you might be able to combine the texture input with a PrincipledBSDF node in the Shading Workspace and apply PBR to your entire colour atlas. I don’t know very much about making procedural materials beyond what’s taught in Grant’s beginner course so I don’t know if this is something you can get away with in Blender; if not, you might have to resort to dedicated materials. Godot will be able to handle most PrincipledBSDF variables directly, but anything more procedurally-complex than that would have to be baked before you can use it in a game engine, which is a whole other domain of research.

4 Likes

Ha! Someone remembers! :slight_smile:

Scaling UVs to 0 should not cause issues if you intend to stick to Blender. It should work in Unity too, but I haven’t tested side effects there (might cause shading artifacts for built lighting).

Otherwise I now do ‘normal’ UV unwrap for my low poly models, and then just scale it down to fit in those little color squares.

The palette-based look typically just use some value for it, and not separate texture map. You can experiment with it, but my (limited) experimentation didn’t yield anything interesting. The simplest way IMO is to have a few materials for different kind of ‘things’ (e.g., metal, shiny plastic, rough/rubbery material). Btw. a lot of people don’t even set metallic value for ‘metal’ things (like swords, axes, nails, etc.) due to aiming for very ‘cartoony’ look.

4 Likes

The power of two rule is an old rule to be sure that you are using memory and CPU efficiently.

in the early days with 8, 16 bits … systems, it is inefficient to load a (as example) a 5x5px image, when the cpu works with 8, 16 … bits at each clock cycle and memory allocation with those factors.


That would give me 64 colors in a 512x512 UV sprite.

If you do 4px for each color, then a 32x32 uV sprite would be enough. Smaller file size, faster loading times…

4 Likes

The palette-based look typically just use some value for it, and not separate texture map. You can experiment with it, but my (limited) experimentation didn’t yield anything interesting. The simplest way IMO is to have a few materials for different kind of ‘things’ (e.g., metal, shiny plastic, rough/rubbery material). Btw. a lot of people don’t even set metallic value for ‘metal’ things (like swords, axes, nails, etc.) due to aiming for very ‘cartoony’ look.

Considering I’m wanting to do more stylized or low-poly inspired I just might end up using a grey color instead of an actual metallic map. Thanks! :+1:

3 Likes

If you do 4px for each color, then a 32x32 uV sprite would be enough. Smaller file size, faster loading times…

I actually played around in Affinity Designer a bit with some color palettes I found on lospec and I was amazed at how much a 64x64 square was! Especially considering how small I could scale the UVs. Once I get to the point where.

What size color palette do you suggest a beginner start with? I know on the one hand constraint breeds creativity, but on the other having more options aren’t always bad, either. Should I start with a 64-color palette? 128? 256 (:scream_cat:)? I’m thinking that 64 is enough to start with.

3 Likes

What I would do is, with a specific project/use-case in mind, make a test palette with a few colour gradients in squares that are larger than you think you need, then scale that palette down to 50% several times over to create several identical palettes of different sizes. Then you’ll be able to see for yourself what size you need to have the level of colour detail you want. It’s less about “beginner” in this case and more about how much control you need over the gradient spread on the model itself, since the smaller the square you use, the less gradual you can make each gradient.

3 Likes

Honestly as someone who’s partially colorblind I prefer to use other people’s palettes. Lospec has a lot of great (IMO) palettes to use made by people with (what I hope is) more color-awareness and an eye for design that I lack.

3 Likes

That’s a good reason! I guess what it really comes down to is to sample a few sizes in order to build a sense of what feels right for you, and either way, it may actually differ from project to project. Never be afraid to just try stuff out and see what happens. Have fun! =)

4 Likes

Privacy & Terms