Posted 17 September 2004 - 02:00 PM
I was sitting here trying to think how I would render some hair when I found an old post of yours where you helped someone render their ri_curve as a tube.
Taking what you did (thank you, thank you)... I modified the lighting model to Oren-Nayar and here is the result :
image1 : default hair shader. image2 Mario's tube shader.
Do you mind if I package it up and put it on the codex? As an improved hair shader?
oh P.S. If anyone has any idea on where to start for a skin/fur shader for this guy, I'd be mighty appreciative.
Posted 17 September 2004 - 03:24 PM
Marc, on Sep 17 2004, 02:00 PM, said:
i'd get hit by a bus [accidental like]
there's a nice paper from 2004 about density lookups,
just make sure it is antialiased correctly.
Posted 17 September 2004 - 08:26 PM
But before you go putting it in the codex, do you mind if I have a look? -- 'cause I can't for the life of me remember what post you might be talking about
There is an old Renderman "Thin-tube" fur-like shader that was one of the application notes for quite a few years now. And my next little private project was to try to implement Jensen's pull-out-all-the-stops 2003 Siggraph paper version -- much better looking than the now classic Kajiya model...
I'm just curious to see what the heck I was smoking that day
At the risk of endangering someone's life at the hands of a large utility vehicle... can you at least say whether it was a siggraph paper or not, and whether it was relating to hair/fur, or to the skin part of the question?
One paper from the sig2004 proceedings that has got me really excited is the one on Shell Texture Functions... very cool stuff. Now all I need is time!...
Posted 18 September 2004 - 06:49 AM
Here's the thread : curves
Perhaps it shouldn't go up just yet . I was just so excited yesterday that I actually got something better than the default hair shader.
Posted 19 September 2004 - 06:16 PM
Oooooo.... nasssty little trick, that!
That shader doesn't even try to antialias the illumination. Instead, it fades the parametric surface coordinate s to the center position (in this case zero) as the ratio of the curve-width to the filter-size shrinks. Yikes... straight from the "l33t h@x0r sh4d1n9 mAnUa1", chapter 666.
It works... but only because illumination changes pretty gradually, and so you don't usually pick up the hack.... oh well... it is better than doing nothing at all, though
Anyway. There's also a lot of extraneous (read unnecessary) stuff in there that had to do with showing how to derive a height for displacement. The actual guts of computing the normal is just two lines of code (which I had also posted to the wiki here).
I threw together a quick VOP that you can use to produce this (mysteriously antialiased ) normal, so you can then feed it to whatever lighting model you care to invent for your hair (OrenNayar or whatever).
Here's a VOP that calcs the magical normal RiTube.zip 1.48K 648 downloads
Posted 20 September 2004 - 12:04 PM
I found this oldish link as well for you and yours.
I like the paper you pointed out as well.
I have to admit, I have a lot to learn when it comes to shading, but I'm trying my darnest to keep up:)
Posted 20 September 2004 - 02:33 PM
@kenny : I'd dug up that paper already, its pretty cool. A lot of the stuff may be a little on the overkill side for what I'm trying to achieve though .
But definitely a nice guide on what to look out for.
Besides, I never think of horses as fluffy.. They're more sleek and shiny, so I may get away with texture mapping combined with a nice shader for the specular and whatnot.
I have no idea, and I'm not very good at these things. But I've got nothing but time right now.. so I may as well play around
Posted 20 September 2004 - 09:44 PM
edward, on Sep 20 2004, 10:46 PM, said:
Something for i3d?
No need for i3d (although it could be interesting). They are implementing the scattering from a volume, but the actual local illumination for the Kajiya model isn't too complicated (and has problems). In pseudo-code:
Rdiff = Kd * sin(T,L) Rspec = Ks * pow(dot(T,L)*dot(T,V) + sin(T,L)*sin(T,V), roughness) Rfinal = Rdiff + Rspec Where: T = normalize(dPdt); // for an open poly L = normalize(L); // inside an illuminance loop V = -normalize(I); And where the expression "sin(a,b)" (where a and b are normalized vectors), can be written as sqrt(1.0-dot(a,b)^2)
And the problem is that it can look really "burned out" because it makes no distinction between front and back lighting.
Actually... I got curious so I just checked the code for the "VEX Hair" shader that ships with Houdini and it is exactly the model I just described!
So there you go... if you use the vex hair shader, you're using the Kajiya model.
Actually... not quite. The vex shader subtracts the two terms for specular reflectance instead of adding them...hmmm; I'm sure they had a good reason, but I can't look into it right now...
There are ways to take directionality into account and attenuate contributions opposite the viewing direction. Plus you can warp T along +-N to emulate the two separate specular hits that real hair has (due to the fact that it's made up of layered cones, not a simple tube). When I get some time, I'll try to post a version of this.
Posted 21 September 2004 - 08:37 PM
My point wasn't the fact of using the Kajiya model but rather to do a volumetric approach for the fine horse fur rather than using actual geometry.
Posted 24 September 2004 - 07:08 AM
edward, on Sep 22 2004, 12:37 AM, said:
Yes, I agree. For millions of very short hairs, something like that would be the way to go. I was just trying to give Marc a version of the model that he could apply "right now"... only to then realize that the model is already available in the hair shop ... oh well.
There's also a statistical (as opposed to volumetric) method that was used for 101 Dalmatians... siggraph circa ?... can't remember... I'll try to look around for it. A statistical approach may be easier on the implementation side, than the volume thing -- (but only applicable for *very* short hairs, of course).
Posted 25 September 2004 - 06:02 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users