Achieve an Oil Painting Style in Blender

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so um hi uh and i'm doing a tutorial about how to achieve this uh paintery style in blender using eevee and uh this version is 2.93 i think and first time doing tutorials and i'm kind of nervous so uh anyway so here's a basically the final result let's zoom into camera wheel because i enable a camera calling and it's gonna look weird if so you see it's like a 3d scene but rendered kind of like a painting and it's entirely interactable well i wouldn't call it internet but like just it can be animated and uh here's the uh looked at wheel port oh that's just due to the camera calling i can just disable it and uh let me do that too so here's looking at the mesh and here is this suzanne and uh if we're disabled the geometry node that's on it you can see that's just a normal susan i don't know why the uh x-ray sound but yeah and there's just a plane with the geometry node that basically distributes those brush strokes as planes and uh so that's how you achieve this look in general and here are those brush strokes and i use three colors in the scene just like blue red and uh green but with some color variation building the material and i guess i just how to show to build this kind of style from scratch so the first thing let's disable everything and make the brush stroke first and let's make a plane that looks good scale it on the uh y axis a little bit oh x axis and this will be our brushstroke and let's create a material for it so and the first thing go to lookdev center it so for the brush stroke basically i'm using an image of the brush stroke and i could do it procedurally but there's three no need to so i have one brush stroke already it's showing it as this but if i plug in the alpha and the color you can see um it's basically a brush stroke that i could show you the picture actually so where is it here so here is the png and it kind of looks like this you can make it like download it from google or you can just paint the brush in uh photoshop or procreate or anything and remember to save the alpha and as png so yeah if i use alpha you can see like it's kind of like a squeezed brushstroke and we are using this for the brushroll so since we're using uh alpha and we kind of have to change the material setting and change the blend mode to alpha blend and you can see there's a brush stroke and shadow mode uh i'll get to those later but let's first create this brush stroke make it look good so as you see the color is kind of weird because it's painted with the same color and the only thing changes across this thing it's actually the alpha so we're not going to use a color but just to create a color so we can do this choose whatever color we want here uh this is just a placeholder but to actually make the color we can use a mix rgb node um and plug in or wait sorry actually i use the color ramp but for now like we can just use a simple color like that and you can see the color and for an actual painting there's actually color variations and there so let's create some noise to go with it so let's go noise texture let's build those over here and i want to use a uv space which is the texture coordinate use the uv and change it to 2d because we don't need 3d it doesn't really matter though so we can tap uh basically we use the uh we multiply uh by a different color let's say we want to keep this color we're just going to sample this color keep the color the same and we use a factor in the mixing factor this one if it's just like a white picture you can see that there's a color variation here now if we add a mapping node change this to texture i mean just reverse from the point but not exactly reversed but so if you could change it on the uh oh actually it's y probably y axis you can see the kind of goes along the brushstroke and increase the scale a little bit but they kind of look a little bit too uniformly distributed so we can actually add a voronoi use use the distance actually and decrease the scale a little bit i actually use colorful vector because that's 3d and yeah that's a bit more like the actual brushstroke and you can see there's actually some detail in the alpha that we're not captured so in order to mix up as a color we can use the color ramp oh yeah we can also add it to the alpha too i'm just gonna squeeze it a little bit so the edges are more defined duplicate this plug the alpha in and let's mix these two with a multiply oh here's the color change it to multiply and here so the color is kind of a change along this as well based on the alpha so it's also like how the brush stroke is shaped which makes it looks a bit better so for this let's say the color if we want to create something huh let's see uh actually let's use a color wrap here instead of a instead of a single mix rgb and the reason is that let's say if we change this to the color we want you can see we have a color we change it to a secondary color it doesn't have to be pink continue to this right and the thing is about the painting is that you're kind of missing color when you're painting it so when actually a paintbrush is struck down the color is not uniformly distributed like the kind of there's still like paint that's not mixed well so there's actually huge changes in the color too so to kind of mimic that effect i'm going to change it to hsv which means we can ask access to the hue value here and i'm going to create a new one and this middle one is actually going to be the primary color we're going to use let's say if you're going to create uh greenish uh let's let's do yellow this time yeah yellowish and i want it to be somewhat dark like around here decrease the value a bit like a dirt color and here i just want it to be so it just we need to change it to near which means that it's gonna go along the color wheel to find the nearest path to it path to it and that's why i think we're going to keep this one on the left so around here and this one on the right side of it i want it to be less saturated but brighter and this one as well less saturated but brighter oh let's see how that looks that looks terrible uh because oh yeah let's try making a a bit less rated but more value i'll keep the middle one oh yeah so the middle one should be higher value the other two should be lower value like in brightness and also less saturated because like you're mixing the color and these shouldn't be too prominent and there's some issue is that the basically the primary color is showing too little here because of the multiply results it's not mapped correctly or just like it's not mapped in desired range to change i can use the uh either a color ramp to change the value but i like to use brightness contrast so we can squeeze down the contrast a little bit to make the color more you know uniform and increase the brightness kind of squeeze it towards this direction decrease it it's going to squish it towards the lower end of the color ramp this actually looks pretty good and i'm squeeze it move it a little bit to the left because i decrease the brightness a bit still got a little bit of contrast to make it just a little bit not uniform has a variation there this looks quite good i think okay we're just gonna leave it like that and yeah oh enable this i think this could be scaled a bit more i think it's along the y-axis like that so just like a brushstroke you could also do some uses value for the normal to add like some pump so we use a bump node connect it to normal use this value actually let's duplicate the color again oh wait uh wait i think this is i think a scout in the wrong direction yeah this is more like it so here i'm just gonna change this to from y to x but you can see like the edges this is more smeared i more like a stroke i think this is correctly mapped cool and use the colors height pretty simple decreases strands quite a bit okay so we got ourselves a brushstroke and uh go back to layout okay oh this is not yeah this is actually just merged this cool and looked up i'm going to move this away because it's just going to be instanced by the geometry node and let's create a geometry that we're gonna render uh what are we gonna do let's try a no not a circle let's try a ue sphere and shade it smooth better and instance those strokes through geometry node so let's go to geography now setup so pretty simple just like to instant stuff let's just randomly destroy the distribute point across the sphere point distribute wait where is this oh yeah so you see this you distribute some points along it and then you instance them as the brushstroke the object let's choose the uh here that looks pretty weird because oh i haven't applied the scale to the brushstroke so it's got instances in sensing it with the original scale so let's apply the scale and that looks pretty good in fact let's uh increase the sphere a little bit let's just see the sphere enable the uh gizmo and apply the scale again because if not it's gonna instance the stroke is also scaled which is not what we want so we got the sphere let's change it to poison disk because we want it to be kind of uniformly distributed and increase the density quite a bit so yeah let's just say that for now cool and the next thing we said we want some randomness or some fuzziness to the sphere because usually when we're doing painting we actually paint outside the outline stuff because this brush is huge it looks messy but also more stylized so let's rotate the brush stroke a bit because like we don't paint every stroke along the same direction so let's uh so we distribute the point and we add some noise to notation do that we can use that attribute or point rotate actually and we use let's just say attribute randomize let's review let's call it rand and rotate use a vector let's say 0.1 0 to 1. change it to minus 1 to 1. rotate along the attribute go use rend see it looks kind of weird because it's too much let's use another attribute let's use attribute vector mess oh this is not if you uh yeah this is not okay attribute vector mass let's choose rand and here is also rand and we try to scale it down using a float so it's zero and [Music] we rotate it a little bit like to make it more fuzzy i guess this is great but also i kind of want the noise to be so this this random knight is basically a white noise so it's not continuous so it's completely random but when you are painting i kind of expect to to paint somewhat so one brush stroke is kind of along the next brush stroke so they're kind of from continuous along a direction but not exactly samely aligned like like a line in the same direction so instead of using random actually i think it's better to sample from a uh cloud texture so there should be a attribute sample texture and let's create a new texture texture point zero zero one and here and we are using so the mapping of it we can use the position of the point so in this way the points are close together gonna have the similar rotation because the uh the noise sector is kind of continuous so the result let's do the result is rent and we remove that so right now the texture is zero because like there's no rotation because the cancer texture is completely bad black so we use uh here oh yeah it's not an image but we use cloud and you can see like these points rotations kind of um so these parts are rotated the same way these parts are rotated the same way but they're not exactly all the same so see this side has basic notation this has some notation and we just have to increase the scale or decrease the scale of this which is increase decrease the size wait hard soft grayscale oh and also uh since this rant you can see here is a color if it's black and white all the 3x is going to be the same so we change it from grayscale to color there is for the rgb basically xyz is mapped to the rgb and you don't want them to all be the same and yeah and the thing is you can see them the all sort of distributed or around the same center which is because like this rand is actually randomly between zero and one and we are actually going to re-map it to words basically minus one to one or something that's like can be minus value or it's all going to rotate toward the same direction so we use the uh still vector mass you could use remap but since it's a vector it's easier just to do a subtract vector we change rend still rand we just minus 0.5 to it and therefore is basically from zero to one to point minus point five two point five and let's see next thing to do is basically there's too little rotation because it's basically minus 0.5 to 0.5 we can scale it up just by duplicating this scale now it's working and we want to plug that as an input so we can change the name of it to rotation the amount of rotation it has but i don't know if this is using a sphere but the notation works perfectly fine right now but i don't know it's going to work fine on other geometry let's try something else because while i'm doing the taurus there's some issue with the rotation kind of not aligned with the geometry so let's apply the same drop tree node oh wait where is it here i think this is the one we just created and we scale it up apply skill move it along y-axis a little bit so we see it's kind of working but there are some like really extreme ones they're sticking out and the way we change that is by not using the point rotate but also using a different one called the rotate along rotation to vector so the vector we wanted to align so basically want it to not go too far from its original face that is facing so we use the vector as an attribute and we type it normal and um don't worry we can change it to z so it's mapping the z axis of the uh brush stroke to the normal which means all the brush stroke is like facing the normal or just like the normal of the so basically the brush stroke the z-axis is pointing upwards and normals are pointing outwards so it lines and it's fine and this way we can change so here if we change rotation amount you can see that it's only rotating relative to the normal but we don't really want that to happen all the time but it's really simple to adjust it so we can just decrease the factor a little bit so it could become fuzzy again and i actually like to keep that also as input so this is the along normal let's just call it that so here's our rotation amount or just like scaling of the rotation and how along how aligned along normal it is so here uh let's keep working with a cube with a sphere actually yeah i think that's enough fuzziness i want cool and other than that let's actually try to be able to change the scale of the brush stroke a little bit because it's always going to be the same scale when you see if the geometry your map is basically instancing it is huge let's see if i scale this up and apply the scale and you can see there's going to be holes in there because like the stroke is not getting bigger and it's not the density is not increasing but there need to cover more ground so actually let's uh try to change the scale which just pretty simple point scale and there's a factor for it just to keep it uniform we can use combine x y z and we plug it all to the same one so it's going to generate the vector of that it's all like the same and the result as actually yeah result is scale and change it to scale why this is why is this oh it's oh we should add it before the instance of course so here okay it's disappearing yeah oh yeah because it's okay yeah we are using a attribute not this one so we connect this to this actually when using the name scale it actually just scale it you don't even need this because the scale is basically uh the name designated for the scale of the stuff so we can scale stuff in up and down but also we kind of wish there's more variation in the basically the scale of it and we can use the random that we sampled from the noise texture again but also that would just make the rotation somewhat linked to the scale of the stuff which we don't really want we can just add a new attribute randomness attribute let's just call it um run two oh it should be a vector [Music] and here we uh actually let's not create a vector it should create a float so the brushstroke gonna be uniformly skilled which is actually um kind of not really what we want but it should be fine it doesn't really matter it doesn't affect look that much and also you don't want extremely slender strokes or extremely bra strokes and when you're painting the same stuff you're kind of using the same brush over and over again so the brushstroke shoe approximately looks the same so let's cut it to random and f so the random float it's going to be min at max and with that i could um that scale vector with the random we just got so skill scale just random render s okay so basically randomize the scale of it uh i don't think you can see very clearly but if we change the density 0.1 there's so we can see it better there should be someone that's smaller some that's bigger you see there's some randomization going on there so let's say we're going to keep that two point five and one so the smallest it gets still like half the size i think that looks kind of fun good in that sense and we can actually just put those two as input as well so change your name scale me and scale max and change that to somewhat like global scale or something to remind ourselves that's basically how everything's going to be scaled but this one only changes the biggest one this one changes wants one so 0.5 oh 0.5 and 0.1 oh just one and we let's make the density also input so we can change it in the viewport and also the distance me max so let's increase the density that looks pretty good and decrease the distance a bit and fill up the hole and add more uh rotation to it more fluffy cool that looks like a cool sphere and if we switch to shaded view here's a looks kind of weird which is it should be so by changing the material setting so we change to plane gy move out so that's the stroke we're instancing this is a huge sphere um you see basically one brush stroke is creating shadow for another which is what we don't want so we change click on this one shadow mode click to none and it looks pretty good but there's another thing which is that the sphere is pretty perfect as a geometry if we scale it let's see let's see the torus we change the geometry note if we increase the density there are gonna be brush stroke that's overlapping and basically they are sort of um sticking into each other and it's pretty obvious sometimes around here and stuff so there is a weird thing that you could do so change it to plane oh yeah oh it is already using it okay so basically if i disable this uh because of the alpha blend it's gonna create these kind of basically alpha blends just trying to show the back face of the transparent texture in this case the back face is same as the front face so light should actually go through it but in ev when you're not showing the back face it is actually just somewhat creating this uh weird look and you have to enable this i can also just enable the bad face calling because sometimes there's going to be geometry that's sticking out quite a bit and seriously the back face and also they don't get the light quite good as well because when you're seeing from the front the back face you're seeing is actually getting the wrong lighting condition or just like the back face you're not supposed to paint on the painting and when you're able to see it it's not aligning with the correct stuff because like it's basically on the other side of geometry so lighting it's definitely wrong and you can see it adds some specular to it but it's pretty inconsistent and i just like to disable that and we can see there is some specular going on on the sphere and it's basically due to what we do in the shading so if you go back to i think it's 0.5 no which one that is [Music] actually let's oh it's 0.4 okay so if you back here we can actually change it to shaded mode so we are only using the color and the alpha and sub normal so we can actually change how stuff look so we can increase the metallic and so if you want paint something metallic it's actually here and decrease specular increased specular roughness this all could be changed but i recommend keeping the roughness somewhere high and if you wanna make it look like you painted something metallic just increase the metallic up here and specular if you want highlights and stuff so basically you wanted to mimic the stuff that's being painted with a little bit more roughness and somewhat exaggerated specular because it's not showing up really well that well so we just want it to be a somewhat reflective sphere so here have it and uh actually let's i'll show you some of the render setting as well so let's end with this again uh let's use the uh actually not the susan let's use the tourist and the call that i use for the first render oh and also the tree trunk so you can see for shadow if i disable all the cones there are shadows here right but if i enable the sphere and display all the oh we need the plane and we get rid of the call there's no shadow here and the reason is that we already set the brushstroke to not cut shadow so in order for it to have shadow i actually altered the geometry a little bit basically by keeping the original geometry using a join geometry node here and so this way we're keeping the original geometry and the original geometry of this oh it's all right you're signing wait oh what am i sucking up here yeah i'm i am so i can't hear so the original geometry is using this material which is still not cut shadow we can actually add a transparent material to it so it's not showing up in the render but you can just alpha clip and set it to one so it's totally transparent because if you only show the uh this geometry see there's nothing there and but there's a shadow there the reason is that we actually change the shadow mode to opaque and here's how you have the shadow and you just assign everything that is instancing those strokes the transparent but make the stroke not cut shadow and that's it and yeah that's basically how you create this effect in blender and uh actually there's something else i wanna oh yeah color variation so here let's go back to look diff so all the brush stroke actually looks the same color right but you can see even the plane has somewhat like a noisy color and let's just let's go back to shading and let's see where this says let's disable the plane let's just go back to this is a brush stroke i use for the sphere basically add the random no i think it's a geometry so in geometry input there is one called random per island basically or is it object info yes object info there's a random so basically for each instance you can get a random number here and yeah let's say uh where should i plug this to basically get a random number from zero to one and you can add it so you first map it to 0.52 so minus 0.5 to 0.5 right so therefore it's not only gonna push the all the color into one direction it's gonna push it basically kind of swing it back and forth so from zero to one to actually minus one to one and you can actually use a math note to edit before you go into this color ramp or before you go to brightness contrast because therefore this one can control like how the entire thing is yeah so you see there's like color variation here but also this might be too strong so you could use uh another i'm sorry this is terrible note organization but uh it's not at it's multiply and you can change a factor to this to something quite low so it's not affecting it as much go back to the diff let's see i think this is enough oh that's exactly 0.5 okay so you see there's some collaboration right here and that looks more like more or less more like a painting i would say than four maybe and yeah that's how you uh shade uh or not really shade but just to create the paintery style and there might be too much strength in the bump i'm gonna decrease it yeah that looks good cool and you can play with the geometry note like you can basically lower the global scale let's say maybe 0.2 if you want it to be super detailed and you kind of have to decrease the distance then minimum distance for scattering i increase the density quite a bit right here and what i find like works with smaller stroke is that you make the uh a line a lot normal a bit more because you know you're using finer strokes so it's gonna be less uh what's it called fluffy cool but you can also use like pretty big strokes like 1.8 and you have to decrease the uh this quite a bit increase minimum distance until you see cavities and stuff and for this you really want it to be fluffy so yeah and let's see okay uh some final thoughts on this it's because there's it's already quite long this video probably gonna cut some stuff but the performance is quite poor uh so as you see why i'm switching doing stuff in the shading viewport every change i make on the material is gonna require quite a while to update that's because uh there's a lot of um geometries being instanced so if you go into geometry node two instances you see there's like a thousand you know 1500 plane that's being instanced they all have each alpha and everything it takes quite a while to render for a cpu process i guess and another thing it's like the true normal versus cost of normal the meaning is that i sync this the normal that we're using here to align it and also to distribute the point which is the normal of the point is the true normal of the surface so if you shade this flat oh it's not going to change everything okay yeah that's why i'm saying just uh so it's using the true normal of the geometry which means where you're doing something like low poly it's gonna like so let's bring out the susan here so there's gonna have like pretty clunky geometry so it's gonna be quite harsh around address which is actually what you want because this actually this style kind of blurs edge quite a bit so this harsh edges kind of helps but i'm just saying if you use shades boost it couldn't do it's not going to do anything because it's using basically the point or the raw geometry and using the true normal surface rather than the shade smooth which is a another custom normal and suggestion parameter of animation so in order to use the lowest amount of geometry as possible basically for the performance uh the way you play with this is like every time you adjust the scale you kind of want to adjust the density so first you want to know something like a desirable scale of your brush stroke and after your make sure you want like the know what the scale is you kind of from first pump the density to something really high and then you gradually increase the distance minimum until there's cavity so you make it a bit less and then you decrease the density down until there's cavity and you increase a bit less so there's no basically no hole in the painting and that kind of gives the lowest amount of instances you need to fill the entire geometry because like basically you're using the maximum decent minimum for it to cover the entire thing and basically in that way the every points are distributed really like likes the similar distance between them which is the distance minimum then you're using the minimum amount of points to cover the entire sphere without like leaving any blank uh what else okay changing the stroke direction so everything i tested works kind of fine so the brush stroke kind of along aligned the tangent which is what i guessed here but there's not really a tangent input in geometry note but i think it is using a tangent at least the generator tangent because when i'm added to uv when i rotate the uv map it doesn't really do anything so there's currently no way to change how this thing is aligned i mean you could rotate the brush stroke but basically along the entire thing because it's kind of along the same direction that's pretty predetermined by the geometry and there's really no way for you to optimize that unless there's a tangent input in the geometry nodes which is we don't have right now and i don't see how maybe 3.0 but i don't see it being added to a list that's the features being worked as they're working on so i don't know when that's going to be added and if there are a tangent though basically have a custom uv that dictates the direction of those brush strokes which would be really nice and auto coloring of the blood stroke oh yeah so basically right now i'm using the same brush stroke all over the entire sphere right and there's no way for me to change there are ways for me to change basically one the half sphere three color black the lower color white currently i had to use the vertex group and basically accessing the vertex grouping geometry note but that could be really labor intensive and what i'm trying to do is basically using a uv map and also a texture for the sphere that's instancing it and also get access to the color that's being used on the sphere to color the brushstroke and currently there's no way to do that maybe in 3.0 but the data transfer node doesn't really work with instance and if you dig into that you know what i'm talking about that's pretty frustrating so currently right now you can only color those in the basically one color or maybe two or three if you're using vertex group so yeah and another thing material flexibility oh this thing that is that i talked about which is like if you want to want it to be a painting of something really metallic you can just bump up the metallic in the material setting for the stroke if you want it to be rough then bump up the roughness and spec and lower specular if you want it to be like shiny then up the specular metalness which is pretty nice and it also adapts to the uh lighting pretty well as you can see there's basically no like other tweaks on light you have to do just light it as normal if you like the scene eevee and i was thinking about using uh like a tune shader you could actually do that but i don't really see the point of it but if you want to do that's really easy oh sorry and yeah so there's some additional stuff like how to render in cycle and camera calling and how to do how did i do the tree which is like the one here i kind of wanted to put into a separate video so this one's already super long so uh let's see the tree let's disable the uh this one oh let's go do this so it is actually uh this tree that is using uh another geometry node to distribute those stuff to make it look like that and this workflow i'm probably gonna put it in the next video or if anyone know maybe nobody wants to know and uh hot rendering cycle so in cycle basically we are losing is the uh in the material setting this showback phase because like the alpha blend and everything is only applied to ev and then cycle alphas render basically just like transparent stuff so there are going to be like basically brush strokes that are kind of intersecting and it's not look it doesn't look very good in cycle and i'll so i don't see really there's a point to use cycle for this but if you really want some like i guess just save some save example work on lighting use some reflections and stuff that you could try to do it it doesn't look that bad i wonder if there is a cycle render that i did i don't see it yeah i didn't save it but it looks alright but somewhat janky and camera calling camera calling uh i'll put it in the next video and also there's some density along a single axis which i actually use on this trunk so let's so this is the georgetown i made before there's a density along the axis basically you can adjust the density along a separate axis like we want to increase the x-axis or y-axis is used for like shapes that are just like strong kind of from slender or it's not like a square or sphere so basically you have to increase the density along a certain axis for it to not have like hole when you're trying to cover it with stroke and i can put that in the separate video as well i guess i'll see you next time let me know if any questions we can just in the comments section or probably find him on twitter i'll put my twitter link down below if so thank you
Info
Channel: Sylv
Views: 5,503
Rating: undefined out of 5
Keywords:
Id: HKl1t8FElUY
Channel Id: undefined
Length: 56min 8sec (3368 seconds)
Published: Tue Jul 06 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.