Flow Maps in Houdini for Unity or Unreal

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey folks i'd like to take a quick look at how we can create flow maps in houdini so to create some flow maps i need to go into sops put down the geometry container jump into that now i'm going to put down a grid and that's just going to represent our river surface for now and i can hit space in g in my viewport to home my view to create flow maps in houdini we need to have the side effects labs toolkit installed so to do that you would need to click this little plus here come to shelves and if you go all the way down to here you need to turn on side effects labs to start off with and that will get you this shelf if you don't have it loaded in all that you will see will be this little button here the little joystick so you need to click on that it will pop open a little window for you and you will need to update it now i'm not going to do so in this case because i already have it installed when you go to update it you will need to close houdini down and you will need to start it up again and you should get all of these extra tools we're going to be outputting our flow map as a texture and that means we're going to need to have some uvs on our grid so let's put down a uv project and we can just jump over to the initialize tab just over here and hit initialize i'm going to be painting our flow map colors onto the grid and the flow map colors because they're vertex based colors they are resolution dependent so i will need to have more polygons on my grid to get a more detailed flow map so in this case i'm going to subdivide my grid and i'll put this up to three for now and that should give me plenty of polygons to paint onto if we hit tab and type flow we can see these are the flow map tools that come with houdini and the one we're looking for just to get started is just the labs flow map node what this does is it creates a velocity vector and we can see that if we take a look in our geometry spreadsheet it's created this v attribute and these are the numbers that we're going to drive when we start painting our flow map you can turn on flow map here if you want to visualize the direction using these little line visualizers i'm going to turn that off for now i'm going to put down a flow mapped color and that will visualize the flow map direction as a color and in this case if i wanted to just get started what i can do is i can comb the direction of the normals in other words i can comb these little guys that are sticking up here if you think of those as like little hairs that are sticking up so we can do that with a flow map brush node stick that guy in there i can come over my viewport here just hit enter to make sure that the tool gets picked up you're probably going to need to increase the brush size i'm just using the scroll wheel to do that and i can start painting my flowmat direction and you can see it's starting to push over all these little hairs if you want to think of it that way now i normally leave the visualize flow vector option turned off and instead i use the flow map to color node to visualize what i'm doing so i put my display flag here i can select my brush tool and i could start painting away to get my flow directions so let's just imagine i've done a wonderful job painting all my flow directions for my water or my lava or whatever i'm doing how do i write it out well i'm going to use another labs tool which is the labs map baker now normally when you're writing stuff out in houdini you go to the out context and you put down your render nodes there for whatever renderer you're using the maps baker is the side effects labs team's effort to try and keep us over in stops to make it easy to get in and out of houdini so this is a render node inside in your modeling context in this case i want to write out the vertex color so this flow map to color here has turned our velocity attribute which we were painting which is just an attribute with some numbers in it that's all that it is and it has converted it over to cd which is which is houdini's attribute for color we can see that in the geometry spreadsheet the geometry spreadsheet is definitely your your best friend in ud if we see here we have a cd attribute now or g and b which is why you're seeing this color in the viewport and that's what we want to write out to disk so we want to write out our color attribute here so if we come down and look on our map speaker we don't care about ambient occlusion here so turn that off this is the one we want color so it's going to generate this is going to write out the disk for us and i'd like to be able to preview it after it's been written out so i'm just going to copy this i'm going to paste it in here into the preview channel i need to take a look at where it's going to write out in this case it's going to write it out to my wherever my hip file is stored which should be in a houdini project it's going to look for a render folder it's going to save it out with this hip name and then with the channel now i do not have my hip saved out correctly so i'm just going to dump this out onto the desktop for right now which is terribly bad practice but however and we'll say dot tga for now let's write that out to my desktop and flow maps can be quite small so i'll put it at 512 by 512 and we can hit render and there it is there is my flow map written out to disk and here it is loaded back in because i had set my preview channel correctly so this is written out to this now i can bring it into unity or unreal or wherever i need it to go i want to be able to see how my flow map is going to distort my water textures on the houdini side i don't have to keep bouncing over and back between my game engine and houdini and i can do that using a labs flow map visualize note so we can put this down just over to the side here and i'm just going to go directly from the flow map to color into my visualize i can set my display flag to here now i need to press play i've got my animation toolbar hidden so i'm going to pop that up i can speed it up a good bit by using this speed slider just up here and there you go you can now see this texture being pushed around quite clearly being distorted by the flow map that i created earlier if i wanted to i could go and load up my flow map that i saved it to disk it's going to look the same in this case but i could change the flow map from using this color here to using a texture and go and look for my flow map that's out on disk and i could load this one in instead and i could also go and pick out a different image if i wanted to i could go and paint a stylized water texture for example and i could load that in here i can go back and repaint my flow map using the flowmap brush node to define my directions and then write it back out to disk now that our flow map is written out to disk the last thing we have left to do is to write out our wonderful model of our river here so to do that we can put down a rop output node so rough geometry output here now whether we want to take out the high poly version that we painted on or potentially a lower poly version is dependent on what we're going to do with it in the game engine if we were going to do some kind of displacement we will still want a certain amount of polygons but in this case i'm just going to take my very low poly mesh and i'm going to run it out it will need uv so i'll run out after the uv projector so i'm going to need to decide where i want to put it in what file format i want to use so if you're using houdini apprentice you won't be able to export fbx and that's because it is owned by autodesk so you would need a license for that so there are very few limitations with houdini apprentice but that is one of them in this case you could write it out as an obj instead again i'm going to ignore the proper way of doing this which is creating our own houdini project and i'm going to write it out onto my desktop here and i'm just going to call it riverbank.obj and houdini is clever enough to pick up from the extension what file format i want to write out to so i can hit save to disk here and that would write out my model and now i have my model and my texture saved out and i can bring those over to my game engine so this was a quick and simple look at creating a flow map in houdini for game engines the particular method we looked at here has some clear disadvantages it is resolution dependent if you go and change the number of polygons in your grid you're going to lose all of your painting it is a very simple little setup and houdini excels at complex setups that you actually run into in game development so in the next video i'll take a look at doing a slightly more complex setup for our flow map
Info
Channel: 3DGO
Views: 2,498
Rating: undefined out of 5
Keywords: 3D, CG, Maya, Animation, VFX, Learning, HowTo, FX for Games, VFX for Games, Flow Maps, Rivers, Water, Real time, Unity, Unreal
Id: OOy0sFLQkfk
Channel Id: undefined
Length: 9min 10sec (550 seconds)
Published: Tue Oct 27 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.