Introduction: Animated Side-Scrolling Wallpaper - Parallax Pixelart
By AjarDesignMakerWorld
More by the author:
About: I'm a novice maker and student - always working to better my skills and try new things. My projects often include laser cutting, 3D printing, woodworking, electronics and more More About AjarDesign »
I've always wanted to make my own animated background for my PC, and this competition was a great way to combine it for my love for aviation to make a neat little flying scene. The steps below break down how I made this from scratch with just free tools like Inkscape and Blender. Check out the Youtube video above for the full project walkthrough with narration as well!
Supplies
Software
- Inkscape
- Blender
- Lively Wallpaper for PC (many alternatives for PC/Mac)
And that's about it! Just that free software is all you need!
Step 1: Inspiration/Direction
One of my favourite time-wasters on my phone is the NimbleBit idle game - PocketPlanes. I find it particularly satisfying due to it's pixel art style/simple graphics, and it's fun to spectate the planes in the background. So much so, that I thought it would be a cool idea to animate my own side-scroller type scene to use as a live wallpaper on my PC. Therefore, I decided to make my own pixel art plane and scenery and animate it into a short looping clip for this very purpose!
Step 2: Reference Images
The first step in this process is finding some good inspiration/guidance for the graphics that we're going to make. If you want to get more creative and design something fully from scratch you can go for that too! But start with some hand drawn sketches and go from there is my advice.
There are plenty of royalty free stock photo websites out there, so once you have an idea of the type of image you want to replicate, it's just a matter of a bit of googling to find what you're after. File format doesn't really matter either at this point.
Step 3: Setting Up Inkscape
Once you've got the reference images sorted, you'll want to replicate them in pixel art. There are lots of ways to do this and Inkscape definitely isn't the best or easiest way, but it's the software I use, free, open source, and most importantly, you can still make it work!
First just import the picture into Inkscape (File -> Import) and select your image.
Then we want to set up the our document and tool properties before we start creating. To do this we'll open document properties (File -> Document Properties -> Grids), then select a new rectangular grid and make sure the spacing for X and Y are the same value (this value can be changed but keep them equal for a square grid). Then make sure that "Major grid line every" is 1 which will help with snapping and keeping everything clear. Ticking "Show dots instead of lines" will also free up the canvas a bit as well.
Lastly, make sure that snapping is enabled. With the sub categories Bounding boxes -> Corners, Nodes -> Cusp Nodes, Grids -> Grid Lines are all enabled as well.
Step 4: Creating Pixel Art in Inkscape
Now our settings are all setup, we get to start the fun part - actually creating some pixel art. Start by just using the rectangle tool to create a square the size of a grid (the snapping will help). Then convert the object to a path, Path -> Object to Path. Once the square is converted you can use the eyedropper tool to match the color of your image and place it.
From there it's as easy as copying the cube, and pasting it along the body tracing out the image. It's a good idea to keep the number of different colors a little limited and not change with every tile - this helps keeps everything looking nice and consistent. But still use some shading to enhance the look.
Repeat this for some generic scenery; clouds, mountains, etc. Having these as separate images will let us use the parallax effect in animation to really have everything come to life.
Step 5: Foreground Terrain
Since the foreground section is quite large, it can help to start with a rough shape, and then use a Bezier curve to fill in large spaces. Remembering it's only the perimeter of the shape that has to be pixelated to give the pixel art effect. The first picture shows these large fill shapes, and after the second the smooth edges have been covered with pixilation, just make sure there aren't any smooth edges showing.
Step 6: Foreground Loopability
Also when you're designing your foreground, it will be a little different to the other elements because it needs to repeat. That means you have to design your foreground to finish the same way it starts so there isn't any noticeable bump when the scene loops. However, if you aren't bothered to have the animation loop this isn't something you'll need to consider.
Step 7: Exporting
After you've gone over the entire image, all you have to do is delete your reference image, and the export the remaining image as a PNG (File -> Export).
Step 8: Setting Up Blender Background
First up we want to start a new Blender document (2D Animation) and import a background reference image selecting object mode, then (Add -> Image -> Background). Just use a plane sky blue color for this.
Step 9: Adding Elements
Now, to add our main elements, make sure that the "Import Images as Planes" addon is selected in your Blender version and then we just follow a similar process to the background, but select Images as Planes (Add -> Image -> Images as Planes). Note, that for the scene to repeat you will have to insert two identical foreground planes which when lined up one after the other, makes the scene repeat seamlessly.
Step 10: Scene Depth
For the parallax effect to work we want to have different layers of the scene to give depth, and act as planes in which the speed will be different. So set up your entities in separate planes with the foreground closest to the viewpoint and the mountains/distant objects closest to the background plane.
Step 11: Keyframe Setup
To start to get everything moving, we want to open key frames, which you can drag up from the bottom left corner of the screen. Make sure auto-keying is de-selected so keys aren't added where you don't want them. To make the motion come to life, align everything such that the foreground is focused on the left most side and any clouds/distant elements are out of frame to the right. You can start with scenery in the frame as well, but that makes it a little more bothersome to make the loop since you have to make sure they end at the same location as starting which requires another duplication of the object. You can the select all these elements and insert a key with Ctrl+I.
Then just move the objects out of frame to the left - moving the closer objects like the foreground or clouds further, so they move faster in the final animation, and the more distant objects less far (just out of range of the frame). Just make sure the duplicate foreground section we added lines up where the first one started, and the sky is clear of elements again for the loop to be smooth. Then drag the slider to a later frame and create a new key. Just make sure to give a couple of hundred frames so you get a decent clip; e.g. 300 frames gives you 10 seconds at 30fps.
Finally, you can add some keyframes along the set of different heights for the plane. This will give a better illusion that it's flying and not perfectly hovering along.
Step 12: Linearize Motion
Now, if we leave things as they are, Blender defaults to smooth motion where the objects will start slower and speed up, which isn't ideal for what we want to create. So we want to pull up another UI window and select the Graph Editor (Shift+F6). This will show a curve of the motion of your selected object in the new window which we can make constant (linearize) by right-clicking the curve and selecting Interpolation Mode -> Linear. Do this for all the objects.
Step 13: Export
Now everything else is pretty much finalized, all that's left to do is export our clip! Opening the menu in the bottom right you can change your export resolution, framerate, video format and location.
I just used the standard 1920x1080 aspect ratio with 30FPS which is plenty for this use case - a lot of free animated background software don't support higher framerates anyway. And finally select the FFmpeg video format, before rendering the simulation with the Render button in the top left.
Step 14: Software for Displaying
Now that we have our video exported and ready to use, all that is left is to display it as a wallpaper. There is plenty of software available that support animated desktop wallpapers for both PC and Mac - free and paid. But I went with Lively Wallpaper - it was easy to setup and use and is available straight from the Microsoft store for free.
After adding the app, just select upload wallpaper and add your video clip, then select "Set as Wallpaper" and you should be good to go! You can also preview in the Lively Wallpaper player before you lock it in.
Step 15: Examples
And that's it! Hope you enjoyed reading and good luck with your own backgrounds if you choose to. Make sure to share below if you do because I would love to see!!! :)