Transcript for:
Blender Tutorial: Coloring and Rendering Donuts

this is the part where we start making our Donuts look sexy so uh we're going to be coloring our sprinkles finally so it doesn't look so depressing um and then also getting into rendering to start making this actually look pleasing with Shadows and Light and everything else so first of all the sprinkles now as you probably know you could come in here and you could select a Sprinkle and then go all right I'm going to make a a red sprinkle and then I'm going to don't do this by the way I'm just showing you uh make this uh Aqua sprinkle and then a blue sprinkle right and this does work does exactly what you would expect the problem with this though is that for one the color is locked to that specific sprinkle so this curved sprinkle is always red okay and the short sprinkle is always white the other issue is that this is not easy to change the distribution of those colors like if I'm an artist I'm looking this I'm like that's kind of boring because all the colors is like 25% blue 25% white 25 you know I want to have maybe 80% One uh dominant color and then a few splashes of complimentary colors I can't do that so there is a much much easier way um so first let me just clear all of these and I'm going to create one new material I'm going to call it sprinkles and I'll actually show you how to quickly apply uh the same material to multiple objects at the same time um because we haven't done that yet so let me I'm going to grab my round sprinkle which is currently still over there by itself I'll just bring it over here so it's part of the family there we go all right so I've got uh I've got one object with the the material that I want to apply them all to uh what I need to do is shift select all the objects that I want to have that material and then lastly shift select again the object that has the material I want to apply them to and then and you know that cuz it's it's uh highlighted yellow okay then hit contrl l this brings up the link or transfer menu and we want to link the materials and now you can see our material has a five next to it because five material sorry five objects are sharing this material and that's it and now obviously because they're linked it means if I make a change over here um they're all going to be reflected great now we're going to do something fancy so let's go to the shading tab which gives us access to our uh nodes oh dear where have I all right let's go back trying to get to that sprinkle okay to our uh notes now I want to introduce you to a little friend called shift a input the object info node a very weird little uh weird little node that just does some useful things when you might need it so you see it pop up in a few tutorials um there's a bunch of stuff here that it can do the most useful one for us in this instance is the random input drop that into your base color and let's see what happens so we've got some gray values and it's easier to see actually when you look at the donuts so what this has done is it has assigned a value a random value for each individual sprinkle between zero and one so because that's then being transferred to color information it means that for example this sprinkle might have got a value of like 0.0 2 3 right the robot spat that out uh and then this one this white is look one maybe this was 0.89 or something like that okay so it's just transferred those values into color information which is just blacks to whites not very useful right now but we can use that those those numbers in a I'll just show you okay shift a we're going to go converter color ramp probably I mean I might have used this node more than any other node in blender before it's like so versatile used for so many things so drop it in here between the object info and the principled and uh currently it is exactly the same because it's just the it's transferring that data into a gradient value of the exact same Shades but we can change this to any color that we want and look at that so you can very quickly see this is exactly how we're going to create sprinkles of different colors um now one thing you'll note looking at this is that every single sprinkle is a different shade like no two sprinkles have the same color right now because this is a gradient and that's not how it works in the real world because the sprinkles come out of you know one constant icing bag right or a machine with the same food di so basically all the blue ones would have the exact shade of blue and all the orange ones would have the exact shade orange so we need to change this from linear to constant and now if I slide this across look at that we are influencing what percentage now is orange or blue and this is really cool cuz it means you get to work like an artist and just create a really nice appealing looking donut very very quickly so I'm going to go with like a light blue over here and then I'm going to create a new color just by hitting the plus button and then let's give this a purple like that and I'll make this one pink actually same shade as our dut why not you'll note by the way that I'm not going like full saturation um and that's deliberate because you learn in our that yeah like saturation and color is quite uh aggressive it's quite noisy and uh quite attention grabbing and so if you use too much of it it can be exhausting so I I tend to keep it at like 08 um okay and then I'll also go over here and I'm going to make this white let's go oh whoop no not like that white and I'm going to create another one next to it and this one I'm going to make yellow okay so just by sliding this around I could say like less white more yellow less yellow more white and then I can go yeah more blue it's just a really simple easy way to create the exact um the exact look you're going for awesome now something uh you don't have to do this next part but it's so easy why not I was looking on a Pinterest on like uh like aesthetically pleasing Donuts like trying to make this uh look really cool and uh and I saw like metallic sprinkles and I was like hm that's an interesting idea what if I made these white and yellow ones metallic and then they would look silver and gold so there is a slider in your principled bsdf technical name that just means it's the Shader that does everything um and it's the metallic Shader look at that so if I slide this all the way to one all my sprinkles are now metallic and if I slide all the way to zero then they are non-metallic and that's actually how you should use this slider all materials in the real world are either uh non-metallic also known as dialectric materials so that would be most of the sprinkles um and then some objects are metallic entirely metallic um there are technically a few rare materials on Earth that have some blend between it but as a rule you should not have a value that is between zero and one it should be either zero or one anyways so what we can do with this because we've got this color ramp information here is I can actually uh just convert like I can make a color ramp that is just black and white that just shows which sprinkle is metallic and which one isn't so um if I duplicate this and here's a pro tip if you use control shift d it will duplicate it but it will retain its connection so just saves you I don't know one second uh and now I'm going to connect that into my metallic input now currently this is wrong because this information is uh it's just using yeah it's like color so we need to be black and white so this one here because this is going to represent my dialectric colors I'm going to set this to Black so it is non-metal and then this I can delete and this I can delete because because on the left hand side of it it's all black sorry so it's all uh non-metals and then over here these two the uh the silver and the gold they're going to be metal so actually I can delete the gold and now that's doing exactly what it should so we've now got dialectric non-metals and metals and the reason it doesn't look like metal by the way is cuz your roughness is here so if you set it all the way down you can see it starts to look a lot closer to a metallic sprinkle um and by the way you can get the exact like position you can go like 7 and then here 7 type it in and then that way it's definitely uh correct for whatever reason of mine this has to be a bug there's something weird about it but there's one sprinkle on my Donuts probably not on yours but it's like it's it's it's purple up here but then it crept over into the metallic category down here which shouldn't be possible but evidently it's just on my I've never seen it before but one of them has actually snuck over doesn't matter it's a what it it can be the rare purple uh metallic One um all right but I don't want the uh these other ones to be uh shiny at least that shiny so I'm going to again duplicate this control shift d and with this if I plug this into my roughness input just like before these black and white values will decide what is the roughness of the metallic and non non-metallics so this one here um I want this to be essentially the opposite of what it is almost entirely black a little bit so that there's a little bit of roughness to it like that and then this one over here I want this to be a lot more diffuse not entirely diffuse like somewhat of a blend cuz if you look at reference which you should be modeling off reference there is uh some shininess to them so yeah but that is it so you can see very quickly we have created some very aesthetically pleasing donuts and have fun with it guys like create a cool looking donut um you can use whatever color combinations you you want I really do like it when people experiment and not just follow a tutorial down to a tea but like venture out there and you know do do interesting things so try different color combinations try different icing colors um and you could make something that looks uh looks really cool but that's almost it for our donut it's pretty well done which means we can now finally talk about rendering so as a recap of uh of part one if you hit F12 that's going to put you into the rendered state our camera is really far away from the donut so actually let's first fix that if you go to your camera view you just by clicking that little icon there or by hitting number pad uh zero that'll take you there as well um this is the camera view we're really far away I mentioned in the start that uh if you use uh this key this button view lock camera to view that'll let you like grab it and move it around but it is actually another way I didn't want to introduce you to too many uh keyboard shortcuts at the start but if you hit with the camera selected shift Tilla key that will put you in fly mode uh the other way to do that by the way is to just go uh view navigation fly navigation there if you don't have that key so anyway in this mode it's now it's almost like you're playing a video game so like it's just I'm playing a first-person shooter looking around my scene w is move forward just like in a video game uh a is strafe left D is strafe right and S is back so w ASD just like a video game um I can also go up by hitting e and then down by hitting q and if it's too sensitive like if the movement is like you know crazy fast uh the scroll wheel also decides how uh far oh goodness there it is okay how fast the movement is so scroll down if it's going too quickly for you um but yeah I can now place place the camera wherever it is I want and then when it's there I just click single left click and now it's there and by the way that mode is H called fly navigation and it works also not just from the camera view but anywhere in blender if you ever want to just like you know move around you can do uh use that fly mode so shift tilter key for that all right so we do a render we get something that looks hideous why is that well for starters it's not a very the scene has just got one light in it but the primary reason and by the way uh the yes that's the render View mode but also if you go to rendered view shading up there this is the exact replica of that but just in the viewport okay now the primary reason this looks bad is because of the renderer okay so blender's default render engine if you go to your render properties is called EV now EV is fast but it is not accurate if you are familiar with games most of you probably are um EV is basically a game engine so it's designed to be really fast probably not 60 frames per second but really really fast um and it's a in terms of uh the renderer types there's usually actually you call them like real time is what this type is and that is a rasterized uh render engine and then you have Ray Tred or path traced engine sometimes called offline renderers um which are a lot more accurate but much slower so this is good if you don't really care about realism uh like maybe you're making a title effect for a TV you know thing or whatever or you're on a really tight deadline you just want to get something out fast you can use EV um now you can make it look better than what we have like for example I think the because we're using like really small sizes for our donut you want to increase your Cube size and then your lamp the bias there you go you set that all the way to zero um and now it's more appropriate for this size we've got Shadows but it's still not great um we don't for example have shadows on any of our sprinkles um because it's just too fine a detail and the shadow itself it's just like a blurry mess so this is it's just a fakery um and it's just like what's going on uh with with video games I will briefly mention also that blunder 4.1 which is what this is here it's in Alpha State at the time of this recording I've been using 4.0 for the this whole recording but this is 4.1 and it is a it's EV but it's completely Rewritten and it is better right so the Shadows are better um there is actually even some bounce lighting happening but it's kind of like a fake bounce lighting and it's definitely better but it's still not great so that is the limitation it's fast but it is not great um and that's what you get with rasterized real time um engines so there is another render engine to go to your render engine settings and click the drop down ignore workbench that's for like um just like basically rendering your viewport really for technical stuff um Cycles so those are the two main engines of of blender you got cycles and you've got EV Cycles is uh what's known as an offline renderer or a path trade also known as Ray traced engine now uh this looks way better than what we had before you'll notice for example that all of our sprinkles have shadows by the way apologies if my recording gets a little choppy it's because it's uh using the CPU anyway um you can see it's uh it's got proper Shadows on things uh there's actually bounce lighting right that's like coming off this uh this table here and it's going underneath the dut um so it's like it's shooting around inside here and it's shooting back and it's going over here which is exactly what happens in the real world and it's really important for realism to get that uh bounce I mean any room any architecture you basically have to use Cycles um to do it because uh that's how you get proper lighting like in the real world but you get all this for free at the cost of speed so you'll notice as I move around whilst my recording goes choppy that it's starts grainy and then it kind of refines itself and if you look in the top leftand Corner you've got something that says says samples so uh as you leave it uh rendering longer it's rendering more samples essentially it's just like the computer's just chewing through it that's I mean it there's technical ways to explain it but that's the simplest way to think of it and it'll get clearer as uh the longer you leave it now there is actually two ways to calculate this one is to use your CPU which is what it's on by default another is to use your GPU which is grade out by default so let's fix that go to edit preferences and then go to system and you can see at the top there Cycles Render devices so try switching to one of these tabs and see what you get if you have a device like myself uh that is a GPU that is supported um then you can render on that and it'll be way faster so just as an FYI Cuda is NVIDIA and it's for like cards like I think 1080 backwards so like 90s 800s I think they used CA Optics was around uh the 2,000 series um further on so Optics is the one that you use if you're using a ninia card today uh hip is for AMD cards and then you got one API and I think actually on Apple devices you'll have a metal option but see what you have and then see if you can render with that because that with GPU on now it'll uh go back to this it might actually the first time you use your GPU it will say I think at the top leftand corner um doing this for the first time it'll do some pass it'll be really slow it might take like 2 minutes but then after you've done that every time you open blender you should never need to do it again so it might be slow the first time you activate it but it'll um it should be faster now this is way faster than what we had before like you can see how quickly it's uh it's clearing through those samples um it's basically real time um it's uh in fact actually so that noise that I mentioned right it's still there but when you render and also in your viewport you can use a denoiser so it's uh it's actually not that new it's like 3 four years old I think we started using Aid noises um Nvidia released their one for Optics um and since then Intel have come out with one and it basically takes that noisy image it uses some of the information from the 3D renderer to clear it out whilst preserving the detail so if you can actually turn it on in the viewport by hitting the dno one if you've got a Nvidia card it'll be way better if you don't it'll have to use the Intel denoiser which is a lot slower um but you can see the noise is practically gone right so this is almost real time um which is really really cool now obviously not all of you are as lucky right I've got four 309s um I started though on a Pentium 3 I think back in 2003 um and I mean look they made a Toy Story on computers that you couldn't even sell today cuz they would be just garbage maybe you could for like nostalgic anyways the point is is that everybody when they start 3D is using a device which is crappy don't let it limit you or don't think oh I can't use 3D until I get a better computer a graphics card is definitely one of the best investments you can make if you're thinking like I want to do this as a career this is definitely for me I'm really enjoying this um it's definitely a good investment because you will be able to uh produce more renders throughout the day faster um but it is not essential you can get by with just a CPU it just means that when you do your render your final render instead of it being you know done in an hour you might have to leave it overnight um in the past when I started with blender I was making crappy renders at like 600 by 400 resolution and I was rendering for over a week just to do a really crappy basic animation so don't let it hinder you it's it's totally normal that you'll have a bad computer um if it's for you in the future definitely worth investing in in um in a card that is fast also if you want to know which card to buy uh blender actually put together an open Benchmark uh so if you go to open dat. blender.org or click the link in the description you can see it's showing you all of the the people that have done this Benchmark what have their devices been and what are the times that you can expect so you can see as see mine is at the bottom it's the uh 3090 uh but it's I've got four of them so it's it's obviously turning through it faster the fastest is I mean basically it's going to be the top card or like the go-to Nvidia is just crushing it um I think uh where is the AMD they used to be on I think AMD is made a made a mention there you've also got CPUs on this side but essentially I mean just by the top like gaming card usually that's the one um but do go here check it out if you want all right so we're going to be using cycles for the rest of this tutorial um and we'll really dive into it in the next part but I just want to quickly um my lamp is way way away so let's just bring that in closer just so that we can see things and you can actually clear the rotation of an object to make it appear at the the center of your 3D scene by tapping alt G okay so now hey look that's actually kind of cool um I'm going to move uh my lamp over to here just check my recordings yeah my recording is not being affected um and I'll just now reduce the strength of this because it's obviously now way closer but look at that like look at the shadow that we get um coming off this donut um it's like properly taped it's not like some fakery so it's like tight here and then it's like really uh faded at the end there that kind of stuff is really difficult to do with a um a a rasterized realtime engine like EV uh and you also get like all of this proper like look at the Shadows on the sprinkles the reflections is actually true it's not like guessing and fakery um yes it's a type of fakery but it's it's much more accurate um anyways I I like Cycles I'm I'm A Cycles guy um I think most people actually are the first version of Eevee was not that great Eevee next in 4.1 might be better we'll see uh but yeah the first version of Eevee was not really that great now one thing you might notice looking at your D I'm going to make one one big tweak to this is that it kind of feels hard like doesn't give this kind of like soft feeling to it and the reason for that is the material so by default all materials are yeah kind of like hard materials but fleshy objects like humans as well as food have subsurf for scattering so I'll throw some reference photos here um but you can see this is my hand I had uh light coming in like as I was eating breakfast and I can see the light is actually going through my fingers right so that's light that is uh like yeah it's a mushy fleshy object so it's passing through it scattering amongst all the other atoms in the finger and it's uh the light is going through to the other side you also see it um in a lot of food so took these photos at a party yes I am that guy U but you can see that's how you get light that goes uh to the opposite sides uh my daughter was eating a banana and uh I was like look at that banana look at that subsurface scattering right there so donuts and icing have that and we can do that we can add that sorry by going to the materials and then down here you've got subsurface okay so here uh the the biggest one to turn it on and just like metallic apparently this is uh by the way a new setup for 4.0 but just like metallic it's supposed to be a weight of either zero or one all right now when you do one it suddenly turned blue and you're like what the hell happened there that's because the radius this uh radius is uh it's this is your XY Z but also it's your RG and your B in this case and these values are different because it's designed for skin by default so this is a great setup if you've got skin with blood inside but we don't so click drag down and then just set these values to one all right so now it's closer to the material still looks weird and that's cuz the scale of this is wrong it's saying that the thickness of the object is 5 cm but this icing is not that so let's make this 01 and now you can see it looks a lot closer it's still a little dark so I think it's uh it's not 1 cm thick so let's go 0.5 and now we can see it's pretty close to its original material the biggest difference is if I just zoom right in here let's set it to what it was before see how it's hard it almost feels like uh it just feels like concrete right but then you set this to one and look at that the the shadow just starts to feel a little softer and you get this bleed effect where kind of like the shadow gets a like an edge to the shadow where it gets a little more saturated and Pinker um and that's Subs surface scattering you don't have to tell it how to do that it just does it so you set the weight to one these to one and then you just set your scale to whatever it is you want um and I'm also going to do it for my sprinkles so I'm just going to click on one of my sprinkles and yeah right in here for the subsurface I'll just do the same thing set the weight as one these radiuses to one and then I'll use a really low value here like let's go 0 two and now you can see because these sprinkles are yeah it's like icing right it's just the exact same thing um yeah we want some of the light to pass through it and we don't actually have to bother setting up that um that color ramp system for the metal because Metals automatically that Shader when you set it to one it means it's going to cancel any subsurface scattering that would have appeared there so we don't have to bother with it the subsurface is not going to happen on Metals um but you can see it starts to feel a lot softer a lot um I don't know more pleasing more delicious looking like real food because that's really one of the telltale signs of food is subsurface scattering awesome so in the next part we're going to start really building out the scene what I want to do though at the end of this video I want to give you some homework and that is to try to model this plate now we're going to do it actually in the next part but it's simple enough and it's actually possible to use all the tools that I've mentioned in this uh this series so far to model this yourself now the reason I I'm trying to give this as homework is that once this tutorial finishes that's how it's going to be you're going to have to try to solve problems on the fly so it definitely helps solidify learning if you can try to apply it um by yourself so have a go it doesn't matter if you get stuck or you fail at it terribly because you can just click the next part and see how it's done but have a go at it now um because then you'll start to you you'll just retain the information a lot better anyways go ahead click here and uh and see how we build the rest of the scene and build that plate