jinso001 Posted April 27, 2011 Share Posted April 27, 2011 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. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.