Jump to content

Marschner hair model


ssh

Recommended Posts

I am also starting the implementation of "Marschner hair model" using Renderman or houdini SHOP like you.

So I read the paper. But it's too difficult to implement the Marschner hair model, because there is no pseudo code.

I found the some information relate with "Marschner hair model" in GPU Gems 2.

Here is site for reference.

http://developer.nvidia.com/book/export/html/42

There is pseudocode summarizing the shader in GPU GEMS 2.

=========================================================================================

// In the Vertex Shader:

SinThetaI = dot(light, tangent)

SinThetaO = dot(eye, tangent)

LightPerp = light –– SinThetaI * tangent

eyePerp = eye – SinThetaO * tangent;

CosPhiD = dot(eyePerp, lightPerp) * (dot(eyePerp, eyePerp) *

dot(lightPerp, lightPerp))^-0.5

// In the Fragment Shader:

(MR, MTT, MTRT, cosThetaD) = lookup1(cosThetaI, cosThetaO)

(NTT, NR) = lookup2(CosPhiD, cosThetaD)

NTRT = lookup3(CosPhiD, cosThetaD)

S = MR * NR + MTT * NTT + MTRT * NTRT

=========================================================================================

Is it same to paper contents? I think not.

I think they use the lookup table and some information in paper is omitted for efficiency.

So could you tell me which pseudocode has to add and change for result like your works?

Thank you for reading.

Link to comment
Share on other sites

  • Replies 87
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Now shader supports texture maps and ramps!

post-4029-130407589892_thumb.jpg

You can texture diffuse or each specular component or all of them.

Ramps serves for remapping computed colors based on hair length.

Now it's much easier to make roots darker or tips brighter.

post-4029-13040759084_thumb.jpg

[ADVERTISEMENT]

All things about working with textures inside of a shader are thoroughly explained in this course by Alexey Mazurenko:

http://houdini-howto.com/course/houdini-rendering-in-box

This greatly saved me time.

Currently course is avaliable in russian only.

[END OF ADVERTISEMENT]

ssh_marschner_hair.otl

Link to comment
Share on other sites

Dunno. :)

He is basically my Houdini character guinea pig, I test pretty much everything on him. But he needs more work. I'm gonna finish modelling him, and Then im gonna rig him.

I want him to be a pretty worthy production asset, Im gonna be playing more with UV range and thinking about splitting maps beyond the 0-1 range.

But I have quite a few more characters/creatures i wanna work with in Houdini, this guy is the test bed. Also im gonna try and see how i can use your shader for long hair.

Long hair is pretty tough in Houdini right now. :(

Link to comment
Share on other sites

This hair model should work very well with long hairs.

If there will be any questions regarding shading setup feel free to ask here!

Oh yea im sure, ive seen your tests on vimeo, i just meant in terms of grooming long hair. Its very hard to control using the fur system.

Link to comment
Share on other sites

Long hair is pretty tough in Houdini right now. :(

I successfully used Blender to groom some long hair and use the exported curves as guides in Houdini fur tool. Blenders long hair grooming tools are fantastic, and you can't beat the price :).

M

Link to comment
Share on other sites

I successfully used Blender to groom some long hair and use the exported curves as guides in Houdini fur tool. Blenders long hair grooming tools are fantastic, and you can't beat the price :).

M

Really! Wow i thought it was only possible to do that in shave. I've envied Blender's grooming tools since Big Buck Bunny.

Cant wait to try it out.

Dunno about the price, seems like a scam :P

Link to comment
Share on other sites

  • 3 weeks later...

Ahhh i wondering if this was gonna get added. Even though you can adjust the thickness from root to tip it can still make hair look a "hard".

Once i get long hair grooming between blender and houdini working, finally i will be able to create a female with softer looking hair.

Thanks for all your hard work Sergey.

Link to comment
Share on other sites

  • 2 weeks later...

Ive been messing around some and found it a little difficult to get light-haired results without cranking up the intensity of the lights (which would over expose the model). I can use the light linker to select all the brighter lights just for the hair but I think it might come down to the parameters.

Primary, Secondary, Overall spec all have bright colours, diffuse has a decent intensity which is a ramp from a very very light grey to almost pure white. What other parameters should i be messing with?

post-666-130749343961_thumb.jpg

(btw ignore the bad hair grooming + render its all a work in progress :))

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