V-Ray | Procedural RUSTY METAL Shader | VRayBlendMtl, Procedural Masks, VRayDirt, AO & VRayBumpMtl

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey have you ever wondered how to create some rusty aging effects for your shaders in this tutorial we will focus about how we can use procedural approaches to automatically generate rust or other aging effects on our surfaces so without further ado let's jump right into it alright so here on the left hand side we have a reference that i found online and that's something i would always recommend to do is try to find a reference of the share that you try to build so this one here i like in particular because you have two very distinctive materials so one is this greenish metallic coating material and the other one is this rusty material here and then we have to recreate both of those materials and then combine them together with a mask and then that's basically the result that i got with this kind of technique so you can see here this one looks kind of comparable to the reference that i found here so basically the breakdown would be like this so first one would be to create this this greenish metallic material the next part would be to create this rust material here and then the third part would be to generate a procedural mass so this mask is done procedurally and by procedurally i mean not that i don't use any textures by procedure mean that i define like procedurally where those textures are placed so um this has certain kind of advantages that i will show in a second so once this mass is created then i can use it to feed a shader which will then combine both materials together and achieve our final result so what is the advantage of those procedural masks you can see it right here i have four totally identical teapots they all are exactly the same but when i render them they all look unique so all of them have unique kind of rust patterns they're not repeating so that's one advantage and the other advantage is for example if i show like those interesting sci-fi models here they don't have any uv maps anything like this it's just a raw geometry and i can just apply my shading setup here and everything immediately looks much more interesting everything immediately has rust on places where you would expect the rust to be so you just need to define the base rules of your shader and then everything else would be done by v-ray itself so what i can cover in this tutorial is the whole studio lighting setup here i have a own tutorial about this that you should check out because that's the base for all my or for many of my upcoming tutorials you can find it in my channel the other thing that i can't cover is like how to make those two base materials in this youtube version because it would just make the tutorial way too long so i have on patreon another tutorial about how to create like those two materials so if that has any value for you you can check it out on the patreon page additionally you can find there all the scenes uh all the resources for all my tutorials to download and try out by yourself all right so now we're just going to start working on mars so what i set up here already is that i have a v-ray blend material and then as a base material in here i have this v-ray light material with the pure black color so all of those steps are to just pre-visualize our mask so it's much easier to see what actually will be masked i think it's easier to build a very simple shader to pre-visualize it that's what i'm doing now so i have this black base material here then i have this v-ray light material with a white color inside here and then i will add this one here into my code 1 and now both of those materials will be blended together and at the moment it will be defined by whatever color value is set here so here it's because the color value is 128 that means both of them will be half blended together and the result will be this gray result here but the way we want to do it is to use a mask so i will add a new composite map in here and then as soon as i add my first layer in here which will be a v-ray color then this one here will be used instead and now i will just put it to black that means at the moment we use 100 this shader here and not this shader and now inside my composite map i will start to layer up all the different parts of the model that i want to mask and like this way we will generate our final mask so in order to make some rust appear we would need to make some parts of this mask become white and that's what we're going to do now so i create a new layer create a new v-ray color in here and then set this part here to white and now of course everything is white that means everywhere would be rust and that's not what we want so we need to smartly determine where this white elements would be added so the easiest way to do that would be to use a v-ray dirt node and this one is an ambient occlusion and it will it works like this you have a radius and you have an occluded and unoccluded color and then it will search in a radius of this many centimeters in this case for example 10 and then all the occluded color would become black all the under glued color would become white so since we want to use this as a mask we would need to switch those two colors here so let's swap them and now you can easily see what's happening so at the moment you can see the radius is 10 so that's too big and if i make it smaller for example like one you can see that he will now start start to mask like the smaller creases the smaller parts and those are definitely definitely parts where rust would accumulate so we can find some value here that we think looks nice and then with this distribution value here you can increase the contrast so if you go lower in this case it would increase the contrast so for example if we go minus 25 and we have really strong contrast and with this you can really start to like um draw some mass somewhere where you want it and for us this occlusion nodes is something really useful so let's leave it at one for now and the problem that we're facing at the moment is that we have now a mask for those creases but this mask is extremely uniform that's not really how rust would accumulate and it would look a little bit computer generated so we need to hide this kind of perfect masking and the way to do that is that we can map something into our radius here so at the moment the radius is just to control it just controlled by this one numeric value in here but we can actually put color maps or we can actually put masks in here so i have this mask here for example which looks like this so it's just a gray or a black and white mask basically and then this one i will map into my radius parameter in here and then you can see what's happening now is that this this radius will be controlled by this mask so i can then for example if i want to change now the size of this i could add a v-ray triplanar texture and then i mask this into here and here and then put this here in between define like a random texture offset and then choose a different size so for example at the moment the size is one that's tiny small let's find for example like 25 or like 50 25 is fine um yeah and then you can see that now we have a much more organic looking mask appearing here which looks much more natural so i can also make the blur value here go extremely low and then this way my mask will stay crisp and clear okay so now this one would be the first part but we're not finished yet we can layer many many more stuff on top of each other all right so now i reorganize the stuff a little bit so that it's a little bit easier to understand this one is our first layer this one here is our second layer and now i want to add the third layer and what i want to do now is that i like the look so far already but for me the problem is that we have these like uh masks here appearing in the in the creases and crevices but it's quite uniform still so i want some of the parts to be gone and some of the parts to reappear right so that not everywhere in every in every crease they have this dirt but or this rust but owning some of them so the easiest way to do that would be to add a new a new material here a new v-ray color here and then by removing stuff we need to switch this color here to black again let's put this one down here so now i need to mask this black layer i need to need to mask that over the existing layer so i have this texture right here so this texture here you can see it has some parts mask out and then i will use this one here as a mask so let me just apply this one in here and now you can see some of the stuff is now being masked away let me just put this under here some of the stuff is basically now masked away but i want to have a little bit more control of this so i will add this v-ray triplanar texture in here add this one as a texture and then put this one here into the mask and also choose a random texture offset and then here for example i can choose a scale of 50 or a scale of 75 or 100 even and now you can see some stuff is like disappearing and in some parts it's the remaining i think 100 is probably too big let's let's leave it at like maybe 75 we can also choose for example to invert this map so then it would be removed everywhere here and only this part here would remain or you could add like a like a color ramp to it which in this case doesn't have so much effect because it's already quite countries contrasty map so we just leave it at this one here and now we will take care of the next part so i will add another layer in here and now the next part would be that we have now rust appearing in our uh like creases but i want to have them also appearing on the edges so some edges where the metal would be for example bumped by some other parts after a while the paint would be removed and then the rust would start to build up in there so that's the next layer that i will build so that we don't get confused by the stuff that we already built let's just put this one here to zero and then this one also to zero so now we only have this base layer and the new layer that we're building and then we can start to add a new v-ray color in here which also is going to be white so this color here will also be set to white and then i will add a v-ray um dirt node in here very similar to what we did before for this part here but this attack this time we will change it a little bit so now let's switch both of them again here so that we're still masking like the occluded parts but you can choose a different mode in here so this mode for example is set at the moment to ambient occlusion but i want to have the inner occlusion that means it will flip the normals of the model and then calculate the inner occlusion so the result will be yeah like this you don't see much because the radius is way too big because now it's uh basically flipped the the model and then inside everything is included so let's just put a very small number for example like 1 or 4 or 0.4 or 0.5 or something and what you can see is that now it will start to mask out my um the edges of my model so i think i will go with one here and then i feel um i want to have a little bit more contrast so the easiest way to do that would be to just add a v-ray color in here and then set this color here to white and now we're back to where we were before but i want to have more contrast so there's this rgb multiplier and you can for example increase this multiplier nah what happened now okay you can increase increase the multiplier to a higher value so before it was one and the higher you go with the multiplier the more contrasty the result will be so for example i will put it at 10 and once you did that it's important um to add a output node in here so output and then add this add this basically in front of my v-ray dirt and then in this output node there's basically only one option that i want to use and that's this clamp option here so if i clamp this one that means i won't get higher values than one and then i can connect this here to my layer 4 again and now we are making sure that there is no weird values appearing in our mask okay so now we have our mask set up but let's still find a different radius in here i will take another texture note apply this in here whoops what happened now take this texture node basically and then connect this in my radius so that's the radius in here now you can see that i have a much more interesting mask appearing here on the side right so i could define it further with a v-ray dirt sorry with a v-ray tri planar texture versus dirt let me get rid of that uh here uh so a v-ray triplanar texture put this one here into this texture note here and then this one under through the radius and then also choose a different texture offset and for example here different scaling so like 50 or 75 50 maybe um yeah now it's all about like trying to find the right value so what i want is that those parts here they should look like pretty scratched because they show out a little bit so now i have to find the right radius for this so if i go higher with the radius you can see it's already starting to mask them out and for example if i go to a radius of four then all of those parts would be masked out i think four is a little bit too high i think something like this should be nice so we have now on all the edges we have like these kind of bump effects or this kind of like rust effects going on and then we can bring back the other stuff that we had before so that's those two things here and then we have already mass that looks kind of interesting so next step would be to just take care of those empty parts here where our occlusion nodes or v-ray dirt nodes don't have any effect so let's just try to focus about these parts now so for this last part i will add a new layer in here i will create a new v-ray color move it down to here so the v-ray color should be white because we want to add something to our existing mask and then just again to not be confused with any of the other stuff let's put all of this stuff here to zero and then i will add a new texture so i will have this texture here which will look like this scratched texture here i will add a new v-ray triplanar texture connect it again like before make sure that there is a random texture offset and then i will map this one here into our mask so this one go to the mask and then now the radius is way too small so i will make sure that the radius is something higher for example 75 100 so that we get these kind of like random um random scratched off parts which is very hard to get with a standard occlusion map because they will always look a little bit generic so we use these external occlusion maps for the edges and then for the parts in the model we will use something more realistic like these scratches basically which come from a texture so then once we have all of those applied to each other or all of those in place we will bring back all of this here and then we have some final mass that we're now going to use for the masking of our rust materials so this one now is the final step of how we bring everything together again i switch to view again and we have our three different shaders or materials right here and we'll create now a new v-ray blend material and then we need to feed it with the correct material so this one here would be our base material and then this one here would be our rust material and then the mask we will take from here so i will check this mask here take this mask and then before i put it inside i want to put an output node in here just to make sure that there is no operation happening inside which will give us values higher than one or below zero then we might enter some problems so i always add this output node in front of here also called output mask and then inside here i will make a color correction uh just leave everything at how it is at the moment and then just copy this mask here so i just copy the whole mask and i will just put it inside here as an instance and then i will apply this shader here to our shading dummy and now we can see already that yeah the mask is being applied correctly um and now with this color correction in here called mask color correction uh we can define basically or we can make some adjustments on the map so we can make this map more more contrasty more strong make some really high values and you can see that we have much more dust appearing now in here we can also reduce the contrast reduced yeah reduce the intensity and so on so i think i would just for example put this one here to 200 and then this one here to a value of 2 for example and then i think yeah this amount of rust looks kind of believable to me and now the only thing that i want to change is uh the bump so i can now see that uh yeah we have some rust appearing here it's basically blending between those two shaders but what we don't have is that there should be like the edge around this right because this one in here is basically deeper than the than the base material that we have here because it's being scratched inside and the easiest way to do that is to use a v-ray bump material so i will add this on top of here so this one here is our blend material then we will add a new v-ray bump material we will keep the old material as a sub-material and by default nothing happens first that's fine because now we need to add a bump map and the way that this material works is that it will just add an additional bump map on top of whatever is typed under here right so we don't need to go in to those materials here again and change the bump map right there we can just later on add it on top of everything so first thing i would do is to change this bump amount value to a value of 100 i think by default it's set to 30 for whatever reason but 100 for me makes more sense and that you will see in a second why because first of all now i would just like to take this mask here and then for example pipe it into this bump map so the master regenerated pipe inside here and unfortunately this one doesn't work so if i see i just put the whole composite map inside i try to see if there are some changes but actually if i clear it out it looks pretty much identical and the reason for that is that v-ray will have a hard time to really convert all of this composite map into a bump map that they can understand so you need to convert it first into something like this so there's a special note for that and this is called v-ray color to bump and then you can put any color map or any composite map in our case inside here and it would then be converted to something that v-ray can read so let's now first here create a new for example composite map and then we will re-create create some parts of our map here to recreate this and we will instance that that's so that no matter where we change it will also be changed will also be changed accordingly for the bump so i copy this part here that was a scratch layer and then i paste this as an instance inside here and now you will be able to see that something is happening because he's now correctly converting all of this color information to something that it can read as a bump map but uh yeah it looks like it's upside down so here this height per meter comes into place and that's why i have this bump amount here set to 100 because if it's not set to 100 then this value here will be multiplied again by this so for example i want that in this case the highest amount of bump should be negative 0.1 centimeters so that means it will go like point one centimeter so one millimeter will go inside so if i set this here then you will see that now the scratches are creating this kind of effect that they look like if they have been like really scratched inside so then you could go inside here and add more elements from this one here but for now i will leave it at this because the procedure is basically the same so you could for example also oops this one set to normal um take like some stuff from the occlusion mast in here so you will also get a bump for these kind of parts but yeah i decided to only have these bump parts for those very heavy scratches and all of those ones they won't get like an extra outline all right so this one now concludes our final result so i will make it a little bit bigger and that we can see how it's rendering and then at the same time i will tell you you can find all of those scene files if you're interested on my patreon page they can find any scene file from any of the toys i'm doing you can find my whole studio lighting setup there you can download everything you can test everything out by yourself if that has any additional value for you and until then i hope to see you in the next tutorial take care and see you soon
Info
Channel: Jonas Noell
Views: 14,294
Rating: undefined out of 5
Keywords: rust, dirt, damage, procedural, automatic, rough, metal, metallic, material, shader, shading, dust, age, aging, add, destruction, blendmaterial, layer, dent, cut, studio, lighting, setup, studiolighting, V-Ray, VRay, 3ds Max, 3d max, max, Chaosgroup, Autodesk, NEXT, feature, tutorial, learning, instruction, Vray 5, V-ray 5, Vray5, vray 3, hdri
Id: qQk-C_g8C3I
Channel Id: undefined
Length: 25min 19sec (1519 seconds)
Published: Thu Oct 08 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.