1
$\begingroup$

First of all, apologies if my question seems too basic to you, I'm a programmer working on a mobile game who's learning how to use Blender and would like to do it correctly.

Basically I'm making a low poly game and I'm using a 32x32 texture for my model which I use as a colour palette. I'm doing so by unwrapping the object and assigning the faces to a single pixel by scaling them down on the colour I want those faces to be. I was wondering, is this the right way of assigning a single colour to some faces? Can scaling down to 1 pixel affect performance on more complex models? And if I'm doing things incorrectly, what's the best practice for this?

Screenshot below to give you a better idea of how I'm doing this at the moment.

UV Map Example

Thank you for taking the time to read and reply,

Simone

$\endgroup$

1 Answer 1

1
$\begingroup$

Your approach is fine. If it works in tests, stick to it.

Changing (scaling down) the uv coordinates, won't affect your performance at all. If you can update the palette easily, your method has many advantages.

Make sure, you disable interpolation of the texture in your game engine. You want to keep it sharp. In Blender internal renderer (as an example), these filter setting are required, to keep the texture pixelated.
enter image description here


The usual is to assign different materials, with different colors to their respective faces. In Blender this is done by creating new material slots in the material properties panel and then assigning them by selecting the mesh's faces in edit mode and pressing assign with the material slot selected.
assigning materials material slot
This will export to most formats and engines.

$\endgroup$
2
  • $\begingroup$ Thanks for your reply, unfortunately Unity doesn't import the materials created on Blender anyway, I just use it to store the UV coordinates and material name. But that's not my issue anyway, I saw the method I'm using on a tutorial and I was wondering if it affects performance, it works fine on Unity as far as I can tell. I guess I was just overthinking as usual :) $\endgroup$
    – Simone
    Commented Oct 22, 2016 at 13:43
  • $\begingroup$ @MrZak Thanks Zak, I'm aware of that but I'm using a single material/texture for several models for efficiency and performance purposes. I wouldn't want to use several maps in Unity for this particular project :) ... Anyway, that wasn't even the issue here, I was just wondering if scaling down UV coordinates can affect performance but Leander was kind enough to answer my question. If time allows I will do some research and read about how UV coordinates are translated and used in the game engine but for now I'm happy to know that I'm not doing anything incorrectly. Thanks for your help guys $\endgroup$
    – Simone
    Commented Oct 22, 2016 at 14:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .