rob Posted March 31, 2008 Share Posted March 31, 2008 (edited) I would like to know more about the context in which some of parameters are used in the supermaterial. When used in conjunction with texture maps as I am just not sure if I am doing anything correctly. This is in respect to using a texture map ( birds feather ) that has transparency controlled via an Alpha. The parameters are arollmap aperpmap apararmap I have presumed the roll is a bias between the 2. It would be nice to be able to see a some control examples as I am getting some strange dark lines when using this shader as opposed to vex layered shader which has some of the same controls Rob Edited March 31, 2008 by rob Quote Link to comment Share on other sites More sharing options...
rob Posted April 1, 2008 Author Share Posted April 1, 2008 (edited) to illustrate my problems and a small wip of the animation wip_feather02.mov Edited April 1, 2008 by rob Quote Link to comment Share on other sites More sharing options...
old school Posted April 1, 2008 Share Posted April 1, 2008 apara controls the opacity for surface normals that are parallel to the eye (camera -I = V). aperp controls the opacity for surface normals perpendicular to the eye (camera -I = V). aroll controls the power rolloff between the two or how the opacity blends between surfaces that face the camera and those that are edge on. Greater values push the opacity to the edges. Smaller values reduce opacity as you approach the center. Given a simple sphere, apara set to 1, aperp set to 0 and aroll set to 1, you should get a nice gradual transition from a solid centre to a transparent edge. apara set to 1 and aperp set to 0 with aroll set to 0.1 will cause the transparency to have a power rolloff towards the center. Good for rendering fluffy cotton balls. Try it out on a simple sphere. Your first and second tests of apara set to 1 and aperp set to 1 will give you 100% opacity (see code below as when apara and aperp = 1, you get solid opacity). aroll will do nothing in this case The third test apara = 1, aperp = 0 and aroll set to 0 will cause strange results near the edges. I would not set aroll below say 0.01. again see the code below as you have a power of zero. This method of controlling surface opacity goes way back to the original Mantra (pre micropolygon) shaders and was a great way to control surface opacity (among other things). The texture maps simply allow you to control these parameters. Here's the code snippet from the shader (same as the Alpha Mix VOP): if (a_apara < 1 || a_aperp < 1) alpha = lerp(a_aperp, a_apara, pow(dot(Nf,V), 1.0/a_aroll)); else alpha = 1; The first if line is what invalidates your first two submitted feather tests. the second line does your typical power rolloff of the alpha as the surface normal orients away from the incident I eye vector. Quote Link to comment Share on other sites More sharing options...
rob Posted April 14, 2008 Author Share Posted April 14, 2008 (edited) Thanks for the help but I am really getting so confused with the whole material approach in houdini compared to other applications like Maya or xsi. Since I am no shader writer and only have a basic grasp of writing shaders even trying to build my own is proving very difficult as none of the shaders that are shipping are complete in any sense of the word. I am trying to make a shader that I can apply to oxygen bubbles underwater to finish off a project . I started with looking at the glass shader from the FX bubbles tool. After a deeper look I discovered its not that useful as there's no Fresnel fall off for the alpha for comp work , but it has a great slot for a envir reflection map and when you render an object say the drinking glass below you get the material from the phantom checked table material refracting. So needing to find a solution to my problem I looked instead at the layered material ,and trying to obtain a simple transparency , using the alpha perp , alpah para values , but if you ghost the the gingham checker table material you just get black for the refraction and there's no environment rfl map slot.So again this shader fails.As you can see I am really struggling to get anything anywhere near useful out of any shader ! . That's right I am pretty stuck alright and looking for some help , in getting some thing thats upto scratch. On a side note as a new relatively new user to this application , its the one area that's giving me the most frustration by far and giving me the impression to actually complete a commerical project a shader writer would be required because without one you just could not complete the job ,due to the need for the advanced knowledge required . Edited April 14, 2008 by rob Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.