 Hello. Oh, we're on All right getting ready Cool All right. Good morning, everyone As movie games, sorry as movies and video games Compete to take audiences on more and more outlandish stories Photorealism remains one of the most in-demand skills in 3D today But if you ask me the movie that everybody should be studying is Toy Story 4 Because Toy Story 4 of all movies gets all the principles of photorealism correct Which is what we're going to be talking about today the principles and secrets of photorealism Which can be broken down into three categories light materials and optics Starting with light the most fundamental and important to get right The easiest when it comes to light is understanding light color and you could do worse than basically Making all your lights fall within the Kelvin scale as a basic rule of thumb most lights in the real world fall within that scale And in blunder that's pretty simple. Just add a black body node and there's your lights So you can see that the majority of the shots in Toy Story 4 use warm tones for incandescent or sunlight and cool tones for moonlight or skylighting Falling into the artificial realm with the purples and pinks when they go to the carnival And as an aside strict adherence to this black body is used in many productions like in David Finch's Bad traveling short for the Love Death and Robots episode whereby he specifically instructed his team to use 1800 Kelvin for the lanterns and 4000 Kelvin for the moonlight then it doesn't matter how the shot is graded because those lights are the correct distance apart It'll always feel correct The next and probably their most Important in my opinion and most under looked is light fall off We're all aware that light falls off, you know over a distance, but I think most people It's common to underestimate how much fall off there is So let's say for example, you got a character. They're standing underneath a lamp so close that they could reach up and touch it If we say that the amount of light that's hitting the head is a hundred percent What percent do you think is hitting the feet? Think about it for a second. What percentage do you think it is? Who thinks it's a hundred percent? All right, no one fifty percent Around twenty five percent Around ten percent Five percent Yeah, you guys are closest Five percent or lower. We know that the exact amount actually is one point two percent or zero according to that screen It's so dark Yeah, color grading is never the best on projectors There's some like that one point two percent and we know this because of something called the inverse square law Which says that if you take the position of a lamp and arbitrary distance from it and then you double it You can calculate the position at that and double it again and again and again all the way down Now this isn't important to know there's no point memorizing this writing a note because the 3d software does this for you But what's important is to notice look I got a laser pointer the Distance between the first and the second it drops seventy five percent But the next one down it only drops fourteen percent and five percent in two One one point five and then finally point three. So the same distance point three Seventy five percent So basically what you need to remember remember Light intensity falls sharply from the point where it originates But the further away the less fall off there is which is why? Right on his fingertip there. You can see that the light is clipping but by the time it gets to the knuckles It's already fallen off drastically and you can see that the amount of light hitting his thigh is Roughly the same amount of light hitting his shin because the further away you are the less fall off there is Which is why you could be standing on the tippity top of the Burj Khalifa and be receiving the same amount of light roughly as someone standing on the ground because We are so far away from the Sun Right not even close to sky One point. Yeah 146 million kilometers away. Yeah, but that's the best I could do a Microsoft for it, right? So that's why somebody. Oh, sorry. Yeah So that's why in Toy Story 4 the light you can see they're using the correct lamp source sunlight So there's no fall off regardless of where you are So the floor is hitting the same amount as the light and other light sources, of course using a point or an area light It's pretty simple, but it's more so important for when you're thinking about lighting a scene So let's say for example, you've got a character who is lit from a lamp source, right? With that distance away now you can see that most of the character is really falling within the same sort of Light amount right even that distance away now if you wanted the attention to be on the character's face Which you might if it's a character. That's where the eyes generally should go You know, some people might take it into Photoshop and do a bunch of masking But if you know about light fall off, you'd know all you have to do is bring the lamp source in closer Closer to the character and you'll naturally get that fall off You can see the difference That it makes to composition. So that's what it that's what it can do to your lighting when you understand fall off Next up understanding light size The smaller the light source is the sharper That shadow is and the deeper those shadows become Revealing all the small details and you the crow's feet in your eye the little pimples and all the little imperfections Not good for faces Whereas larger light sources like an overcast sky does the opposite hiding blemishes and it's generally much more pleasant for phases Which is why Hollywood loves to shoot with soft large lighting even for outdoor shots where it doesn't make sense They want to use that soft lighting because it just looks so much better Toy story alternates between them Hard light source for outdoor shots and then soft lighting where it makes sense to and also it's important to know that This is relative to the distance of the character, right? So this looks like a small light source, right? But if you brought that light source closer to the character, he does the exact same thing as if you were to make it Larger right so smaller Larger and that's just by changing the distance. So keep that in mind when you're thinking of lighting It's like if you've got the position off and it's a large light source It'll appear small, but if you've got it closer a smaller Point lamp will appear large if that makes sense So that's light if you want to learn some more I've got a whole series on YouTube you can look it up lighting for beginners and I go into much more detail there Next materials my favorite topic When light hits a material a couple of things happen First some of the light is reflected and you know it's a reflection because when you move your head left and right You can see the light moves with it some of the the rest of the light is absorbed goes into the material and then it hits in particles and then it like Bounces off those hit some more particles and then some of that exits the material and that is what is called refraction Or as we 3d artists call it diffuse Scientists call it refraction. We call it diffuse, but it's the same thing. It's the color information And that's pretty easy to understand a red car is red a green car is green But it's a reflection where a lot of people get confused Because we tend to think of there being two types of objects reflective objects and non reflective objects when an actual effect They reflect the same most objects reflect the exact same amount It's the sharpness of the reflection that differs on a very smooth surface The reflection is bouncing off in mostly the same direction. It was received whereas on a rough surface those bounces are going to be every which way which means the Reflection is so smooth that your eye almost doesn't see it So take for example a really porous object one that you might not think has any reflection a brick, right? It looks like there's no reflection Right, but actually at polygon when we're photo scanning an object We use what's called a cross polarized lighting setup Which means that you put a polarizing filter on the camera lens and the light source And then they can actually cancel out a reflection and you can see the difference in color there and what's interesting She can actually use a difference pass in Photoshop and you can see what the raw reflection of that brick is And here's another one since I find it fascinating. This is a rock, right? It doesn't look like there's any reflection at all. This is a cross polarized rock Stark difference, and then there's the reflection so every object even ones that don't look like they are reflecting are Reflecting and roughly the same amount, which is why you should never do this bad Always keep it at 0.5% if you want to make something look non reflective just crank up the roughness It might seem like it doesn't make a difference, but it does because all objects are reflective. It's just they have different roughness You can see it here, you know little example from Toy Story. This ground doesn't look very reflective You can see from the top. There is actually some reflection. I don't know if you can tell in that picture But all the objects especially in this attic scene everything has got some amounts of reflection What's interesting though about reflection? It's not uniform across it. There's such a thing as Fresnel So the edges of an object is always reflecting are a hundred percent roughly Right, so like the edge of my face if you could see the 90 percent angle, sorry 90 degree angle You would see a hundred percent reflection And yeah, you here's an example from Toy Story, you can see that lamp there Starts off very bright and then tapers in and here's another more obvious example from George Clooney's helmet So this is again why you want to be careful when you're dealing with like mix shaders in that it won't have the Fresnel So stick to principled. I might might as well just call this presentation stick to principle It also when you're using principle shader like it'll also adjust the Fresnel depending on how much roughness the object does Which is something you don't get if you're also trying to make something yourself So principle shader does it all for you now what I've been talking about now is really just non-metals It gets a little different when you talk about metals I'm sure a lot of you have heard of this, but just a rehash Metals are pure reflection That part there where it enters into it. It does not refract any of that light It does absorb some of the light is absorbed into it, but that is just transferred as heat So when you're looking at a metallic object You are looking at purely reflective information. There is no diffuse. There is no color information there whatsoever Metals are also the only material that will tint a reflection Whereas every other object will be are basically reflecting the color of the lamp that it The source lamp basically so the wood on that clock there will have a different color than the gold obviously Which is tinting that reflection But just to make it more complex the tint will weaken with Fresnel So towards the edges of a metallic object it will also weaken So that's why like really if you're making trying to make a metal object yourself You can really screw it up quite easily. So again stick to principled So much easier you just set it crank up the metallic change whatever roughness you want Automatically does the weakening of the Fresnel make sure there's no diffuse and it just looks correct And finally we've got variants the most interesting part Because if you've ever been observing the real world you might notice looking at objects But it's not the same amount of gloss or bump or you know roughness across it. It's different, right? This road here you've got different, you know amounts of gloss or roughness across it Which creates these little glinting effects. There's a couple of like tire tracks there even a nice cream, right? Every object has varied amounts of these values And this is really what gives Toy Story. It's rich world every object has different amounts of of layering on it Like the sticky surface of this caravan roof The side of this cupboard here all of these details help to bring life to these materials while still looking quite stylized Now I don't know if this video is gonna play it might stop. Let's find out. Yeah, it stopped. Can we Go to that. Yeah, there we go There's an issue with a PowerPoint where it doesn't play But anyways, you can see so when you're just playing with the roughness you only get a certain amount of realism whereas if you Just plug in a noise texture, right? Which takes that value and puts it between like a a random range between Zero and one and then you plugged that into the roughness. I think it will continue playing. That's good You'll see the difference that it makes just this one small thing just adding variants across the surface Breathe so much more light into the realism of a material then you could plug that into the the color information You could plug that into the bump information And then you very quickly get a much more complex Realistic material now this is procedural like there's only so far you can go with a procedural material It really comes together when you start using PBR texture sets which are texture sets designed to go together So the color information matches the gloss information matches the bump information so it all is designed to work together Number of websites you can get PBR texture sets from the best one just happens to be my own company. I don't It's a coincidence. I Flew from Australia. I got to make it worth my while So that's materials now moving on to the optics This is about Emulating what the camera sees and it's very important and the most crucial part understanding is exposure Something that almost no one talks about but I believe is actually the key to what makes Toy Story 4 look so real if you've ever tried to take a photograph of someone on holiday and You've had you know them standing against a bright background and then you like on your phone You push on their face to make it focus and then it blows out the background, right? That is exposure. You cannot expose for a bright object and a dark object within the same photograph It's just impossible without HDR post-processing So that is exposure That's why if you've got a character sitting in front of a window The most realistic thing you can do is blow out the window because that is what happens in the real world It cannot expose for both things if you've got a room which is a dark room with sunlight streaming in through one window the sunlight should be clipping because it cannot expose for a dark room and The sunlight one of them has to look wrong because that is exactly what it does in the real world with a real photograph And this is where I think Toy Story 4 really shines There's this great scene at the start where Woody's looking at Bo Peep under the car It's a very dark environment So it's underexposed or sorry I guess over exposed for the dark environment and then a car headlights go across his face and it just clips You know like it should in the real world And there's a whole scene where it takes place in the attic which is a very dark and dingy environment But then there's these sunbeams which like beat through the cracks in the roof and like a more I don't know reserved or like less courageous director might try to like art direct that and go like oh We got to like turn down the brightness there and like bump up the shadows and try and even it out But they let it clip and I think that that is really what helps Toy Story feel real And you can see it across the movie under exposed areas with bright spots that really blow out just like it would with a real camera Any photographers in the room? People know cameras. Yeah, you already know about this, but it's called the exposure triangle So exposure is the result of these three settings in a camera And although we are dealing with a virtual camera with blender You don't need to necessarily understand all this but you should because these do different things to the image So the first one is aperture right when you're a photographer and you want to let more light into the lens You would use a higher. No a lower aperture. I Always get it's it's a smaller larger aperture But a smaller f-stop will let in more light But it will also increase the you call the depth of field right so it blows out the foreground it blows out the background a lot more and Creatively this is used for portrait photography. You like to use a lower f-stop Whereas a landscape shot you want to use a higher f-stop so more things are in focus And this is quite easy to do in blender. All you need to do is Select your camera It's it stopped again, could you go to the next bit? Yes, it's fun Turn on depth of field Select the object you want to be in focus and then adjust the f-stop and that's it Blender calculates the rest for you, but what no one talks about is the fact that it is scale dependent So if you are dealing with a very small scene like an ant sized, you know miniature Look at the depth of field so much more Whereas if you were dealing with a larger like city scale the depth of field is almost imperceptible, right? So this is the same aperture So this is why I answer when people say why do you talk about modeling things in real-world scale? This is why Because if you don't I mean first of all if you're bringing in objects from other areas It's just annoying to work with everything's a different scale But when you use the correct scale for a scene the real-world scale Everything just works and then when you render it things look the way they should Now this is actually an area where Toy Story takes some creative liberties. I was talking to Jonathan Lacks I don't know if he's here yesterday, but he was like they do kind of change the depth of field So like some of them they get right like this is a miniature correct scale for like a miniature set But because it's dealing with toys you could never really get two toys talking to each other if you had the real-world depth of field So they kind of alternate it across the scene they kind of increase it to make it look like a larger set So you can actually get more characters in focus But much better than Toy Story 1 which I realized like looking at it now It's like yeah, there's no depth of field in this shot like the stars are in focus Yeah, how about that there's it's really weird like some of the shots have depth of field and others don't it's really interesting But anyway, but who's old enough to remember like the old-fashioned way of doing depth of field in Blender We had like a curve circle you put the camera on the curve and then it like it goes around really fast So it creates the depth of field. It's crazy. That was the old method is terrible By the way if you look at that What was that? This bokeh here right this blurry area you see those stretched that stretched appearance there That's emulating an anamorphic lens which is typically used for high-end Hollywood shoots It's basically shoots at twice the width resolution wise and then is compressed back in post-processing To the correct amount which means that the bokeh basically appears stretched And if you wanted to create that in Blender very simple that ratio amount there You just set it to two so it's a little hack if you want to make something look cinematic cinematic. You can just like stretch it It's pretty easy Shutter speed so this one's pretty easy to understand everyone sort of intuitively gets it The longer a shutter speed is open the more light is going to be hitting the lens But the more motion blur there is basically in the scene so in Blender There's really just one setting your tone on motion blur and then you've got a shutter value there So that shutter value is really just I don't know what you call it Just made up it doesn't really match anything So it's really up to you as to how much motion blur there is so this is where understanding cameras can come in to play because Really there would be a higher motion blur when you need more light to hit the lens So a daytime scene there would generally be less motion blur than a nighttime one this one I think there's quite a lot because that's coming towards the camera, but yeah generally nighttime shots There is a higher shutter speed in order to get more light to hit the lens Whereas a daytime one there is less by the way fun fact The ornithopters in Dune the The wings are beating at supersonic speed So fast that they couldn't actually calculate the motion blur So they had to render 11 the subframes just to get the motion blur So basically every single frame there is rendered 11 times just to get the motion blur to look right which is really cool And then finally you've got grain or as I call it like the last attempt to get more light at the sensor Basically the higher the ISO on a camera the more light is sort of forced on to it forced on to the sensor So it's a quick way to basically yeah get more light in there without having to deal with motion blur and all that But you do get more noise with that However, it's not just one type of noise There is digital noise and there is film grain and it's sort of fiercely debated in the camera world basically digital noise Generally looks colored. It is pixel-sized and generally uneven. So it's more obvious to your eye whereas film Is more grayscale varying sizes and it's more uniform. So it's generally much more pleasing for your eye Now if you're hearing this and you're thinking oh great So like grain and noise is a good thing because mine my scenes are very noisy I'll just do a couple of samples and call it a day. No The grain or the noise that comes with a path trace render engine is Completely different to film or camera noise path tracing is throwing samples at area Areas in order to clear it up, but some areas are gonna be less Maybe you've got like a small light source or something refracting through a glass and that's gonna be noisy other areas are gonna be clean It's gonna be all over the shop. It's never gonna look right So a basically noise from a render engine is completely different to grain from film So basically you should be trying to render out as many samples as you can Cleaning up the shop with denoising and then Adding grain over the top which you can do in Photoshop Or you could use for animation like a plug-in like red Giants renoiser Or if you really want to go on the cheap side You can just get a camera put the lens cap on record like 10 seconds of it and then like throw that over as an overlay in Premiere The other thing also quickly as a bonus is barrel distortion, right for lenses So towards the edges of a lens you typically get like bowing out of straight lines, right like over there And that is done very easily in blender using a lens distortion node in the compositor and increasing the distortion You can also do it with a camera like panamorphic This is just way easier and you can see there's a little bit on the edge of some of the wide shots in Toy Story 4 and Then also glare as well really important basically whenever the camera is Receiving hard light, but it has to be exposed for a darker scene That bright light on that small part of it is kind of the way I think of it It's like it's like fuzzy in that area like the sensor can't really clean it up So that is perceived as glare and that appears not just in dark scenes But also in sunlight scenes where you've got dark and bright together. You will get that glare And that is very easy to do with a glare node. You just set it to streaks or glow depending on what you want So that is basically it the light the materials and the optics So in the 20 years since the release of the first movie hardware got beefier 3d software got more accurate Yes, but what makes the movie realistic is actually restraint because despite existing in a world with talking toys It adheres to the principles of photorealism more than most movies Which in my opinion makes it one of the most pleasant fun movies of the last few years and definitely the most beautiful So thank you all for listening