Houdini Everyday - Part 5 - Material Building

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay so just quickly before we create a material let's jump into our object view it's just let's create a new camera where we currently are sore just hit command and click on a camera and then let's just change the view to 720 and then let's just hit the lock so that when you stick to the camera and then let's just move this around a little bit so we have exactly the same lighting as before let's go to material palette and then let's just quickly give this a render so that we so that we know where we are so let's hit render okay so we have our sphere because there aren't any other objects it's super white so let's just go to our light over here quick and it was let's just remember four and one let's just bring this down to say 1 and there we go we've got a nice overall look and just while we set things up let's create another light so let's just hit stop otherwise it's going to update let's jump back to our scene view let's hit command and click on an area light now that's going to create an area light here and what I'm going to do is let's just move it up let's just zero everything out and let's move it up by say five and let's point it downwards so now we have a light which is just above our object so a top light cool so let's go to render view let's save this and hit render okay so let's get rid of this area light and let's get back just stepping back here to delete four okay so our sphere is way too bright let's just bring back our floor get a bit of lighting detail let's bring back the wall and that's not showing up just go to our camera camera 1 and it's a good camera 2 we are looking the wrong way okay so I'm just going to move the camera around so that we can see our wall and our floor just for now and then let's let's jump back to render view and then let's render camera 2 again cool so there we go we have a decent looking sphere with a bit of light on it in the same scene that we had I'm just gonna stop that then back to our scene view and just Center our camera a little bit if you select the camera the controls will come up and it just makes it a little easier to try to find out the center position cool so let's do something like that let's move it out a little bit go back to the render view hit render again cool so now we have our sphere and you can see that now that we are rendering things it takes a while to calculate and that's why I usually set things up inside of an attribute fob so that I can see kind of first hand what my textures are going to be looking light or what the patterns are going to be looking like and then you can actually copy so say we wanted to copy what we had I'm just gonna uncheck this so if we wanted to copy what we had we can actually jump inside of the attribute vApp let's just copy let's copy this and all of that and just here to come on C or control C let's jump into our material network now and for the sake of it I'm just gonna paste this so that we have it and then let's create our first material so I'm just gonna snap a shot over here and then so we don't render everything I'm just going to hit shift and click and drag and this just tells Houdini that I only want to render this region over here so let's do that for now and then inside of the material Network I'm just gonna hit tab and type principled shader principle shader so I pretty much use this for everything at least for now if you if you are doing subsurface you probably want the skin shader core this will give you a better subsurface than the principal shader and then another common one is the classic shader which I think used to be the mantra surface so for now let's just use the principal shader so if we just from our material Network and inside of the render view you can also do it inside of the scene view but for now let's just click and drag and drop this on our sphere and then let's enable our update for changes and let's get rid of that snap and there we go now we have a material so starting from the top here's our base color so if I had to change this to say red it's now going to create a red metallic ball use point color I'll show you that just now but essentially you can just import the color from the object let me actually do that now so now that we have red over here because our object doesn't have any color it is using this red base color but if we jump back to our object and jump inside of this test material and just an able our attribute fob now our sphere should have some color and the shader is going to pick that up oh yes okay so it has picked it up you can see the shapes here but what we need to remember is that inside of our material this color is a multiplier so if right now it's multiplying all of the color by red this value here so if I change it to white we should get our original color back so there we go we have got our color back so that is what use point color does and if I uncheck that it doesn't use the color from our object and it uses this color so we can say set this to like a green and there we go we have a green sphere and if we use use point color again see it's multiplying it if we want to get our color back just change that to white it's it's easy to forget because it defaults to like point to gray or something like that so just remember if you're getting a bit of a dull color this needs to be white here's our index of refraction which we won't touch roughness I'm just going to uncheck use point color and let's put this back to say like a gray and if we bring our roughness down we should get a tighter less diffused reflection over here reflection all over and then if I pump the roughness up all the way to 1 we should get a red a very rough surface so even though we have reflectivity on we are telling the render engine that this is a rough surface so that's roughness we'll get into that then there's reflectivity metallic coat we've got transparency for glass and subsurface Sheen and emission so emission will start to if we change this to say white now our object is essentially a light and emission illuminates objects we should should notice that this is actually casting I think if we change the color to say red so now this ball is a red light but you'll see it's not doing anything because we don't have our global illumination on so if I just snap that let's go back to our mantra R up and let's update this and give it a diffuse limit now you'll see that we actually have some color being illuminated from the ball into our scene so that's essentially what happens when you enable this to diffuse limit like I was talking about in the previous tutorials it will cost color from other objects in your scene except this is technically not the correct way to turn something into a light if you actually want more control you would select your object and then come up here and select geometry light and that will hide the object and then create a light in the same shape of your object cool so let's jump back to our material let's forget about in let's just turn that off and just make sure that we disabled our diffuse limit this will double if not triple your render time so usually when I'm developing stuff I just keep that off and if I don't need global illumination you don't need to keep it enabled so jumping back to our material so metallic is does exactly what you think it does it turns it into the metal and we should get a more metallic looking object now there we go we can even increase the color let's get like a more chrome II kind of look so now we have a metal I'm just gonna snap that and let's bring our roughness down because now we'll really be able to see it so now we have essentially a mirror bowl and if we pump it say all the way to 0.8 we have a very diffuse metal so let's just keep this at say point three which is the default let's actually take that back up to say point seven and then let's enable our coat so essentially the coat is just like in a dish an additional reflective layer on top so you'll notice things like say marble or you know even some polished concrete's or hardwood floors they they are reflective but some of them have this like additional coating on top of them so let's add some coat we should get an additional reflective layer so there you'll see that even though we had some roughness we do get an additional hotspot an additional ping there we go and then we can adjust the coats roughness as well so we can get rid of that ping or soften it if we need to so that's coat let's just get rid of this get rid of that get rid of this if we turn up our transparency we should get a glass bowl there we go it's still pretty rough so let's bring this down now we have a transparent ball and just quickly if you come up to the top here there are a whole bunch of presets down here you see I have created a few of my own you can go down to the presets and they have like bricks to copper concrete glass gold a whole bunch of good stuff and then if you create a material inside of here it's easy enough to just click this and say save preset and then it will show up here like I have a bunch that I've created so let's get rid of transparency and it's turn off render engine so that I can just show you this quick opacity I don't really use there's texture inputs here so if you want to use the texture for your base color and index of refraction roughness reflectivity you can enable this and input a texture just by clicking here and navigating to one then there's bumps and normals and displacement so usually I mainly use surface and displacement and this in a nutshell is the principal shader so you can really do a lot but now let's start customizing things so okay let's get our principal shader back to defaults so let's say 0.3 that looks good for now let's hit render so just like before what we are going to need here if we start plugging things into our principal shader you'll see over here we've got surface opacity textures displacement all of these tabs over here show up over here so if I click this little it comes down without basecolor refraction roughness metallic and this is where we can start customizing things so just like in our attribute vApp what we are going to need is we're gonna have to hit tab type global variables so we are only gonna need the position from this global variables and right now it's kind of giving us everything so what I'm going to do is just check out put a single variable and that variable is surface position so you know we can change it if we need to but we just want the position so this is where the rest position comes in just to cover our bases and make sure that our textures don't slide around I'm gonna hit tab and type rest position and now if our object has a rest position it is going to look for the rest position to basically freeze our object if it has animation on and apply the texture at the rest position level before it starts moving you're basically frame holding whatever you want to apply the texture to you are frame holding it you are applying the texture and then from then on it is sticking to that frame essentially so let's plug the rest position into the position of our unified noise here and then what we want to do is take our position and we had previously distorted the so before we do that let's just plug our rest position straight into the position for our noise and then let's plug our ramp over here into our base color and just keep in mind that if you had use point color enabled it will override but now you'll see our base color is grayed out and that is because we have plugged in this input so if we go back to okay we didn't take a snap but but now if we render let's just take a snap here when we render we should get more or less the same pattern that we did when we were creating it inside of our attribute Bob these are stove ups we are just inside of the material Network which uses Bob's inherently so keep in mind that when you start customizing materials it will take a little bit longer to calculate and create and you'll notice that we are getting something we've got our noise but we aren't displacing our position yet so let's just cut that take a snap quick oh yes I know what's going on so let's add this quickly but you'll notice that because we didn't adjust the ramp here this was just when we changed it the color was actually set on the BOP itself so if we jump into our test material this is where the colors are so it's a little bit of a workaround but you know you can copy the values if you need to but essentially I'm just going to rebuild it because what he had was a red then I'm pretty sure we had something like a blue and then we had a yellow over here let's just do that and then we had like a purple up here so let's just do that cool so our ramp is now set up again more or less and we have plugged in our unified noise to distort our position and now we Marie when we render we should get something that looks closer to what we had created cool not sure why it's not distorting oh that's because we've plugged this in here instead of our noise so let's do that and enable our Update button and now we will see something closer to what we had so there we go cool we haven't set up displacement yet because we are going to delete what we have just set up here and let us create a a coppery material for our scene so hopefully you guys understand now that this is how we get into procedural shading and texturing and just manipulating things using the position it's really cool it's really fun like I said again it's procedural you can start getting some cool-looking patterns just with changing a few parameters anyway it's super cool okay so let's let's set up a shader quickly that we're going to use in our scene so let's just get rid of this and go back to a default shader so you guys can follow along I'm just gonna speed through this because I have already set this up but you will start to see some of the techniques in play here so from our rest position what I am going to do is let's throw down a turbulent noise and I'm just gonna stop the render engine snap that plug this turbulent noise into position and then let's change this frequency to 200 200 200 leave everything at default and now what's cool is that when you are when you're working inside of the material network you can actually just drag and drop your turbulent noise onto your object and if we hit render it we'll show us what we are looking at it's a nice feature but obviously you know seeing it in the viewport is a lot quicker but sometimes if you're wanting to make changes and view things it is it's pretty handy so that you don't have to go all the way back to the object level it's cool so now we have this I'm just gonna throw down a fit range and so I am just going to change this to negative 0.5 and 0.5 so we slide our values down a little bit so we get something like this and then what I'm going to do is I'm going to throw down another fit range and then we are just going to choke this value so that we get a little bit more contrast just going to drag this on so that we can see our updates and then I am just going to take the destination min and change that to 0.2 okay so we've actually made it a little brighter cool what I'm going to do is just hold down alt click and drag to get another turbulent noise we are going to change this one to two two and two and the frequency let's change this to 0.25 and the amplitude 0.65 5 and then 0.5 in the attenuation and if we have a look at that you'll see that we have this alligator noise at the moment we've got to change the other one so let's change this to original purlins and let's change this one to original Pollin as well and you'll see that we get this sort of shape and noise type and then we're gonna take these two again alt click and drag while this up over here and then we are going to change this fit range over here negative 0.5 to 0.5 and then in the destination men we are going to change this to point four five six and if we drag and drop this this is what we get and then for this fit range I'm gonna take the destination max and change that to 0.75 and then let's click and drag and have a look cool so this is what we get and now I'm just going to select all of these let's alt click and drag downwards now we are going to change this to zero centered Perlin noise let's change the amplitude to 0.5 the roughness we can keep attenuation we can keep the foot range the same and the same over here so let's just have a look at that so this is what we get and now what we're going to do is we are going to multiply all of them together so you'll notice that we're not really getting any dark like black values because we're going to multiply all of these together and essentially that is going to bring down our values so if we just type in multiply let's wire all of these up we can actually select both and wire it in and then let's click and drag I'll multiply and this is what we get so this is going to be added into our roughness this is the roughness of our object let's just throw down another fit range and wire this up and then it why to cut that okay so then for this fit range we're just gonna change our destination max to 0.5 to 2 and let's have a look cool so now what we're going to do is just save quick and then we're going to create another turbulent noise let's plug this up here it's got a turbulent noise to plug our position in and let's change this to original Perlin noise let's give it a frequency of 5 5 & 5 let's change the amplitude to 0.25 roughness 0.65 5 and attenuation 0.5 so now what we're going to do is we're going to take an ADD o add and we are going to add this noise to our position and then what we are going to do is throw down another turbulent noise let's go turbulent noise let's change this to original purlins again and then we are going to give it a frequency of 50 by 2 by 2 the amplitude is 0.25 the roughness is 0.65 5 and the attenuation is 0.5 and we're going to plug that into our position and let's just take a look at that you'll see we get this cool fractal like a Damascus kind of feel to it and and essentially if we just plug this straight into here you'll see that we just get this frequency so essentially what we're doing is we're taking this noise and we are multiplying I mean distorting the position by this turbulent noise and that is going into the position of this noise so whatever this noise is it is being distorted by this noise and we get this cool kind of Damascus fractally feel which is what I want for this material so now what we're going to do is let's just put this into a fit range and wire that up and then what we are going to do is we are going to say the source max is 0.47 one and the destination max is 0.7 oh six so we get this we've just adjusted the the values there and then what we are going to do is we are going to add this let's go to add we're going to add this to our other noise that we have created so that's why that in plug this one in here and let's view this cool so now we have this this texture and what we are going to do with this is we are going to plug it into the roughness of our material so if I throw our principal shader back on this is what we get and because what we are doing is creating a a coppery kind of material on our principal shader we are going to turn up metallic so now we have a chrome II ball and I'm just gonna let this render cool let's take a snap and now let's plug the texture that we just created into our roughness and we'll see some cool stuff happening so now you should see the roughness of our material is being driven by the texture that we just created so we get a cool breakup in our material especially around the edges of this hotspot here so we should be able to see that our texture over here is now driving the roughness of our metallic object cool so [Music] it's still it's still half there I guess so let's just snap it let's stop the render and what we're going to do is now set up our base color so what I want for that is we are going to hit tab and throw down a constant and the constant is not a float we want that to be a color and what we want the color to be so we we can just click in here and change our color whatever we wanted to but you might be wondering you know how do i sample some colors from from images and that so I'm going to show you it very quickly I have a little material palette over here or color palette I'm just gonna click that I think I used this color over here to drive the copper tone and then with that just off to the side just hover your mouse over the color over here and then click middle mouse button and now we can move our mouse around and pick up color from outside of Houdini which is super super handy so let's just with our middle Mouse down I'm just gonna release it on this color and you'll see that the color has now been set so that's all I wanted to do for now super handy trick so out of this fit range I am going to throw down a multiply add constant so for this particular set up I don't usually use the multiply add constants it's either a multiply for blending together or a multiply constant for bringing values down but in this case I needed to add a constant value as well so for the pre add value let's put two for nine and then for the post add value let's do a point three three and let's wire this up here and that's because we are going to be multiplying ow noise over here by our color that we have just set and now what we can do is we can just plug this into the base color and if we have a snap yeah now if we hit render we should get some color and a variety of color because we're using the same noise to drive our roughness now we should see some cool stuff happening so the roughness right now is mainly just breaking up this edge if you wanted more roughness you know we can throw down a multiply constant let's plug this in here and let's change the multiplier to c2 and we should get a more rough object just like that because we're essentially bringing up our values and wherever it's white it's gonna be rough where the it's black it's not gonna be rough but the roughness is a very handy parameter if you want to expedite the displacement but in this case I want the displacement to add to our roughness as well so you'll see what happens when we start adding some displacements I'm just going to let this render cool so now we have this and what I am going to do is I'm going to come down here tab in a multiply constant we're going to set this value to point zero zero five just like remember when we initially plugged in our displacement it went crazy so I want to make sure this value is really small and then what we are going to do is we're just going to come to displacement we're going to enable our input displacement and what that does is it essentially makes this parameter live so it's just telling Houdini that use displacement but the displacement is going to be coming from this parameter over here so one of the weird things that happens is we are going to need to change this to point zero two and then you'll see our displacement bound and it comes down so we need to right-click and say delete channels and let's bump this up to say 0.3 just so that we have enough space if we need to and now if I take the noise that we created and we multiplied it down let's plug it into our displacement and it's creating displaced geometry and let's see what happens and again you'll notice that it does start to take a little bit longer than it usually would that's because what we all of these nodes over here are not cached you'll notice that the principle shader there's this little pink icon here that means it is cached and if we actually have to jump inside let's let's throw down another principal shader and let's right-click and say allow editing of contents I'm just gonna uncheck the search continues to render and and you'll see that the little lock is is open and now the pink bars have gone away because it hasn't cashed the updates so if we jump inside here this is what the principal shader is it's essentially a network of Vox which is being used to drive different parameters and I think it's over here so here's all of the base color and it's all plugged in and and just being promoted to the top so you can do this and jump inside and see exactly what they doing it might be a little bit intimidating but essentially what this is is is exactly the same thing that we are doing but this is pre preset so it's it's already set up if we just go right click just say match current definition now it locks and the little pink bars come up meaning that the code inside of here is cached so let's see what this displacement does okay it was just taking a lot of time to render the displacement and I think I know why let's just go back to our object level let's go back to our sphere we don't need such a high frequency so I'm gonna set this back - let's say ten and what I'm going to do is actually change us to a polygon mesh I just find it works better with displacement and subdivisions so going back to our scene view let's just change this to say 50 weight let's change it to 25 and 50 and then what we are going to do is actually on the object where it says render here we're gonna check render polygon as subdivisions so it will subdivide it when it starts to render which will give us some resolution so let's hit render again and this should go a bit quicker and there we go we've got some displacement happening and sphere has gotten rougher because essentially that is what displacement does it makes the the surface rough because we are displacing it and you'll notice with these little values that we now get some scattering and our sphere has become a bit rougher but it has still maintained the characteristics of a metallic object so let's just let that render and you can see that we have gone from a pretty shiny sphere with a metallic coppery sphere with just a bit of roughness and base color and now we have a full-blown displaced rough cool-looking metallic copper sphere cool so you know I can pump up the render settings to to get a better render out of this but for the most part you can see that it is working and and now we would just need a pump up the render settings to to get a better looking image but for now that is essentially how you build and apply materials to your objects inside of Houdini
Info
Channel: Break Your Crayons
Views: 2,952
Rating: 4.939394 out of 5
Keywords: houdini, sidefx, render, 3d, art, minimal, digital art, byccollective, tutorial
Id: 0aAH6PQLpWA
Channel Id: undefined
Length: 42min 17sec (2537 seconds)
Published: Tue Oct 08 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.