Skip to main content
  1. Tutorials/

Making a quick and dirty pixelation compositor in Blender

· Sep 15, 2023 · 1006 words·5 mins· loading · loading · ·

Sometimes you gotta make things a little more digitized and gritty! Follow this simple guide to create a base pixellation compositor that you can build onto!

Table of Contents

Information
#

Material

Compositor Material

Pixelating Compositor
Built with: Blender 4.2.1 LTS
Tutorial release date: Sep 15, 2023

External resources required: none

Preview
#

This is what your final product will look like. You will be able to adjust the amount of pixelation to be as chonky as you want by adjusting a couple of value fields.
Before
After
Loading...

Compositor Preview
#

Compositors get applied after something has been rendered in Blender. Please apply this particular style with "Use Nodes" checked in your Compositing tab.

below is a basic overview of what we will be constructing in the compositing tab over in Blender.
LOFI
CLICK TO VIEW MODEL
Powered by Seiza Logo
LOFI mode: a de-spaghettified view of a node graph. This is designed to show you the flattest possible representation of a node graph by only registering one line per node-to-node connection to make the overall structure easier to understand.

Tutorial
#

In this tutorial, we’ll walk through the steps to create a pixel art shader using Blender’s compositor. Follow along, and by the end, you’ll have a working shader that gives your renders a pixelated, retro feel.

Step 1: Setting up the Compositing Tab
#

  1. Open the Compositing tab in Blender. If it’s not visible, you can add it by hitting the + at the upper edge of your screen and selecting Compositing.
  2. Check the box for Use Nodes at the top of the Compositing window.

Now, we’ll build the first chunk of the compositor by adding the following nodes:

  • Blur
  • Two Scale nodes
  • Pixelate
  • Value node
  • Math node (set to Divide)

Ensure the following settings:

  • Both Scale nodes are set to Relative.
  • Math node is set to Divide, and its value is 1.
  • Pixelate is set to 2.
  • Blur is set to Gaussian.

Node Setup
#

section 1
  1. Connect your Render Layers’ Image output to the Image input of the Blur node, then connect the Blur node’s output to the Image input of one of your Scale nodes.
  2. Connect the value of the Divide Math node to both the X and Y inputs of that Scale node.
  3. Wire a Value node to the Value input of the Divide node. Set this value to 8. This will control how the pixelation effect looks. Connect the same Value node to both the X and Y inputs of the other Scale node.
  4. Connect the Pixelate node’s color input to the Image output of the Scale node you just wired.
  5. Finally, connect the Image output of the Scale node (attached to Blur) to the Pixelate node to complete this section.

What’s happening here: In this section, we’re manipulating the image’s scale and blur before pixelating it. By adjusting the values of the Scale and Blur nodes, we control the pixelation effect’s intensity. The process is somewhat similar to how games like Donkey Kong Country created a pixel art look by shrinking and enlarging 3D images, a process called quantization.


Step 2: Adding Color Separation
#

Now we’ll introduce some color manipulation:

Node Setup
#

section 2
  1. Create a Separate Color node and connect the output of the Scale node (attached to the Value and Pixelate nodes) to its input. Set it to HSV.
  2. Create a Combine Color node, set it to HSV, and connect the Hue and Saturation from the Separate Color node to it. We won’t be modifying these values in this tutorial.
  3. Create a Math node, set it to Round, and connect the Alpha from the Separate Color node to this Round node. Then connect the Round node’s output to the Alpha input of the Combine Color node.
  4. Create another Math node, set to Multiply, and connect the Value from the Separate Color node to the top input of the Multiply node. Add a Value node and connect it to the bottom Multiply input.
  5. Create a third Math node, set to Divide, and connect your Value node to its bottom input.
  6. Create one last Math node, set it to Round, and connect the Multiply output to the Round input. Then connect the Round output to the top input of the Divide node. Finally, connect the Divide node’s output to the Value input of the Combine Color node.

What’s happening here: In this section, we’re breaking down the image into its color components using HSV (Hue, Saturation, Value). The math operations we apply help round and quantize the image’s brightness, giving us more control over the pixel art effect. This quantization will make colors appear more distinct and less blended.


Step 3: Finalizing the Shader
#

Finally, let’s add some sharpening and softening effects:

Node Setup
#

section 3
  1. Create a Filter node, set it to Diamond Sharpen, and connect the Image output from the Combine Color node to the Image input of the Filter node. Set the Factor to 1.
    • Why Diamond Sharpen? This sharpens the edges of the pixelated image, making the effect more defined, especially for retro-style art.
  2. Create another Filter node, set to Soften, and connect its Image inputs between the Diamond Sharpen and Soften nodes. This smooths out any overly harsh transitions.
  3. Finally, connect the output of the Soften node to a Composite node and a Viewer node. Ensure both nodes have their alpha channels checked (if not already).

Final Summary: Your pixel art shader should now be complete! The combination of blurring, scaling, and sharpening gives your renders a pixelated, retro aesthetic. You can tweak the Value nodes to adjust the intensity of the pixelation and the clarity of the final result.

Since this is a Compositer this will be applied AFTER all materials render in your scene, so it makes a perfect base for setting up a pixel art shader. We’ll be building onto this in future tuts to make a very competent pixel art shader to make animated sprites. Please don’t forget to subscribe for new updates as I continue to post free resources and tutorials to this space!

Final Image

Related

The Story of Mimick – A Post-Mortem
Jun 4, 2023 · 2456 words·12 mins· loading · loading
Pixel Art Game Design

A postmortem of a game that got started but never finished.