View Full Version : p_HairTK and shave

07 July 2009, 09:43 PM
Hey guys

I tryed the puppet Hair shader with shave. So far everything works cool, but I need to tweak the Tip and rootcolor in a special way....
Witch means that I can define when or where the RootColor is blending in to the Tipcolor. for example that the rootcolor blends not after 50% but after 70% or 90% in to the Tipcolor. So basicly like the transparancy atributes...

Is there maybe a workaround aor a way to get the UV information from the Hairgeometrie..
to be able to map a Ramp... Puppet :) any Idea?

Thx for any help :)

07 July 2009, 06:56 AM
Yes, you may map your hairs with any ramp texture
You just need to use p_hair_mapping shader. You should connect it to your Ramp node.
Like on this image:

07 July 2009, 02:15 PM
Maaaaannnnnn :)))) You are my F***cking Hair Master.
That is absolutly perfect!

Last question... I'm right now not on my own PC so can't check it.... But as I remember
there was no posibility to output Object or Wordnormals for the Fur... (with shave)
Or am I wrong...? Can you give me a little hint :)

thx so much man, that helped allot!

07 July 2009, 02:27 PM
oh another one, hehe
did you ever got it managed to export Mi file for the Hairgeometrie (inbuild mentalray maya2009) since Maya2009 has now the renderproxies... theoretical, it should be posibel :)
so that you don't have to export all the hairshit again just for tuning lighting. Of course MR standalone can do that... But I'm here on crapy Maya2009 only.

12 December 2009, 08:01 AM
thanks puppet

but i can't understand shading network.

how connect ramp1 to p_HairTK shader?
is it already connect "check-texture" in P_hairtk.rootcolor and p_hairTk.tipcolor ?

ramp1.outcolor ->P_hairTK.(?)

i want to know "ramp1.outcolor ->P_hairTK.(?)" connection.

12 December 2009, 08:26 AM
In current example it's 'Ambient'. But Checker is on 'Diffuse Root' and 'Tip'.

12 December 2009, 02:20 AM
In current example it's 'Ambient'. But Checker is on 'Diffuse Root' and 'Tip'.

thanks a lot Puppet

it's a great shader!! ^_^

04 April 2010, 11:00 AM
Is it possible to plug a ramp into the diffuse tip root or both, and then to map the colors of the ramp with different textures, essentially being able to map infinite levels of the hair. So far using the current setup i haven't been able to do this, if anyone knows im very curious.

04 April 2010, 07:34 AM
im having problems mapping a texture to anything in this shader, nothing works, even a simple checker map on a sphere wont plug into the hair attributes properly.

04 April 2010, 07:59 AM
ok, put here the scene.

04 April 2010, 08:25 AM
Test scene uploaded. Im using maya 2009 by the way. Its using shave.

04 April 2010, 08:33 AM
But everyhting works fine in your scene!
Make shave scale smaller and rise hair density- u will see it clear.

04 April 2010, 08:19 PM
must be something to do with a setting ive changed in maya 2009. I tried it in 2010 and it works now... odd.

Thanks for your help!

07 July 2010, 12:03 PM
Hi everyone,
I'm also having problems applying maps to tip/root - nothing works, including maya native ramps, checkers, etc. p_HairTK seems lighting fast and I don't wanna give up on it, and since Maya 2009 is my only option, maybe someone knows any workarounds? Btw, I'm on x64.

Thanks in advance

07 July 2010, 01:26 PM
Hi everyone,
just wanted to report that upgrading to service pack 1a solved the problem I had with mapping attributes.

And big thanks to Pavel for amazing shader!


09 September 2010, 04:19 PM
thats a great thread great replies
just downloaded service pack 1 now

10 October 2010, 07:35 PM
Yes, you may map your hairs with any ramp texture
You just need to use p_hair_mapping shader. You should connect it to your Ramp node.
Like on this image:

Is this possible inside 3ds max?

10 October 2010, 10:55 AM
OK, i was able to figured that out... converting the float output of p_hair_mapping to color and then using it as a grayscale map in the "mapped" option of the gradient ramp in max.

