Today we’ll create a pixelation effect in Blender. I’ll be using the 2.90 version of Blender.
For the purpose of this tutorial I’ll be using the dolphin-203875_1920.jpg image by Claudia Beer from Pixabay, but you may use any image you like. Make sure to save it in your project folder. Here’s the image I’m going to use:
And now let’s see how to add the pixelation effect:
Table of Contents
Step 1 – Add a Grid
Save your file and delete the default cube. Now we’re ready to add the image. But the image must sit on something, so let’s add a grid (Shift + A -> Mesh -> Grid) and go to top view.
Now, for the pixelation effect to look good, the pixels should be perfect squares. To achieve that it’s important to maintain the width to height ratio of the image and subdivide the grid accordingly.
If you hover over the image file icon in your project folder, you will see that the size of the image is 1920 x 1280 pixels. So, to maintain the ratio, we can divide both dimensions by 10, thus getting 192 x 128.
Also, if we set the numbers of subdivisions for the X and Y axes to 192 and 128 respectively, we’ll get perfect squares. So, right after you add the grid, set the X and Y subdivisions to those values (A). Now hit N to open the sidebar and set the dimensions to 192 x 128 (B):
If you now go to edit mode, you will see that the grid is subdivided into squares:
Step 2 – Add a Material
Go back to object mode, go to the Material tab (A) and press the New button (B) to add a material to the grid:
Change the Material to Emission:
Step 3 – Add an Image Texture
Go to the Shading workspace (A) and switch to Rendered shading (B). In the Shader editor at the bottom add an Image Texture node (C). You can do it by hitting Shift + A and then under Texture selecting Image Texture. Connect the node with the Emission node, Color to Color (D):
Then hit the Open button on the Image Texture node and select the image:
Step 4 – Align the Camera
Let’s set up the camera. To do that, select the Camera in the Outliner (A) and in the View menu under Align View select Align Active Camera to View (B):
When you do that, you’ll be in camera view automatically. But you won’t see the image anymore (A). This is because the image is too far away from the camera. If you go to the Object Data tab (B), you will see the Clip End value set to 100 (C). This is how far the camera can see:
In order to be able to see the image, we have to increase this value. You can try higher values, for me a value of 350 works fine. I can see the image again:
Step 5 – Add the Build Modifier
Go back to the Layout workspace (A), switch to Rendered shading (B), camera view and select the grid (C). Go to the Modifier tab (D) and add a Build modifier. The grid is gone. But if you hit the Play Animation button (E), you will see how the grid is being built pixel after pixel from bottom to top:
Step 6 – Set Up the Build Modifier
So, we have a pixelation effect, but not the one we wanted. Let’s change some settings in the build modifier. First of all, we want the building process to be slower and take the whole duration of the animation. At this point the End value in the Timeline is set to 250 (A), but the length of the building process in the Build modifier is only 100. That’s why the grid is fully built during the first 100 frames. Let’s change Length to 250 (B) so that it matches the End value in the Timeline. Go back to frame 1. If you now play the animation again, the building process will be 2.5 times slower:
There’s one more thing we want to change. The pixels should appear in random order. To do that, all you have to do is check the Randomize checkbox. If you now play the animation, you will see something like this:
Step 7 – Add Another Build Modifier
Now suppose that this is the effect we want to achieve: The animation should start with no grid, then the grid should be built during the first 100 frames. Then it should remain fully built for 50 frames and finally, in the last 100 frames it should disappear pixel by pixel. It’s pretty simple to do, but we’ll need another Build modifier. You can just duplicate the one you already have. So, click on the arrow (A) and select Duplicate (B):
Now you have two Build modifiers. In the first one the Start frame should remain at 1 (A), but the Length should be 100 (B). In the second Build modifier set Start Frame to 151 (C) and Length to 100 (D). Also, in the second modifier check the Reversed checkbox (E) because we want the grid to be deconstructed in the last part of the animation:
Step 8 – Add the Brightening Up Effect
Let’s add one more detail to the animation. When the grid is fully built, around frame 120, the image should brighten up for a fraction of a second.
So, go to frame 120 (A). Then, in the Material tab (B) hit I over the Strength value of the Emission shader to insert a keyframe (C):
Now go to frame 132 (A), change Strength to 10 and hit I to add another keyframe (B):
Finally, we want the light to dim back to its original value. To do that, select just the first keyframe in the Timeline and hit Shift + D to duplicate it. Then drag the new keyframe to frame 136:
If you now play the animation, the image will become brighter for a while:
Step 9 – Render the Animation
Let’s now render the animation, but first let’s make a test render to see if everything works. Select any frame during the animation you like (A) and in the Render menu hit Render Image (B):
I got something like this:
It’s not bad, but maybe a black background would look better. So, close the image and go to the World tab (A). Drag the Color all the way down to black (B):
Render the image again:
I like it better now. So, we can finally render the animation. Go to the Output tab (A). Select the folder where you want to save the animation (B). Set File Format to ffmpeg video (C) and under Encoding set Container to MPEG-4 (D):
Save your file and select Render Animation in the Render menu:
It will take some time to render, but after it’s finished, you will have a nice animation.