Procedural Peppermint Candy 🍬 (Blender Tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this tutorial i'm going to show you how to create this procedural peppermint candy material in blender now if you'd like to help support me and my youtube channel you can purchase the tutorial files on my gumroad store and my patreon page and that is a great way to help support me and you can also check out my blender procedural material packs if you'd like to purchase more of my procedural materials or if you'd like to learn how to create all of my procedural materials then you can check out the procedural material tutorial playlist on youtube all the links are in the description and then before we start i want to thank this video's sponsor sketchfab sketchfab is an awesome 3d model site where you can preview 3d models in your browser you can even view them on a phone tablet or in ar and vr they also have a huge 3d model store where you can purchase models and assets you can even apply to sell your own models on the platform check out sketchfab with the link in the description alright so real quick i'm going to show you how i've set this up in the 3d space so what i did is i pressed shift a and i just added a plane and i just moved the plane over just so that i can preview the final material on a plane and then also i can press shift a and i'm going to go right here and i'm going to add an ico sphere and then right behind me if you open up the ad icos for settings i turn these subdivisions up to five so that it's pretty subdivided and then i just shaded it smooth just so that we can preview the material on a sphere and then also because this is a peppermint candy material i thought i'd model just a basic peppermint candy so to do that i'll press shift a and i'm going to add a circle and then i'm going to tab into edit mode and i'll just press f to fill a face then i can press g to grab and z to bring it up on the z-axis and then i can press e to extrude and i'm going to extrude it down on the z-axis and then what you can do is you can press ctrl b and ctrl b is going to add a bevel and you can scroll your mouse wheel up to add more cuts and then just click to place that and then i can also hold down the alt key and select this ring of vertices and i can do the same thing so i'll just press ctrl b and then just scroll your mouse wheel to make those cuts just like that and then i'll just shade this smooth and then also right over here on the modifier properties just to subdivide this i'm going to click on add modifier and i'm going to add the subdivision surface with the render and viewport to one just so that it's kind of smooth and then for the lighting right over here on the world i added in this machine shop zero two 1k hdr and this is from polyhaven.com so if you'd like to use the same hdri i'll have the links in the description so i'm just going to click on new here and i'm just going to call this procedural peppermint candy and then what i can do is i can click and drag and i can drop this material on these different objects and that way the same material will be on all three objects and then in this tutorial i will also be using the nodewrangler add-on so if you don't have that enabled you can just go right up here to edit and open up the preferences and then if you click right over here on add-ons over here on the search you can type in a node and then just check mark the node wrangler add-on and i'll show you how to use it in the video so to start off i want to create that red and white stripe texture so to do that i'm going to press shift a and i'm going to search for a gradient texture and i'll just drop this down here and then using the node wrangler i can control shift and click on nodes to preview it and then i don't want this to be set to linear so i'm going to click on this and i'm going to change it to radial and then also using the other node wrangler feature i'm just going to select this and i'll press ctrl t and that is going to add the texture coordinate and mapping and then i want to use the object coordinates not generated so i'm going to plug object into the vector here on the mapping and now you can see that we have one of those stripes in our texture now one stripe isn't what we want we want to have a bunch of stripes and we want all the stripes to be going around the object so to do that i'm going to press shift a and i'm going to search for a math node and let's just drop the math node right here so now what i can do is i can click on the add and i'm going to change it to fractions so it's right down here under rounding if you go down here it's fractions so i'm going to turn this to fraction but you can see that we still don't have any more stripes so to create more stripes i'm going to click on the fraction and i'll press shift d to duplicate it and drop it down here and then instead of this being set to fraction i want to click on the fraction right here and i'm going to change it to multiply so it's right here under functions just change it to multiply so now if you turn this value up it's going to duplicate that and spin it around and whatever number you set this to that is how many stripes there's going to be so for something like this i think uh 13 looks pretty good so i'm going to change the value to 13 and now there are 13 of those stripes now with peppermint candy there usually is a bit of a swirl because right now the stripes are just straight and they're just going straight into the center but they're not swirling so to make it swirl i want to bring the texture coordinate over here and then i want to click on this gradient texture and i'm going to press shift d to duplicate it and i want to drop it down here and then i can ctrl shift and click on it to preview it so to make the stripe spin around i want to affect this rotation value so that the stripes are rotated so i'm going to take the color right here on this gradient texture and i'm going to plug that into rotation and then if i ctrl shift and click back on the fraction you can see it is doing something but that's not really what i want so if i go back over here to this gradient texture i want to change it from radial to spherical and then if i control shift and click on this you can see what it's doing so now the gradient texture is a sphere the problem with this is that it's moved over sideways and so if i control shift and click back on the fraction you can see this is all warped and it's not rotating in the correct spot so to fix that i'm going to take the object right here and i'm going to plug that into the vector on the gradient texture and now if you control shift and click on the gradient texture you can see that that sphere is in the center so just ctrl shift and click back on the fraction and you can see now it's rotating in the right spot but there still are a few more problems because you can see right here this is kind of offset if i select this object and tab into edit mode i can press g to grab and z on the z-axis and you can see when i bring it up and down on the z-axis it's actually changing and that is because this gradient texture changes depending on where the object is in the 3d space if i ctrl shift and click on the gradient texture and then move it up and down you can see that it starts to get brighter and then as you bring it up it gets darker so what i want to do is i want to only use the z values so i'm going to control shift and click back on the fraction so i only want to use the z values of the gradient texture so what i'm going to do is press shift a and i'm going to search for a combine x y z so i'm going to take the combine x y z and i'm going to stick it right here and then i want to take this color and i want to put that into the z so now that i've done that you can see that it's rotating quite nicely and the rotation is in the very center of all these objects now i do want to be able to control how much it's rotating so to control that i'm going to press shift a and i'm going to search for another math node and i want to drop the math node right in here and then i don't want it to be set to add i want to click on this and right up here under functions i want to change it to a multiply so now if you change this value right here on the multiply that is going to determine how rotated the stripes are and then right over here on the sphere you can see that it's not actually being rotated and that is because this sphere isn't flat if i tap into edit mode on the sphere and then scale it on the z-axis as i start to scale it down and as it gets more and more flat you can see that it's starting to be more of a swirl so at the end of this tutorial i will show you how to fix this i'll show you how to change it so that even when this sphere is rotated and it's not flat it'll still have the swirls so on this multiply here i'm going to change it to a value of 2 because i think that looks pretty good i don't want to overdo it i just want to change it to a value of 2. alright so we now have a really nice stripe texture so what i want to do now is i want to plug this value right in here into the base color on the principled and then i can control shift and click on the principle so now what i want to do is i want to change the colors and then that way it'll look more like a peppermint candy so to change the colors i'm going to press shift a and i'm going to search for a color ramp node and let's just drop the color amp node right in here so i'm first going to click on the black tab and i'm going to click on the minus to get rid of it and then i'm going to hold down my ctrl key and click right in here and that is going to add another tab and i want to push the tab over so that we have white and white on either side so now i want to create a red one in the middle so right about here in the middle i'm going to hold down the ctrl key and click to add another tab just kind of put it in the middle here and then i can click on this color down here and i'm going to make it a bright red color and if you'd like to use the same exact color that i'm using you can click over on the hex value and you can type in a hex value of e3 0 0005 so that's looking pretty good but it's not very sharp it's quite smooth and i also want to make the red stripe thicker so what i'm going to do is i'm going to hold down the ctrl key and i'm going to click to add another tab about here and then hold down my control key and click again to add another tab right here and then both of these tabs i want to make them a red color as well but i want them to be just a little bit less saturated and again if you'd like to use the same exact color that i'm using um right over here on the hex value you can type in ff3b 4 4. so that's the color that i will be using and then right over here on this one i'm going to use the same color so now if you take a look at this it's really starting to look like peppermint candy now i want to sharpen up the white values just a little bit so i'm going to drag the white values out a little bit or drag them in and i'm going to drag them closer to the red values and now you can see that that white is a bit sharper and then you can also play around with these values just dragging them in or out and that way it'll change the size of the red stripes alright so that is looking really cool but i also want to play around with some other things in the material just to make it look a little bit more like candy so the first thing that i want to do is i want to turn this roughness down to like a .2 because hard candy like this usually is pretty shiny so i'll change the roughness to a 0.2 and then i also want to turn the subsurface up to a 0.3 and so the subsurface scattering is going to kind of let a little bit of light go through the hard candy and then the subsurface color i'm going to click on this and i'm going to make it kind of a reddish color but i don't want the subsurface color to be too bright so just kind of a reddish orangey color and not super saturated and if you like to use the same exact color that i'm using over here on the hex you can type in a hex value of e7 4a 3 7. all right and then the last thing that i want to do to finish off this material is i just want to give a tiny little bit of bump just to make it look slightly more realistic and give it just a little bit of imperfection so to do that i'm going to press shift a and i'm going to search for a noise texture let's just drop the noise texture right down here and then i can press ctrl t with the noise texture selected and that'll add the texture coordinate and mapping and then i don't actually need the mapping so i'll press x to delete it and i'm going to plug the object up to the vector so i can now control shift and click on the noise texture to preview it and i want to turn the detail all the way to the max which is 15 and then i'm going to turn the scale down to like a 2. so now we can use this value to kind of make the candy look slightly bumpy so to do that i'm going to plug this factor right here up to the normal and then what i need to do is convert this to normal data because this is black and white data but this needs to be a normal data so to convert it i'm going to press shift a and i'm going to search for a bump node and let's drop the bump node right in here and then i want to plug the factor up to the height and that way it'll convert the black and white data to normal data so if i control shift and click on that you can see what it's doing so i can now control shift and click on this and you can preview that material now it's really really strong right now and that is way too strong so to make it less strong i'm going to turn the strength value to a point zero two and that way it's very very subtle but if you kind of look right in here in the reflections there's just a tiny little bit of bump and that just makes it look a little bit more realistic and that is it for the peppermint candy material now one more thing that i want to do is i want to create a separate material and i want to change the material so that this object has a swirl as well because if i tap in edit mode i can scale this down and you can see that as it starts to get more and more flat it starts to swirl but let me show you how to change this so that it'll work on a circular object so what i first want to do is make it a separate material so it won't affect these materials so i'm going to click on the sphere and then i'm going to click on this button right here to duplicate the material and i'm going to call this procedural peppermint candy 2. so now to change this so that it swirls we need to go right over here and right here behind this gradient texture i need to press shift a and i'm going to search for a mapping node and i want to plug the mapping node right here so the object is going into the vector of the mapping and then the vector from the mapping will go into the gradient texture and then what i want to do is i want to flatten the z values so if you go right over here to the mapping you can go right down here to the scale and on this z value i want to turn the z scale to zero and now when i change it to zero you can see that it's now swirling all around that object alright and that is it so that is the procedural peppermint candy material so i hope you enjoyed this tutorial and thank you for watching and again if you'd like to help support me and this youtube channel you can purchase the procedural material on my gumroad store and my patreon i'll have the links in the description you can also check out my blender procedural material packs if you'd like to purchase more of my procedural materials or you can also check out my blender procedural material playlist on youtube if you'd like to learn how to create all of my procedural materials so thank you for watching and i hope to see you in a future tutorial
Info
Channel: Ryan King Art
Views: 3,235
Rating: undefined out of 5
Keywords: Ryan King Art, Blender Tutorial, Blender, Ryan King, Tutorial, peppermint, candy, christmas, mint, peppermint candy, swirl, 🍬
Id: Qb3a27oAXjw
Channel Id: undefined
Length: 13min 28sec (808 seconds)
Published: Fri Dec 10 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.