Atom Posted August 16, 2016 Share Posted August 16, 2016 (edited) Hi All, I came across this link, from Pixar, about how they took a volumetric approach to hair for the Incredibles. Does anyone have any example files or know how we could set up this kind of hair style in Houdini? Edited August 16, 2016 by Atom Quote Link to comment Share on other sites More sharing options...
Atom Posted August 16, 2016 Author Share Posted August 16, 2016 (edited) I took Matt's grain hair example file and tried converting it to a VDB and back to polygons. I'm not sure if that is all the above paper is mentioning. It does work but I don't get any specualr highlight at all on the hair? I tried using the fur hair shader but that shader seems to be looking for specific fur attributes that are not present. ap_me_volume_pig_hair.hiplc Edited August 16, 2016 by Atom Quote Link to comment Share on other sites More sharing options...
Skybar Posted August 16, 2016 Share Posted August 16, 2016 39 minutes ago, Atom said: I took Matt's grain hair example file and tried converting it to a VDB and back to polygons. I'm not sure if that is all the above paper is mentioning. It does work but I don't get any specualr highlight at all on the hair? I tried using the fur hair shader but that shader seems to be looking for specific attributes that are not present. Did you read the paper? It's not as simple as converting to a volume and then to polygons. Just skimmed through it and looks like they are rendering curves but they calculate the normal from an SDF, among other things. Quote Link to comment Share on other sites More sharing options...
Atom Posted August 16, 2016 Author Share Posted August 16, 2016 Well, I did "read" the paper. But if you are asking if I understand the paper, I would say not fully. I don't really understand the symbols of complex math. I understand code quite well, though. I hoped someone may have already tackled this on the forum and I could dissect an example HIP file if one was floating a round. Quote Link to comment Share on other sites More sharing options...
Skybar Posted August 16, 2016 Share Posted August 16, 2016 (edited) 1 hour ago, Atom said: Well, I did "read" the paper. But if you are asking if I understand the paper, I would say not fully. I don't really understand the symbols of complex math. I understand code quite well, though. I hoped someone may have already tackled this on the forum and I could dissect an example HIP file if one was floating a round. I have no idea what all those math symbols mean either. But I just wondered since "tried converting it to a VDB and back to polygons. I'm not sure if that is all the above paper is mentioning" isn't really in the paper at all. Edited August 16, 2016 by Skybar Quote Link to comment Share on other sites More sharing options...
amm Posted August 16, 2016 Share Posted August 16, 2016 (edited) 4 hours ago, Atom said: Well, I did "read" the paper. But if you are asking if I understand the paper, I would say not fully. I don't really understand the symbols of complex math. I understand code quite well, though. I hoped someone may have already tackled this on the forum and I could dissect an example HIP file if one was floating a round. Well, mentioned Kajiya and Kay’s illumination model really isn't that complex, I think there are a few dot or cross products of hair tangent, camera and light direction, something like. Should be easy to find a Renderman sl example somewhere and rebuilt in H. However this model is really really an old fashioned, limited trick. Works only with 'classic' lights, not with environment lighting, it's very hard to get sharp highlights. Decades behind of hair shader in H. Normals used for diffuse shading or something else, seems to be derived from SDF and interpolated back to curves. Should be easy to utilize built-in functionality in H to get 'normals' from VDB SDF, how to interpolate this back to curves, I don't know. However again, entire story imho has a bit too much a 'dirty tricks' for today's criteria, not easy to keep it believable unless you're Pixar. A lot of interpolations from low to high resolution will work nicely for "mono volumes" but it can output something weird just in case of yours, 'multi volume' example. Anyway if there's goal to utilize volumes for hair shading, there's simple trick to render a 'real' hair, visible only to primary rays, while VDB volume is used for any other sort of rays. So, VDB volume, without converting back to polys, having a volume shader with high density, around 100 times more than default, with color close to dark hair color. This gives a smooth shadowing look, similar to shadow map, also it is around 10 tomes faster to render. Edited August 16, 2016 by amm Quote Link to comment Share on other sites More sharing options...
Atom Posted August 16, 2016 Author Share Posted August 16, 2016 3 hours ago, Skybar said: isn't really in the paper at all. It's in the pictures, top pf page 3. I just don't know how they went from lumpy iso surface to normal driven strands? @amm: I have played around with the shadow technique you mention. It is also described in this video as well, near the end. Quote Link to comment Share on other sites More sharing options...
Skybar Posted August 16, 2016 Share Posted August 16, 2016 1 hour ago, Atom said: It's in the pictures, top pf page 3. I just don't know how they went from lumpy iso surface to normal driven strands? @amm: I have played around with the shadow technique you mention. It is also described in this video as well, near the end. That's what I meant, it says in the text what it's for and what the pictures mean. First picture is the SDF, second is the hair (curves) rendered with the normals calculated from the SDF, and the third is a comparison without this. Quote Link to comment Share on other sites More sharing options...
Atom Posted August 17, 2016 Author Share Posted August 17, 2016 Assuming the posted file is step 1, the next step is the calculated normals then. How is that done? I tried placing a Normal node in line but it did not seem to have any affect other than to add that attribute. Quote Link to comment Share on other sites More sharing options...
jkunz07 Posted August 17, 2016 Share Posted August 17, 2016 I think you'd want to sample the gradient of the sdf to get your normal Quote Link to comment Share on other sites More sharing options...
haggi Posted August 17, 2016 Share Posted August 17, 2016 The problem with hair is usually that they are rendered as thin polystripes, at least in some renderers. These polys are always facing the camera what results in a unrealistic behaviour if you use environment lighting or indirect lighting. For one of our projects I implemented a similiar normal calculation model for mentalray in maya to get a nice interpolated hair normal for some lighting calculations. I created a voxel volume, calculated the normal for each voxel and interpolated these normals for every sample. I was surprised that it worked I wish I had houdini back in these days, you only need two nodes to get the normal and one vex function to read it... Quote Link to comment Share on other sites More sharing options...
symek Posted August 17, 2016 Share Posted August 17, 2016 Perfect for short, fluffy like thingies i.e. here. Quote Link to comment Share on other sites More sharing options...
Atom Posted August 17, 2016 Author Share Posted August 17, 2016 (edited) I wish my icon did not say "Grand Master". I only have that title because I ask a lot of questions. The forum should really change these titles to reflect that. I am still learning Houdini and don't know how to implement many of these suggestions. This is why I ask the questions. So here goes... @jkunz07: I know how to create a ramp parameter, which node should I put it on? As far as sampling, is there a sample node? Is that CHOPs kind of thing? Quote I created a voxel volume, calculated the normal for each voxel and interpolated these normals for every sample. @haggi: That is exactly what the PDF document describes, do you happen to have an example file showing this technique? Edited August 17, 2016 by Atom Quote Link to comment Share on other sites More sharing options...
haggi Posted August 17, 2016 Share Posted August 17, 2016 Sorry no I have no file to show. It was a whole environment of scripts, mentalray light maps, surface shader and so on. And to be honest I don't want to tuch mentalray again. Quote Link to comment Share on other sites More sharing options...
jkunz07 Posted August 17, 2016 Share Posted August 17, 2016 Here's a file showing how to use a gradient of an sdf as a normal. There are 3 different methods shown, one in vex (wrangle), one in vops, and one with only sops. curve_normals_from_sdf.v1.hip Quote Link to comment Share on other sites More sharing options...
Atom Posted August 17, 2016 Author Share Posted August 17, 2016 Thanks for the example file. I have installed your nodes into the pig-wig file but I seemed to have lost lighting on the hair all together... ap_me_volume_pig_hair_1a.hiplc Quote Link to comment Share on other sites More sharing options...
mawi Posted August 18, 2016 Share Posted August 18, 2016 21 hours ago, Atom said: Thanks for the example file. I have installed your nodes into the pig-wig file but I seemed to have lost lighting on the hair all together... ap_me_volume_pig_hair_1a.hiplc On the geo node volume hair, you miss the * in the light mask parameter. So... No lights no shading. Keep an eye on your primitives, you are using the convert lines SOP upstreams. It creates a primitive for each segment in your curve. Also, the simulation part of that paper almost sounds like a simplyfied "flip" workflow. Did something like that a few years ago, I´ll check if I can find it at office tomorrow. Quote Link to comment Share on other sites More sharing options...
Atom Posted August 20, 2016 Author Share Posted August 20, 2016 Thanks Martin, I certainly missed that one. When I added the * back to the field the lighting works again. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.