X-Ray Shader Tutorial in Unity

Mercy and certain other characters and powers in Overwatch have a cool effect that draws players in front of walls. Mercy’s looks like this:

mercySeeThruShit

Notice how, in this image, the D.Va is drawn as a solid translucent color. The translucency applies to the model itself such that it looks like you can see the inside of the model and its backfaces.

In this tutorial, we’re going to learn how to replicate this effect!

For your reference, the full code for the x-ray shader is here, under a non-commercial open-source license. 🙂

Continue reading X-Ray Shader Tutorial in Unity

Heat Distortion Shader Tutorial

Hey y’all! We’re going to learn about several different shader techniques in this tutorial. The distortion effect in particular was covered in the ice tutorial, but we’re going to re-learn it here in a new light.

Basically, this heat distortion shader was achieved by creating a flat plane mesh and applying a material with a shader that does the following:

  • Billboard the plane to the camera view & draw it on top of everything
  • Grab the camera’s rendered texture
  • Distort the texture sample position
  • Use the distorted position to sample & draw the camera texture

For your reference, here’s the final code for the distortion fire shader.

Let’s jump right in!

Continue reading Heat Distortion Shader Tutorial

Rim Highlight in Unity

Hey y’all! Today, I have a quick tutorial on how to create the highlight effect featured in the gif above. I was inspired by artworks like this one by Loish which have strong rim highlights.highlightArt

If you’re familiar with this tutorial on how to create a basic outline, then this technique will be super easy! However, that’s certainly not required reading 🙂

For your reference, here’s the link to the final code for the highlight shader. It also includes some custom diffuse lighting from this tutorial, but you really only need to look at the pass labeled “outline pass”!

On with the tutorial!

Continue reading Rim Highlight in Unity

Texture Mask Shader in Unity Tutorial

Hey y’all! I was incredibly inspired by this piece of art that Caludia Rinofer created, and I wanted to try and make it as a shader.

The result was the bird you see from the header image! And, of course, I just had to make a tutorial out of it too, to show y’all how I used texture masks and other fun shader tricks to create the effect.

If you enjoy this post, please consider following and supporting Claudia, who inspired it, and checking out the free Unity assets I used for the bird and background:

Living Birds (raven 3D model)

Farland Skies (skybox)

You can find the final code for this tutorial here.

Now, on with the tutorial!

Continue reading Texture Mask Shader in Unity Tutorial

Intro to Procedural Geometry, Part 3

This is an immediate follow-up to Intro to Procedural Geometry, Part 2. If you don’t yet know how to generate a cube, make sure to read Part 1 and 2!

This tutorial assumes you know:

  • Basics of using Unity (creating objects, attaching scripts, using the inspector)
  • How to code in C# (or at least a similar language)
  • The high-level of how 3D geometry is represented in code (vertices and triangles)
  • How to use Unity’s Mesh API to create geometry
  • How to create a plane mesh in code
  • How to create a cube’s vertices and triangles

This tutorial will teach you:

  • How normals & UVs work
  • How to texture procedural meshes (part 4)

For your reference, here’s the final code for a procedural cube. Make sure to read the linked file and the file titled Shape in the same repository folder!

Let’s get to it!

Continue reading Intro to Procedural Geometry, Part 3

Intro to Procedural Geometry, Part 2

If you follow me on Twitter, you’ll know that I post polls to determine the content of these tutorials! Y’all are keeping up the trend of voting for this procedural geometry series, so as requested, here’s part 2 😀

If you missed Intro to Procedural Geometry, Part 1, and you’re unfamiliar with how vertices and triangles work, I highly recommend checking out that tutorial first.

This tutorial assumes you know:

  • Basics of using Unity (creating objects, attaching scripts, using the inspector)
  • How to code in C# (or at least a similar language)
  • The high-level of how 3D geometry is represented in code (vertices and triangles)
  • How to use Unity’s Mesh API to create geometry
  • How to create a plane mesh in code

This tutorial will teach you:

  • How to create a cube’s vertices and triangles
  • How normals & UVs work (part 3)
  • How to texture procedural meshes (part 4)

Let’s get started!

Continue reading Intro to Procedural Geometry, Part 2

How to Start a Career in Games

Most articles about how to get a job making video games are misleading. They spend too much time over-emphasizing, and sometimes exaggerating, how competitive the game industry is, and yet simultaneously propose a perfect formula for “breaking in”.

Even the phrase “breaking in” is a misnomer- although it can be difficult to get a paid job making games, if you’re making games at all, then you’re contributing to the game industry, and you are a game developer already.

Boom! You’ve started your career. Seriously. You’ve already taken the most important step to making games as a career: making a game.

So, I can’t tell you exactly how to run your game development journey. Maybe you want to find a paid job making games, maybe you want to do your own indie thing, or maybe you need help taking the first step to make a game. This article will hopefully be adaptable to any of those situations. I’m not going to be condescending and tell you what you want out of your game journey or career, or try to look cool by exaggerating how competitive this field is.

Instead, I’m going to list a bunch of practical, honest, adaptable ideas for getting paid for your art and improving as a game developer. Because hey- once you’ve made your first game, you already are one. ❤️

Continue reading How to Start a Career in Games