Adding Emissions to Custom Textures

Christopher West
6 min readOct 25, 2022

--

Using Photoshop and Blender to create Emissions maps for custom textures for use in Unity

In the last article, I looked at modifying pre-built textures using Photoshop for use in my Sci-Fi control room in Unity. Today, I’ll be making parts of those textures glow by creating emission maps to be applied in Unity! I’m going to be using a combination of Blender and Photoshop to do this!

What is an Emission map?

An Emission Map is a grayscale texture that defines what sections of a texture should glow. Black areas are ignored and white areas emit light fully. Shades of gray in between allow you to emit light at different intensities. An emission map gets wrapped around an object in 3D space the same way that it’s associated texture map is so it is possible to identify areas that you want to glow by locating them on the objects albedo texture. While this is the simplest way to locate the areas of an object’s texture that you want to create an emission map from, it is not always easy to identify specific areas in the texture, particularly if the texture and object are complex.

Simple Emission texture using Photoshop

I’ll begin the process by locating the texture I want to use to locate the area I want to glow on my model. This is the same process I used in my last article to locate the texture I wanted to modify. In Unity, I can locate the texture file by opening the material I want to change and clicking on the texture icon labeled Base Map to highlight the texture file in the Project window. Then I right-click the texture file in the project window and select Show in Explorer (on Windows) to open the File explorer to the folder where my texture file is. Lastly I right click on the file and choose Open with.. > Adobe Photoshop.

Now with the image open I want to create a new Layer in the image this will act as my base layer. I’m going to fill this layer with black.

Next, I’ll hide the black layer and create another layer above the black layer to hold the white/gray portions of my emission map. I hide the black layer so I can still se the underlying texture map for selecting the areas I would like to glow. In this case. The transparent areas of the image are the areas I want to create an emission channel from. Since that is the case I’ll use Photoshops “Load Selection” Option. First, I want to make sure I have selected the later with my original texture in it. Clicking Selection > Load Selection presents me with the load selection dialog below. I’ll select the Transparency layer and choose to invert the selection by ticking the Invert check box. If I don’t select the “Invert” checkbox, Photoshop selects all of the non transparent pixels in the image and I would have to press Shift + Ctrl + i to invert the selection and choose the transparent areas I wanted. The check box in the “Load Selection” dialog just saves me the extra step.

With my selection created I now choose my new top most layer and use the paint bucket tool to fill in the selection with light gray or white.

I then turn back on my black layer and press Ctrl + D to clear my selection. Now that I have my emission channel ready I choose File > Export As… and export the image as a PNG file into the same folder as the original albedo texture. I also save my Photoshop file for future reference or use.

Switching back to unity, I can now find my Material and enable the emissions channel. Then I’ll drag my newly created emission map into the slot for an emission map on the object.

Emission texture using Blender

Sometimes the areas of a texture map that you want to turn into an emission map are too difficult or complex to simply highlight like in the above method. In these cases, I use blender and the 3D model file to create a guide for my emission map before going through a similar process as above to create the emission map.

For this method, I start by opening Blender, my current modeling software of choice. Once I have the software open I delete the light, cube, and camera from the default scene. Next, I click File > Import > FBX (.fbx), navigate to my projects Assets folder, select my FBX folder where I store my models and select the 3D models for objects that I want to add an emission channel to. In this case I’m importing my Sci-Fi Column pieces. Since I imported 3 files Blender has stacked them on top of each other at the origin. I use the Move tool to space them out.

With my models now in my scene, I make sure they are both selected and then I click on the UV Editing Tab to open the UV editor.

Next I make sure that “Face Select” is turned on, and I select the faces that I want to glow. This highlights where those faces are in the UV map.

Now that I have my faces selected in my UV Map Editor, I want to export that map so that I can bring it into Photoshop to finish creating the emission map from it. I can do this by selecting UV > Export UV Layout in the UV Editor panel.

Now that I have my UV selection saved, I open it in Photoshop, and follow a similar process as I did for the simple selection. I create 2 layers, one to hold the black non-emissive selection and the other to hold the emissive selections. Using the “Magic Wand” selection tool in Photoshop, I click in the transparent section of the imported UV Map and then invert the selection using the Shift + Ctrl + i keyboard shortcut. I then fill in that selection using the Fill tool located at Edit > Fill and selecting to fill the selection with a solid color. Once the fill is complete I deselect my fill with the keyboard shortcut Ctrl + D and turn back on my black layer.

With my emission texture created I now export the image as before, with File > Export As… and save the PNG back into the same folder as the albedo texture for these models. I can then head back into Unity and assign the emission texture to the emission map slot of the material used for these column models.

Look at those emissives!

Next Time!

In this article, I looked at creating Emission maps using Blender and Photoshop. Next time, I’ll be diving into the Universal Render Pipeline’s post processing stack beginning with adding post processing profiles in Unity! If you enjoyed this article, or want to come along with me as I progress on my journey, follow me at gamedevchris.medium.com.

--

--

Christopher West

Unity Game Developer, Software Engineer, Gamer, Musician, and Father. Christopher is a creative that enjoys a challenge and loves coding.