p_HairTK and Shave Setup


#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/


#21

Attached on the scene. Thanks again


#22

I’ve been experimenting with the p_hair_with shave. It’s great, and renders faster than the normal shader. But then i go and try to map a color texture to the root and tip attributes, but the diffuse color comes out really really dark. It doesn’t look like the shader is reading the color texture at all. Am I making some noobish mistake?? I’m using standard maya file texture and a *jpg file. Any solutions?


#23

I’m not sure. I too am having some problems using color maps with p_hairTK. I seem to be losing a lot of detail when I plug color maps into the diffuse root and fiffuse tip of p_hairTK.

Here is a sample of what I am talking about.

As you can see, the black line going down from the nose to the mouth area is almost lost when I use p_hairTK.

I am not sure what I am doing wrong.

Here are my settings:
rasterizer (rapid hair)
rasterizer quality samples 7
detailed shadow maps
2 spots (regular spots but also used p_spotTK to see if that made difference but did not)

I like what I get using only Shave but I would really like to use p_hairTK to take advantage of using the p_megaTK pass system for fur and need to resolve this problem to do so. Any ideas would be greatly appreciated.


#24

I haven’t had any problems mapping color maps to the diffuse root and tip colors so far. The image looks like the tip isn’t getting the texture. Try turning off all the other attrs like specular and ambient to see if the diffuse starts showing up better, or to see if the issue causing it becomes apparent. Just a thought.

The problem I’m having is with mapping a texture length wise along the length of each fur strand. As far as I can tell this can be done with the p_hair_mapping node. But I can’t figure out how to set up the connections. Say I want to use a ramp with p_hair_mapping. How do I connect them to the p_HairTK node? Please help. Been trying web searches but I’m only finding vaugue posts to go off, and they’re not helping. Thanks!


#25

agredbeard,

I believe you need to hook up p_hair_mapping outvalue to the U or V coords of your ramp. Then connect your ramp outcolor to the diffuse root and diffuse tip or p_hairTK.

Here is screen shot of my crappy setup of sphere and shave with p_hair_mapping and p_hairTK. Here, I just plugged the outvalue of p_hair_mapping into the V coord of the ramp. Then I plugged the outcolor or ramp into the diffuse and tip of p_hairTK.

if you have a texture in your diffuse and tip already, you can plug the outvalue of ramp into the ambient slot of p_hairTK. That is what Pavel did in this post.

http://forums.cgsociety.org/showthread.php?t=786803

Hope this helps. If it does not, I will try to help you figure it out.


#26

Also, thanks for replying to my problem of colormaps not showing up properly with p_hairTK node. I tried unchecking everything like you said except for ‘enable diffuse’, but still no luck. Still looks the same.

Any other ideas would be greatly appreciated.


#27

Thanks vg1!!! :thumbsup: I HAD been trying to get it to show up in the Ambient ala that post by Puppet. But, it wouldn’t work until I hooked it up to the diffuse root and tip. Maybe I missed something? But the effect in the diffuse works too.

I’ll see if I can reproduce the problem you’re getting with the texture in the diffuse root and tip.

Have you ever tried doing the same thing with p_hair_mapping but plugged into Transparency? I’m wondering if I can get a shape transparency-cut out of the hair “cards” (wide tip and root width). I’m Trying to make some Feather-like fur. Working on maya fur here at work. Will probably try feathers with Shave instancing too at some point when i get home.