Jump to content

Volumetric Hair?


Atom

Recommended Posts

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

Untitled-1.jpg

Edited by Atom
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by Skybar
Link to comment
Share on other sites

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 by amm
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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 by Atom
Link to comment
Share on other sites

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...

Untitled-1.jpg

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.

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...