Even with the variety available to us in Neverwinter it's not uncommon to look at a creature or a placeable or something like that and find yourself wishing for more color variations of the whole thing or maybe just bits of it.
This tutorial will serve as a quick and dirty guide to doing recolors in a traditional way, the inefficiency of the method, and also show you a much more efficient method which allows for making the texture of certain NWN objects "infinitely" recolorable using environment maps- if you're willing to trade shininess for color variation .
Let's say I wanted to get some greenish armor on the Gnoll Warrior (c_gnoll.mdl) instead of the silver colored armor he currently has. Here is what he looks like and next to that, his texture::
If you wanted to make this modification yourself, your first instinct might be to crack open the image editor of your choice and start fiddling with hue and saturation controls or, if you use GIMP like I do, jump straight to the Colorize tool and go to town! Unfortunately, here's the first problem you run into: By mucking with the color controls for the whole image, you've tinted
everything when you only wanted to tint the armor. The two images below are the tinted texture and how the model looks in-game:
Okay, to get around that problem we use two layers in our image editor. The original as one layer and then the tinted version as another, with (say) the tinted layer on top. Then what we do is erase all the parts of the tinted layer that we don't want to be colored- revealing the original colors in the layer below. When you save, the layers will get flattened and the resulting texture and model would look like this:
Ok, it looks a lot better now and more like what I wanted.
But there's a downside and you'll start to notice it if you do more than a few of these recolors on different models:
It is very inefficient, spacewise. The cost in resources using this method: - Duplicate the model (111K to 757K, see Amethyst Dragon's reply below about supermodeling)
- Duplicate the texture (342K for DDS, 1,024K for TGA, 1.3M for both)
- Consumes a 2da line, in this case in appearances.2da
Total cost: 450k to 2 megabytes per recolor. All for just changing about 15% of the texture.
Ten colors would cost you 4.5-20 megs of space, total.
Wouldn't it be nice if there were some way we could perform the same kind of recolor as we did above, but using a much more efficient method? One that only required us to duplicate the full model and texture
once?
Read on...
What if instead of actually recoloring the image itself, we dedicated the alpha channel on the texture to the part we wanted to recolor and then assigned a solid color environment map via the appropriate 2da file? Our new version of the creature (or whatever) would have to give up whatever environment map the old version was using using but we could then have an "infinite" number of recolors which would only require the duplication of a single model and texture. The actual space taken up by solid color environment maps is so small (1k), their resource consumption is negligible.
The cost in resources using this method:- Duplicate the model (111K to 757K, see Amethyst Dragon's reply below about supermodeling)
- Duplicate the texture (342K for DDS, 1,024K for TGA, 1.3M for both)
- Still consumes another 2da line, in this case in appearances.2da
Total cost: 450K to 2 megabytes initial cost, 1k per recolor thereafter. Ah, that's more like it!
Ten colors would cost you 450k-2 megs of space, total.
The typical drawback to this method is that you're going to be giving up shiny reflections on armor or metal. Of course the texture will still look like metal, it's just won't have the envmap reflections. On most things this isn't a huge deal but on some things, like the 1.69 Heavy War Horse, it would dramatically change the look if you made colorable versions.
Below, you'll see an example of this method in action on our Gnoll, using 5 different environment maps from
this pack of 55 on the Vault. Each environment map is just 1k. They're just little
color swatches, basically.
1. Pick a creature or placeable (possibly other things, depends on what their alpha is used for), copy and rename the model uniquely
2. Get
the highest-quality version of textures the model uses, copy them and rename those uniquely. Usually it's just one texture.
3. In the new model change references from old texture names to new ones, save
4. Open new texture in the image editing software of your choice (I use
GIMP) and add an alpha channel if none is present. If an alpha channel exists,
completely white it out. Explicit directions on how to open and close the alpah channel in GIMP are at the end of "Refresher, alpha channel"
here. View the image in channel mode.
5. Of the R, G & B channels, identify which one appears to have the most
detail in them in regards to the bits you want to color. If you can, stay away from layers with high contrast . I usually wind up going with the Red channel, though not always.
6. Copy the selected channel into the alpha channel
7. Invert the image in the alpha channel For most textures, it's
imperative that you do this step. This will put the color on the highlights rather than in the "crevices" of a texture.
8. Carefully lighten the darkest of the parts you want colored so that they aren't entirely black. Black means no blending and the raw envmap will show through, which we don't want.
9. Using a white brush, white out everything in your alpha channel you do not want to be colored at all. You can blend, too, for a smoother transition.
10. Recompose the layers of your image and save them as a single 32-bit TGA. Convert to .DDS if you'd like.
11. Copy original creature's line from appearance.2da into a new line, giving the creature a new name, updating the model name and making sure to add the solid color environment map's name as well. For appearances.2da, the column for the environment map is called "ENVMAP". In placeables.2da, it's the "Reflection" column.
Here is the alpha I used for the gnoll in the screenshots, with an indicator of what happens if you leave pieces too dark:
I wanted to use a model from Neverwinter which everyone was familiar with, but here are some much better examples of the method on a Crocman from Titan Quest, all of which are recolors. Since I'm not coloring armor but skin, the blending is more challenging but the extra time pays off in a smoother, more natural transition:
His texture (with some notes about what to omit or blend) and the resulting alpha channel I created:
This effect can also be used on placeables. To give them a weathered look in which they appear to have been painted and the paint has been worn away in places through use, just use white and a
scratch brush in your alpha channel.
If you're a little fuzzy on envmaps and the alpha channel, I have a refresher on both
hereOTR
Modifié par OldTimeRadio, 09 décembre 2011 - 03:47 .