Friday, February 2, 2024

Create a Custom Texture for Bought Mesh

 

Mesh! What a wonderful and beautiful thing to have! How much detail, how many faces, shadows and SO realistic! We all want it, don't we? And we all want to offer mesh to our customers, but not all of us can make it. 

So what are we doing? We buy nice mesh things full perm and then.... we get a folder with TONS of stuff: the actual mesh object(s) plus an incredible amount of different textures. But what are we supposed to do with them??


In this tutorial, I want to show you how you can make a custom texture for the mesh you bought with the help of the AO- or Shadowmap that usually comes with the mesh.

We will use Gimp for this tutorial. It's a free pixel-based picture editor and just as powerful as other programs you have to pay for. You can download the actual version here: Gimp Download
In this tutorial, I use version 2.10.32. It might be slightly different if you use another version - but the main steps should be the same.

In our example, we will use the AO-map of a table cloth I made myself.

I usually don't like alpha maps.  Even if none of the transparent parts show on the mesh, SL will still treat them as transparent and so they get caught by the SL alpha bug.  This can seriously mess up the looks of the finished product. So we're forced to set the alpha mode inworld to "Alpha masking"  (which I personally don't like much as it makes the  texture a bit blurry) or Alpha mode "None" - but less experienced builders often don't know that. So if we don't need alpha, it's best to not have any transparent parts in the texture at all right from the start.

However, some creators still leave their their textures transparent, even if it's not needed. So I have created an alpha AO map, to show you how to turn it into a professional custom mesh texture.
If your texture has black parts instead of transparent parts, be happy and skip step 1. 

Sooo, let's get to it, shall we? 😉
Then  take a deep breath and open your AO- or Shadowmap in Gimp.

 


 

Step 1: Turning our alpha-texture into an opaque texture

 
Create a new layer.
Select black as foreground color.
Go to "Edit" and select "Fill with FG color". 
 
Whoa, our whole picture turns black?! Yes. 
Don't panic, all is well. We just have the black layer on top of our layerstack, so that's the one showing. 
Click the orange arrow pointing downwards to move it down. Now it looks right. 😊 
 

Now select the top layer (the AO map) and click on the "stack-with-arrow"- icon. This will merge the 2 layers. 
Please note that Gimp only merges layers from top to bottom, so you will have to select the upper layer first to be able to merge it to the next lower one of the layer stack.
 

Now we have a proper opaque AO map to start with. So far so good. 😉

 

Step 2: Extracting the Shadows

 

Well, we want to use the shadows of the AO-/Shadow map. But we want to have only the shadows, ideally on our own beautiful textures. So what we have to do next is to extract the shadows on a transparent background, discarding the white. 

Thankfully, Gimp has an easy solution for us: It has a literal button to turn a color into transparency- Naturally, this works best on clean RGB color channels (pure red, pure green, pure blue) or black and white. Good we're dealing with white today, this will make it easy.

 

Go to "Layer" on the top menu and select "Transparency", then select "Color to Alpha". 

In the window that pops up, pick the color you want to turn transparent. It should default to white, but if it doesn't, just click into the color box and select white. 
Click "ok" to confirm. 
 
Our picture should now look like this: 
 

Now, we're ready to play with all our wonderful fabric textures and apply them to the tablecloth.  👍😁
 

 

Step 3: Adding Fabric

 
Well, what we need now is a nice fabric texture we want to have on our tablecloth. 
For my example, I used a fabric texture made by Polina/virin000 on pixabay. 
This texture is not seamless but for this project, we don't really need it seamless. If you want a finer structure on it, you can use a seamless texture and tile it several times before you go on.
 
Now we need our cloth image as a new layer in our image. We can do this directly by opening it as layer. 
Go to "File" on the top menu, then to "Open as layers..." Load your cloth image. 
It will come up as a new layer into our image. The layer might not have the right size yet and can even stick out of the image. No worries, we're going to fix this in a moment. 
 

 

Go over to the layer stack menu and make sure you have the Cloth layer selected (the top one). Click on the orange "Down"-arrow below the layer stack to move the layer down 1 spot. Alternatively, you can just click on the layer in the layer stack and drag it down. 

Now, we should have something that looks like this: 

We can see the cloth texture and - admittedly rather faint - the shadows of the shadowmap. 
Our next step now will be to enhance the shadows until we like them. 
 

 

Step 4: Enhancing the Shadows


Enhancing the shadows is pretty much the easiest step of all and done in a second. All we need to do is to copy the shadow layer for a few times. 
Select the shadow layer by clicking on it. Then go to the layer stack menu and find the copy icon. This is the icon with the 2 squares. 
Click it a few times and see how the shadows become deeper. Stop when you like it.  


Note: 

Depending on your shadowmap, it can need quite a few copies until the shadows seem deep enough. In this case, the shadows are pretty deep already, so I kept it at 3 copies of the layer.  


But there are some textures where the shadows are rather faint, so you have to make quite some copies to get them to look good. 
I recommend to export often and test them locally on your model to see how they look inworld before you finally upload them. 
 

 
Now the only thing that's left is to export your new texture into a format you can upload to Second Life. As long as your texture doesn't need an alpha channel and you don't have extremely detailed textures, I would recommend to use the jpg - format. Yes, it might lose some detail (though it often hardly makes any difference, really) but you can be sure that no hidden alpha channel creates trouble later. 
If it needs the alpha channel (e.g. if it has any visible parts that should be transparent), make it a png - file. 



That's it for today! I hope you enjoyed this tutorial and feel all inspired to make a ton of custom textures for all the mesh you have bought so far. Hehe, Happy Gimping! 😁

As usual, please let me know what you think in the comments. I would really like to hear your experiences with making your own custom textures. Have a wonderful day and see you soon.!
 
Best wishes,
Wolf Song


No comments:

Post a Comment

Create a Custom Texture for Bought Mesh

  Mesh! What a wonderful and beautiful thing to have! How much detail, how many faces, shadows and SO realistic! We all want it, don't w...