Adding Emissions to Custom Textures

Continuing on from yesterday’s article about manipulating textures — read more here — we can also create what’s known as Emissions. Emissions are added to a material to make all or selected parts of it appear as a light source of a selected color and intensity from the defined surface. This can be a great way to add light to a scene without having to use resource intensive light sources. Check out my Lighting article here.

If you have read the lighting article, you may have noticed the emissive objects in the scene already. Let’s take a step back and look at how to create these textures on the central test tubes in the scene.

Default material for the test tube asset from Filebase. Lit up with blue spotlights.

We want to make these test tubes have a neon green glow, like they’re filled with some sort of scientific radioactive material. Many pre-built assets we find may already have an emissive texture that we can simply alter the color and intensity of, but sometimes we need to create these from scratch.

Albedo Transparency texture of the test tube

With this texture, we can quite easily determine which parts are the glass-like faces of the tube. Being a different color to everything else will allow us to isolate these faces, but sometimes we may need to dig a little deeper and use 3D modelling software to find exactly what we want.

If we open this texture with GIMP, we can use the Select By Color tool, to capture the bits we want to add emission to. Non-Emissive areas are defined by black space, with the emissive areas being what remains, whether it be an image such as a computer screen, or a simple white area. Making this texture black and white, will allow us to change color easier in Unity.

To do this, we want to make a copy of our selection to another layer.

Let’s now change our selection to white using the Fill tool.

Now, we can Invert our selection, and fill it with black.

Recreating this example, actually lead to a bunch of artifacts as seen above, so we can simply cover them up. Now we can export this image as a png file. If we export it to the same location as the other textures, we can easily access it in Unity.

With our created Emission Texture now in Unity, we can go back to our material, enable Emission, and drag and drop our texture.

Finished product!




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to pass CKAD

Error Comparison (Python 3 vs. Scala 3)

👨🏿‍💻 Why Software Engineers are the unsung heroes of this pandemic

Google Earth Engine Makerspace: Community Commons in action

Contractual Decisions Mapped for Ten of the S1000D Issues: 1.9 through 5.0

Dockerizing StringBoot Application and MySQL

My Haskell VS Code Setup in 2021

Tryhackme:Content Discovery

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Calum Slee

Calum Slee

More from Medium

Layering Materials In Unity

Loading Scenes in Unity

Using Height Maps and Pixel Displacement

Creating A Timed Run Challenge In Unity