Another question! When i use p_MegaTK shader where the specular is set to Fast Fur Specular on a shave& haircut with the option to render with mray hair primitive, max crashes... i think it has something to do with the tangents that're used to break the specular, but this (breaking the specular) and the ability to control the specular rotation is why i was trying to use it... any workarounds?

01 January 2011, 02:29 PM
Hello I just installed P_ shaders pack on Maya 2011, now when I try render a shave system I get this error:

// Error: *Fatal* (mental ray) : mental ray encountered a fatal error. The system may have become unstable. Please save the scene and exit Maya. //
// Error: (Mayatomr.Output) : failed during mental ray rendering: mental ray abort //

I think it has something to do with this new parameter:
- p_HairTK: Added 'Visible for FG' parameter

sometime mental ray does not crash but it does not render fur either, and give me an error complaining that it can't find visible_for_fg parameter.

have anyone ran into this problem before? any fixes?


01 January 2011, 01:47 AM
Hi Puppet...
Could you please give more detail on how everything is connected to get the checker material coming through.
I've tried connecting a checker to the diffuse root and tip, but I just get this:

I'm using shave and the 3.3 p_HairTK shader.

thanks in advance

01 January 2011, 02:46 AM
Hey Guys,

I'm having the same issue as Stellios was having. I just opened his scene, pumped up the hair count and rendered, and I'm not getting correct "mapping" of the checker.

I'm using maya2011 and the 3.3 shaders

can anyone advise as to what I'm doing wrong?

I'm using Windows, Maya 2011, shave and p_HairTK v3.3.
I have a character with different coloured hair on various parts of his body.
I've tried assigning the normal UV mapped shader to "diffuse root" and "diffuse tip" but am having no luck getting correctly 'mapped' colours.

So I went back to basics: Made a sphere, gave it hair, assigned the p_HairTK, added a standard "checker" to "diffuse root" and "diffuse tip" hoping to get hair colouration matching the checker pattern, however I get really random results!
I've seen the example image buried on Puppet's site, however there are no real instructions on how he achieved this:

This is all I'm getting:

I've tried scaling the "place2dTexture" which changes the result, but doesn't give me the correct one.


01 January 2011, 09:55 PM
This issue is a p_shaders bug only with maya 2011 as you can see in this thread:

11 November 2011, 01:27 AM
But everyhting works fine in your scene!
Make shave scale smaller and rise hair density- u will see it clear.

I am using that same scene in Maya 2012 with Shave 6 and the hair does get the colour from the checker pattern but it does not get the pattern itself, the black and white colours from the checker is randomly applied on all the hair.

I'm getting the same thing when using a file texture. Where exactly am I supposed to plug in the outValue of p_hair_mapping if I'm using a file texture for colour?

Thanks for any help!

11 November 2011, 01:38 AM
Ok I think I shouldn't have tried using p_hair_mapping when using a texture.. but still no results.. :(

11 November 2011, 07:48 AM
If you have problem with texturing of Shave, you should try enable 'FixShaveUV' option in 'Extra Attributes' tab of p_HairTK (version 3.3 and higher).

10 October 2012, 10:38 AM
i am new in p_hairTk and it works gr8 (thanks for the puppet)
but i am having the problem with assigning texture mapping with p_hairtk.
this is maya render
and it doesn't takeover the p_hairtk (i don't know why)

this one is mental ray and it does
which is very nice for me on this stage (everything is default)

but the problem is when i apply the uv texture map to the p_hairtk (ok i already said that)

thanks God this thread is still running and i follow the method like set the filter type off but still stuck
also i want to active the "fix shave uv" in extra attribute but in my p_hairtk its only lights under the extra attribute.
PS: i recently downloaded puppet shader (so there is no way to download again for updates)

11 November 2012, 08:25 PM
so i did some work on fur and it looks fine for me but when i put some spot light on it it gets bad.
here is without spot light

and this one is with 3 spot light

spot light setting is just a
1) depth map shadow
2) in mental ray shadow section "use mental ray shadow map overrides
3) shave shadows "resolution 1500 and fuzz 30"

11 November 2012, 09:23 PM
after i sample up to 4 and softness to 0.1 it look like this

looks like dark shades are gone but it still not looks so good and the render time is high.
7min to 31min.
any advice

11 November 2012, 08:40 PM
when rendering in mray....follow these rules

