Arnold Toon Shader Series | Part 3 | Using camera projections to create halftone effects

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay so the next thing I want to show you guys is how to use the camera projection so we can project our textures onto our scene rather than having them deform around our geometry so we can start to create some cool sort of like retro a shaders like this or any sort of like halftone effect like how they did in the new spider-man animated film where they sort of had like the little like edge details and stuff with like the halftone sort of features on them I don't show you guys how we can start to create and build shaders like this where you use a similar camera projection stuff just on in like a different way in style so to do that I have a couple textures here that I've pre-built so it gets so here's sort of like the halftone pattern and I have three different sizes of them and you'll see why I have the three different sizes later on in the tutorial as well as I solved like the normal sort of like striping pattern okay so now let's set up our shader to use the camera projected textures to make sort of unique materials so let's just drag in your like texture you want to use I'm using my sort of like medium sized halftone and let's connect that into our emission color and you can see by default as being cubically projected on all our assets and our scene as that's how we did it through our texture tag in this version of Arnold I which I believe is the current version there's a couple bugs with the camera projection stuff so if it's not working almost like show you all the ways on how to do it and one of them should be able to work for you this the way I'm going to show you now I used to be able to do but I can't do it anymore so I'll show you a workaround for that so what I usually do is grab the texture tag for the material and then we can change our projection drop down to camera mapping and by default it'll be like some random film aspect and piss pixel aspect ratios and you can see by default it's stretching under textures and usually when you change it to square which looks at your squared texture and applies it in like a 1 by 1 ratio but right now it won't update it to properly reflect how you want it to be represented so you can see our halftone dots are getting stretched out no matter what we change it to in any of these options and this is a bug that Arnold has currently in its version in this current version so for now let's just change it back to cubic and I'll show you a workaround for that so we can do in here let's go in you can start typing in camera and a camera projection node will pop up let's drag that into our scene and let's connect that into our shader graph so we'll drop down into main and projection color and then we'll take the output and plug that into our emission color so this is like a similar bug with this current version of Arnold as well where when you change the aspect ratio in here it's not updating to reflect the aspect ratio that you want so here's the workaround I sort of found for that what you want to do is find like whatever resolution you're rendering at so right now mine is a 16 by 9 ratio which is like norm all like TV ratio like 1080 or 1920 by 1080p or like 12 1280 by 720 or whatever the conversion is too so figure out what your ratio is for sixteen by nine the ratio is one point seven seven so with that knowledge what we can do is let's go into our UV coordinates and let's scale our you to one point seven seven Oh make sure your uniform scale is turned off so we'll scale our you and one point seven seven and our rate or V will be a scale of one so it's the proper ratio for our aspect and you can see now we're getting perfectly like unstretched circles for our halftone dots so now we have our camera projection set up and this is the one workaround I kind of found for this bug that's going on with the aspect ratio adjustment in our scene and I've like played around with this for like 20 minutes trying to figure it out and this is sort of one of the like just ways that I could only find for it so for now we'll use this way in older versions of Arnold you should be able to just change your aspect ratio without having to go into you're scaling your U and V unless you want to specifically scale your dot smaller so say now we want our dot smaller anyways the nice thing about cinema 4d is you can actually do math in here so say we want these twice this iswhat we can actually do is do x by 2 then we can times this 1 by 2 as well so we can keep it as the proper ratio is just doubled in size so now we're getting twice as many dots in our scene so next we'll do something similar that we did before with the shadow mat but this time we'll use a utility shader and we'll clamp that down to sort of isolate and mask out where we want our halftone dots to show up so it's in our search field let's start to type in utility and let's drag that into our scene so let's connect so I recommend all those zoomed out here let's connect this into our material output here and you can see how this utility shader is working right now it's sort of default to the end do and die which is like sort of like the camera facing sort of option what for what we want let's change it to Lambert and you can see now we're sort of back to that default base Lambert sort of material or masking in this case to our objects in our scene so now we can use this to mask out our halftone dots but what we want to do is clamp it down so we're left with a black and white mask so to do that let's grab our wrap node again and let's connect our output into the input of the ramp node and let's for now plug that into our Arnold Beauty output material output let's just stretch just a little bit let's grab our white node and let's start to bring this down and clamp it so you can see now if we like bring this down quite a bit we can start to create like a full shadow mat and if we were to grab this black sort of gradient node and turn it to the steps you can see now we're getting that harsh line that is sort of represented that we got from our shadow map this this one is just a more of a customizable way we can sort of clamp it into different areas so it can start to really customize how we want our materials to come across like that so for now let's unclamp this to bring it back to linear let's bring this up a little bit sorry oh so now we have our mess created let's take this and blend it with our halftone dots so our halftone dots are only showing up where our shadows are so first let's connect our tuned shader back into our material output let's just organize this a bit here okay so now let's combine these two together so what we want to do right now let's actually reverse our Basques so our white is in the shadows and the black is everywhere else on our output and I'll quickly show you guys how that looks so now we're getting this sort of luck and actually now that it's reversed I kind of want to adjust that there we go now we're getting a true black on the ground so let's connect that back up there and to blend these two together let's actually use a mix node mix RGB a node let's plug our camera projection our halftone dots into input one and let's connect our utility shader this is our mask let's connect this into our mix and then let's plug this back into our color emission so actually let's plug this guy let's plug our halftone dots into input two and let's remove our input one node so you can see now where the white shows up as showing up input two and you can see how we're getting the halftone dots and then input one let's just bring that back up to white and you can see now we're starting to get a little bit of the halftone feel on our objects and we're using the utility node to mask out where we want those to show up and so usually in I like comic books and like sort of like retro or like screen printing and stuff they won't have like the gradient effect going on so that's where the multiple different sizes of the half-tones come into play and so I'll show you guys how to sort of create a chain of how it can blend our sort of thick halftone dots so we can show those in the shadow two are the real tiny small halftone dots where it'll fade out into the lit areas so now let's chain together a few different sizes of the halftone dots so we can get rid of the gradient for the most part and increase or decrease the size of the halftone dots based on our mask so to do that let's grab our little halftone dot and mass chain as ctrl-c ctrl-v that and now we have our two sizes so to connect these together grab a multiply node because we're dealing with just black and white information we can multiply these on top of each other so connect that one into input one and connect this into input two and plug into our color emission so now let's grab our second half tone texture and I'm just gonna grab my half tone small and open that up so by default we won't really see a change until we adjust our utility ramp clamping so let's drag out our black and let's bring our whites up as well let's bring our black back down a little bit and you can see now we're starting to get a gradient or not a gradient sort of like yeah I guess a gradient of like the size though from like the medium half tones that we're getting into the small half tones now snow we can like clamp this a little bit more let's bring this back down so don't want that much to show there you go now we're starting to get a little bit more of the half don't fall off that way one and the more sort of sizes of half tones you have you can start to really get rid of all like the faded Ness of them so they're so if you're like doing screen printing and stuff you can like really like clamp them down to just like the true colors we can do that a little bit in here let's actually change this one to step let's start to bring that back a bit you bring the white all the way back now because it's the steps okay so yeah let's bring this back up actually let's bring this back to for the linear for now but clap are fall off there we go so now we sort of have our finer dots let's introduce our full shadow dots right the big thick ones so let's take this chain let's just move it up there but let's grab our small dots and let's grab the multiply as well let's copy paste that and let's bring that up into here and we will connect the multiplies together grab the output sometimes a little hard to grab there we go into there and let's connect this down the line so you can see now we're starting to create a chain of outputs to build up our customized shader where we have our mediums our smalls and now we have our big halftone dots that we're creating so in our output or our our texture node here let's grab our thick half tones and let's adjust our ramp note so there rate on the edge of the shadow that'll be like clamped almost all the way down there we go so now we have our big ones and let's go back and adjust our medium ones and you can see how we're starting to create a like a fall-off based on size rather than the just like opacity of the gradient and though the more of like a chain you have like so you do with like five different sizes at the half tones you can really start to get that effect going real well and it also just takes a little bit of like finessing down your you're ramping to get the look you want there we go now we're starting to create a little bit of a better fall-off here so I keep reading bring those up a little bit there there we go so yeah you can see here along the side how it's starting to blend away based on their size of the half tones so to just it just depends on how like complex you want to go with your shader for the end result but for this tutorial I'll just keep it at the three steps for now so next I start to introduce some color into our scene by blending our halftone dots in with a base color now because we did it all in black and white information we can actually plug this into a ramp node now so let's grab one of those a ramp RGB and let's connect the end output of your chain of your little material chain here and push that into your input and let's plug this into your color emission by default it'll be the same because it's still a little the black and white rap so now let's take our our blacks our our black note this will be like your halftone color well let's create a color for that so you've seen now we're starting to get like a nice blue hue on our half tones let's take our white gradient node and let's find a color for that let's do something in orange there you go now you can see how we're starting to build up a look for our scene this takes a little bit of chaining the nodes together to get the set up but once you get it set up it's pretty much just going back in and fine-tuning the look for your scene and then we can also do now is turn off your edge detection and you sort of it starts to create a sort of a cool look for your scene something this is sort of what I did for the one scene I created for this one I turned off all the edges and just used this halftone sort of effect to create like the fall-off and stuff so now let's play with this back and bring in the the sort of angled hatching detail to drive our where our spec is and isn't we'll sort of use it as a mask so let's drag that into our scene and what we'll do now first let's just plug this into our specular channel into the weight and then what we can do now let's start to increase our roughness oh yeah one thing I forgot to do let's up our camera projection for that so let's go and grab a camera projection node on that's Brit put this into the chain here and let's plug this into weight spec and then let's adjust our scale UV to the ratio mister uniform scales turned off so it's the one point seven seven two one for the sixteen by nine ratio you can see now we're starting to get that sort of specular feel into a texture that we mashed in and then what this is just sort of like dialing it in until you get the look you want with it I think somewhere around here should be pretty decent maybe a little bit less so you have what you want what is just too bright what we can do let's grab another ramp node and we'll add this into the chain as well okay I know let's grab our the white side let's start to bring this down and you can see the the roughness effect is still it still makes it like this sort of like broad specular coverage but now it's not as hot and we still have the ability to come into the color and sort of find a nice color that we want for that specular highlight there now we're starting to bring that back in actually want to increase the roughness a little bit and maybe bring up the brightness of that a little bit as well there you go so one thing I did in this scene was bringing a little bit of like sort of like a grainy field detail to it just to make it feel like it has like that sort of like retro like sort of old paper quality to it and that's just another texture that will blend into our sort of material chain here so for that I will either use like sort of like a papery texture like that or just use like a simple like sort of Gaussian monochromatic noise is created in Photoshop just something quick to bring sort of more noise into your scene so for this one let's actually use the the paper texture oops let's undo that make sure we're not messing up our chain here so now let's add this into our color emission let's blend this in now let's use maybe a multiplied note to start out with let's see how this will work that's the one thing I don't like about how it's using the sort of c4d so a graph editor is sometimes the points are real hard to grab but for now let's pipe this in and we'll see how that looks so you see how it's darkening your scene there a little bit but now we're starting to get that paper feel to it but right now it's going it's not camera projected camera projected so that's a Grammer camera projection node and let's add that into our material as well and then let's adjust a to our correct ratio oh there we go so now we have our right ratio for that I'm actually thinking I'll double that or you can times it by like 1.2 just say if you just want it to be like doubled like a little bit or like whatever you want depends on what you want it's just nice to be able to do the math up in like any of these boxes so you can keep everything sort of similar without having to like do the math somewhere else you can just type it in there and you're ready to go so now we're we got like our nice papery texture in there and it starts to create like a cool field well right now it's darkening our texture quite a bit because this thing is a pretty grey by default so what we can do now let's grab another rap node you can see how much I let use these things use them for everything let's plug that into input let's plug that into our camera or actually let's not do it there let's do it after the camera just to keep it a little bit more organized so we're not searching for it later on if we want to adjust it let's plug that into there and let's start the clamp or whites a little bit more there you go now we're starting to get our actual true colors back into our scene but we're still getting that sort of paper quality feel to our render oops let's actually do like a nice full render of our scene awesome and you can see now we're starting to get like a nice material build up that we can start to duplicate and create like different colors and stuff so now we can duplicate our material once we have like our main soft blocked out now let's say on this create object let's drag and drop this onto a couple pieces in there and let's take our second toon material unless adjust the color of that so that will be here let's change this to like a green and you can see now this is like how I've been sort of like building out materials in my scene is build like a main material really get that dialed in and then you can start duplicating them to sort of start to finish your scene to start blocking out like your colors and stuff like that so one thing that's nice about Arnold IPR window is you can actually drag and drop materials into it and wherever you release it it'll apply that material to that so it can be real nice so it's like quickly like duplicate your materials and like quickly change the colors so I can do that let's make this one sort of like a blue color it won't update down here until you update or until you stop the IPR window but in the meantime we can still drag and drop it and I'll still update with that sort of new color nobody can drag and drop it again make sure that's selected and now let's turn it to like a green eye now we can drag our new green material onto our scene as well and we could really start to quickly once you get your base material sort solidified how I like the look and feel you want you can quickly duplicate those and create colors then quickly populate your scene with those new materials so you can create some real fast iterations of your scene with them and just be able to like refine your scene way faster using this sort of like drag-and-drop process in the window so I brought her shade err back to just a simple tune shader with ramp RGB node being driven into the tone mapping for our base color so let's close all these just so we can get back to just our default scene with our cel-shaded look and so now I'll show you guys how to create a sort of a pixel art feel for your scene so to do that let's go into our edit render settings let's go into our Arnold renderer tab and inner camera eh eh let's bring that down if you like drag it all the way down to one you'll still refine your scene up quite a bit but we can actually do is manually type in let's type in a minus one and push and click enter and you'll see now it's starting to create it doesn't refine your scene to like enough steps to make it unpick slated but so we can like drive that even further let's drive that to negative two and you can see now we're starting to create sort of a pixel II like a pixel art feel to our scene and you can create some pretty cool little looks with that so with that I was able to sort of create like stuff like this where you could get like there cool sort of like pixel shade it sort of like retro like 16-bit sort of feel to your scene like the old like videogames it's off from like the Super Nintendo or whatever so there could be like a lot of capabilities with this like the further the further down you go of course like the less it will be refined which means more pixels in your scene sometimes you have to refresh it for it to update there we go so you have minus three now we're getting even more pixely you can see now it's almost two pixely so it all depends on like the resolution of your scene as well but I like to keep it like ironic sort of like a medium sort of like Pixley feel where you can still make out the details like I still see that it's like pixel art which I think sort of gives it a co feel and you can create some really cool sort like retro we sort of renders so yeah that's pretty much the end of the tutorial offered that we went over the toon shader and broke down all the sort of the channels that are commonly used for it and we went through a whole bunch of different sort of ways to be able to create and customize our materials for different unique looks if you guys have any questions or would like to show me any of your artwork feel free to contact me on any of my platform Center Mon I know also leave my contact information with the tutorial as well so you can contact me from there I would absolutely love to see what you guys are able to come up with this thing with this shader so yeah have a great day and have fun playing with this thing it's really it's really fun to just really get into and to start creating some unique things with it have a good day
Info
Channel: calder moore
Views: 25,357
Rating: undefined out of 5
Keywords: c4d, arnold, cinema 4d, c4dtoa, toon, shader, tutorial, camera projection, halftone, retro, how to, screenprint
Id: _4E2B_phZkg
Channel Id: undefined
Length: 35min 9sec (2109 seconds)
Published: Sat May 11 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.