//****************************************************************************//
//
// Softimage XSI / Mental Ray muhHair Hair shader
//
// by Daniel "thebigMuh" Rind
//
// Version 1.01, 06.07.2004
//
//****************************************************************************//

//*********//
// HISTORY //
//*********//

Version 1.01, 06.07.2004
 - Fixed a stupid bug that caused more rays to be traced than necessary
 - Fixed a tiny bug involving detail shadows
 - Replaced cos and acos calls with lookup tables. If, against all odds, you 
   get banding, please tell me. Lookup tables are 1023 entries big, so you 
   should not get banding under normal lighting conditions.
Version 1.00, 04.07.2004
 - Initial release

//**************//
// WHAT THIS IS //
//**************//

It's a hair geometry shader for XSI 4.0 / mental ray 3.3.

No, not for 3.5. Don't ask for it, please.

//**************//
// INSTALLATION //
//**************//

Please use the enclosed muhHair.xsiaddon file to install the muhHair shader. 
Should something go wrong, you can still use the SPDL file.

//*******//
// USAGE //
//*******//

It's a hair shader, and meant to be used on hair geometry _only_. You will very
likely get odd results if you don't use it on hair geometry. The shader also
does not support the volume mode of XSI's hair primitive (yet).

The documentation is, as usual, in the doc subdirectory. This shader has
a lot of options, so please take the time and read through the docs once or twice.
Should still something go wrong, my contact info is at the end of this file.

//************//
// THE SOURCE //
//************//

The complete C source to the shader is enclosed in the "source" subdirectory,
along with a VC 6 project. You are free to do with it whatever you want, but 
should you manage to produce something usefull/interesting/nice/cool with it, 
please be so kind and give me credit. Of course, if you find any "unintentional 
features", please e-mail me so I can fix it.

//*********//
// CREDITS //
//*********//

Puh. First of all thanks to all the good people who worked on this paper:
http://graphics.stanford.edu/papers/hair/
I omitted a lot of the things they suggest in the paper, but a few of the base
ideas remain.

More thanks go to the people working with XSI hair and putting up with the 
considerable render times hair has. Hopefully my shader can help a bit.

I am a 23 years old computer science student from Vienna/Austria. I love computer
graphics (which is the field I am studying in), I love XSI, and I love Mental 
Ray, so starting to program for it was only natural ;-).

If you want to contact me, you can do so at:

thebigMuh@chello.at

or by lurking for my presence on the XSI Base (www.xsibase.com) or the
3rd-Dimension (www.3rd-d.co.uk) internet boards, and maybe even occasionally
CG Talk (www.cgtalk.com).

Eventually I might even update my homepage (www.animusartis.com).