p_HairTK with p_shader_replacer update
A few months back I wrote about using puppet's p_shader_replacer to override maya's fur shading with the p_HairTK shader. I discovered a strange anomaly that I thought would be worth a mention. But for the rest of this post to make sense you need to know how the p_shader_replacer works. If you don't, have a look here.
So here's the thing: The name of the object that holds the geometry shader and the name of the furFeedback node actually matter. Specifically, the name of the object that holds the geometry shader needs to come before the name of the furFeedback node from an alphabetical ordering point of view. And in this case capital letters come before lowercase.
So this works: pCube1 , polySurface1_FurFeedback - because "pC" comes before "po"
but this does not: pCube1 , PolySurface1_FurFeedback - because "pC" comes after "Po"
and this works: ApCube1 , PolySurface1_FurFeedback - since "A" comes before "P"
Easy once you know, but if you don't then depending on your naming some of your fur will just ignore the p_HairTK.
I'm currently using shaders_p v.3.3 beta 11 for Maya 2010 (win64) and find that p_HairTK is very stable, often quicker to render than maya fur and has better shading attributes. An especially interesting, and welcome benefit is that it fixes the NaN (black pixels) problem that seems to haunt maya fur.
Thanks for these great posts on p_HairTK!!! I've found them to be very useful in my work.
I'm currently struggling to get the p_hair_mapping node working so that I can texture/shade along the length of a fur strand. Like for example, using a ramp to shade the hair Red Green Blue from the root to the tip. I found a few vaugue descriptions online, but nothing explaining exactly which connections to make like you offer in your blog posts. Any help would be greatly appreciated.
Comment by andyg3d — May 29, 2010 @ 3:39 am
p_hair_mapping is a replacement for the place2dTexture node. So you can create a ramp and delete the place2dTexture node. Then connect the p_hair_mapping.outValue to the ramp.vCoord. Then you can connect the ramp to the p_HairTK. If you want to use the ramp to shade all the way from root to tip then you would need to connect the ramp to both Diffuse Root and Diffuse Tip.
Some interesting results can be achieved by switching the p_hair_mapping mode from "length" to "width".
Comment by david — June 15, 2010 @ 12:06 am