p_HairTK and Shave Setup


#1

Hello,

I was wondering if anyone could take the time to explain how to setup the connection between p_HairTK and Shave.

I am familiar on how to setup p_HairTK with Maya Fur following DJX’s explanation in his blog.
http://www.djx.com.au/blog/2009/04/14/p_hairtk-p_hairtk_shadow-p_shader_replacer/

I have not figured out how to get this working with shave. What exactly must be connected into the shader_replacer node from Shave. I have attempted to connected the given transform node from the shave fur but with no success.

Or is the setup for Shave/p_HairTK completely different from what David explains in his blog for the Maya Fur/p_HairTK setup?

Any feedback is greatly appreciated.

Thank you


#2

just assign the p_Hair to the actual shave node and uncheck the override geom shader on the shaveShape.
For advanced shadow tweaking place the p_HairTK_shadow to the shadow slot. Plus set the hair render mode to hair primitives on the shave globals.
If you would like to use the awesome pass rendering use the light shaders (p_SpotTK).


#3

Zerogee,

Thank you very much for the solution. Works like a charm.

Didn’t realize it was that easy to attach p_HairTK to Shave.

Cheers! :beer:


#4

p_shader_replacer is used for Maya Fur and Maya Hair only, because it’s not possible to override default shader in GUI.


#5

That’s great to know. Makes sense now.

Thanks for the reply Pavel, and thank you for your hard work on these shaders. You are a great asset to the community indeed.


#6

Does Ambient Occlusion work with built in pass system of MegaTKk_pass?

I have attached MegaTK_pass to dummy geo to setup the pass system. I have p_HairTK attached to Shave node. Seems like when I render, I get this pass for Ambient Occlusion.

Here is my setup in Hypershade. I have p_spotTK attached to my spotlight.

Any ideas on what I am doing wrong. Does the AO pass work.

To Render, I am using Rasterizer with Detail Shadow Maps. I don’t have raytracing turned on. Must Raytracing be on in order to spit out the AO pass from MegaTK_pass (Although I have tried rendering with Raytracing and still get same result? Shave settings I am using primatives with Mental Ray. Is there a setting I am missing in order to get AO pass working?

Thanks in advance.


#7

p_HairTK have no build-in occlusion. You should connect any occlusion shader you want (to “Custom Occlusion” slot).


#8

Ok, great to know…Thank’s Pavel.


#9

Sorry to bother you again Pavel…but here is an update on my progress.

I connected an Ambient Occ node to the custom slot of p_HairTK. I am still getting what seems like a blown out Occlusion as you can see in the pic. Any ideas on what may be the issue. Seems like I am starting to see some Occlusion perhaps on that image…a tiny bit but it is still blown out. When I view the image in Photoshop or After Effects it still looks the same, knowing that it is 32 bit image and all.

BTW, Here is AO pass after rendering with Rasterizer with turning Raytracing on. Occlusion starting to appear but very subtle. Have Spread set to .8 and Max distance to .1 in the mib_amb_occ node. I guess I’m getting somewhere. Still, Any other suggestions you may have would be great

Also, the alpha itself, is this normal…it looks like it renders with a straight alpha with jagged edges for certain passes like this one in particular. Other passes like diffuse, shadow and spec do render with alpha looking correct respecting transparency. Just curious.


#10

does your fur have some incandencense or ambient color set to a high number?
maybe play a bit more with the max distance and spread. I got some okay results except from some small black dots on the tips.


#11

Occlusion effect to 4 component of p_HairTK shader: Diffuse, Specular, Ambient and Indirect.
You may control amount of effect for every component.

For all components default effect == 0.5. So I suppose you just need set “Effect Ambient” to 1.
Don’t forget for Ambient Occlusion you should have “Ambient” enabled as well.
Incandencense or Lights should not effect to occlusion.


#12

Ok, thank you both,…im getting better results now. Here is render with mib_occ with spread set at higher setting. I turned the effect ambient and diffuse ambient up to 1 on p_HairTK node.

thanks.


#13

Looking good!!


#14

I used FG with a white IBL and it gave me somewhat better results than with old school occlusion.

Is there any way to bake this result into 4 textures based on the length of the hair like in Ratatouille?
see this post…


#15

It would definitely be interesting to find out if it is possible to bake occlusion result bases on length of hair. Perhaps Pavel may have some insight on how to do this or if it is currently even possible with his shader.


#16

maybe with a ramp?


#17

Please help me. How to connect to the p_HairTK the shave. shave on the link does not work p_shader_replacer. Thanks


#18

Please help me.


#19

Alibaba,

The first part of this thread pretty much answers your question. As puppet himself says…

p_shader_replacer is used for Maya Fur and Maya Hair only, because it’s not possible to override default shader in GUI.

Also, Zerogee explains how to assign pHairTK to Shave…

just assign the p_Hair to the actual shave node and uncheck the override geom shader on the shaveShape.
For advanced shadow tweaking place the p_HairTK_shadow to the shadow slot. Plus set the hair render mode to hair primitives on the shave globals.
If you would like to use the awesome pass rendering use the light shaders (p_SpotTK).

So, all you have to do is assign your pHairTK directly to Shave node. Treat pHairTK as a shader and just assign it to Shave node. Make sure to uncheck override Geometry shader.

Your scene that you included seems to have shader_replacer node with Shave but as Puppet said, shader_replacer node is meant to work for Maya Fur only since you cannot directly assign shader to maya fur.

Good luck


#20

thanks vg1
Why do I render out of occlusion pass in this way. . why
Please help me. . Thanks

You can put your e-mail sent to me through the scene to learn about it?
my e-mail:carli0215@gmail.com

Occlusion rendering your hair look very hard. Can be built up into such an effect?
This example is mattrm fake occlusion
http://mattrm.blogs.3dvf.com/2009/09/18/pourquoi-un-fastsss-because/