TLDR: I went through quite some trouble creating a set of device mockup templates for PowerPoint, which you can download here for free.
Realistic device mockups are a great way to showcase creative work, whether it’s a mobile app, a website, or any other digital product.
While Adobe Photoshop is certainly most designers’ first choice for creating device mockups, I wondered if PowerPoint’s “3-D Rotation” feature could do the job just as well.
(You can find the 3-D settings in PowerPoint by selecting a shape and navigating to Format → Shape Effects → 3-D Rotation → 3-D Rotation Options...)
I started with a photo of a MacBook on a table and a dummy image that I wanted to project onto the laptop’s screen. Unfortunately, PowerPoint doesn’t let you transform an image by simply dragging its vertices like Photoshop does – you have to manually adjust the rotation, perspective and size settings. Pretty quickly, I realized that guessing the right values was virtually impossible and that I had to try a different approach.
My idea was that in order to determine the optimal “3-D Rotation” settings, I first had to understand how the settings actually work. With some reading on 3D transformations and a good amount of trial and error, I finally found the math behind PowerPoint’s calculation of the coordinates of a 3D transformed shape.
Let’s suppose we have a rectangle shape located at position (left, top) with size (width, height). We want to calculate the coordinates of the (left, top) point after 3D rotating the rectangle using the “X Rotation”, “Y Rotation”, “Z Rotation” and “Perspective” values set in PowerPoint.
We start by building a transformation matrix:
Now we transform the (left, top) point using the matrix:
The resulting vector is divided by z to project the 3D coordinates to 2D:
We reverse the translation to the origin:
The resulting 2D point consists of the x and y coordinates:
Knowing the mathematics behind PowerPoint’s 3D rotation, I wrote a small, quick-and-dirty tool to find the optimal 3D settings for given input values. Basically, you feed the tool the four vertices of the screen and the size of the image to project onto the screen. It then tries possible combinations (using nested intervals to improve performance) of width/height, x-rotation, y-rotation, z-rotation and perspective to check which one gets closest to the target coordinates. I have published the source code on GitHub.
The result of the journey is a PowerPoint document comprising eleven mockups of different devices (laptops, tablets, phones). Here’s an overview:
The mockups are based on photos released by their authors under the CC0 license, which means they can be used for any purpose without attribution. I have included source links for the photos in the comment section of each slide. You can download the .pptx file from the link below:
To add your own screen image, simply select the placeholder image on the slide, go to the “Format” Ribbon and click on “Change Picture.” Have fun!