Hello everybody and welcome back.
We're going to discuss depth of field this time using the cycle's rendering engine.
So this is going to make this scene even better where we can blur out the trees and grass in the background
to really focus on our rabbit in the foreground so I'm going to make us seen even better than it was
before.
Now one of the first things to just work out here is and to tell you about is now a P.S. As you probably
gathered this isn't a Mac anymore and these it's the second thing is just to refresh my memory and this
will happen to you as well.
When you're coming back to a project and applying things you've learnt.
So first of all does this actually render as I expect it to I've opened this project to move computer.
Let's just make sure it does and I don't wanna wait in E on ALL I NEED TO SEE IS grasp being there.
So I'm still using s.p. rendering it's very intensive I know the GP on this computer can't even handle
it 16 by 16 is fine for my tiles sizes.
So the first thing I'm going to do here is whack.
My resolution 1920 by 10 it is fine but the tone all the way down to just 10 percent and here F 12.
Now what this is going to do is give me an impression of how the scene is looking.
I don't care if this is full of detail or not.
What I do care about is is all the are all the bits that I want to be there there.
If they're not then I'm going to have to reconstruct something or move things about.
Now this often happens especially with images in a scene but as we can see it's rendered out there and
I've got everything I wanted my scene perfect.
So what's the next thing to do.
Well the next thing to do is to go ahead and start tweaking and adding in the appropriate depth of field
to the right camera in our scene.
So the next thing we need to trouble ourselves with is working out which camera actually looking to
an easiest way of working that out is to make sure your looking through the camera view with your number
pad is zero.
And when you've done that just go through your cameras in the outline clicking them one by one and we
can see there's a camera up here.
We've got one over there and one we eventually get to my cam.
We will see that the border around the camera highlights are in so we know that's the camera we need
to edit so we can go to that straightaway go into the camera properties with that's selected and we
can tweak our settings here and then we're going to need to scroll down to where it says depth of field.
Now just as we did way back in the chess section we can go ahead and use the Selecta here to select
the.
I threw up the object rabbit there and we've got that selected and we're focussed on the lens of the
rabbit.
That's good that's a good place to be and then we can start playing with ah settings now whereas with
Blender render you need to fake it cycles is really good we dont need to do that.
It's a it's a great tracing engine so we go ahead and change the camera properties.
It should change as well something to change sister f-stop rather than radius.
And I'm going to lower it down to something like one point to the number of blades that's going to change
the shape of the bokor the outer focussed area I'm going to go for six.
And that will be the same as having a hexagonal shaped aperture.
The next thing we can do here is flip into rendered mobridge shift in Z and start tweaking things.
We've already got this setting here.
We can see there's already a bit of blur going on in the background.
How about if we lower this 2.5.
Does that change the background even more.
Yes we can see it starting to get even fuzzier in the background.
You know what I might just leave it as that and just see what's going on.
When I go ahead and hit render Now this is one of these points at which hitching render I should imagine
is going to work well going to have a little bit of a longer render time but also with the resolution
that I have set under the render properties of escarole I am already up at 10 percent.
I might not be able to get enough detail in that in order to ascertain whether I've got the right depth
of field settings going on.
And here we go it's coming through so we can see that is definitely blurred compared to last time.
But I can't really tell how much.
Now I'm quite happy with the viewport and how it has updated obviously it doesn't give an impression
of the grass or how much of a depth of field we have there.
So what I'm going to do now is I'm going to go ahead and whack this up to 400 percent and I'm going
to go grab myself a cup of tea whilst that renders out because it is going to take a few minutes to
do.
In fact I'm going to whack it to 50 percent because I do want to be able to not have two cups of tea
so I'll see you guys back in a few moments after that has finished rendering out.
Okay so there we go second about two minutes to do that's not bad at all.
And we've got a definitely a separated image of foreground image here of the rabbit than the rest of
us seen again is still not particularly high detail at the moment but that's something we can work on
as we get to the final render.
Now one of the things that can be incredibly fussy when you're trying to work out where to place your
actual focal point so on the camera itself.
When we were setting it up we've picked the lens of the.
I wish that that is a good place to focus in this particular scene.
If we wanted to change the focus over time perhaps animates it so we've got the tree in foreground or
the bush in foreground and then the Rabbit itself with its eye actually focussed in we're not going
to be able to do it with that so we need a bit more finer control over what is happening.
And that is where an empty can come in.
So let's go over to the 3D view.
Then take a few moments to come out now.
Our 3-d cursor at the moment when we come out of rended mode our 3-d cursor or moving the camera around
I will one day one day remember to turn off.
Lock to camera view.
There we go.
So come out of there and our and our.
Yeah it is.
Three curses right on that eyeball there which is exactly what I want to see because with the 3-d cursor
there we can go ahead and add in an empty and smoke aeroplane access in this point and I'm going to
call this focus points straight away so focus points.
And now I've got a focus point I can go on so I can go to my camera and then change the focus to that
focus point.
And that means now we can animate that focus point in our scene and the focal depth will track wherever
that focus point is and we can demonstrate that with the viewport rendering.
Looking through the camera.
There we go.
So at the moment the rabbit is definitely in focus and the Bush is not.
If I come out and I drag that back to the bush I could be a bit more precise with it being placed.
But let's drag it back to roughly where the Bushes come back round to where the camera is and flip into
rendered mode and we can see here that now are but gone a bit fuzzy and ah Bush is in focus.
How about that.
That is pretty cool and that will enable you to animates that depth of field as well if you so wish.
So let's finish off this election now with a challenge.
And you've probably already guessed what your depth of field challenges it's to add depth of field and
depth of field to your scene and make sure you are tracking an empty that is important that is part
of this challenge.
I know you can go ahead and just click on a particular object but add an entity or scene and use that
for the tracking render out your final image and share it with everybody.
And there's a bonus if you feel up to the challenge of animating a depth of field change or maybe even
a bit of a focal change as well.
Go ahead and do that as a bonus as well.
And if you go ahead with that make sure you share that as well.
So go ahead pause video now and give that a go.
OK everybody welcome back let's go ahead and add a different depth of field to our scene.
And I'm going to make sure that I am tracking an empty which I think I'm doing anyway.
And you know what I'm going to go ahead and do that.
Bonus parts of the challenge as well.
Now I'm not going to get overly fussy with what's going on here I'm going to do a little bit of camera
movement.
I'm not going to make it too long.
I'm not gonna render it on this computer and probably can render it on why I probably am going to render
on this one but probably several computers.
So let's go through the process that I would now go through.
I'm going to start off focussed on the tree in the background then I'm going to move to the bush and
then to the rabbit itself and I'm going to just move or pan or do something with the camera.
Not quite sure yet but nice and slowly it's not going to be a big movement.
Now this point in time I am going to save my file and I'm going to create a new file as well.
Based upon this one fluffy Ben the bunny and with depth of focus and the reason why I'm doing that is
because I want to remove some things from my scene.
I want to keep it a little bit more simple so I'm going to go ahead and remove these extra cameras that
we were playing with before and almost delete the wrong thing.
There's another one that I camp.
Okay so who set those all up before just to get an idea of what's going on.
Now we can go ahead and I can move that focus point.
If I go g and move it will end up with things being out of focus.
I'm going now do that in this mode so I can place things in an appropriate place and I'm going to bring
up the time line at the bottom here so I can just key in some movements now to make this make any sense
to me.
Umm guns have switched to orthographic mode and look at things from above.
Did I want above.
Probably in wireframe all as she can't see what I thought I was going to be able to see.
Let's look at it from the side.
Move it back and then look at it from the front.
So that's that's fine.
Then I could track along here if I wanted to.
I wanted to go from here to the bush and then to the bunny's eyes.
I'm going to key in the original position so let's go ahead.
Key in the position and then I wanted to come down sort of in an arc by Fink I can do that later on
the bush itself.
If I see that from the top is about there just a little lower.
Let's look at it from the one side from the other.
Yep that's fine.
I forgot to move the time line lets move it.
It depends how many frames per second we're doing this is going to be a long animation if I'm not careful
not I'll do it.
Two seconds to move from here to the bush.
Now I can move it can't I.
Okay so let's move it down to roughly where the Bushes switch around to the other side.
There we go and keep that in AK So removing it from here to here and then to the bunnies.
I will be the last one a hundred and twenty frames.
I don't think I'm going to have many more resources to focus on it like that.
So in this particular case it's in the right place and I can cheat here because the three curses already
on it are not.
Going to call it cheating but I can move the origin of that to the appropriate location.
Shift in s n then where is it selection to cursor.
There we go.
I've moved there mechanically that's in.
So let's just go through here to there and up there.
Okay so the next thing to do is a line that the movements of the camera itself with the rest of our
scene.
So I'm going to use the first person mode to move the karibe.
I'm going to set the camera up at frame 1 and then I should be able to see my focus point as well.
It's all the way up here.
I'm glad to make sure my camera selected shift F and move up to look at it and key those details in.
I'm not going to worry about moving the camera too much but by me it was 60 wasn't it.
It will be down at the bush so when I move around to the bush here and keep those in and then the final
scene was on the rabbits.
I says go ahead and show them.
Zoom in ever so slightly to the rabbits.
I look down as if he's towering.
Now this may not work out at all but it's a good idea that see how those movements are going to be.
So going to be focussed up here it's going to start pulling focus immediately round to there and then
to the rabbit cape.
I think I want more of the tree in this end shot some just going to move the camera back a little and
make it even lower and looked up.
Question is whether there's going to be a blade of grass in that that's ruining the shots.
There we get.
I'm going to go for that as my end.
Remembering to keep those two areas in.
I think I'm happy with how that's gonna be moving about.
So the next thing of course is to go and do a quick test render of an animation and I'm going to really
really crank this down and I'm not going to worry too much about how it's being output at the moment
and just be output to a temporary folder.
But I'm just going to do one percent of this and just to see if it kind of works.
I'm going to do an animation and unless you can see that's going to be very few pixels is going to take
a few moments to build up the scene and then hopefully it won't take too long to just go through these
120.
I've never actually done a one per percent render of 1920 paternity before so I'll be interesting to
see how it comes out.
And I can see from that straightaways just going to be probably too low a detail so I need to crank
that up a little.
I'm gonna go across and render this across a couple of machines now to get that rendering done.
Go to my output folder and set it to an appropriate location.
In this case I've popped it in completely the wrong folder but move it in a bit.
Except that because I've got everything set up ready to render.
Now that's the one not going to faff about with it.
The final thing I'm going to do here before I do anything else is a quick assessment of how many frames
I'm not going to render all 250.
Do you want there after it's finished moving when it's reached frame 120 for it to last another second
or so stationary some are going to take it to 150 as my end frames is going to be 150 frames in total
being rendered out and the render samples here are going to up them a little.
I'm going to go to 30 because we are using blender 2.0 7 9 now there's a couple of other things we can
do.
First of all on the settings the seed tab I'm going to set.
That's using the little clock which means that any noise that appears will be randomise because by using
a different seed every time that's useful I'm going to go over 30 samples.
But what I am going to do so I'm going to go to the next tab along which is the render layers tab and
then go down to D noisy and turn it on but I'm not going to have the strength set very high.
I'm going to set to maybe point two because what I don't want is it to make things unnecessarily bleary
and just clean up noise essentially.
So now that's all set out I'm going to make sure I've saved my file before I hit render and will start
sending out that animation and it is going to take a while to do.
I know that Im going to employ the services of another machine as well so I want it to create place
holders in this folder because that's a shared folder with another machine.
And I'm going to not overwrite.
I want to turn that off so each time it starts a new render it will continue going.
Save that once more and go ahead and render that out.
I'm going to hop onto the other machine now and get that working for me as well.
And then in a few moments I'll be back.
Well a few.
Probably an hour or two for me but a few moments for you and we'll see how it finally looks.
Okay so welcome back.
I have stopped the animation at the moment.
I just thought even though I have animated from zero all the way to 120 after 120 is essentially the
same frame so I can pretty much just repeat that again and again.
The only difference would be that even though it's a static frame for these last 30 frames because the
noise if you if we go back to or scroll down here because we've set the seed as randomise we will get
a slice of show you know it's going to change ever so slightly even though it's the same image.
But I can get away with that rather than waiting for it to render out the rest of it.
So the next thing to do of course is to put this all into one.
So I'm going to go ahead go to the video sequence.
Ed when I'm going to make sure we're right back at the very beginning and I'm going to add in an image
and then I need to go find those images.
Now Im going to change the view type here so I can see all of the images because I know these last ones
are not going to be great.
In fact they've not been rendered out so we can go from 129 all the way through.
Yeah that's fine.
We can select all of those with the exception of that last one so it's just the select that they're
going to add that image strip.
And then in once I've rented this out I'm just going to extend the last frame in a video editor rather
than just adding the same frames several times.
We've got 130 there.
I'm going to render it out to one hundred thirty frames.
That's looking good so the next thing we need to do is actually render it out as a video.
Now of course you could do this in your favourite video editor.
I'm going to use Blender here so lets just make sure our output this time is not a P N G.
But its gonna be an F MPEG video encoding wise Im just going to set it as an MPEG for now there's lots
of presets here and I prefer just using this not the top one there but the 8 2 6 4 in MP 4 so that will
play back on most devices and you can upload that to the Web as well.
So now all of that has been set up the final thing to do here is to render the animation out and we
should find.
Here we go.
Its coming down be quite quick.
This stage because its rendering it out and this is quite exciting.
You know it did take a while to render this out.
I will admit perhaps I shouldn't have done 10 ATP something like seven 20 would have probably been fine
for this.
But you know what.
Yeah well I'm having fun and do it.
All right there's a bit of grass in front of the ah that was beautiful.
I am a Latino so I've that sort of thing.
And there we go there's the final frame.
They're all rendered out.
And then of course we can play back that rendered animation as well using the built in playback feature.
There we go.
Look about.
Awesome.
I am really pleased with how that's turned out.
I'm really looking forward to seeing yours as well.
I don't know whether you've gone ahead and done a debt for field animation like this as well if you
have.
I'm looking forward to seeing it.
Please share your work over in the discussions and I'll see you all in the next lecture.