Terrain Tools | Rajendra Khirodkar | Toronto Houdini User Group (THUG) | March 2019

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so hi everybody a little bit introduction about myself my name is Rajendra carrucha I came to Canada last in last year January I joined Seneca visual effects and film for film and television program at Seneca College in January last year and I got introduced to Houdini at that time being more interested in lighting I really liked working in Houdini since the beginning and after my graduation which was in September side-effects offered me an internship program here so I quickly hopped in join here and since then I'm working on the terrain tools in Houdini so I'll so let's get into terrain tools right now before actually starting with the presentation I would like to show you some work out so let's quickly have a look at it so this was the island project where I used truly need to create terrains to create textures on on this terrain to scattering all the geometry and to render so for those of you who do not know what terrain tools in Houdini are they are called as height fields head faces are basically two D volumes which are interpreted in your we put like a geometry and you can perform all kinds of volume operations on your height field to create the terrain look you want so in the first part of the presentation I'm going to introduce you to some of the more frequently used nodes like these ones and then in the later part I will take you through the steps are taken while I was working on the island project so let's quickly dive into Houdini let's start with the very first node which is height fill itself so when you when you are want to access any of operate operational node in height fields you start to type HF and it will show you all the nodes which are listed in that realm so height field this is a very very first node you always start with by default it creates a to do volume grid of thousand meters per thousand meters you can see here and it also creates two 2mm primitives called as height and mask along with it you can also call these as layers the grid spacing on this node is like a resolution so when you grid spacing is two your resolution will be 500 boxes by 400 boxes if you reduce your grid spacing you are going to increase your resolution so it's now thousand boxes per thousand voxels you can also change the division mode to by axis and specify exact resolution what you want so if I specify 750 I can have that resolution now this is in terms of voxels resolution of your height field at any point of the time is really important because now effect of any operation you perform will be dependent on your resolution and you can simply change that by dropping down a node called as hatful resample and here you can specify exact resolution you are in terms of grid spacing or in terms of boxes let's move on to the next node the next node is height field noise when you drop down height field noise it will create this vertical displacement on your height field according to the type of noise you use the combined method on this node is like blending modes in photoshop or in any compositing package where you can add subtract or multiply you can see this effect when you have another height field noise connected in chain so when I add it it will add the height value at the same location and if I multiply it you can get extreme results like that amplitude will decide how much what is the amount of displacement you are doing element size is the size of noise pattern across your grid so you can change the element size and get different results here in noise settings you can choose among bunch of noise options available in Houdini some of the more frequently used noise options have listed here for your visualization so you can see fast convolution looks like this pollen noise will give you this result simplex noise now here is volley F 1 and somewhat mechanical of all the F 2 minus F 1 one thing to observe here this node has got two inputs first into this first terrain and the second input is for mass that takes us to our net next nodes to talk about which is masking features in Houdini in height fills basically you'll see this second input on a lot of operations to limit the effect of that operation to certain masked area so how to create this mask so the most simplest way to create this mask is you go on that node and if you see this paint node if you click on this well it will take you too far not always though so let's bring it near and now you have your height field paint node created here but you don't have any mask information so you can paint your mask with the help of your brush I'm gonna visualize mask so by default mask is always tinted with red color in height fields and if you visualize your effect you'll get your noise pattern only limited to the masked area now if you are getting this sharp edges here you can put down a node head filled mask blur and then you can alert this to get softer edges another node to create mask is height fill draw mask where you can make a lasso selection to create mask and there is height field project so this node is basically more popularly used for projecting any geometry on your height field so when you drop down a Jeff project and the second input goes to any any primitive you can see that so I have a sphere here you can see that sphere being projected on my height field but if you change the affecting layer to mask it will create mask according to that so now I can just change by change the position of my object and create mask according to that there is one more way to create mask and that is by using height field noise we just saw we use this node to create displacement but again if we change the noise layer to mask you can create a mask according to the in its certain type of noise you use along with all these nodes there is one more procedural tool to create mask which is one of my favorite nodes in hide fields so to show you that outdated this terrain the node is called as height field mask by feature so when you put down this node you get certain parameters here like slope height peak valleys direction in occlusion on the basis of these you can create certain masks so when I enable slope I get minimum slope angle maximum slope angle and now I can include the value in between these in my mask if I want only vertical faces I can say I want between 50 degree to 90 degree so this will be most steeper edges you're getting so after I've created some mask just to show you how it how it looks so this is mask according to slope this is mask according to height then again using curvature using certain direction so you can see you can spread 360 degree cone here and get any mask according to any direction and finally occlusion so these are all masking features in height fits which are pretty useful masking is really important when you are dealing with creating terrains because it it it is really responsible for creating different shapes in your terrain then again it helps you with scattering different objects onto your terrain and finally even in shading and texturing part mask will be really important things moving out to the next node will discuss about height field distort a lot of the times working in height fields are you will face the situation where you will have to use some mechanical noises like wall-e f2 minus f1 and when you are creating something natural which the straight lines doesn't go along with that in good way so to break up these straight lines and give it a little bit more natural look the best node to use is height will distort we have two types of distortions available in Houdini one is height field is stored by noise and another is height field is stored by layer as the name suggests hide field is stored by noise uses two types of noise curl noise and simplex noise to give distortion new terrain and we have all basic settings like amplitude element size on this how I'd feel disturbed by noises noise and hide feel destroyed by layer gives you the freedom to create the noise of your choice to distort your terrain so here I've created two different types of noise so this is one type of noise and second and third I have put down a switch node and I'm plugging that into second input of Hat will destroyed by layer and this is the result I'm getting after distortion so this is first type this is using second type and this is using third type on the first look it doesn't look pretty but believe me when you are when if if you want to get a lot of feathering on your today on your terrain when you erode it this is a tool you want to use it let's talk about height field erode as you all might know erosion is basically removal of soil or rocks basically removal of mass due to some natural agents like water or wind and and transporting get that material getting transported to some other location and to imitate the same effect in height fields we have height field erode node we already had height field erode since beginning where height fields were introduced in Houdini that was put in a 16 but in Houdini 17 they have completely rewritten the tool and added a lot of new functionalities let me show you a video to just demonstrate the difference between two so here you can see I have a Himalayan terrain actually this is actually Himalayan terrain on the first very first frame I don't have any erosion and in hood there is a region happening on both of the terrains in Houdini 16 point 5 and 17 for the same amount of frames and on by default settings so let's see the result this is after about 20 frames you can see the erosion in Houdini 17 looks a lot natural than the one in 16.5 erosion so let's see how erosion works in Heidfeld I would broken down our chain into two just to show you effect of erosion on the two different resolutions so in the first channel in the first chain we have 500 to access by 400 talks to the resolution terrain and in second we have 2,000 by 2,000 so if I drop down height field erode on the very first frame I don't see anything happening other than these colors popping up so let's go to visualization tab and switch off the colors for now we don't see anything anything changing because erosion in Houdini is not a direct effect it's basically a simulation so you to see the effect of erosion you will have to let it cook for some frames so I'm going forward with the timeline now and you can see some these edges are getting eroded here some flow lines of being formed so at this point now you can let it run for a longer time and let your terrain getting erode but if you like the result at any frame you can simply go here and say freeze at this frame and once you do that now even if you scrub through timeline your result will be intact so let's talk about the options on the erosion erode node on the main tab you have some basic settings for like erode ability and erosion rate for hydro and thermal ocean on the second tab Advanced tab you have a lot of new features added which will let you fine-tune your terrain to a lot greater extent details I would recommend you to watch a master class from Erie Danish which was only specifically for a hydro erode 2.0 he talks about it for around 2 hours so it's pretty detailed video and added Danish he's from side effects so it's good to layer stab before that I want to go back one node and get this at this node we can see we have two layers your height and mask and when we go down to erode node we can see a lot of new layers being added here we have new layers like bedrock sediment debris and water so this layers tab it will let you keep or remove or reset the layers which are being created in the previous erode node so if you drop down another you don't note here and connect in the chain so at this point you can say I do not want the these layers created in the previous node so that choice is on this tab again if you go forward on the simulation tab you can get options for starting frame and allow allowing how much energy cache memory you want let's come to the visualization tab you see this colors popping when you created this tab created this node and if you click on compute range this this will calculate the actual elevation of your terrain and it will assign this ramp from minimum to maximum elevation from left to right so this yellow color will be assigned to the lowest elevation and white color will be assigned to your peak you can also visualize different channels which are created as a result of this erosion node in different colors so if I want to see my bedrock I can say just show me in the red color or in any color for that matter so I have run this erosion for 21 frames and I'm visualizing it here and on the other side you can see here 21 frames and on this side I'm running the same amount of erosion for 21 frames again but this is on higher resolution and you can see the difference here you are getting a lot of detail details added on higher resolution terrain so that's where I said your resolution of your terrain is really important of course you are going to spend more time eroding your high resolution terrain I have a habit of using height field when it comes to adding result of erosion note on your on your terrain so what I do is I connect my incoming terrain into the first input of height field layer and I connect my second eroded terrain in second input here what it enables me when I use layer mode to blend on zero I get my input terrain and when I do one I get this second eroded terrain now I can decide here now I can keep control to myself how much of the erosion line I want to add on this so I think that's all about the erode node let's talk about scattering so to show you how scattering was I've created this small terrain here like a headful erode node 2.0 height will scatter 2.0 is also a completely rewritten new node which is added in Houdini 17 we have two main problems in the old node one was when we were adding new scattered points our oldest cat accounts were getting the position was changing so that was not always desired for artists and the second problem was when you use pre old scatter node in cascade mode it wouldn't recognize the point scattered in your previous node so it will kind of create intersections between the geometries let me show you we do exactly to show you exactly what I meant so here is Houdini sixteen point five and I'm creating a mask here by putting down an old height field pain so this mask is being created and as soon as I click on height field scatter node I get points being scattered in that area I'm copping some points some spheres on those points just for thing to see it clearly now I'm changing my mask and adding some more area into my mask and now you can see all the points are getting changed their position is change and that's not all always we want we sometimes people will ask you like oh I like this result keep this scattering but I knew new points in some areas yes no right so we can have any number of height fill scatter nodes cascaded in your chain so here is our terrain and I'm gonna visualize this is our basically our Lake area and your director asked you like okay you have to scatter a village in this area so how would you go about that in headful scatter 2.0 I have actually down sampled our terrain just for faster processing so first thing we need for scattering is a mask where we need to scatter the points so we'll create masks by using Hatfield masks by feature now I have created this Mars but we only need this area I've created this by using height the height of the terrain and we only need this area so I've created another node called Hatfield draw mask and I'll put it in multiplayer mode so that it will only keep whatever mask I've created in my previous node in this selected area and now I'm dropping down height field scatter node so height will scatter node has three inputs first is for terrain a second input is for mask or scatter points and third input is for primitives let me show you some parameters on this node first thing we have here is tag name which we have said $2 OS which is operated string it means it will create an attribute called tag on the points being scattered on this in this node so you can see if I visualize this node I can I'm getting some points being scattered in this area in our masked area and if you go to geometry spreadsheet you can see a tagger to being created here so we have houses attribute which is created on each point and this is gonna be the base of our instancing workflow the tag attribute the next thing is scatter method let me go back to sheets we have four different scattering methods in hatful scatter out of which the top three will use a mask as the input and will scatter points in that difference is just that they have different parameters to control how many points to scatter so by coverage it will give you an coverage of coverage options like here and you're getting a coverage option to control how many points you want to scatter in the density you get basically the density channel in total point count you get how many exactly points you want to scatter in this area so you can specify that but the fourth method is different it is per point count using source point it takes already scattered points as input and scatter more points around it so these were the points which were scattered in the previous node and you can see all the other points of being scattered around those points the next options are outer radius and fall-off these two options are responsible for allowing intersections or not allowing intersections so choice is up to you sometimes when you're scattering rocks you want them to intersect and form some interesting shapes of other rocks and sometimes when you are scattering houses or trees you don't want them to intersect so it's up to you so here when your radius is 1 and fall-off is 0 you won't get any intersection but if you allow fall-off is basically allowing intersections and would these parameters to work with together for that like if you have radius of consider more radius than one but your fall-off is in between you still have you still have in so you get basically intersections and some other important or Asians here are variability this is P scale which is responsible for the scale of your scattered primitives so you can specify range here which will so now your points will have P is killed from 0.7 to 0.8 some other options are keep incoming scatter points if you use another natural scatter node in cascade you can choose not to keep the previous points which are scattered in the previous node then another thing is keep trained you can only keep points here if you select these options the terrain will not migrate along with your workflow then match normals with terrain this is basically if your point is on some elevation it will whether do you want it to match the normals without Orion or not and again the direction and slope randomize up it will randomize I think it will be more visible when I plug some trees here so here I will plugged in some trees in the third input and randomized op is basically it will randomize what up direction randomize your is rotation so you can randomize rotation here here itself you don't have to create an another attribute on scattered points all right so now we want to scatter some houses first so I've created this basic house geometry which will scatter on the train and I'm giving it that house geometry now our houses are scattered in that area but it's not necessary that we want only one type of houses we want multiple types of houses so just to have a difference I've created another house which is red color and hateful scatter node is always listening to an attribute which is called as weight attribute it's a primitive attribute and here you can specify the percentage of your variance so these are your two variants house one and house too and you can create a weight attribute on it and specify how many of a specific variant type you want so if I say house one I want point nine percent which is 0.9 which will become 90 percent basically and on other red house I have 0.1 and you can merge them together and plug that much into your primitive input for height field scatter and now you can see both the houses are being scattered here and also you can see percentage-wise red houses are really less number so it's like ten percent all right it's time to scatter somehow trees so in the same way I have created I have taken the same mass for trees and I have three different types basically in different colors tree and I'm plugging that into here so I'm getting this all three different colors trees being scattered here and now I also want to scatter some rocks so first I need if you were if you have different masks for rocks you can plug that into or if you are having the same mass you can you can have that as an input but here I have created another mask for rocks firstly I'm using height filled masks by feature and creating this mask on the basis of height and slope then I in this node I only wanted to scatter points along this edge of the lake and I shrunk it down a little bit with by using Heidfeld mask string again I also had these flow lines coming from the terrain where usually rocks kind of flows from the Train to downwards right sure okay so that that is already been taken care yeah that's that's the feature of height we like scatter 2.0 yeah I doesn't matter it it it won't it won't know that that you will decide with the help of radius if you specify this radius as more no no so here you can see every house has a little bit like he it has a radius of this much right it's not getting intersected with other trees so for the mask I wanted to create some more for rocks I wanted to create some more masks which were which was in my debris channel so here I used Rangel to put the information in my debris channel into mask so it's a very simple code actually you start to say at the rate mask equal to added debris and initially when my debrief value was low like the mask value in the debris channel was low and I created this flow channel here to multiply that because height will scatter is also looking for the basically value of your mask if you have a low value here it will scatter automatically scatter less number of points as compared to your one value and again as previously I used hide field layer to add to hide fields Here I am using the same hide fill layer node to add two different masks and this is my final mask also my camera angle was this so I wasn't going to see anything beyond these ages right for that I created this I drew basically a mask and I got rid of all the point all the area which was outside my visibility spectrum and finally my mask for rocks were ready and here I'm scattering rocks again I also wanted to scatter some grass so I used basically the same let me show you the mass created for grass so this was again we start with mass by feature we drew we again draw the area where I wanted to keep that and I again painted out this area with zero value because of from the camera angle I was I wasn't able to see that area so there's no point in scattering where you don't you don't see anything so here I am scattering draws and I match let me show you from my camera angle and you can see a glass being scattered in this area Houdini takes care of the fact that your report can't handle a lot of Polly's but you can go in optimize and specify here how much of the poly count you want to visualize so you can say I want to I want to see 80 millions of Polly's and now it's it is gone otherwise it creates bounding box for the for those objects and that's it with the help of for scattering nodes I scattered or I created all my village now at this point your director comes to you and say oh that's all right but I also need some houses in this area I also need some trees in front of the camera that's where the main feature of scatter comes in where you add more scattering points and it doesn't change though your old scatter right so let's see how that works so basically what we will need to do is paint some more area in our trees and houses scattered so at this point I'm going to drop down HF paint and I'm going to plug in in our trees mosque and houses mosque and i'm visualizing directly the result of trees and houses being scattered right so clicking on this node and painting some more area now now you can see automatically with our rules being followed scattering is getting done and there is no change on the other side you're all scenery in the background is now as it was this can also be used in the other way where you director tells you like we want some streets in the village so you make your foreground value 0 and you just delete some masks and you create streets in your village that's creating masks is manual right and that's because I'm showing you painting here but usually you will create masks on the more procedurally as well because you will get the road maps you'll get some geometry for road maps right and you can basically use hide field project node to create masks on the basis of that geometry so it won't be that manual I guess but of course it so this is basically allowing an artist if you want to go like if you want to go and paint stuff or you want to use something else to create mass point I'm making here is it's to show you that even if you change your mask and any point of time your points which are already scattered are not gonna change so that's the only thing I guess did I get your do you have any other question sorry I'm sorry okay sure yeah sure you can you can have that so basically if you bring in any image right and you can have that image projected on any plane and you can delete on the basis of that so it will create keep only geometry right and then you can use Heidfeld project node which will project the same geometry on your height field as a mask so that is one way cool so at this point our terrain is actually a volume it's not a geometry so I'm choosing not to keep my terrain in this in this last node we get a node called convert height field which you cannot plug in and your height field will be converted into geometry so now these are Poly's you can specify your density here according to which your number of Poly's will depend on that you can again say a big point color so if you have any visualization on your terrain it will keep that colors I would disabled that but let me enable it so here what I'm doing is I created this mask for the rocks and I copied it into another layer so basically I'm creating another layer here by using height field copy layer I am putting the mask informant mask information in rocks layer I'm creating another noise with the help of height field mask noise and multiple multiplying and adding that together and so I created this mosque and I put down a height field visual this is the the same visualization you get in height Philly Road node where you can have a ramp mapped from your lowest elevation to highest and again you can color specific layers here so this is the color I've got from there and when I converted it I get the same color which transferred as an attribute on the geometry again whatever channels we had they're also they also become your attributes when you convert the terrain and at this point you can merge this both you can and you can take it to render basically not not that detail of course because they are just colors right and this is not how we of course texture the terrain and this is also not how we take it to output I'll show you that in my Allen project code so let's dive into the island project so when I was searching for some references for this for doing a project I came across this image and I really liked it this Crescent and having little a small island around this and I wanted to create something like this not exactly but having this Crescent and some islands in the distance so first thing was blocking how would I block out my scene so I started with height field pattern node here I got this bomb basically as a result of pattern node although this is not how it looks when you drop down so when you say HF pattern you'll get this and you have to play with shape size and scale and post blur radius and again you can choose a different star na s and things like that so this is like basic pattern I created first and I distorted it so I got this small rock like structure a small mountain basically and I again created another pattern with another height and distorted it and I use height full layer to go to kind of merge that effect in maximum layer mode so what it will do is it will keep the terrain which was which whatever was on the highest maximum height and I went on adding these kind of same structures to create my base so if this was my camera angle I went on adding some more mountains I know what this blue is okay I'm sorry for that I think that's because we are recording with the device so this was my basic structure created for that now at this point I wanted to create a clear difference between my ground layer and basically bedrock so I created a mask this mask was created by using height and actually this I created this mask for ground and just clicked inward mask here so it gave me this this mask here for bedrock I've blurred it a little bit and applied distortion on only mask when you apply distortion you get a lot of this rocky edges kind of distorted edges which will look more natural when you go forward and I used hide fill noise to lift my terrain from the ground and after at the end of this I cleared this mask because I didn't need it anymore I'm going to provide you this file and I also returned down at every step what I've done and why I've done it so it will be more clear for you at this point it was time for steeper erosion steeper erosion is basically a erosion on lower resolution in this height field workflow we start from basically we start from very low resolution like 500 boxes where 400 walk stills and we go we go on adding our resolution and doing more erosions so this was our first erosion path which is usually which usually gets us more steeper result so I have a resampled matter in down to find out washes and I'm doing this erosion pass here so this was the result I got at the end of this I got this good flow lines happening here and again I told you before I like to have control on my in my hands how much of the erosion I want to keep so on from the one side I got my original terrain and from the second side I got the eroded terrain and I kind of kept it a point three five value that was which was desirable for me after that I wanted to add some tracing effect if you might have seen at some terrains this is the tracing effect we see in some of the mountains and to imitate this in height fields we have a height filter race node it needs a mask so I created mask here with the help of again mask back features this is mask wear feature isn't no deal like ninety ninety percent you will use it for creating the mask because it is procedural even if you change if you go prior to these nodes and change values it's still gonna keep let's same elevation and all at this point I distorted my mask and I applied filter days so this is the effect it created you can see this tracing from the top angle properly again I didn't want to have only one type of tracing so I created another mask in some other areas just to have a random tracing so this was Lowe's basically less step size today's in this dressing you get basically two options are important one is today's step size which will decide decide the size of your trace step and smooth edges so if you go on decreasing your size you need to decrease your smooth edges as well to get this proper smoothing at the edge of Leo today's there is a few steps and at this point I created a mask and used hide fill layer to add these both of these to racing right so this was the end result I got I also wanted to have some slumping happening at the bottom slumping is basically when you're when you're debris and mask mass of the terrain basically soil is coming down and it gets precipitated at the like horizontal level and it forms these kind of shapes right so it's this is this effect is called a slumping and we have a height field slump node to imitate that one so here I distorted my terrain a little bit and I created mass for slumping because I only wanted slumping at the bottom and you can see as a result of it I got this mass being precipitated at the bottom and the end of it I cleared this mosque a headful slump is really very useful when you are creating some snowy mountains or also deserts it will give you the same feel if you create like this area will will serve you as snows and this vertical faces will be rocks popping out of the snow area now it was time for mid-level erosion so to add more details I resemble my in 2000 by thousand boxes and I again eroded it now as you go down the line and you re sampling your terrain to higher resolution you'll see the time for erosion will keep increase and I have a habit of putting down a resample node after each erosion because as a result of this erosion I'm like I've seen we kind of get this jagged edges result so I just recent up sample it to a little bit higher resolution so here I am at 2000 by 2000 walk CIL's here I was also getting some even after resampling I was getting some jagged edges in the debris channel so I wanted to blur the those edges I created masks for that and I blurred this that mask and I again put down height field blur node to get some softer areas in that and again like previously I added height field layer node and decided how much of the erosion I wanted to keep so after the after my final erosion I again got this result at this point I my train was almost finished I wanted to create this kind of a lower elevation in this area to kind of show this is a beach area and it's kind of going down for in the water or the water surface so I created mass for that area and use height field remap to take that area a little bit at low elevation and finally I resembled my train to how far the thousand boxes by five thousand voxels this is pretty high resolution so when you convert it I I have a value of value density of 0.5 now for rendering this terrain you have two different options like you can convert it into a geometry and take it to any other package or it like it doesn't how Houdini doesn't keeps any dependency on this so you can take it to any third-party software and render it another way which is more often seen is exploding out Maps so you can export out height maps and masks for different channels and then use that height map for the render time displacement and for doing that we have height field output node in hardening in this node we specify file name then in format you can specify RGB or single Channel and specify your resolution and in these channels you put the information you want you can also have a kind of hybrid height field output where you can put one value in one channel and different value in difference so that you can spare save space basically so I created this height field mask let me show you how it looks and this is the height height map I exported out of that terrain and you can use this to basically have a grid and displace it at render time then again for texturing purposes I created this texture this mask so my first mask was for rocks and rocks I wanted to keep the rocky region where I had very steep areas a very vertical faces so I created this mask where I specified I want the faces which have more than 38 degrees and till 90 degrees and I applied a small blur on it so that when my another texture will come in it should blend it with properly likewise I created mask for grass and again mask for flow lines flow lines is basically one of the channels get created as a result of erode so I I put that information I put I took this information from sediment layer actually and I put it into mask so it it will show you in red color and I exported that out so this was my flow line mask again the grass mask and mask for rocks and I'm going to use this to apply different textures on the terrain geometry after this point let me show you how I created material for this so I'm bringing in my poly reduced geometry here and as you can see if you go in you is it right when you convert your height field it kind basically projects you is from the y-direction so you will get your U is perfectly in your first you dim and this is my material setup for the Train so what's happening here is I am using a material blender to blend different materials in in the base color I have applied a material for San so this was rendered from my camera and I only had geometry here know with without any material and this is when I applied sand material on it but I only wanted to keep sand material in this area in the beach area so after that I created another material for rocks so basically it's like this you will have only sand material now and this is rock material and I will plug it in in the second layer and again I will use in the place of blend color I will use I am the mask I created for rocks so as a result of this you will get this result so this was my mask for the rocks and this was my result after getting rocks material getting apply again after that I plugged in mask for grass material which I had this mask and I rendered with this so now I have both materials of light rocks and Ross after that I also wanted to add some flow lines here so I already had a flow line much mass created so here I applied that material and you can see I have different material in flow lines so materials I explained you how materials are created for this now it was time for scattering so I brought in my terrain in another geometry container so this was my created terrain and here I created mask for trees here I wanted to have less less density of trees spread on the top edges so I had a mask where I had less value in there and so this was my base mask I did not want any tree or to be scattered in the flow lines so I deleted that area from my mask just by simply saying mask equal to mask - water so it got rid of that water channels and as a result of this I was missing some tree or some area interesting area on this edge so I explicitly created that in the mask and I merged that with the help of - layer node and I get these points scattered on this let me show you when I attach the geometry so here I get my all the trees being scattered on this terrain after that I also wanted to scatter some points in the rock in the beach area so if you go forward with the camera you get this beach area exposed so I created mass for that and I put some more rocks there with the help of another hatful scatter node so at the at this point I had both my rocks and trees being scattered I can also have grass but as my camera distance oh it wouldn't seem to have a good decision to how grass scattered because it wasn't in any way going to be visible that clearly but you do not want to render this way because this becomes a lot heavy in terms of calculations so I wanted to get only points out from here at this point and on the my last node of scattering I had like million points available for different objects being scattered there and I also have a lot of different attributes here so I put down an attribute delayed and got rid of all the unwanted attributes and I wanted to instance different objects on that on those points so let me show you how instance interesting works in Houdini so if you have a sphere that and you want to scatter this in basically instance this spear on a bunch of points so you get an instance node the way instance node works is you need to have points inside it so add nodes create one point I delete it and create a grid and scatter a bunch of points on it so now our points are ready for scattering let me have some less points like 20 and on this instance node you can specify which object you want to scatter instance the instancing works only in object level it doesn't take any input from soft level so you can only specify any geometry container here you can't go to the actual out node or anything so am space allowed to specify sphere one and add point instancing i'll say full instancing so I get this Spears being stands on this point and if you want to move any one of these peers you can't do that because this only just at render time this doesn't actually exist in your viewports like if you take the same sphere and do copy two points and if you want to select any one of them and if you want to move that you can actually do that but not with instancing they only exist at render time so I put on an instancing node and I got all my points inside it the way instance not works is it is always listening to an attribute called as instance so I I wanted to do what I wanted to do was create an instance attribute which will tell which objects are to be instance on those points so I put down a node create attribute the name of my attribute was instance ID class is point attribute and it's the type of that attributed string where we specify which object is should be instanced and you can see here I use this tag which was created as a result of height will scatter node to specify what geometry container I need to instance on trees points what geometric container I need to instance for on draw points so at this point I had four different types of trees and I had same nomenclature wise I had same text till this point in each of the trees only one two three and four was the different points so I I specified this string here till the my common text and I put down this floor function to how the different values on each point on each random point so that it will pick up all the four trees randomly on each point and similarly I created that instance attribute on rocks so if you go down you can see these values here I have randomly different trees being assigned on different points again I brought back some more freedom to choose P scale attribute at sometimes when you are rendering you realize that oh my trees are smaller much like some there is some scale changes needs to happen so I created a channel to multiply your P scale and I brought bat it on your main installs node so that you can decide at that time if you want to change the P scale and I'm using this R angle to get rid of the points which are not in the camera frustum so like that and when I visualize this node it will take a minute but it will create all the instance geometries and it will render way faster so that was around million points and I also had two different islands so about two million objects being scattered and my render time was around 15 to 20 minutes per frame so that's a pretty good time I think for that again if you observe in my render the rock details here doesn't look that good like they they just look like plane textures on that so I wasn't happy about it and recently I got I worked out a workaround for that so let me show you that so here's what I did that's Houdini right it starts cooking as soon as you enter yes so here we are so this was my rock geometry I wanted to have more details on to write and the way convert Hatfield works is it creates you is only from y-axis so on these vertical faces you'll definitely have a lot of stretching happening so what I did was I deleted a lot of unwanted layers from here so this is a funny thing because this node is used for soaps or delete node and I for a long time I was struggling with this thing how to get rid of unwanted layers from here if I don't want to use it again and it never occurred to me that a soft node would work with height fields because those are volumes basically but one thing I learned while working with Houdini is to keep an open mind because anything can happen here so I saw one of the developers told me that this soft node works to delete volumes as well so you just have to specify name of this layer and it will get rid of that so here I got rid of all the layers and what I'm doing here is I'm creating masks on the basis of different directions because my faces are mostly vertical what I can do is I can create mass from all the four directions and a project you is from all the sites to how good you is basically so I'm creating this mask from one direction and I'm creating I'm adding that mask in my main height field and I'm copying that to a new layer called positive X and I'm doing same from all the directions positive X negative x positive Y Z and negative Z so at the end of it I have four different directions mask for four different directions and here at this point you can see I have different layers and I converted my height field to geometry here but still I have all those at layers as an attribute on my points at this point I am deleting and keeping only the geometry which was from positive Z here negative Z and this all operation is happening on points so it might take you some time yeah I did I tried it putting a group here but when you have a group it basically has some overlapping faces which are shared so you have problem with that with the U is and now on each of these faces I am projecting you is from that particular axis so at the end of it when I'm merging all the points together I'm again using ad swap to get rid of these unused points here but in you a quick shade you can see you get a very perfect kind of use here I could use try planar but I've seen it it's not giving me that because you have to use try planar is in displacement as well right and I haven't seen any you like displacement wise I can't use to a dinner yeah at this point I am creating a group for outer edges and I'm then applying them to different materials one for outer edges which is without displacement and one for all the energy ama trees which is with the displacement so that for the outer edges it will keep that this entire geometry intact and it will basically merge with your original terrain so only internal these interior faces will be extruded as in rocks so at the end of it I am getting these really good rock details and now you can just change any material put displacement on that and have different kinds of rocks even popping out of the of your terrain so this method allowed me to have this good kind of details on this you can also have a noise on this material as a mask to have different kind of different tile textures basically so some of the some of the region will have more tiling so that it will not look so uniform and at this point I have all this geometry here which is visible and both of my instancing and then that's it I hit render so that's all guys I hope I didn't bore you too much it's a lot of technical information and I would really recommend you to go and watch one is master class from a Airy danish another is again his master class for scattering as well and third video when when high fields were introduced in Houdini first in Houdini 16 there is a master class from Jeff Flake I would recommend you to watch these three videos to get to know more of height fields you can actually you can also go to a website called as open typography and from here you can basically get this height data you can select the region you want and you can get this height data exported out they you have to create an account on this website so and they will send you that data as email and you can input you can take that file and put down a height filled file node and this will basically give you the same exact terrain geometry terrain volume as that area so that is one thing that Jeff Lee it has explained in this video so I would recommend you to watch that as well so cool thank you very much and billing me for whatever Thanks do you guys have any questions I didn't ask actually sure yeah sure sure sure let me show you one thing for that in height fill 17:5 they recently add this feature where you you need not to have any square geometry now you can just have any mask and you can cut out that height field and you can have any shape yeah let me show you that no it's like as I created mask for by using an object you have had food project node right so you have height field cut out by object node where you can cut out by object but it is available in ordina 17.5 because it's only in the recent version and you can just plug that into the second input of cut out by object and it will only keep the area which is covered by that object so now you know more how that dependency of square height words yeah right guys thank you very much
Info
Channel: Houdini
Views: 16,686
Rating: 5 out of 5
Keywords: terrain, heightfield, environment, Houdini HF
Id: wdt2MXY0eN8
Channel Id: undefined
Length: 70min 1sec (4201 seconds)
Published: Tue Aug 06 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.