Set the mray in render globals to preset "Rapid Fur" or "Rapid Hair" (the later is better quality but longer render time so start with fur preset)

it will switch to rasterizer mode and also turn off raytracing (fast rendering with depthmaps)

Use least possible amount of spot lights and aim them properly on your furry character (just slightly bigger spot enclosing just the model not the rest of your scene)

Set your shadows on spotlight to depthmap and in mentalray options "detail maps" watch out for shadowmap bias its really sensitive and its really important to have set properly to see any shadows in your render use values like 0.001 not like standard 0.2 for normal lights resp. depthmaps.

This should give you good starting point for experimenting with shadowmap size, bias settings etc.

For final rendering you will need two different renders just for geometry and another with just the hair (you can use raytracing and GI for models and rasterizer without any raytracing just for fur and hair) and comp them togheter later in post. This will give speed and a lot of possibilities for finetunning.

Hope this helped a bit.


11 November 2012, 08:02 AM
Some info about using pHair_TK you can find here:
And example scene with fur here:

11 November 2012, 08:31 AM
thanks libor for the answer and i am gonna try this today and thanks kiryha for the links i used 1st link and it help me a lot but for some reason or should i say some bug in maya 2011 it is not working for me but the 2nd link was new for me. i am gonna check this and see how far i can go.
thanks anyway.
also i did some more render and it changes thing but 1st i am gonna try libor method and then post both result. i hope you guys help me with this.
thanks again.

11 November 2012, 08:18 PM
thanks libor
after follow your settings (this was pretty much my setting too but i missed the preset to rapid fur) this is my result and yeah the render time is still killing me. 34min with 2k and 8min with 640*480.

i took many days and your answer is help me a lot. still working on it and would be appreciated if you give me more advice.

11 November 2012, 03:40 PM
Ok small resume (made test myself in maya to be sure)...

1) make simple test scene (make Sphere, apply some Shave/preset when creating)
2) create simple SpotLight and set it to aim on the sphere (turn depthmap shadows, go to mentalray options and switch from regular shadows to "detail" also tick on "get settings from maya" (should switch to value of 512)...change values to 1024, bias 0.001
3)go to mentalray globals (RenderGlobals window) switch to mray preset in quality menu for "RapidFur", you can change resolution also to something higher than default 640x480 for ie 1280x720
go to ShaveGlobals and check if shave rendering mode is set to "HairPrimitives"..could be "Buffer" if so switch to hairprimitives so its true geometry for hair

4)select your ShaveHair and change options for haircount to something like 3000, also hairpasses to 1 (the more passes the more time it will take, usually 1-2 are ok extremes 3-4) so leave for now on 1
5)make test render it should take several seconds (something like 5-15seconds) not minutes!
You can duplicate that spotlight and made some contra light for rim light effect or fill (usually you dont need more than two lights for nice rendering of your hair

6) experiment with shadowmap size/bias value, also with hair thickness and number of dafault the values could be a bit wrong because of scale of your object on which the hair are...

good values for Sphere (radius 5 units) are root thickness: 0.2 tip: 0.02

Then just play and put more and more complexity (several shave nodes for different locations, much more hair count or more hairpasses for more soft look)

P.S. send me your email and I will send you example scene and some jpg for playing with it...I cant put it anywhere as a link to download so thats the only way


11 November 2012, 08:08 PM
i did some of these settings and the result is little bit clear to me but when i put some lights on it then i don't know how to tweak settings but thanks for the info (more like tutorial) and i am gonna try this. also my email is and i will appreciated if you mail me some more detail.
thanks ones again.

11 November 2012, 08:45 PM
I have just sent you a test example scene (Maya 2011)...

Let me know how things going and if you have any further questions.


11 November 2012, 09:00 PM
i tweak some setting and render it out and did many more renders but the result is same (not so good) i get the black part of fur little bit right but the white part of the fur is killing me.
i open your file but the problem is there is error and fur is not showing but i check the lights setting.
i am gonna import your file and see if the hair show up.

this is the last render.

one of friend light settings result

my many renders but the problem is i don't know which part of lights and rendering setting to tweak.

CGTalk Moderation
11 November 2012, 09:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.