Automated model processing using Houdini's PDG

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
how's it going guys I recently came across this need to be able to reduce the polygon count on a whole bunch of different models so I remember that Houdini's got this new tops context and PDG and stuff so I decided to see if I could use Houdini to automate the whole thing and honestly it's not very hard but it did take me a little bit of time to figure out the right way to connect things up to get it working so I thought I'd make a quick little video to show how it's done so over at Houdini here I've got I've got a little model right it's fairly high res sort of stuff and basically I need to end up getting it down to low res this is a bit extreme but I just want to be able to show show it off right but and the nice thing is because it's a Houdini you can do whatever process you want like if you want to you know for noise shatter this guy and explode and then great whatever but the thing is like if you need to do this do a whole bunch of files it don't want to be coming in here and changing the geometry file and then waiting for it to cook and then you know saving and doing that whole thing so yeah anyway let's get into it so I've got a new window here and right off the bat I'm just gonna save it and I've got a little spot picked out over here and I'm just gonna call this tops sandbox for the moment okay so the bate way we're basically going to do this is we're going to make a geometry context that takes in the file does the stuff to it and then we're going to convert that to HD a Houdini digital asset so let's drop down a geo context and the first thing we'll be bringing in a file so I'm going to add a file and then just so I have something to work on initially I'm gonna go select some of my files or one of my files to work on so in this folder I've got a folder called models in it I've got just a couple couple models here just so we can have something to work with so you can see we got this three model oh yeah we got this scan of Lincoln's head and his death mask if I'm not mistaken and then there's a little owl thing right but the thing is we got a folder here and the end of this we want to be able to just turn through all of them so here we go we've got yeah it's a model of this guy right so the first thing I'm going to do is just I'm gonna reverse it because the normals look backwards and then going to Polly reduce and this is really the main thing I wanted but just for the fun of it I'm going to set the output polygon count too and I'll say 500 change the display flag the nice thing is once this thing cooks the first time and actually just kind of slide around and see what looks good so we go with 500 and the first thing I notice is there's some little little holes in there so because this is Houdini and we've got some tools to work with I'm gonna do a little polyfill I'm gonna fill it with triangles and there yeah we got our holes filled in right so that's cool we've got our guy and just just to keep things exciting I'm going to I'm going to break this guy up so well let's say I want to make that flat first so let's add normal set that cusping all the way down so that way it's all nice and flat right now let's say my scatter hundred points something like that on there and we're gonna use that to do a Voronoi fracture so bringing the original geometry the scatter geometry and there we go we fractured the guy and then just to make them look a little cooler we're going to do exploited you right so that's kind of fun I'm just gonna bring that down to something like that cool so that's our that's our little action that we want to happen right like for every file I just want to do this set of actions so we've got that going and I hit save and now I'm going to come out to my geo context so I'm just going to name it do things to stuff yeah so so this is just one geo context right so it only does one thing but if we right-click it we can say create digital asset and this is where things start getting a little bit more fun I'm gonna save this just into that same folder with the rest of my stuff so I pick that path and just accept the default thing when I hit accept so this is gonna make a file that will basically house all the actions that we wanted you and this thing pops up asking about layout and craft I just say destroy all spare parameters this will take a second then it pops up this thing which is kind of like setting some parameters on up the first thing I'd normally do with HTA's is come over to the parameters tab and select all these things and just hide them make them invisible cool so that means when we click on our little note here there's there's nothing here to work with but we want to add some stuff so specifically I want to add this path here because I want to be able to set that path from outside lis of the thing right so if you right click on a field you can say export parameter to type properties or you can hold alt + middle mouse button it's nice because then that shoves this over here right so these are the parameters and if we come up to looking at this thing once we apply do-do-do-do-do yeah all right now you can see we've got a spot for us to like actually put our parameter and tell what file to work on so we can just accept that and at this point if we were to go and swap out for say the owl you can see it does the same thing to the owl all right but again we're at we're still at the same problem where I don't want to be changing this and saving that so here's where we get into the tops stuff so I'm gonna add a top Network and this is the this is the fun stuff so if I add a file pattern and then over here in the pattern this is asking where to go look for things or where it should look for all the folders or all the files inside a folder so I've got everything in the models folder and I'm gonna say find me everything this is a wild card to the asterisks so everything in this folder so if we bake this now and say dirty and cook this note you'll see that I've got three three little dots and those are each of the work items right and if I double click them you can see that came up with LeBron STL Lincoln head sto and should be the Alice children so this is just the same stuff that happens to be in this folder cool so now we just have to add an HD a processor which means we're gonna basically feed all these work items into the HD a that we just made so we have to tell it where that file is so let's go select that and that's Matt's do things to stuff HDA all right it's cool and after we do this we have to say update HD a parameters which then when we go over to the HD a parameters tab will have all the parameters from our HD a so the only one we set up for this was this geometry file and here's the trick we need to get the the information from these guys these work items into the HD a processor and this is the part I had a little bit a little bit of trouble figuring out what the right way to do this is so I'm gonna show you the way I figured out how to do it I'm not sure if there isn't a better way but for the geometry file we're gonna help put a little expression in here so using a backtick that means we're going to do an expression I'm going to say hip right now no no sorry I'm looking at my the wrong notes here sorry let me look at the right notes there we go okay so we want to pass in the back to expression and then the at symbol directory slash backtick file name and the way I found these is looking at the work items if you double click it it'll show you that here are the attributes so we've got a directory extension and file name and the file name has the extension on it so if we combine directory plus a slash with the file name we should get what we need so that's what this is this is an expression that pulls out the directory attribute as a slash and then adds the file name cool so the last thing I think we got to do with this thing is just tell it where to save the stuff out at so if we scroll down to the output file name it has all this by default and I'm gonna change this around a little bit I'm gonna say output to my same folder where my hip is which is just the whole Cugini file and then I'm gonna say put in an output folder and then whatever the PDG name is and i'm going to output STL's cool so I think we're good I'm gonna save save the file and now if I right click in dirty and cook this node it's going to start processing and it's spinning it takes to the second for it to do its thing but if I open up a folder and go look at that that's spot we've got an output folder now and we've got our three files you can see it's done cooking because it's got the little check box and if we open this up you can see we got our yeah our LeBron there we got our Lincoln head and our out all should be here yep and that's that so it just means that we can basically what however many files we had we can get it set up and have it just true through them in fact the this whole tops thing is great if you need to do a lot of files and you have a couple machines with Houdini you can actually set this thing up kind of like a farm and have them all work on them but yeah that's it's pretty simple we made an HD a that just contains the actions that we want it to do then we made a top net that just looks at a folder and then executes the 88 HD a on all of them and then just saves them out to a folder which it is pretty cool yep well that's all I got talk to you guys later
Info
Channel: Matt Bell
Views: 1,742
Rating: 5 out of 5
Keywords: houdini, pdg, tops, sops, automation, filepattern
Id: kz62Hbvsjv8
Channel Id: undefined
Length: 12min 23sec (743 seconds)
Published: Fri Mar 20 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.