Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to TerraFirmaCraft Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Dries007

      Server Move   09/13/18

      I (Dries007) have recently taken over as main developer and server admin. This involved moving servers to reduce cost. It's likely there will be some more downtime in the future but most  things should be sorted by now. This forum is in dire need of replacement as the software is quite old and can't be easily updated. If you wish to discuss or stay updated, join our discord: https://invite.gg/terrafirmacraft. The forum will remain available to read, but will be locked in the future, when a new system is setup. The forum and wiki are now ad free. If you'd like to contribute to keeping it that way, you can do so via paypal or patreon.
Sign in to follow this  
Followers 0
Darmo

Texturing Tutorial

2 posts in this topic

I thought it might be helpful for budding modelers to have an idea of how to approach textures.  I'm far from a great texturer, but I think I get decent results, and this is the process I use.  I'm not going to go into the technicalities of actual commands in the image editors - you're on your own there, and you might need to read some other tutorials to learn the image editing program. 

First you’ll need an image editor.  If you don’t have one, gimp is a good free one.  After you have an editing program, export your model’s texture map.  You will now have a .png file with colored shapes.  Hopefully you already understand how these shapes relate to the boxes in the model.  If not, you should play around with the shapes, put some numbers on them or something, so that you know which shape is which.  Save/export it to PNG, load the image into your model's texture map, and see how things show up.  Once you have a grasp on how the shapes relate to the boxes, you're ready to work on your texture. 

Export a fresh texture map if you have to.  This will be your base file.  Open it.  Make a separate layer, and call it background.  Name the layer with the texture map something like ‘texmap’ or whatever.  Make this texmap layer translucent, and keep it above all other layers.  This way you can turn it on for reference, but still see through it, and work under it on a separate layer. 

