hi there, in this tutorial i'm going todemonstrate how to create a very simple mountain scene like this as well as addsomething like the lens flare that you'll see appearing here now obviously there's a certain artistic element here as to how much less lens flare you have. i've emphasized it quitestrongly here, but it's for aesthetic, artistic reasons obviously this isn'tnecessarily a hundred percent photorealistic render, and i find to behonest that a lot of the more pleasing
renders are often not completelyphotorealistic certainly when the image is still you cansee there are elements about this that aren't completely true to real life, certainlysome in the reference images i've seen snow tends to roll down and you maywant to consider what taxes you're using before youdecide how to approach the scene. that said, i'm fairlypleased with the overall result of this and i'm gonna show you how tocreate this mountain yourself. so to begin with we need to use an add-on called the ant-landscape. if youhaven't already got it installed
it's not one that you need to download and its part of blender already so just go to user preferences and under add-ons, start typing 'ant' and there you'll see the ant-landscape is under the mesh section and just make sure that's ticked. once it's ticked you should be able to add, under the mesh, a landscape and as with many modifiers you get alittle options window on the left hand side here which we can look at. so you can zoom inand move your view around but if
you want to continue to use theseoptions don't make any changes to the land outhere. so the first thing is it's going to need to be fairly high resolution if we're going to represent landscapeand for another reason because we're going to use a displacement modifier and we need lots of vertices for that to work, so let's try 128 now this isn't gonna be enough in itselfbut we're going to add a subdivision surface on it we can subdivide it further if we need to the size you can do later or you can donow. so if you need to change the mesh
size you can update it there you'll see you need to change the geometry ifyou do that i'm gonna stick with two at the moment, and you can choose differentoptions for the shape of the terrain. you can see we've got a sort ofterraced form of terrain there. i'm going to stick with multi-fractal it looks prettyrealistic and you can use different basis and i think voronai is quite good. iquite like the ridges and we'll go with this one but perhaps weneed a little more height on it
we can increase it there. so onceyou've got the mountain looking something like what you want go with at least 128 subdivisions and thenwe can just re-scale the mountain how we want it and theoptions will disappear from the left-hand side you don't necessarily need to change the scale but ifind that easier now in edit mdoe i'm going to select allof the edges the only reason i'm doing this isbecause i did an animation and i wanted tomake sure that the squared-off
edges where out of sight. i've turned on proportional editing with 'o' and now i'mgonna drag them down and you can see this gives me a rounded edge and then just select a few random vertices going aroundthe edges particularly the corners and that will just give a bit more randomness to it and you can see the corners are nowpretty much out of sight.
so the next thing we need to do is lookfrom above go into edit mode, make sure all the vertices are selected and then press 'u' and select 'project from view - bounds' that's now very simply unwrapped the wholething and we'll very quickly just put a verybasic texture on i'm doing this all in cycles by the wayyou can do it in blender internal but obviously many ofthe material settings will be different so this is a cycles tutorial. so i'll just select new overhere and we just put
a very simple image texture on it tobegin with and we'll select an image. i think the one iused was this one here mostly because of the colour of it, and we can see that it has been very simply applied. you can tile that differently if you want to. you may notice that because i've got quite steep sideshere the sides haven't mapped so well but thosesides aren't really gonna be visible i'm not too worried about that. part ofthe reason i selected this is because it had some larger patches init and i knew they would stretch down thevertical size which would help to get that
idea of snow filling in gullies that pass downthe surface of the rock. so that's applied a very basicmaterial, i'll add a simple light now, just a sun lamp.it doesn't really matter where it is in the scene but looking from the front i think im goingto rotate my land, have it something like that and we'll see what that looks like so we've obviously got no sky yet
so that's quite good, it is illuminatingjust the one side of the mountain at the moment we'll give it a slight yellow colour and turn on multiple importance sample. i did experiment with various types of sky i think if you could get a very good highresolution hdri image that might work. have a look at somesample images as is always a good thing to do with mountains and you will find some haveactually completely empty skies and obviously that's the case where thereeither isn't a cloud in the sky, or
the clouds are below the level of the mountain that we're looking at. so it varies and i decidedfor simplicity's sake and the speed of the render to go with an empty sky,some peopledidn't like that but it worked for me. so to very quickly justadd a basic empty sky just go to the world settings with background selected which is thedefault go to sky texture and you see you getimmediately this. one issue i did have with the skytexture is
this horizon line. in the majority of cases you'vegot something going on here so it doesn't matter but because of the sort of image i've got i obviously don't want a horizon like that. you can't move it around with this ball, thischanges where the sun is in the sky so there is a way to move it. if i come to the next layer we can click on vector and select mapping, then come down tovector down here and just say generated, now it should lookexactly the same however the only difference really
is, i'm going to select texture here doesn't reallymatter i've explained what that is and anothertutorial what it means is i can i use theseparameters to alter the effective position of thesky map you can see there i can now lower thehorizon you can see there's a slight glow there so that's the effective position of the sun which is somewhere near where i needit to be. one of the reasons for doing the sky, over and above actually having a sky, is that you can see now i'm getting alittle bit of light cast over here in the
shadows so unless it's a space scene in themajority of cases you do want some sort of ambient light. you can see already that we've got a lot of sharp angles on this rock we haven't set it to smooth shading yet so wecan do that now and that helps but there's still not enough verticesfor what we need to do but you can see it's starting to look mountain-like.the next thing i'm going to do is, notice how many vertices we've got up here,i'm going to add a modifier which is a displacementmodifier
and you can see it goes all over the place. i'm goingto say new on textures and then i'm going to say rock large, for the texture, just gonna call it that and then click this little control button andthat takes me over to textures it currently says clouds, i'll change that to 'image or movie' and i'm going to use for thelarge size of the rock i'm going to use the same texture as i used originally. it looks amess at the moment but we can come back to the displacement
and we can tell it to use uv projection.we don't have to do that but it will align the texture that i'm usingfor displacement with the image texture that i'm using for colour and then tell it to use the default uv map. put the strength down to something like 0.01 at the moment, because we really don'thave enough vertices, you can't see a lot of difference betweenhaving this and not having it but if i now add a subdivision surface and ineed to push that
above the displacement modifier so that it effectively gives its additional vertices to thedisplacement modifier what we should start to be able to see is thatwe get a little bit more definition so you can now see that we've gotmuch more detail in the landscape. it's still not goodenough for my purposes because if we were gonna fly around or youcreate an image of the whole thing it would just not be good enough for most purposes. if you're gonna see this from a distance you probably don't even need to do this level
but you can see it's creating little pits inthe surface which is a start now you can either add furthersubdivisions here or very simply select the whole mesh and say 'w' and subdivide. this isgoing to start to slow it down you don't want to do it all by the root verticesbecause it's nice to be able to turn off subdivision up here in. you now see we're startingto get a lot more vertices. come out of edit mode and go into rendered mode. you can see we've got a millionvertices with the subdivision surface on there.now that's starting to look a lot
better and you can play around with howdeep you want the strength of this modifier and so on but what i'm going to do now, so you can seewe've got quite a nice, slightly worn looking surface, and there's these striationsthat i was talking about earlier, i'm actually going to add another displacementmodifier this isn't going to add more verticesbut it is going to affect the vertices that are already there which is why it takes a little while. we'll putthe strength down to 0.001 at the moment, just because it's making a mess of the mesh,
just so we can see what we're doing, and i'm alsogonna turn off the subdivision surface for the viewport for a little while because that willspeed things up a little and then i'm gonna say 'new' for the textures and we'll say 'rock small' we'll tell it to use the uv map it doesn'treally matter and then we'll go to here, and for some reason it doesdefault to using a common image, and you can see in orderto change this you need to click that little '3' there now we can change it for any other texturethat we want to. so we can have a look through here and ithink i used something like this last
time this is black-on-white high-definitionversion of these rocks, come back to themodifier and i'll turn this one off as well so we can seewhat this one is doing so it's very subtle at the moment, i'm goint to go up to 0.01 and then go back to the control of the modifier because it is essentially not doing a great deal different to what the originalone is yet and what we can do, under size, we can sayrepeat it two times. so that's made it smaller, say four times
you can see it's a higher frequency change as it were. so we'll come back here, we'll turn on bothmodifiers and then we'll turn on the subdivisionsurface. takes a moment because there's a million vertices to calculate, and you can see thatstrength's a little too high but at least you can see it's starting to add a lot ofdetail now. so we'll go with 0.001 again and see what that looks like.that's looking pretty fair now. you can see in some areas we've got high detail inothers it's lower detail. and if we render that, and it's starting towork there's still a few issues there, i think the strength of this one is stilla little bit too high
we'll go with 0.005 for that one. if itpushes the vertices too hard, as it were, you'll get the edge show up and thatreally isn't what you want so its got to be within the natural bounds so you need toplay with the strength and so on and there you go that's quite a bit better.so that's added some basic texture to our mountain and now we need to add some snowas well as improve the texture we've got there. so i've opened up a new window and we go to the node editor make sure this little sphere is selectedand this little cube is selected. this tells it that we'replaying with the materials on an object
and this tells us that it's the materials which we're changing. so at the moment we've got a simple image texture feeding into a diffuse and that's what's output into the material. so first of all, very few materials have noglossy in them at all so we need to add a mix shader and drop that there and then add a glossy shader and put thatthere make sure that it is set to white because ittends to only be metals and a few other strange materials thatreflect light in anything other than white in terms in the base glossiness, andconnect that into the other side of the mix shader,
and set this to something like 0.01and we'll go with the default roughness to start with. so we'll zoom in somewhere and see what that looks like. so wecan probably afford to go a little higher on the glossy, if i turned it all the way up here youcan see it becomes very shiny but there's one last thing we need to doto give this just a little bit more texture i'm gonna take the original image and i'm going to plug that into displacement, so it's another form of displacement. now you can see it's a bit over the top
to start with and we'll add a math node, plug that in there set it to multiply and turn the numberdown which turns the how extreme this modifier is. so you can seethere that without it, it's very smooth andpolished with this modifier we've just got a littlebit of extra detail added into the surface, and you could mix texturesas well which is especially useful if you've gottextures which are'nt big enough to cover everything.
what we might also wanna do is add some kind of colour modification i'm adding a gamma node here, drop that into there and as we turn that up, you can see it gets darker.i want the difference between the snow and the rock to be quite high and that's why i'm doing that, and obviouslyyou can put other nodes in to effect the colour. so that's our base rock done, and we now need to addthe snow on top of that. so this is still a colour effect,we're going to use the colour itself to decide whether or not there is snow here. now youcan use the same texture
or you can use a different one, itdoesn't really matter, it's up to you. we'll try it out with the same texture to beginwith. so first of all i'm going to add a colour ramp, and i'll put that there, and plug this texture into there. then i'mgoing to add a mix shader, and i'll put that there. in fact i'll bring the colour ramp down here. just move these nodes around a littlebit. i could group them of course. i'm going to makeanother set of textures so i'm going to set this over to 1 at the momentwhich is why it's gone black, and i'm going to add another image texture, i'll justcopy this one to start with
but i'll change the texture for a snow texture. i'll now add another diffuse shader, i could plugthis in up here but there is quit a bit of differencebetween the material of snow and the material of rock so this gives me a bit more control overit. i'm going to plug my snow into there now i could just plug that straight intothere like that and there's snow what i wanna do of course is i need some reflectivity or glossiness on this now
so i'm almost replicating the same setupup here, you could just copy it in fact and i think the snow is probably alittle bit more shiny than the rock, but not too shiny, so we'll put theroughness up a little bit so that it's not too wet looking. so that's our mountain coveredin snow, we've still got a displacement coming infrom the rock but that's fine it's good to have a bit of displacement on the snow. if you wanted to you could putsubsurface scattering on that as well to add a certain amount of realism but ithink it's not so necessary when you're
looking at it from a distance and you might want to change the colourbalance as well to make it slightly blue perhaps. so we can now fade between rock on oneside and snow on the other, and at 50% youcan see it's half and half. so we now need something to control whether it's rock or snow, so we can take the output of our colour ramp here and plug that into the factor, and then wecan do is start to narrow down our settingshere. you will find it's quite fine, you can see there, wesuddenly go over,
there we go, we're starting now to get adifferentiation between one colour and another at this point we start to see, one moment it's snow and then its rock. we've got a little bitas bleed across, where you can see the rockschanging to a slightly lighter color and we can playaround with different options here, 'b' spline is probably not the best one unless you really do want frost on the rock, you may even wantto consider something like constant, whichessentially it's one thing or the other
you can see there that it suddenly becomes snow-covered where these pointers are determines howmuch. but you need to find that right place which is where the texture itself flips from one to the other, if necessaryyou can change these base colors to narrow down on it and every time you do this you'll get a slightly differentdistribution of snow. and what you might wanna do isbrighten the snow here by turning the gamma down, and you can see that's a much whiter snow now. i think the rock's possibly a bit shinier than it needs to be. that really is
all there is to creating a very basicmountain simulation. at a glance that looks prettyimpressive, you can obviously render this at more samples but that is25 samples and you can see it's already not verynoisy. there's a couple of other things i'm going to show you and the first one is about the sun. you can seehow the shadow is very fuzzy. for an empty sky like this with arelatively bright sun that's not right and actually even ifyou don't notice it your brain tells you there is something wrong here
that's actually what you get with a veryovercast sky. so we'll turn the size down to 0.01 and now we start get much sharper shadows that actually highlights the detail a lotbetter and makes it much more convincing. so that's one thing we can do, we can play around with the colour af the sun, maybe it's abit to yellow. and now what we want to do is add that effect that we get once we've rendered it which is thelens flare so to start with i'm going to add a uvsphere.
we're not gonna see it in details soreally, even an ico-sphere would suffice we need to decide on a size, the further away from the mesh landscape the better, you'll get amore realistic, if you're animating anyway, because you'llget a more realistic movement of what appears to be the sun but it'sall about aethetics really more than it is realism for the most, part unless you'retrying to simulate it for the purposes of fooling someone. now i'veput the mesh over the lamp, if you use a sun lamp itdoesn't really matter if however you put your mesh over anyother kind of lamp
it will actually cast shadow. now i've still got that object selected, what you can do, under ray visibility, say 'no' to shadow now it won't cast a shadow on thelandscape or anywhere else now the material we want for it is actuallyan emission material. and we'll give it a slight yellow colour, and the other thing i'm going to do under settings is put a pass index of 1 on it and i'll put the emission strength up to 2. this isn't really the main light sourcesit will be adding somewhat to it, the main light sources is still the sun (lamp) but what it will do is give us an object to
represent the sun in the scene in order to give us our lens flare things like that, so there's a camera, what i'm gonna do is move our camera around a little bit telling it not to render the border and have a preview render of that. so that's quite good we've got the sun in the scene we can see the sun shining on this areaand we can see the sun hasn't reached this area yet so it's quite blue which givesthe scene a good cold feeling. so before we can do the next sectionwe need to be go to the render layers, under passes, we turn on mist, becausewe'll be using that in a little bit,
but we'll also turn on material index sat it to 25 samples and, because i don't have any need for it,under light paths i'm going to say no caustics and that helps to improve the level noise in the scene. and we'll render that. you can see there's our scene. it's quite nice, there's not very much noise in it at all. even though it's only 25 samples, i'm prettysure i could render it even less than that and still see very little noise. and you can see we've got a nice littlebit of detail here and the edge
the sun's just reflecting off detail here andthen it's reflecting quite well here. so we''re ready now to add some flare. so we'll click this which is thecompositor settings and then say use nodes, and immediately we can see, there's our render output which is this and there's our composited output. you can bring a viewer node so you can see it in here, but i prefer to see it in a separate windowand you'll notice that because we turned on mist and material index we get those two coming up here. so thefirst thing we want to use is the material index so we'll add a converter
which is an id mask. turn on anti-aliasing and take the index ma and put that intothe value if you just take that value and put it into the image, you can see everything's white exceptfor the sun, so what that shows is because this is set to index 0 the default is for everything to have anindex 0 and so everything is 1 it saying one, yes or true for everything except for the sun butwe actually want it the other way around, we want to select the sun,
so we do that. so now the only thing that'sgiving us a true output is the sun. so we can now use that as it'sdesigned to make a mask so we now go to colour, add a colour mix node and and we'll put our image into the bottom i we'll set the top to black, we'll take theoutput to the main image output and then use the mask to control the factor.so now you can see it looks almost the same but rather than just getting white we're getting whatever colour the sun is, now at the moment it lookswhite but of course we did set a slight
colour in it and therefore that's there so if we were to turn that purple that would have been purple so it's just like a black screen and it's made a holein it where the sun shines through. that now gives us the basis to make some modifications. we can now add a filter which is a glare filter and add that in there, set this to ghosts, and there they are and you can decide how manyiterations
and how much you want the colour of each ghost to vary. i like have a good bit ofvariation on it. it sort of simulates having lots of different lenses, now the mix, if i take that down to -1 you cansee the effect disappears if i take it up to 1 the original imagedisappears but my lens flare is the onlyremaining thing in the image i'm gonna leave itlike that but what i will do is add a gamma node out and i'm going tobrighten this up, perhaps not quite that much,just a little bit.
and this will allow me to vary how brightthat is later on so that's just my lens flare. i also needto add some blurry fog around the sun in order tomake that seem like a real sun so i know that i've got my sun coming out of here, so i'm going to add a filter which is a blur filter put that here, change it to fast gaussian, relative, we'll put 2% and 2% for thepercentages put my image into that and then just forthe moment take that straight to the output. so there is our sun. i think i want to
make the y a little larger and now what i want to do is combine the blurry image of the sunwith the lens flare. so add a colour mix node, put that on the bottom it doesn't reallymatter where because gonna change this to an add node. there you can see we've got both effects there. move this out slightly and duplicate the add node, again it doesn't mattertoo much which side you have as which as long as you know. take the original image and put that in,
and you can see that what we're now doing is we're adding this set of effects to the original image and we cancontrol just how bright that effect is by turning it down here. at zero we haven't got any of it and wecan turn it up here. we can independently control howbright the lens flare is by changing the the gamma here, a larger number means it's slightly darker. and i thinkwhat i want to do is brighten up that blurriness a little bit, i've put a gamma node in there and you can see the blurry part is brightening up nicely
i think what i'll also do is now select my object and we'll change the color, andwe'll add a little bit more colour into it. we'll render that, and that's starting to getthere. you can see it gets even whiter in the center where the two things are added together, so i'm going to turn that that up a little there and up a little there. i'm going to turnthe number samples down a bit we, we don't need that many. and so the final thing we need to do now is add the mist. back in our compositer, there are all our effects to create the sun effects,
now what we want is things to get alittle paler and hazier as they go off into the distance. so tobegin with we'll just use distance to controlhow bright the mist is. we've got a mist render pass, so i'm going to use my image here i'm going to add a colour mix node, drop that in there. set it to 50% for the moment so you canjust see what this is doing, and we'll make the mistever so slightly blue. now, if i just plug the mist output into here, you can see it's starting towork
what's going on is that as its gettingpast a certain point it is starting to fade out, butreally we don't want the whole sky turning white. if i bring my camera up, these are extra lights thati have my default settings so don't worry about those, i go to my camera settings, i could turn on the mist, and what this shows is where mist begins and where it ends, under the worldsettings the mist pass is starting at 5 meters andending at 25 meters so i could bring that a bit closer andbring it quite a bit closer there.
so if we render that, now we can see we'regetting a nice mist effect but the sky is going white outwith it because the sky is obviously a long distance away so we need some method for preventingthat. the sky is a long distance away so we canuse 'z' to mask it out.so if we add another math node set this to multiply, and we'll set this to asmall value, 0.002 we then put the 'z' value into that, then we
add another colour mix node and we take the output of our mist mixer, which we're gonnachange in a minute, because it's a bit heavy at the moment. put that into one side, take the original image and put into the other side and then take that and feed that back intoour node setup and then take the output of our, divided down really, 'z' value and put that into the factor.now to begin with, the sky has gone white so that's obviously got maximum mist and the mist has disappeared from down here so we swap them over. it's obviously doing something with the sky but it's
gone black that's to do with the ways that 'z' works but if we click 'clamp' up here on multiply we now get that working. now if you get a bit of an edge like that which i did, there's something we can do about that. under filters, add a 'dilate erode' node, put that intothe 'z' and set it to distance of 1 or 2, you can see 2 is a bit high so 1 is pretty close we can send it to a feathervalue and distance 2 now seems to be fine.
that's pretty good and now we can changethe amount of mist. we can change the color and darkness here, and we can also had a math node into the factor, change it to multiply, put the mist into it and we can then turn the mist down. and you can see the mist retreats into the distance. so with very littlemis at the front and it starts to become a visible in thedistance.that's just a subtle amount of mist and i had quite a bit to the scene so explaining those nodes again, 'z' tells blender how far away things are, this creates very large numbers
so we multiply it by a very smallnumber such that the only pixels which give a deflection arethose that are very far away such as the sky, everything else shows upas very close put that through this dilate-erode node with feather, at a distance of 2 to just smooth out the edges. it doesn't blur it, it just smooths the edge out. that's then used in the factor to mixbetween the original image so that if it's close to us it gives us a 1, theoriginal image, and the mist version of the image. by theway don't forget to turn clamp-on and otherwise the sky want work properly.
mist is created by the mist output whichyou can set to whatever depth you want whichyou can see when the camera limits are switched on. you can put that that in to one side a multiply math node which is used as thefactor on a mix node which mixes between the slightly bluish white colour and the original image. that's then fedinto one of your mix node the other of which is your original image. that basically allows us to have no mist really visible against the sky,but plenty of mist visible against the ground, and you can and varythis multiply node
to determine how i thick you want the mist.so i hope you found that useful, if you did let me know. i'm alwaysinterested in suggestions for other tutorials and i hope you've had a chanceto take a look at the first of my videos on sardi pax 2, and there'll be a link inthe description. hopefully i'll be able to find the time,not only to compile this video, the next video which shows actualprinting of the object that i've created in a blender in sardi pax 2. so, i'll see you in the next tutorial.
bye for now.