The Shading of Hair

December 20, 2007

Been reading tons of stuff about hair, mainly papers from Kajiya and the much later presentation from Thorsten Scheuermann (ATI Research).

From goofing around with the equations to finally buckling-down to implement the attempt using simple tools like Blender to create the geometry and then export the vertices to a render tool like RenderMonkey, I thought I had all the materials ready. Unfortunately, the geometry I generated did not have the tangent data which was required in the fragment shader. To state it simply, I was royally screwed.

What I basically had was the position, normal and some texcoord data. Plus two textures for skinning and masking. With that on the table, the only option was to re-think the phenomena and re-state the formula according to what was available.

The first try failed, it came out just like an ordinary texture splatted on a polygon.

The second was even worse, the specular made it like plastic.

I’ll try again this weekend.

 

ref: Martin Koster, J¨org Haber, Hans-Peter Seidel

Advertisements

Random Thought Dumps

December 15, 2007

Like any accounting clerk would do to a ledger during closing, I would foot the column with a total amount. Then moving the total from the subsidiary ledger up to the control account.  Just like clockwork, I would do the same and here it goes now.

I’ve been using Irrlicht for so many things, mainly to educate myself of the inner workings of a simple elegant implementation. Though Ogre3D would have been nicer if not for that thing I couldn’t install. Anyway, the choice was already made and I stuck my aim and bet some of the bling to Irrlicht. Rolled the dice and found myself in good company, among the nice fellas who congregate the forums. Day and night I would visit the place like a devotee holding a candle in the still of the night, praying endlessly to the almighty 3D gods. And yes, one night they threw their sights on me and gave me enlightenement. The 3D Buddha has been found, he lives! Arise O Peppi, you have arisen for you are not dead.

 Adding SpiderMonkey binding to Irr was probably the best damn thing I ever did, simply because the guy who wrote the Lua binding has moved-on to other things. Perhaps he figured there was no glory in coding a binding, scripting engines do not make a rock star programmer, but only those who make the shiny things attract the bling-bling. That’s basically how consumers react to shiny things, though. Bling-bling gets attracted to shiny things resulting to newfound utility.


Accounting: Epilogue Part I

December 14, 2007

Tim entered the classroom for the last time, about fifteen minutes late, to be exact and he wasn’t apologetic either. He walked to his usual spot, in front of the class, and said “the traffic was horrible!”

He brought several items with him, and we were wondering what was inside the glossy paper bag, could it be the grand prize, the prize the winner of the contest will bring home? That could only be it, there is no other reason why Tim would do it any other way.

Tim raised the bag and said “This is it, the big prize, only to the group who answers the toughest question.”

While Tim went on to discuss the mechanics of the contest, my mind wandered again, taking me several weeks back. Flashbacks of the cool and happy moments started rolling-in, the moments he would ask tricky questions to any student, and he would throw a piece of candy from his usual spot, launching it from his arm to the lucky student sitting somewhere in the room. Another unforgettable moment was when students would question him about his explanation and try to pin him down to the exacting  grammatical rules of spoken language. Sometimes, even professors make linguistic mistakes, too, you know. And he would easily escape from it like a slippery toad from a clenched hand.

I was pulled-back to reality, the vignette is now gone, this is reality now. Tim is now looking at his laptop screen calling out names, he is organizing the sitting arrangement. He called my name, “you go to group One, in front.” So I waved to my seatmate and off I went to sit in front. Sitting next to Mr.Salinsky who happened to also aced several tests, “now I know you Mr.Salinsky, I’ve never seen you this close before Mr.Salinsky. You’re the one who managed to ace those quizzes? This time Mr.Salinsky, we’re going to be teammates. Now who’s going to be the wingman?”

I threw my eyes up a couple vectors away, from there my view of group one was flawless. I see several geeky classmates sitting in group one as well. “So, what Tim is up to this time?” But then group two has their geeks too, as well as three and four! “Hmmm, Tim has evenly distributed the geeks, eh. Now it gets even more challenging.”

I gave out a huge shout inside my head….

Mua-Ha-HA-HA!

When Tim gave his final number and all students were finally re-seated, Tim clasped his hands and motioned the start of the contest.