Jump to content
ssh

Marschner hair model

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Initial images were a bit large, used attachments in the next post.

Edited by phrenzy84

Share this post


Link to post
Share on other sites

Here are a few low sample tests ive done (with my regular Houdini guinea pig :))

Stubble / 5 o' clock shadow version

post-666-130443225181_thumb.jpg

Unshaven / Rough

post-666-130443227238_thumb.jpg

George Clooney (Syriana):P

post-666-130443229378_thumb.jpg

Share this post


Link to post
Share on other sites

hey, actually that´s very cool phrenzy.

So I understand that´s the Houdini stock hair tools coupled with Sergey´s shader?

Share this post


Link to post
Share on other sites

Nice images, phrenzy!

Will he talk? :)

Share this post


Link to post
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. :(

Share this post


Link to post
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!

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Blenders long hair grooming tools are fantastic, and you can't beat the price :).

That's really interesting!

How easy is it to make a braid with such tools?

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Update:

Added opacity ramp.

May be useful to fadeout hair tips, for one thing.

Edited by ssh

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 :))

Share this post


Link to post
Share on other sites

Apologies for the double post. Here is a clearer pic.

post-666-130751596387_thumb.jpg

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×