Next find an image of the animal on the internet.  One that has the colors you want to use, in good lighting.  I find this to be easier than trying to pick from a color wheel.  Find an area of the animal’s hide that has even lighting, and is relatively free of shadows and folds.  Copy an area of the animal’s hide that is approximately the size of your texture.   Paste it into your image editor (you may want to use a separate one, such as paint.net). Use the blur filter to further blur out fine details such as hair, which will probably be too jarring for your texture, which will be far smaller than the photo.   It should be fairly smooth, with very subtle gradation.  Now do a noise filter.  The noise filter adds small artifacts in a random and evenly distributed fashion.  This gives texture to the image, without being overwhelming.  I often apply these filters separately, in paint.net, another image editor, so as not to mess with the layers I already have in gimp (I'm not super-skilled with gimp to know how to keep this from happening).  Play with these filters until You like what you see. 

 

Now copy and paste it into the background layer in gimp.  Use the clone stamp tool to get rid of any areas of shade or detail that stand out too much.   This becomes the base color of your animal, and will cover the entire field.  Put this on it’s own layer, and do not change it.  This is now the default background for the entire animal.  This layer will always be on the very bottom, and the texmap on the very top.  Do not change either of them.  By having one large base texture, you avoid a lot of copy-paste detail work trying to fit a base texture to every square of every box.  With a nice generic underlayer, you never have to worry about that.

 

Next, make a ‘Details’ layer.  This layer will hang out right below the texmap layer.  This where you put fine details like eyes, noses, and perhaps claws.  If your animal has sharply colored stripes or spots, they can go here, or on their own layer.  You can make separate detail layers for different colors of eyes, for instance, and quickly switch between them for comparison. 

 

Now make a ‘shadows’ layer, and a ‘highlights’ layer.  These will be below Details, and above the Background.  You will use these layers to adds darkness and lightness.  Use layer transparency to allow the base coat to show through, and use the airbrush tool to give soft gradations of highlight and shadow.  Experiment with darker and lighter variations of the background color for shadow, using the eyedropper and color wheel.   By doing these on their own layers, you avoid messing with the background image.   This allows you to erase the shadows and highlights entirely or using soft erasers, without erasing the background color as well.  It makes it faster, in my experience, to get the shadows and highlights just the way you want them.  It helps to use the selection box to select just the face you want to put the shadow on.  The tool will not do anything outside the box, so you will have sharp edges.  This helps show the box outlines, which can be useful from an organizational perspective, and if your texture is very packed, it may be absolutely necessary.

 

Once you think you have it, make sure the texmap layer is off, and then export the file as a .png.  Always keep a copy in your image editor’s format, so that you can still change things layer by layer.  Nothing is worse than having details and shadows locked into a flat image, and wanting to change them.

That’s the basic rundown - use a real image to get the colors right, add blur and noise for a whole-field background, and use layers to add details and shading.  I leave the background covering the whole field, so I don't have to cut and paste bits of it around.  This method does make it harder for someone else to understand the texture, if they don't have access to the texture map or model file.  If you want to make this easier you can use the selection wand to select all the white space on the texmap layer, switch layers to the background, and hit the delete key, which will delete all parts of the background that are not actually in use.

Edited by Darmo
0

Share this post


Link to post
Share on other sites

After figuring out how to use alpha masks, I thought I'd add a post about that, since it's a highly useful thing.  I'll use some screen captures from my Ptarmigan texture, since that's the first time I fully utilized alpha masks.  These instructions are gimp specific, but I suspect most programs that have alpha masks, will use them in the same fashion.  Remember, I am far from a skilled image editor, I just get along as best I can, and don't know all the ins and outs of things.

THE PROBLEM

Texture transparency.  It's  useful thing, to bring a bit more detail to your model.  It allows you to bring in a more nuanced edge, without making dozens of extra boxes.  The following image shows how texture transparency looks in gimp, and the effect in the MCMC model.  The dotted white lines in the inset on the right are the actual outline of the box.  Those white lines don't show in game of course.

TextureExample.jpg

So for the Ptarmigan, this allows me to show a tapered, feathered tail.   The basic way to do this in gimp is simply to select the area of texture you don't want to show, and hit the delete key.  But this has problems.  For one, You lose the texture you had there.  So if you want to change the design of the tail, now you have to go back and cut-paste texture back in, or do it pixel by pixel with the pencil tool.  Both are tedious.   Also, it's tedious to delete the texture in the first place in cases where you have a lot of variance, such as the ptarmigan tail, or a ragged hanging fringe of hair, for example.  Sometimes you're selecting one pixel at a time and deleting it, then two, then one, then 3.  Super-tedious.  Alpha masks will free you from this.

ADDING ALPHA MASK

There's basically two ways to do an alpha mask - one that starts entirely transparent, and one that starts entirely opaque.  I'll start with the opaque version.  The opaque is useful for a background layer that you want to be visible for the most part.  In the case of the ptarmigan, this is the white background.  This is the majority of the body, and so I want it to be mostly visible, only transparent in certain areas around the tail, wings, and claws. 

So the first thing to do is right click on the layer in your layer manager on the right.  This will pop up a menu.  In the middle is "add layer mask".  Click it.

Step1AddMask.jpg

Next you will have a dialogue box with many options.  I've only really used the first two options, so I can't help with the rest at this point.  But the first two seem to do about all I need.  They are White(full opacity) and Black(full transparency).  To explain what each of these mean, the alpha channel is basically an invisible layer, linked to a visible one.  The alpha layer only accepts greyscale colors (you can use a color selection on your tool, but it will convert it to the grayscale equivalent).  Total black, means transparent.   Total white means fully opaque.  And shades of grey indicate degrees of transparency.  The darker (closer to black) the more transparent.  So for the ptarmigan's white background, which we want to be mostly visible, we will select white, full opacity. 

Step2WhiteOrBlack.jpg

Now you will see, to the right of the thumbnail picture of the layer, another thumbnail, completely white.  This is the layer mask.  You switch between the two by clicking on these thumbnails.  The currently selected active one will have a white border, as in the following picture.

Step3Active.jpg

This can be a bit confusing in the case of a white mask, because the white border doesn't read visually.  But anyway, that's how it is.  

From here on out I'll refer to that last screen capture, as it show about everything I'm going to talk about from here on out.   You can see in that picture, the mask to the right of the background layer is mostly white, with some black areas.  Those black areas are the transparent parts around the wings and tail.  I painted them in using a rectangular selection box with paint fill (in the case of entire faces I wanted transparent) or by using the pencil tool in single pixel mode, in the case of the wing and tail taper.  I used only one color on the mask - black.  This made those areas totally transparent.  But you can see in the left background thumbnail, the entire white background is still there.  So what this means is, I can go back if I want to adjust the wing and tail edges, use a white single pixel pencil, and add pixels easily.  No cut and paste, no having to figure out the color of the pixel.  The background I already made and simply shows up again in that spot, when I change the pixel(s) from black to white.

TRANSPARENT START

Now I'll explain a reason to use a totally transparent start when you first make the mask.   In the case of the ptarmigan, in the summer they their plumage gets a lot of patches of brown feathers, to better blend with the dirt that starts appears.  So I wanted a lot of ragged and random areas of brown.  I wanted the shade to vary a lot.  I made a brown layer, added a noise mask.  I didn't want to have to tediously delete most of the layer, and all the list ragged edges, and then later decide on a different pattern and have to do tons of copy past. 

Instead, I created an alpha mask that started entirely transparent.  It will show up with an entirely black thumbnail when you first create it (black = transparent).  In the particular screenshot above I have two summer plumage (SurPLmg) layers, for different styles I was trying.  You can see that the alpha masks to the right are mostly black.  These masks started entirely transparent.  So when I added them to the entirely brown plumage layers, the brown vanished.  But then, I went back in and used again, the selection box with white paint bucket for entire faces I wanted brown (the neck and head) and then for the body and wing, I just started using the pencil tool with a totally white color.  everywhere I paint a white pixel, the brown shows up.  If I change my mind, just switch to black, and it's easily gone again.  No tedious selection boxes for deleting, no selecting just the right colors to copy and paste from other areas.  The entire brown texture is there always, and appears or disappears with use of white or black.

But then, I can also use shades of grey, to add more variety.  Pixels I paint grey show the brown with a degree of transparency, so the white shows through a bit.  These are the areas of light brown that you see in the first screen capture that shows the tail.  So you can get *shades* of the layer the mask is attached to, and quickly add color variety without a lot of fiddling around with the color wheel. 

Some technical notes: you can copy the alpha mask of one layer, to the alpha mask of another.  So if you want the same masks for a background layer, and the highlight or shadow layer, you can cut and paste the alpha mask from one to the other.  you can even copy a regular layer into the alpha mask (it will be converted to grayscale) and vice versa.   Also, when you are in the alpha mask, and using a selection wand or paint bucket, it is referring to the alpha mask pixels, not the pixels of the layer the mask is attached to.  So you can get some pretty crisp selection and fill, since most of the stuff you have in the alpha layer will likely be pure white or pure black.

So, I hope I've clearly explained how alpha masks are useful within out context, and how they work - in gimp at least.  Let me know if there's anything that needs clarification.

 

 

 

 

 

 

 

 

 

 

Edited by Darmo
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0