Award-Winning Marketing Websites

Create Image Sequence with Blender

Award-Winning Marketing Websites

Lesson Description

The "Create Image Sequence with Blender" Lesson is part of the full, Award-Winning Marketing Websites course featured in this preview video. Here's what you'd learn in this lesson:

Matias demonstrates how the images in the animation were created using Blender. A 3D model is downloaded and added to the scene in Blender. A camera and lighting is added, and the camera position is animated in the timeline. When the animation is complete, a sequence of images is exported from Blender and added to the project.

Preview

Transcript from the "Create Image Sequence with Blender" Lesson

[00:00:00]
>> Matias Gonzalez: Right, so let's see how we can create the image sequence that we saw before. For creating this image sequence, I just to grab a 3D model, I just went to Sketchfab and downloaded this model that's free to use. They have a bunch of models with different licenses, so it's a really useful site to just get something up and running.

[00:00:29]
So I have downloaded that model into this folder. So what I want to do is to import this model into Blender and configure some cameras and lights and just create a sequence of images. So here I have Blender. And let's first import the model so on the latest version of Blender I can just grab my model and grab it into Blender and just, I usually leave everything as default and just import the GLB.

[00:01:12]
And here we'll have our model already imported. So now what I need are a couple of lights and a camera so that we can create the animation. I'm going to add the camera. With Shift+A you can open that camera menu, let's move this camera away. And what I want to do is, I want to move my camera and I want the camera to always look at the center of the target.

[00:01:47]
So to do that we're going to create one object that we're going to use as reference and the camera's going to always look at that object so if I want to move the target of the camera I can just move that object. So I'm going to add what's called an empty with Shift+A. And I can select like this one plain axes, for example.

[00:02:13]
And again what I want is that if I move this object, the camera should follow this object all the time. So to do that, I just go here into constraints and add what's called a constraint. And a constraint track to so the camera will always track some object on the scene. And here we just have an eyedropper and I can just click on my object or click here on the scene graph.

[00:02:52]
And as I can see now if I move my empty object, the camera's going to follow it all the time. So this is very useful for focusing on one thing on your scene and then moving the camera and always getting the same point on the center. So let's start by doing some really quick animation and before that, let's actually add some lights to get started, so I'm going to add some area lights.

[00:03:37]
Let's actually move this here. And let's make it way bigger so that we have something to work with. So we now have one basic light. If I move away the camera and hit render I should see my scene. So let's go into render and render image. And I just got my image basically rendered.

[00:04:25]
So what I want in order to create the image sequence is first to have some sort of animation, so let's quickly animate this camera with some very simple movement. So I'm going to hit N to open this panel. And what I want is to animate the location of my camera, so I'm going to hover over the location properties and hit I, sorry.

[00:05:01]
And then I'm going to move on the timeline into some other frame and move the camera. And notice how these values change their colors, this means that these two values have changed. And this one also means that it didn't change the value but I don't have a keyframe actually for this value so if I move on the timeline I can see that my movement has been erased because the only keyframe that I put actually was on the first frame.

[00:05:36]
So I, what I want to do is actually to move the camera around, maybe change the height or something. Let's actually preview what we're doing, so I'm going to right-click in here and add a vertical split so that I can have a second viewer of my scene. And what I actually want to do is to click here to enter into the camera view and see what's going on.

[00:06:12]
So I'm going to hover again over the location. I'm going to hit I again. So I'm going to create another keyframe, so now if I move over the timeline, I'm going to see how we are changing the scene. I'm actually going to move this a little bit low so this gets into the shot and hit it again so it gets updated.

[00:06:40]
And with that we have a very basic animation that we can work with again we could do the same but with the target so I'm going to look for the target on the scene graph. Let's start by having this target a little bit up. Maybe, so we're watching this part right here, hit I. Then move the time and move the target a little bit.

[00:07:18]
Hit I again. One thing, if I hit I without hovering anything, it's going to create a keyframe for everything scale, rotation, location, maybe we don't want that. So in order to create a keyframe for one specific property we just hover over that, we can even animate things like field of view and other properties.

[00:07:51]
So for example, I can have my camera with more zoom in at the start and hit I here and then go into the 14th frame and edit that back. And yeah again while hovering so it will animate also the zoom, the focal length of the camera. Let's actually adjust the empty so that it looks, the shot looks better.

[00:08:28]
Here I'm hit you again, OK. So now as I progress through the timeline, I can see how we got some interesting animation. So let's actually render this and export it. So what I want to do next is to configure my render to actually be 40 frames long because right now if I go here and render the animation, this is going to render the entire length of this animation, so this 250 frames, so I actually need this first 40 frames, so I'm going to go here and type 40.

[00:09:15]
And just with that we just configure how many frames do we want to render in our animation. Then what we need to do is tell Blender where do we want to export this animation to so we'll go into output and say, let's actually find some place where we can do this, so let's create a new folder called animation.

[00:09:52]
I'm going to probably forget where this is later but. And accept and then what we could do is go ahead and render the animation. So this would actually start rendering frame by frame and saving every frame into a folder if I go ahead and look for that folder, so it was projects.

[00:10:29]
Animation. I can see that it's saving all of the frames. So I can just go ahead and open one and check every frame that has been rendered. Notice how every image is about 1.6 megabytes, so we probably want to compress this. I actually use a script to compress all of the images from this folder.

[00:11:04]
Let me try to pull out the script so what I did here is using WebP to compress all of the PNGs into a WebP file. I just shared this script with AI. Let's just edit this, so our folder, it's called animation. So I was the first to create another folder called animation WebP and then we want to enter into our animation folder and search for every PNG.

[00:11:44]
And then for every file, we're going to compress using 80% of quality and we're going to store that into animation WebP and use the original file name. So I'm going to go ahead and open a terminal. So if I do ls, I can see all of the files that I just rendered. I actually want to go one directory up and then copy the script that we just created.

[00:12:25]
And again, this will just go into this animation folder, search for every PNG, and actually run this WebP library that you can install on your command line and then it would just compress them into WebP, so let's just do that. And it would just loop over every file and do this.

[00:12:56]
And then if we go ahead and do cd animation WebP we should see all of our WebP files. So right now we could just grab this and replace this into our sequence. So let's do that. Let's go one step up into the animation folder. Let's grab our repository. Let's create a different folder called sequence2.

[00:13:53]
And let's paste all of the files in here. And since I have a different amount of frames I would just need to go and modify the variable that I use to remap so. First, I want to load 30 images only and then I want to remap into 30 frames, 40, sorry. And then if I go in here and I reload I should see.

[00:14:39]
The file name. Oh, that's true. Sequence2 thanks. Now reload I have the new version of it and if we scroll, we can see that we have this new render sequence in place. Of course we can play again and again improving lighting background and other things until we get the perfect shot that we want, but that is basically the flow that I used to create the other sequence.

[00:15:05]
As you can see on the other sequence, let's undo these changes. You can get a pretty high quality image because it's just rendering so you can get a really cool depth of field this if you actually try to implement this in 3D in real time you can but it's going to be way more expensive so it's actually nice to have this technique.

Learn Straight from the Experts Who Shape the Modern Web

  • 250+
    In-depth Courses
  • Industry Leading Experts
  • 24
    Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now