Ghostship's superfly hair shader
-
@nagra_00_ Just did a check and replaced the mix with the add+mix as you have posted up and it makes the hair glow. I would not go this way with the shader.
-
@ghostship I know, never trust a physicist… ;-)
Hmm, thats strange. By using the MixNode the way you do the diffuse value is reduced to 50% of its physical value.
I took a quick look at the complete shader. There is a HSV node with value 2 in front of the TranslucentBsdf, which is than mixed in at 50%. This gives a 100% translucent in total. When i use translucent with clothes i use only 10-15% for it and drive the TranslucentBsdf input directly with the color map.
-
@nagra_00_ the HSV node, if I'm not mistaken, is changing the color of the image prior to being used for translucence, not upping it's amount compared to the diffuse node.
-
It's doubled. This causes glow.
-
@bagginsbill Yes I just tried that and leaving that at 1, no glow
-
This is what I've got now
-
@amethystpendant that is not how @nagra_00_ set up the add closure and with it set up as he suggests and setting that value to 1 it still glows, just not as much.
-
The setup from @amethystpendant is fine. The MixNode from my suggestion is not needed as there is already the TranslucentHSV2 node that can be used to control the amount of translucent.
-
Okay the plugin is done. I can't of course attach it here and I've forgotten how to mark text as code to preserve it. I've uploaded it as a zip to my stash on DA GhostshipHair.zip I had to zip it as DA wont allow saving .py files
Could some people test it and let me know if anything needs changing please, and let me know if any of the params are not right or obvious as to what they link to
This is what is created by default assuming there is a firefly shader there to grab the maps from (the ff shader will be left in situ.
-
@ghostship said in Ghostship's superfly hair shader:
@amethystpendant that is not how @nagra_00_ set up the add closure and with it set up as he suggests and setting that value to 1 it still glows, just not as much.
I'm not getting any glow from the shader, maybe my lights are different, I'm quite happy to change the setup it's quite easy to do
-
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.
-
@bagginsbill said in Ghostship's superfly hair 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.
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.
-
@bagginsbill said in Ghostship's superfly hair shader:
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?????
-
@amethystpendant yes
-
@ghostship said in Ghostship's superfly hair shader:
@amethystpendant yes
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.