Jump to content
Marc

Hair revisited

Recommended Posts

spice    0

Just to give you an idea what near field means (an extreme close-up of two hairs)....

right: Marscheners model

left: (my) near field model (with indirect illumination)

post-776-1102945729.jpg

Share this post


Link to post
Share on other sites
serge    1

Arno,

Never saw the Schlick approximation before but I just got ahold of his paper from 1994 and intend to read it at some point. Looks like the approximation formula is in there and I can make an implementation from that.

As for theta there looks to be one set of them in my calculations, all based on the exterior incident angles between the hair and the eye and the hair and the light. I don't have a seperate set for the interior of the hair. It was my impression that the exterior theta determines the effective index of refraction that is used to make the subsequent calculations possible in the normal plane of the hair. And that whatever calculations need to be made, including the fresnel calculations, could be done using this effective index of refraction. Why do you ask, have you found a need for the internal incidence angle?

As for pictures, it would probably be best to get your hair sample (along with the lighting you used). Currently all of the tests that are being run are using models specific to the film project we are working on and I am not at liberty to post them (as much as I'd like to).

Cheers!

Serge

Hi Serge,

im in a hurry so I have not enough tiime to answer your question in detail... I think you use the Fresnel-Schlick approximation, right ?! The difference is not that big compared to the "real" Fresnel equation... But if you are interested, I could sent you the C-source of my optimized "real" Fresnel function...

How do you calculate theta_t (the "inclination inside the hair") ???

Cheers!

Arno

15439[/snapback]

Share this post


Link to post
Share on other sites
spice    0
Why do you ask, have you found a need for the internal incidence angle? ...

As for pictures, it would probably be best to get your hair sample (along with the lighting you used). Currently all of the tests that are being run are using models  specific to the film project we are working on and I am not at liberty to post them (as much as I'd like to).

Cheers!

Serge

15493[/snapback]

Hi Serge,

you DO need an additional theta inside the hair to compute absorption correctly !!! The modified index of refraction is used ONLY to compute the "projected path" (within the normal plane).

Of course I can send you my geometry. But I

Share this post


Link to post
Share on other sites
serge    1

Quite right. I'm just using the plain old external theta there too. I guess now would be time to take another look at the absorbtion formula given this and your other correction to it.

Cheers!

Serge

Hi Serge,

you DO need an additional theta inside the hair to compute absorption correctly !!! The modified index of refraction is used ONLY to compute the "projected path" (within the normal plane).

Of course I can send you my geometry. But I

Share this post


Link to post
Share on other sites
spice    0
Quite right. I'm just using the plain old external theta there too. I guess now would be time to take another look at the absorbtion formula given this and your other correction to it.

Cheers!

Serge

15495[/snapback]

Should we try my (Marschener implementation) code with your renderer ?? :-)

Share this post


Link to post
Share on other sites
Never saw the Schlick approximation before but I just got ahold of his paper from 1994 and intend to read it at some point. Looks like the approximation formula is in there and I can make an implementation from that.

15493[/snapback]

Hey serge,

I just thought I'd chime in in case this is of use to you: I've started sketching some info on BRDFs at the wiki, and toward the end of the page you'll see a half-finished entry on the Fresnel equations -- these are for the reflection factor for unpolarized light, including Schlick's approximation.

Cheers, and good luck with this hair thing! :)

Share this post


Link to post
Share on other sites
serge    1

Well, let me bounce this off of you. It would seem to me that the actual ray that penetrates into the hair forms a right triangle with it's projection in the normal plane and the wall of the hair. The relationship between the radius and the length of the penetrating ray is 1 / cos(theta_t). So your corrected ray path length would go from 2*cos(gamma_t) to 2*cos(gamma_t)/cos(theta_t). And since theta_t=arcsin(eta)*theta_i the whole path length in terms of gamma_t and theta_i would be:

2*cos(gamma_t) / cos(arcsin(eta) * theta_i)

What do u think?

Serge

Should we try my (Marschener implementation) code with your renderer ?? :-)

15496[/snapback]

  • Like 1

Share this post


Link to post
Share on other sites
spice    0
I wasn't suggesting that you switch to this format but merely to add a format for your renderer. I think it will help you in the future to be able render geometry output from another source anyhow. For the purposes of exchange, I think it's the easiest way.

The nice thing about .PLY is that there's already large academic repository of models. Plus, imagine the ability to process geometry in Houdini. :)

15499[/snapback]

Yes, that

Share this post


Link to post
Share on other sites
Jason    104
So if anybody out there wants sophisticated "state of the art" hair visualization dont hesitate to contact me :D 

15503[/snapback]

You'll surely get a large response from this community right here with a great desire to see the shader implemented in Mantra. :D

As for paying customers... :)

Share this post


Link to post
Share on other sites
serge    1

Yes, a little mistake in my algebra. At least my heart is in the right place. As for the faster formula, I assume you are refering to the Snell's law approximation that is in the paper.

Regarding the geometry you can send it to me. I'll see what I can do with it but I may need Jason's help for the conversion and he's out I think for the rest of this week.

Cheers! and thanks again.

Serge

Yes Serge, in principle your idea is right, but:

theta_t=arcsin(sin(theta_i)/eta) -> cos(theta_t) =cos(arcsin(sin(theta_i)/eta)) !!

But if you think hard enough, you might find a formula, which does the same, but can be computed MUCH faster.... :D

Is there anything else, you

Share this post


Link to post
Share on other sites
spice    0
As for the faster  formula, I assume you are refering to the Snell's law approximation that is in the paper.

Hi Serge,

hope we see some results of your shader soon ?! :)

No, I was not refering to the approximation Snell

Share this post


Link to post
Share on other sites
spice    0
You'll surely get a large response from this community right here with a great desire to see the shader implemented in Mantra.  :D

As for paying customers... :)

15505[/snapback]

OK, they are welcome :)

By the way: Does Mantra support a "real" cylinder primitive ? For my near field shader I need to know, where an eye ray hits the minimal enclosing cylinder (just the first intersection normal) of a hair segment.

Cheers !

Arno

Share this post


Link to post
Share on other sites
Jason    104
OK, they are welcome :)

By the way: Does Mantra support a "real" cylinder primitive ? For my near field shader I need to know, where an eye ray hits the minimal enclosing cylinder (just the first intersection normal) of a hair segment.

Cheers !

Arno

15520[/snapback]

I'm afraid not - I believe you'll have to calculate it yourself from the ribbon (curve) primitive.

Share this post


Link to post
Share on other sites
spice    0

Some other post-776-1103304702.jpgresults rendered with my near field shader (simple raytracing)... :)

left: brown hair, right: blond hair (top: one distant front light, bottom: one distant back light)

Cheers!

Arno

Share this post


Link to post
Share on other sites
deecue    1
Some other post-776-1103304702.jpgresults rendered with my near field shader (simple raytracing)... :)

left: brown hair, right: blond hair (top: one distant front light, bottom: one distant back light)

Cheers!

Arno

15551[/snapback]

is this mantra?

Share this post


Link to post
Share on other sites
spice    0

Jason has convinced me to publish a VEX version of my hair shader. I already converted the surface shader function, but since I

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

×