# Ghostship's superfly hair shader

• Everybody keeps saying "my shader" but doesn't show it.

Let me explain something, but quickly, with math.

A mix node at .5 with inputs A and B is producing .5A + .5B
Suppose you make A equal to Translucent(2 * Texture)
And you make B equal to Diffuse(2 * Texture)
You have
.5 * (Translucent(2 * Texture)) + .5 * (Diffuse(2 * Texture))

But using 2 * Texture as input to linear nodes (both of Translucent and Diffuse are linear) can be logically rearranged as:

.5 * (2 * Translucent(Texture)) + .5 * (2 * Diffuse(Texture))

And given that p * (q * r) is same as (p * q) * r, this is

(.5 * 2) * Translucent(Texture) + (.5 * 2) * Diffuse(Texture)

Now everybody should recognize that .5 * 2 is 1, and that 1 * X is X. Therefore the above simplifies to

Translucent(Texture) + Diffuse(Texture)

Which is same as using an Add instead of a Mix.

The doubling of Value was providing enough compensation to counteract the 1/2 effect of the Mix node, thus effectively making it an Add node.

You may have been doing that all along. I don't know.

• @bagginsbill I think when we (or at least I) are referring to "your shader" we are meaning your uber hair shader, and when referring to you saying about add node for tran / diffuse we mean the excellent example you gave of why it should be add and not mix or modulated by rays in that same thread before you went on to develop the shader

• I was almost quoting others who said something like "In my shader, I'm not getting glow" and by "my" I mean whoever said that, not literally me, bagginsbill. Sorry for the confusion.

Anyway the point is that maybe ghostship's shader was not wrong, because .5 * 2 is 1. It's unnecessarily complicated to use a mix with two doublers instead of just an add, but it does produce exactly the same result.

• I was almost quoting others who said something like "In my shader, I'm not getting glow" and by "my" I mean whoever said that, not literally me, bagginsbill. Sorry for the confusion.

Anyway the point is that maybe ghostship's shader was not wrong, because .5 * 2 is 1. It's unnecessarily complicated to use a mix with two doublers instead of just an add, but it does produce exactly the same result.

Ah that would be me, but I have shown my shader :) and I am using an add rather than a half doubled mix.

• I'm not reading with care. Kind of distracted with work. Been that way for months.

• Anyway the point is that maybe ghostship's shader was not wrong, because .5 * 2 is 1. It's unnecessarily complicated to use a mix with two doublers instead of just an add, but it does produce exactly the same result.

Not really, from the pics of the shader setup there is no doubling for the diffuse input. So we had translucent + .5*diffuse

• Anyone want to try the plugin?????

• Well, so far one person has downloaded it, and they haven't given any feedback...

• @amethystpendant oh, I did not see that you had it for upload somewhere. let me get it.

• @amethystpendant I could not get it to run. I stuck the DOTPY file into my scripts menu along with ezskin and such and it did not want to run. I am still on an old version of Poser 11.0.7.33999 so that might be a problem for me?

• @amethystpendant I could not get it to run. I stuck the DOTPY file into my scripts menu along with ezskin and such and it did not want to run. I am still on an old version of Poser 11.0.7.33999 so that might be a problem for me?

Ahhh, if that's the case, I'll have to wait to try it out, as that's the version I'm still running.

• @amethystpendant I could not get it to run. I stuck the DOTPY file into my scripts menu along with ezskin and such and it did not want to run. I am still on an old version of Poser 11.0.7.33999 so that might be a problem for me?

You need to go into EzSkin3 and click the spanner button and set a path in the "Custom shader engines" set a path where plugins will be stored, easiest if it is a subfolder of where EZSkin3.py is stored, then copy the GhostshipHair.py into that foldr then it will be available as an Ezskin3 plugin as an alternative to "superfly" and "Firefly" titled "Ghostships hair shader by AP"

But at least thats now 2 people who've downloaded it :(

• @amethystpendant Ohhhhh, if that works for Ghostship, then I'll been able to play with it too.

• here is what I got with the script compared to the default shader that I use. The script makes the hair glow a bit.

• @ghostship It makes the hair look more gold than blonde.

• Thought you said you had a Superfly Hair Shader in this thread.

• @eclark1849 lol hold your horses. Rick James is on his way!

• here is what I got with the script compared to the default shader that I use. The script makes the hair glow a bit.

If we look at the shader that gets created by the script with the defaults, because we are, correctly, using the addmix to decide whether a ray is dealt with as diffuse (forward) or translucent (backwards) we are telling the renderer that any ray coming from behind will pass through, coloured by the mesh. Obviously that is not true to reality as hair is not 100% translucent. The fix for that is not, I believe, to use a MixClosure favouring diffuse, but to use the value of the hsv2 node connected to the translucent hsv and or darken the colour chip of that hsv to reduce the amount of light that appears to be coming through. I'll run some tests when I get home, unless someone beats me to it :)

• Well, 'color' me interested!