creator-convert-transparent-UDIM

How to convert .png textures that have transparency using Blender

The first thing to mention here is that Blender doesn’t bake transparent textures. It will fill any part of your texture that is transparent with black or white, which is not very helpful when you have a smattering of fine freckles, for example. Or a fine fishnet stocking.

In order to convert these types of textures to Cinnamon and Chai, there are a couple of things to do first.

UDIM Method for full body baking

What is UDIM?

Blender.org has a decent explanation of UDIM. If you’re familiar with UV maps (if you work to the SL avatar template, you should be, as it is the UV map for the SL avatar) you should be able to understand what UDIM is and how it works, and how it helps with the full body texture baking process.

This tutorial consists of a preparatory step for your transparent PNG textures, baking 2 sets of textures, and then combining them after the bake to create a texture with an alpha channel that can be used in SL.

Preparing the software

This tutorial requires Photoshop and Blender, and a blender plugin called UDIM Baker. At the time of publishing I am still working on the process for GIMP.

Installing Blender

Getting and installing the UDIM Baker Plugin for Blender

Preparing the textures

  • Identify all 3 textures (Head, Upper and Lower) that you want to convert. In this tutorial I will convert some freckles.
  • If you are not converting full body textures, use the baking NON UDIM method.
  • Name all 3 to something.1001 something.1002 something.1003 (where something = an easily identifiable name so you can find the textures when you need them.
The head, upper and lower texture ready for baking
  • For this tutorial I have named the textures SLUV Freckles.1001. SLUV Freckles.1002, SLUV Freckles.1003 for the HEAD, UPPER and LOWER textures respectively. If you don’t name them this way. Blender will not understand that they are a set, or will put them in the wrong tile.

Creating the colour and alpha maps

  • Open your textures in Photoshop
The 3 textures open in Photoshop
  • In the .1001 texture, select the transparent layer (there should only be one layer) and then select the Layer menu – Layer Mask – From Transparent.
Adding a new layer mask from transparency
  • This will change the little thumbnails in your layer stack but won’t change the appearance of the layer itself in your 2D view.
  • Press ALT and click on the new LAYER MASK thumbnail on your layer
  • This will make the layer mask visible and selectable
Exposing the layer mask
  • Press Ctrl (or Command) A, Ctrl (or Command) C to copy that image
Selecting and copying the layer mask
  • Go to Layer – New – New Layer
  • Press Ctrl (command) V to paste the mask into the new layer.
Creating a new layer and pasting in the layer mask
  • Save the image as FrecklesALPHA.1001.tga (use 24 bit)
  • Turn off the new layer and then right click on the LAYER MASK you created before and select disable.
  • This will make the flat texture that was created when you made the mask visible. It looks strange, but that doesn’t matter. The layer masking does a smart fill with the layer itself to ensure there is no background bleed.
Making the full colour visible without the layer mask
  • Save this image out as FrecklesCOLOUR.1001.tga (24 bit as before)
  • Repeat these steps for the .1002 and .1003 textures.
  • You should end up with 6 new textures to work with.
All ALPHA and COLOUR textures ready for baking

Preparing the Blender scene for baking

  • Open the blender file in your skinmakers kit – UDIM Tiles – “Cinnamon Chai Skin Kit 2.93 with SLUV_UDIM TILES.blend”
  • You will be presented with a scene that has a 3D body, Image panel 1, 2, 3, and a the Outliner and Bake (render properties) panels to the right. You can ignore the 3 panels at the bottom, we won’t be using them in this tutorial.
The blender scene as opened
  • In the Outliner, make the “aaChai for Skin Conversion Kit SLUV LOAD TEXTURES HERE” mesh visible by clicking the closed eye icon to it’s right. If the eye is open, the mesh is already visible.
  • Make the other 2 meshes (Chai for texture painting and Cinnamon for Texture Painting) visible also. (They should be visible by default when you first open the file)
  • You won’t see them in the scene as separate meshes. For this to work they have to be absolutely identical so they are placed in the same position and have the same geometry. Please do not move or alter the meshes in anyway, or this process will fail.
  • In the middle texture panel – called Chai UV UDIM, on the right side menu under the Image tab, select the 1001 slot and then scroll down to click “Fill Tile”
  • On the little popup menu, make the texture size 1024×1024 and the colour doesn’t matter.
  • Fill the other 2 tiles with the same (they may appear to be filled when you do the first one but they are not, make sure you do all 3 tiles
  • In the the middle panel Top Menu, select Image – Save As. Save your image as ChaiFrecklesALPHA.1001. This will save all 3 tiles properly named. You must save the images before you bake them as Blender will not bake properly onto an unsaved image.
Filling and saving the Chai texture tileset
  • In the lowest texture panel, on the right side menu under the image tab, repeat the fill tile process. Everything in your scene will look black! That is ok 🙂
  • In the lowest texture panel, on the top menu select Image – Save As. Save this image as CinnamonFrecklesALPHA.1001, same as the above step.
Filling and saving the Cinnamon Texture set

Loading the Alpha map for baking

Now that the initial setup is done, we can get into the repeatable steps.

  • In the top texture panel, open the right side menu and find the Image tab
  • Click on the button that looks like a little folder, and then navigate to where you stored your textures
  • Double click on the FrecklesALPHA.1001 texture. This will load it, and it’s 2 associated textures into the 1001, 1002 and 1003 tiles

Baking Chai

  • In the panel below the outliner, scroll all the way to the top of the options and make sure your Render Engine is set to Cycles (It should be by default)
  • Make sure your Device is set to GPU Compute. This will use your graphics card to bake rather than your processor, which is faster and won’t chug up your computer for other things while you are baking.
  • Scroll down until you find the bake section. Do not change any of the settings in here.

NOTE – YOU ONLY HAVE TO DO THIS ONCE – THESE SETTINGS WILL SAVE WITH YOUR SCENE

  • In the outliner, select the model “aaChai for Skin Conversion Kit SLUV LOAD TEXTURES HERE”
  • Hold down CTRL (or command) and select the model “Chai for Skin Painting Kit”
  • Click the button – “Bake to UDIM tiles” and go make yourself a snack or pet your pup or feed your fish or whatever it is that you do for a few minutes.
  • Come back to the textures having been baked. If it does not appear in the middle texture panel, you can click the drop-down button and select it from the list.
Checking the render settings and selecting the 2 meshes for baking – Bake to UDIM Tiles
Chai UV textures Baked

Baking Cinnamon

  • In the outliner, select the model “aaChai for Skin Conversion Kit SLUV LOAD TEXTURES HERE”
  • Hold down CTRL (or command) and select the model “Cinnamon for Skin Painting Kit”
  • In the Bake tab (render properties) Click the button – “Bake to UDIM tiles” and go make yourself a tea or watch a bit more of your TV show, or chat to your kids or whatever it is that you do for a few minutes.
  • Come back to the textures having been baked. If it does not appear in the lower texture panel, you can click the drop-down button and select it from the list.
Switching to Cinn UV Udim texture
Selecting Chai SLUV and Cinnamon for Baking – Bake to UDIM Tiles
Cinnamon Textures Baked

These textures are now done. Onto the next step!

Loading the Colour map for baking

  • In the top texture panel, open the right side menu and find the Image tab
  • Click on the button that looks like a little folder, and then navigate to where you stored your textures
  • Double click on the FrecklesCOLOUR.1001 texture. This will load it, and it’s 2 associated textures into the 1001, 1002 and 1003 tiles
  • YOU DO NOT NEED TO FILL TILES AGAIN – that is a first time step and you can just save the existing images out with new names before the next bake
  • In the top menu on the middle panel, select Image – Save As. Save your image as ChaiFrecklesCOLOUR.1001. This will save all 3 tiles properly named. You must save the images before you bake them as Blender will not bake properly onto an unsaved image.
  • In the lowest texture panel, on the top menu select Image – Save As. Save this image as CinnamonFrecklesCOLOUR.1001, same as the above step.
Loading the colour maps and saving new tilesets for Chai and Cinnamon

Baking Chai

  • In the outliner, select the model “aaChai for Skin Conversion Kit SLUV LOAD TEXTURES HERE”
  • Hold down CTRL (or command) and select the model “Chai for Skin Painting Kit”
  • Click the button – “Bake to UDIM tiles” and go make yourself a cuppa or scritch your cat or chat to your parrot or whatever it is that you do for a few minutes.
  • Come back to the textures having been baked. If it does not appear in the middle texture panel, you can click the dropdown button and select it from the list.
Baking colour map to Chai
SLUV baked to Chai UV

Baking Cinnamon

  • In the outliner, select the model “aaChai for Skin Conversion Kit SLUV LOAD TEXTURES HERE”
  • Hold down CTRL (or command) and select the model “Cinnamon for Skin Painting Kit”
  • Click the button – “Bake to UDIM tiles” and go make yourself a noodle soup or watch some youtube, or have a stretch or whatever it is that you do for a few minutes.
  • Come back to the textures having been baked. If it does not appear in the lower texture panel, you can click the dropdown button and select it from the list.
Selecting and baking to Cinnamon UV
Cinnamon UV baked from SLUV

Combining the textures and preparing for upload.

Now that you have all the textures baked, the final step is to combine them in photoshop to re-establish your transparency.

The ONLY texture you have to worry about with Chai is the lower body texture. The upper body texture and head textures use the SLUV so you only need to create a new texture for Chai for the lower body.

The textures you need to create for Cinnamon are the TRUNK and LIMBS which go into the Upper body and Lower body slots respectively.

  • Open these 6 textures in Photoshop
    • ChaiFrecklesALPHA.1003
    • ChaiFrecklesCOLOUR.1003
    • CinnFrecklesALPHA.1002
    • CinnFrecklesCOLOUR.1002
    • CinnFrecklesAlpha.1003
    • CinnFrecklesColour.1003
All 6 new textures open in Photoshop ready for final steps.

Converting Chai Lower body to TGA with alpha channel

  • Go to ChaiFrecklesAlpha.1003
  • Press Ctrl A, Ctrl C and Ctrl W to select all, copy, close the image
  • Go to ChaiFrecklesColour.1003
  • Open the Channels tab (Window – Channels)
  • Create a new channel by clicking the “new” button at the bottom of the Channels tab
  • Ctrl V to paste the ChaiFrecklesALPHA into the new alpha channel
  • Save this image as a targa, 32 bit so the transparency works.
Adding the alpha channel to the COLOUR texture for Chai Legs using menus

Converting Cinnamon Upper and Lower Body to TGA with alpha channel

  • Go to CinnFrecklesAlpha.1002
  • Press Ctrl A, Ctrl C and Ctrl W to select all, copy, close the image
  • Go to CinnFrecklesColour.1002
  • Open the Channels tab (Window – Channels)
  • Create a new channel by clicking the “new” button at the bottom of the Channels tab
  • Ctrl V to paste the CinnFrecklesALPHA into the new alpha channel
  • Save this image as a targa, 32 bit so the transparency works.
  • Repeat this step for CinnFrecklesALPHA.1003 and CinnFrecklesCOLOUR.1003
Adding alpha channels to Cinnamon Trunk and Limbs COLOUR using hotkeys

  • Upload your textures to SL and create new copies of your SLUV freckles layer
  • Name them:
    • Yourbrand – Freckles – Chai
    • Yourbrand – Freckles – Cinnamon
  • It is important to distinguish between the 2 or your customers will be confused!
  • Wear the new layers and edit them
  • Drop the texture ChaiFrecklesColour.1003 into the lower body section of the new Chai layer
  • Drop the CinnFrecklesColour.1002 into the Upper Body section of the new Cinnamon Layer
  • Drop the CinnFrecklesColour.1003 into the Lower Body section of the new Cinnamon Layer

DONE!

Future baking like this will only require naming your SL textures with their 1001,1002 and 1003 designations, loading the texture you want to bake from, saving the Chai and Cinnamon textures already in the blender scene to the new names, baking them and placing the alpha texture into the alpha channel of the bake results. You won’t have to repeat the preparation steps