Test Driving Houdini 19: Karma XPU, MaterialX And A Hidden Gem

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] so houdini 19 has been released and as always it's quite a handful to find out which of those features we want to focus on and with this release i have the feeling that side effects focused on providing high level tools that are a bit pipeline centered more focused on the big studio while at the same time providing some maintenance and further development of some features that were already pre-existing in previous houdini versions so instead of focusing on the big guns like kin effects or grooming i want to pick out a few small tidbits that caught my eye here and there in houdini 19 which i think are a great addition to the software and are actually quite useful for the freelancer or small studio workflow i want to build this with you an abstract sculpture of these two hounds and to get started in houdini i'll just drop down a file node in the obj level dive in there and point it to the provided the geo file that we ship with the townley greyhounds remeshed which is a 3d scan from 3dscans.com that i just remeshed so it has this uniformly triangular mesh here with around 120 000 polygons to build that basic sculpture we'll scatter some points onto the surface make it a hundred points maybe for now and then use the fortnite fracture to break up this statue into individual pieces takes a while to calculate and then we have this when you zoom in you might be able to see some additional cuts maybe here and there so our statue has been cut up into those individual pieces for what we want to build we are only interested on the outside of this and luckily bernoulli fracture gives us an inside and an outside group so what we can do down here is add a blast or a delete node blasting slash deleting the inside group leaving us only with the outside here next i want to remesh each of those pieces so they have a bit more fine uniform mesh while keeping those edges here which can be done just using a remesh node which i want to set to be not as coarse as this let's set a target size of 0.005 takes a bit of time to remesh this and i also want to increase iterations to four to make this a bit smoother even so that leaves us with this mesh here so now to build this cloth or bubble surfaces spanning in between the edges of those individual cells i first want to mark those edges as the boundary so that they don't get moved or don't get influenced by what we are trying to pull off now so i'm going to use a group node wire this into my remesh set it to create a point group which is called boundary then uncheck base group and scroll down here to include by edges which i'll enable and then if i scroll down further i'll check unshared edges so that leaves me now with only those edge points selected here now the surfaces that i want to create are called minimal surfaces and we created them already in a previous tutorial using vellum however with houdini 19 there's a new node in town which allows the calculation of those surfaces in one go and is really quick and really handy it is called the attribute fill node wiring it in after the group node here and looking at its properties we can see that its default mode is set to interpolate and it says also here poisson which is the name of a french mathematician who discovered and worked on the equation that bears his name poisson equation what poisson's equation does is if we for example use it to calculate the positions of each of those points on our mesh in here is it says that for each individual mesh point here its position should be as similar as possible to the adjacent points around it so basically it says make this surface as smooth as possible while still respecting the boundaries of each surface which in turn results in what we know as a minimal surface so let's set this up so we want to work on the position attribute p and we want to have our boundary loop as our boundary and after a bit of calculation we can see this which already looks quite similar to a minimal surface minus these normal arrows that we still have in there and to correct for them let's just attach another normal node like this and set its cusp angle to 22. so now when zooming out we have the bases of our sculpture here now to add these wires in between those mineral surfaces to give the appearances of wires holding up the sculpture and holding up these pieces of cloth or pieces of bubbles we will go to the remesh node again copy our group node here and paste it and move it over here and instead of grouping points in here by the unshared edges we'll set this to group the edges actually and then use a really really handy side effects labs node called labs edge group to curve and what that one does when i highlight it and set its group to work on the boundary is it converts these boundary edges into lines one remark i've got the feeling that side effects lab tools have become increasingly important for my daily workflow and even more so with houdini 19 so i would highly recommend just installing them by default together with houdini so you have them there always available and ready to go when you need them so let's just switch to point display and we can see that these lines are a bit irregular so let's fix them clean them up a bit using first the clean node set to consolidate points fixed overlap but uncheck delete overlapped pairs and then the resample node to uniformly resample the resulting splines here the resulting lines and the length of 0.1 might be a bit too coarse as you can see here so let's set those to 0.01 and before it wire in the polypath to join adjacent paths and clean up our geometry a bit further like so so that leaves us with those lines here forming the wires of our sculpture let's save this and for rendering this later and correctly rendering those lines as wires these need a width attribute so let's use an attribute create wired in after the resample and create a width like this and let's set it to 0.005 for now maybe let's attach two nulls in here call one out underscore wire [Music] wire in the attribute create that we just set up and then up here after the normal let's drop down another null pull this one out underscore surface and the normal node goes into that one and this is the surface output of our sculpture so far let's highlight that here go up one level and create another geo node which we're going to call wire and also maybe let's call this one surface instead of file one before we want to throw this into a render engine let's add a camera by ctrl click on the camera here making sure it's locked to the viewport so we can adjust it accordingly and maybe let's build a background grid a cyclone just using grid diving in there maybe i'm moving this down while switching our viewport to goes the other object so we can see our sculpture in the background and i think if i move this down to minus 0.5 it should sit flush and then let's use a bend set to bend this by 90 degrees upwards and the transform [Music] could just turn it around 180 degrees along the y-axis and maybe move it back a bit we have this cyclo as a background slash ground plane and the only thing left for me to do is subdivide it a bit maybe two steps and disable the grid display so we have this cyclo and background let's call this grid bg for background and finally set up an environment light by control clicking on the environment light button up here and then in the end slide under the light tab in the environment map let's just point it to an hdr in this case making sure i unchecked show sequences as one entry and then i select my artist workshop hdr which i downloaded from polyhaven resulting in this before i finally set this up to render let's just assign a few materials and if you don't have these networks up here open already just pin this network here using this icon here and hit ctrl t a few times to open up new tabs here and set just one to the materials network here in here i'm going to use the new material x standard surface as this is the new material standard that not only houdini but also unreal are going to support and this is the shader that's not only working in comma cpu but also on the comma xpu alpha and we'll get into that in a minute so let's copy that and paste it two more times and call one shader surface call one shader wire and let's call the third one bg for background let's assign those by maybe switching the viewport to smooth wire shaded and dragging the bg onto the background the wire will take care of in a second let's drag the surface onto the surface here and as the wire is kind of hard to hit here because it's very thin let's just under the obj context on the wire geometry in the render tab let's select the material manually and point it to the wire shader like so okay fingers crossed i think we're ready for rendering and i want to render this using comma and typically you would set up lights shaders and camera for karma in solaris in the lobs or in the stage context however if you're lazy and maybe a bit slow like me you like staying in your old obj context and just use your standard out context to render stuff like you did with mantra redshift octane 3d light or any of the other third-party render engines and luckily in houdini 19 side effects finally provides a tool for that called the karma rob before we have a look at it here's a disclaimer in my few tests so far it didn't perform as reliably so sometimes material updates were not propagated sometimes geometry updates were not propagated we will have a look at the node and i think it holds a big promise for the future however as a first release it still feels somewhat experimental so i'm going to cover a second workflow of how to render using carmine h19 as well however let's just have a look at the comma rob here and for dialing in my materials what i want to do is hit comma viewport and this new window will pop open providing me with a comma viewport here and the settings here so to enable the rendering let's go here to perspective and set it to karma and immediately it starts rendering the time to the first pixel is really quick however convergence is still somewhat slow especially given the fact that we're only shooting 9 samples per pixel and not maybe 200 or 500 or a thousand as you would in production if we increase the sample count here you can see that now our render times increase quite drastically even for such a simple image and what we can do is try out a new alpha version of karma xpu that means karma that not only runs on the cpu but also on your gpus it is called alpha for a reason it's far from feature complete it's a bit unstable here and there it does some unexpected things sometimes but it's really fast as you can see and in this case also consistent as we are using material x shaders i ran into major issues with comma xpu with the alpha when trying to use it with the classic shader principal shader worked fine mostly but material access standard materials seem to be the way to go so let's try adjusting those materials and see if the material changes propagate through my viewport here which they not always did so let's go to the mat net here and for the surface here maybe let's add some transmission by setting the transmission to one here and yes indeed i can see that seemed to have worked one thing i'm clearly missing and i didn't just care setting up yet i just plainly forgot is the wire so let's take care of that just closed comma going back to obj and in the wire here the only thing i have to do is use an obj merge to bring in the wire geometry we created by pointing it to the surface out wire here going up one level and now we can see we also have wire geometry here so now let's go back to our out context and on the comma rob hit comma viewport again again setting it to comma and after a while watching it converge now you can see we are also getting those wires in here so again let's go back over to the material network here let me just move that over and on the wire node here maybe let's increase the metalness and set its base color to something more red orangey maybe like this to give more of a copper or brass appearance finally let's just tweak the background a bit and maybe make it a bit brighter setting it to be pure white and as a last measure in our obj context on the environment light maybe let's increase the light intensity to 1.5 one more thing i want to set up here in the karma settings is under the limits i can dial in how many bounces i want for my diffuse that means my indirect light my reflections and my refractions and i think they all could need a few more bounces so i'm going to set the fuse to 4 and the reflection and refraction limit to 8 bounces respectively one final thing that is needed down here on this glass where the glass touches our ground plane slash background this gets quite dark darker than you'd expect in reality and that is because caustics aren't enabled by default so let's go to geometry and shading here and check caustics and after a brief initialization we can see now we are rendering caustics as well takes a while to clear up but with comma xpu it at least is way faster than using purely cpu rendering okay so far so good this all works you remember to stick to using material x standard materials or karma xpu however as i mentioned in some instances the comma rob here could be a bit unstable or not update properly and in this case the only way i found to properly reset and reload the scene and restart rendering is just fully delete the comma rob and drop it again and then restart rendering on the comma viewport if that doesn't sound like your cup of tea maybe this technique is more for you so let's delete that karma rob here and switch over to our solaris desktop and also make sure our scene viewer is set to stage by default this scene the stage is empty because we didn't import anything yet and traditionally in houdini 185 or earlier we would use sub-import or subcreate to populate our scene and then set up cameras lights materials in here however for people like me and potentially you who like setting up lights and cameras and maybe also materials in the obj context side effects implemented a few nodes to make it easy to bring those setup scenes into the stage context into lops and solaris namely the scene import nodes in this case i'm going to use this scene import all node to just import everything that i set up in my scene so far and then i can immediately switch to the camera one which i already defined and specified in my main scene and you can see my image is already rendering and converging as my viewport is set to karma so if i want to adjust the comma settings here i could do so by attaching a comma node underneath my scene import and flagging it accordingly and in this case i want to set it to the xpu engine and increase the pixel samples so maybe 1024 also as previously down here under the limits i want to increase my limits to four and eight bounces respectively and in the geometry and shading tab i want to enable the caustics resulting in the same image we just rendered on the comma rob so what if i want to set up my materials in here well for one what i could do is on the scene import all i could disable the import of materials so now i'm only getting this clay ish rendering here and then the technique is pretty similar to previous houdini versions using a material library wired in after the scene import and in here i'll dive in and create again my material nodes sticking to material x for this example as it is the most stable material with karma xpu so far i'm going to drop down the material x standard surface copy and paste it two more times call one surface call one wire and one bg for background like so again as previously i'm going to drag and drop this so the surface goes on to this geometry here the surface and then so lars asks me if i want to assign this material only to this piece here or this mesh here or onto the whole obj node that is the surface which of course is what i want to do so i'm going to select set as material on the whole surface component i'm going to drag the wire to the wire geometry it's just a bit hard to hit here okay like this and again i want to set this as a material for the whole component and finally drag the pg material onto the background and again setting this as the material on the whole component and now i can dial it in respectively so maybe make the background i don't know either brighter or maybe good bit darker so we get a bit of reflection in here or maybe we want to have it orange to make it pop a bit more whatever you like i'm gonna go for white now same goes for the wire i'm just going to increase the metalness again and adjust the base color accordingly so i'm going to end up with this copper or brass like material and then again on the surface i'm just going to increase the transmission to 1 to give it this glass appearance and if we go back to the stage now we can see not only did we add the material library in here where we created the materials but also by dragging and dropping those materials into the viewport houdini automatically created this assign material node here where you send those three materials to the individual components of our scene i want to point out that neither did we create a camera in here nor an environment light those are being imported by the scene import all node here from our obj level and i'm not sure as the future has to prove which of those workflows i'm going to stick to but i have the feeling that this one here that i've shown you will be the one that i'll be using mostly when rendering in karma or karma xpu again keep in mind karma xpu is alpha and if side effects themselves decide to declare something as an alpha you should take them serious so karma xpu is fast but it's by no means feature complete it might be unstable so i recommend using it for experiments or private projects only apart from comma let me switch back to build we mentioned a few new nodes mainly the attribute fill which can be used to solve partial differential equations such as the poisson equation and thus being used not only to generate minimal surfaces such as in our example here but also interpolate between textures or images which we'll briefly cover in another video what i want to do next is add a bit more detail into those areas where this connecting wires are but i think that's also a topic for another video and if you like what we're doing and want to support us or maybe learn more about houdini using in-depth courses consider becoming a patreon of ours and to everyone already supporting us on patreon thanks so much folks without your help and tagline in this form would just not be possible with a very special thank you going out to important looking pirates rodeo effects sean edwards chris bear and rafika nadal thanks so much folks so until next time as always cheers and goodbye
Info
Channel: Entagma
Views: 41,775
Rating: undefined out of 5
Keywords:
Id: tI4zqTezniI
Channel Id: undefined
Length: 17min 38sec (1058 seconds)
Published: Wed Oct 27 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.