How to Alter Your Pre-Built Texture Maps
Using Photoshop to alter textures for use in Unity
In the last article, I looked at the different types of lights available in URP in Unity. Today, I’ll be going modifying texture files for my game using Photoshop and Unity. A note before proceeding, Photoshop is my tool of choice for raster image manipulation. It doesn’t have to be yours! It does have a cost attached and I gladly pay my monthly fee to have the entire Adobe suite of tools at my disposal. There are some very good alternatives to Photoshop that don’t cost anything! Both Krita and GIMP, come to mind. The point here is that the processes that follow can be done in different tools without the cost and you should use what you prefer!
The first thing I need to do to start editing my texture files is to find them. 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. This highlights the texture file in the Project window.
Once I’ve located the texture file in Unity, I want to open the folder where the file is stored on my computer. I can do this by right-clicking the texture file in the project window and selecting ‘Show in Explorer’ (on Windows).
With the file located in File Explorer on my computer I can now open it in Photoshop by right clicking on the file and choosing to “Open with.. > Adobe Photoshop”
Once the texture is open in Photoshop I can see that it is opened as a PNG file with the texture as the background layer.
In Photoshop, I can use “Adjustment Layers” to modify the look of an image without modifying the original image. This is known as non-destructive image editing. In this case, I start by adding a “Hue/Saturation” adjuxt ment layer and reducing the Saturation slider to remove the Orange hue of my texture. I then pull the Hue slider to add some cooler blue tint to the texture, simulating a colder, texture more like metal.
I then add a “Curves” adjustment layer to add contrast to the image and sharpen it some. The “Curves” Adjustment layer allows you to
Now that my texture has been modified I can use File > “Save As…” to save my modified image as a _new_ png image and I’ll change the file name to both reflect the change in the image and distinguish it from the original image. Using “Save As…” will save the new image into the same folder as the original and Unity will be able to see the new image when I return to work on it there.
Once back in Unity, I can assign my new texture to the Base Map property of my material and all of the models that use that material will change in my game scene.
Repeating the Process
I’m pretty happy with the look of my new texture! I now want to apply the same modification to the other textures for my walls, floors, and columns! So, do I need to manually repeat the process over and over for each file? Well, yes and no. I do need to repeat the process for each texture file I want to modify but Photoshop will allow me to copy My adjustment layers to each of the other files as I open them and work on them. This means I don’t have to find the exact settings over and over which may be prone to error! That’s some time savings!
Here is my scene with the new textures applied!
In this article, I looked at modifying the textures for my game scene. Next time, I’ll be looking at making parts of them glow using Emission Maps! If you enjoyed this article, or want to come along with me as I progress on my journey, follow me at gamedevchris.medium.com.