Arnold for Cinema 4D: Variance Techniques For Random Color | Greyscalegorilla Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everybody in today's video we're going to talk about Arnold and specifically variance techniques a good way to get a natural look out of your renders is to make sure not every object looks exactly the same so we're going to learn all how to do that with Arnold in cinema 4d let's get started hey everybody it's chad here from grayscale guerrilla where we give you the tools training and tutorials you need to make yourself a better motion designer today's video is all about the Arnold utility node the Arnold utility node has lots of different ways that you can use it but today we're going to cover how to use it to create variance variance across many different objects that are controlled with one shader it's a really cool technique I think you're going to love it let's jump in hey everybody I'm back and here we are in cinema we've got Arnold cooking and we're ready to get rockin on this so variance variance is a really important thing when you're doing any sort of shading you want to have every object be just a little bit different than its than the one next to it because in life in nature nothing is exactly identical so this tutorial is going to be a real broad stroke intro and then we'll dive into some deeper stuff later on in this video but right now I just wanted to start off with something really simple like the concept of color and varying color using Arnold so here we have some Lego bricks we've got red going on client does not want just red bricks they want all the different Lego colors that they can that they expect and we need to do that for them but I don't want to have separate shaders for each single color because I want to be able to adjust the specularity and maybe the the bump map or whatever all in one shader and not have to dive into five six seven different shaders so that's why this technique is powerful so let's go ahead and open up this this material we've got an Arnold standard material pretty basic it's red got a little speck going on got a real simple lighting scene so what we need to do is we need to make each one of these different the first thing you're going to want to do whenever you're doing this sort of technique in Arnold is use the utility node now later on I'm going to show you some other technique that we use the AL shaders but for this one we're going to start off simple we're going to use the utility node the utility node is a really powerful node in Arnold and it can do lots of different things but for today we're just going to be using it to do some some variance so we're going to set our shade mode to flat and we're going to shut set our color mode to object ID now if I look at the output of this utility node meaning that I just plug it right into my Beauty you're going to instantly see that every brick has a different color now this is not going to work for us if I pipe this into our diffuse color and then look at the output of the shader yeah they're all different colors but they're not Lego colors Lego has very specific colors that they've given given me and now we have to we have to match these colors these are definitely not it but we're close we're definitely closer than we were before okay so what do we do next well I want the ability to to change the seed that's picking these colors and I want to be able to do that easily so I'm going to go over to my little search window here and type in random and I'm going to pull out a random node in this random node I'm going to make sure I set it to color and I'm going to put my utility plug it right in to the input of the color and I'm going to change my input type to color yep that's all good so now let's look at the output of this and now I'm going to start hitting different numbers in my seed you can see I'm getting different colors each time this is going to be good for me when I'm later on maybe I'm just trying to decide on a ratio or maybe I just want to be the ability to change that seed and get a different result all right so now that we've got the ability to randomize these colors that the utility node is giving giving us we need to tell it very specifically what colors to use so with that I'm going to grab a ramp RGB and let's go ahead and plug that right into my beauty and right now it's just going to be black it doesn't really know what to do so I'm going to use the random output and use it as an input of my ramp now I'm going to change my interpolation from smooth because we got a lot of gray values here and we want this to be not no grave alit's you want these to be so that's the none so that we're getting a very harsh fall-off which means it's either going to be black or it's either going to be white depending on this random utility note here in fact if I hit random seed you're going to start to see these all change so we're pretty close okay so I guess I could probably come in here and like add a bunch of handles to this ramp and try to figure out the colors but one of my favorite things to do with a new ramp I don't know when they introduced this maybe it was 16 or 17 is grabbing the color from picture so if I have that selected and I just go ahead and navigate to this picture that the client sent me now these are all the Lego molding color palette for 2016 and you can see it gives you this little crosshair dropper thing this little picker and if I move that anywhere if I put it over a color it's going to grab that color and put it into my selected ramp handle so a few of them will be black so that's fine and I want some of them to be red but now I'm just going to start adding more handles here and then I'm going to grab a new picker and just go ahead and start populating this ramp with with colors that I'm picking from the brand the brand guidelines that my client sent over all right let's add another one here maybe the green and I'm just kind of doing the more traditional Lego colors here the gray is always good and maybe one more and this one will grab white yeah there we go and right now we've got a lot of the yellow so I'm just going to start to favor some of these other colors to get them to show up that's looking pretty good so look at that we've instantly got our Lego color set in fact we could save this as a preset if we wanted to I'd already actually saved it but I'll save another one we'll just call this Lego colors and we'll say yes to override so now we can use that again and again and again later on if we're doing another Lego job what-have-you we don't have to redo that work again so now that we have the colors selected I can come in here into my random and I get to start to you know click around changed changing my see two different get a different result until I find something that I like that looks pretty good so now we're ready to plug this into the diffuse color of our shader and let's go ahead and look at the output of that and let's make sure that we're also pushing this into the subsurface so let's grab it and put it into the subsurface color so that now we're getting the correct color in the subsurface and even while it's still rendering I'm just going to go ahead and change the seed until I get a little few more red bricks in there because I really like the way the red bricks look in fact I'm going to make sure that I get a few more red bricks just by favoring the red a little bit more in this ramp perfect great so that is a quick and easy way to get some variance but to also determine the color that you want to put into that variance so let's move on to the next technique once you start to wrap your head around variance and how it can really make your renders feel more realistic you start to realize there's lots of other places that you can put it for instance in this scene we have a really simple sci-fi floor tile going on we've just got a bunch of tiles cloned we've got one shader that's going to be driving all of this stuff going on on the floor the different shades of color the different amounts of reflectivity the different glossiness this is all going to be driven in one shader so how do we do that with with the techniques that we've already kind of talked about so let's go ahead and open up the shader and let's just start from scratch with this in fact I'm just going to go ahead and delete everything down and now we're just going to have this kind of generic black tile it's got a little bit of specular a little bit of roughness for now of course we need to add some variants to this so you again using the same techniques that we we've been using throughout this entire video we're going to grab utility we're going to go ahead and look at the output of that and let's make it flat and change it to object ID which is good and now we want to add our random so this gives us that ability to change it up because we like to change our minds let's pipe that in there if I could actually grab the handle let's put that the color input make sure this set to color let's go ahead and look at that output and now we have the ability to kind of change this a little bit all right great all right what do we want to do next well we want to vary all kinds of different things I want to vary not only the color but the weight of the specular and the roughness of the specular so the way I'm going to do that is through one of my favorite nodes it's the range node now the range node is pretty powerful very self-explanatory actually what it does is it has an input an input range and an output range that's it so right now if I set this into my input of this range and I just go ahead and look at the output of that you're going to see that we're getting an input of 0 output of one input min of zero output max of 1 that's great okay so we're not not clipping anything right now now for my own sanity I don't want to see I don't want to see RGB I want to see luminance so I'm going to change this to luminance so I'm going to grab an RGB to float which is just going to convert it's a conversion node so let's do RGB to float and drop that in and put that into the input put this guy into the input there and let's change this to luminance okay so now we're just looking at luminance and you can see I'm still getting the random still working perfectly great so now that's going into a range now you're going to see what this range is going to do I could actually clip this range out to let's say maybe point two would be the brightest it would ever become now I'm gonna have to linearize this because it's not going to show it to me properly right now but for right now I think it's fine I'm not going to worry about it too much and well let's go ahead and do it anyway let's go I'll show you how to do that linearize just type li n you're going to want to hit you're going to want to go ahead and make sure this is set to gamma and to 0.45 4 and let's look at the output of that and oops sorry it's going to have to be 2.2 now this is correct now what we're looking at is about what you would expect the highest that's going to get is 50% the lowest it'll go is 0 the input is 0 the input min is 0 the input max is one and we can clip this down to 0.45 and now we're getting very little variance or we could have it go from 0 to 1 where we get complete variance all right so that's set up and we're liking that now what we want to do is what do we want to drive this we want this to drive let's have it drive the weight of our reflection first so right now point six six is where I had my shader to begin with and I kind of like that number so I'm gonna go back into my range and I'm going to say the input the output and min should be a little bit lower than point six six so maybe 0.45 then the output will be a little bit higher so maybe like 0.75 so now let's take that and put it into our specular weight and let's go ahead and look at that shader and now we're getting a little bit of variance in the specular weight see each one is a little bit different now I could just split off this range and put it into all the different attributes but that's not going to give me the control that I need so what I want to do is I want to make sure that my utility stays the same but I am going to want to copy my random because I want to be able to change the random seed on each little output that I'm going to use so let's pipe this into a different random put that into the color input and let's make sure that is let's zoom in here it's a little hard to see there we go all right so now I'm going to grab another RGB to float and again I'm just holding down control while I drag and let's grab that guy and we're going to grab another range and this one is going to be a different value but we will put our linearize in there just in so that it's correct all right so this one I want to drive the roughness now the roughness I like at point three it's pretty good so let's go we're going to put our range a little bit below point three so 2.25 actually I'll go a little bit lower because I want some of them to be pretty shiny so I'll do like 0.15 and then the highest the roughest value will be like a point four and let's go ahead and use this in our specular roughness and let's look at the output of that shader and something along the way got screwed up here okay that's correct and let's make sure this is set up right let's I think that we've just got a bit we're grabbing not enough roughness here so let's grab this back up to like 0.3 that's better and let's have the highest it goes to 0.5 good so now we're getting a real nice variance in the roughness on each tile now the only thing left to do for me now is to create a little random variation in the diffuse color and I am going to do that the same way I'm just going to actually pull off a random and I'll pull off a actually you know what I'm just going to do random and then I'm going to pull this off we're going to do it a little bit differently let's pull that into there and I'm going to grab a mix node it's another node I tend to use a lot and we're going to have this drive the input of that mix node let's go ahead and look at the output of this and just so you can see what it's going to be doing I'll go ahead and change that so now I'm basically our diffuse is grabbing anywhere using this map as a mixed node it's going to mix between black and red on this mix so it's going to give us these varying these varying values of this red not really what I want don't want red so I'm going to change this to bring the saturation down maybe bring it to about 50% man maybe a little bit darker than that so this is going to be my new diffuse color and so I'll just pipe this right into my diffuse color and we'll look at the output of that node and this will give us everything that we need so right there we've got now we've got complete varying tiles with one where we could always come in here and change the seeds on any of these to get a completely different look completely different arrangement of each one of these parameters so when you start to really understand how variance works and how to use it you can see that you know with one shader you can create a really robust look without having to have you know having a million different nodes or a million different shaders sitting in your material editor so it's really handy for doing complex scenes with they have a lot of different parts and pieces maybe you don't want to have a million shaders you want to have like one shader for your metal but with varying levels of roughness that can really go a long way and in terms of getting that realistic quality without having my ton of shaders so let's see what's next okay so here's another interesting use case for this technique using variants so in this scene you might do like an architectural scene or something where you have like a wall of photos and you need to put different pictures on every frame but you don't want to have ten different shaders and you don't want to create one map where they're all UV doubt in different places because client might change their mind whatever so how do we do that well it's actually pretty simple and I'm just going to go ahead and look at this shader and I know what you're thinking this looks a little complex it's really not that complex we're going to start from scratch and rebuild it so you can see here we've got a standard material we have this ramp and then we've got all these images piped into this ramp which is kind of weird I know and then we've got our random like we had in the previous video we've got our utility which of course we're going to need to drive the randomization so let's build this from scratch so the first thing I'm going to do is go ahead and actually I'm going to reopen this shader and we're just going to delete all this stuff and when that happens we're just going to be left with this green color that will just turn all the way up here in our diffuse in our pictures so let's get rid of that let's grab a utility node and grab our utility node throw it in there let's look the output let's zoom in a little bit I'm feel like we're a little bit far away and let's look at the output of this utility node let's set it to flat and let's set the color mode to object ID so now we're getting somewhere now at least we have a bit of variance in our color but this is still not going to be what we want so the next thing we're going to do like we did in the previous video is going to grab that random node and I like to use this because I like to change my mind a lot so I might come in here and shut switch this to color and let's look at the output of that and now I can sit here and change the seed until I find some sort of you know configuration that works for me okay that works all right so let's take our random node we've got our standard now how do we get all those pictures to show up on to these picture frames well let's grab another ramp so let's grab a ramp RGB and let's go ahead and look at the output of that and we're going to drive it with our random here so there we go we're going to turn our smooth not to none and now we've just got black because we've got black taking over the entire entire ramp here now if you look down here you're going to see this little little area down here that's going to say load textures from folder so if I select that and I actually navigate to the folder in which I've got these pictures which is going to be in my Arnold variants variants pictures texture pictures I'm going to say okay and now it's looking to that folder where I have all these different pictures and I'm going to say load textures from picture and it's going to it's going to bark at me that the the number of color inputs does not match the amount of textures in the folder that's fine will - say yes and instantly it gives me all of those pictures that were in that folder loaded in as image texture nodes and you can see them right here the load in a second here takes them a little while there they are and each one is different each one is coming from that folder and being piped in to one of the gradient handles now it automatically spread the gradient handles out for me and then that is then being output to the shader so look at that we've got different pictures happening in every single picture frame it's great and we can actually come over here grab our random and change the seed until we figure out which picture we wanted where I kind of like there that one's nice actually let's try a few more now it's pretty it's a good combination so with that setup you could then throw this into the standard diffuse color and let's go ahead and put that out to the beauty and there you go so you can actually use images these could these don't have to be picture frames this could be grunge maps this could be anything and it automatically distributes these for you and if you want to delete one go ahead and just pull one out delete it no big deal so it's a really handy way of putting a bunch of image textures onto one material and being able to control them all right there in fact now that this is all in one kind of controllable area I could throw a colour correct node on in between all of these images and my standard diffuse and we could make this black and white just by bringing the bringing the saturation down or we could do this just for a few of them like maybe we find one that we want to make black and white let's try this one's nice so let's go ahead and copy this guy and we'll throw him over here oops and let me just delete that put it in the input and let's go ahead and make sure that's piped in correctly and we'll go ahead and bypass this one and now we've got one black and white picture and the rest or color so it's a really kind of nice contained way to get variants and it's it's a really useful technique alright so for the final part of this video I wanted to show you another way of doing variants using the algid shader which is part of the AL shaders system that anders Langlands put out for free you can I'm going to put a link down in the description he has all kinds of great shaders here for all different applications supporting Arnold and they are really powerful nodes shaders nodes noises things like that but in particular we're going to take a look at his al jitter node for this leaf scene now these leaves come courtesy of turbosquid I'm going to put a link to the model down below and let's say that we have this nice autumn scene with all these leaves sort of falling in our viewport but we have one leaf texture and we want to make it look really natural and ran in random so how do we do that so let's turn on the IPR in Arnold here and let's open up this shader you can see we've got a pretty basic shader we've got the the leaf texture map going into the diffuse color we've got a bump map going into the bump 2d now we need to add some some variants to this so let's grab the ALG itter node algid ER and if you just look at it you can see that it is expecting an input it has a minimum saturation maximum saturation min gain Max gain and min hue offset max you offset so what this does is allows you to put in an image or a color and and sort of randomly change these values based on this signal number right here so we're going to approach it very similar to how we approach everything else we're going to grab our utility node and we're going to dump that into our scene let's go ahead and look at that and we're going to change it to flat and again we're going to change the color mode to object ID and there we go now we have our random colors and let's see what happens when we push this into our signal of our ALG itter and let's just pick a color in our Algeria let's just make it red and you can see that it's all plugged in correctly but we're just getting one value we're just getting this kind of orangish brown color which isn't really working I think you know let's let's think about this well the utility node is actually outputting all of these colors but the ALG itter signal node is expecting a signal much higher than the numbers that we're giving it it wants something closer to let's say 100 or 500 as far as a value so we need to remap the values of these colors to that higher value for algid or nodes the algebra color signal input to read it correctly so let's do that with a range let's grab another range and we're just going to put our utility into our range input and we're going to change our range from output 0 to 1 to output 0 to 500 and now if we plug this into our signal we're going to see a correct distribution of that jittering so now if we come in here we change our min let's just bring these all up to 1 and 1 and I just want to do it with hue offset so we're going to do a hue of set and now we can see that we're getting correct jitter and it's looking good now we're ready to start using this with our leaf texture so let's plate let's take our leaf texture which is right here we're going to plug that into our Al jitter node input and let's go ahead and look at that and you can see it's already I've got it randomizing right now is at a minimum of 0 and a maximum of 1 that's way too much hue jitter so I'll probably bring this to like 0.15 maybe something less than that it's getting a little bit too yellowy green right here so let's try like 0.1 and now we're getting a little bit vert of variance but I want to be able to change the seed so again I'm going to grab that seed node that what that I like the random node and I'm going to put that in here and plug this into the color input plug the output right into that range and now I can start to click around here let's grab the color and now I can just kind of click around here and see with that randomize how it's being randomized looks pretty good okay so now let's see what else we can get er let's try to jitter the saturation maybe the Minn saturation is 0.8 and the max is maybe 1.2 or maybe it's 1.5 and or maybe it's two let's go crazy with it and then the gain I'm going to bring down the max or the min gain is going to be 0.5 and the Max gain will be 1 so now we're getting some of those really pretty yellow and red colors that you see in the fall so now that we got the color going we can put it right into our color diffuse and let's output our main part of the shader here and look at everything together and that looks pretty good and you can see here you Arnold has this really cool little feature called backlighting which if I turn this down to zero you're going to see that the higher this number the more it's going to feel like a translucent almost like paper-thin material so if I bring this up to like 1 you're going to see the light kind of creeping through these these leaves without having to use any sort of subsurface scattering cool so that looks pretty good now let's take our random seed and just start clicking around until we get something that we like that looks pretty good so with one image and the ALG itter node and of course the utility we've got a pretty robust system here using one leaf texture to make it look like a bunch of leaf textures so imagine if you you know use the same technique over your bump map or maybe over your roughness or any any other sort of map that you might want to try to create more variance it's really really useful what's up guys welcome back thanks for watching make sure you hit subscribe if you like what you see or stick around and watch some of the other videos that we got going we're putting out a lot of great content this next couple months so you're going to want to watch them all thanks a lot I'll see you next time the Macbeth chard
Info
Channel: Greyscalegorilla
Views: 44,473
Rating: undefined out of 5
Keywords: cinema 4d, c4d, tuts, tutorials, motion graphics, greyscalegorilla, cinema 4D tutorials, Cinema 4D, arnold, arnold tutorial, arnold variance, arnold random, c4dtoa tutorial, c4dtoa, random colors in arnold, randomness in arnold, cinema 4d arnold tutorials, arnold c4d tutorial, arnold renderer, solid angle arnold, arnold randomness, cinema 4d arnold, c4d arnold, c4d arnold tutorial, c4d arnold tips, cinema 4d arnold tips
Id: Eh7FG3r9rFA
Channel Id: undefined
Length: 28min 37sec (1717 seconds)
Published: Tue Oct 04 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.