Mike: Hahahahah, no, you really don't at this point in time. I'm a terribly messy coder at the start of projects.
In any case, it's just a tweaked standard Kajiya Kay specular powered to some factor and then smoothstepped to control the sharpness.
Funkies & Haz: I'll try and get an alpha version out soon. There are still some scenarios I need to test out and add some more general features like tweaking the shading model of the hair, add linear color space support, shadows, fake translucency, etc...
CW: Thanks! Interesting thoughts on using splines to define tangent direction based on geometry, but that leaves a lot to be desired when it comes to workflow then being able to just paint it. The latter case wont't be 100% correct mathematically of course, but if it looks good, it is good I always say.
But I dunno, trying to crack this nut is going to be tough one for whoever takes it upon him/herself!
If you don't mind me asking, what terms are you using for the Diffuse and Specular? If you plan in making the light information Normal Map dependent, as opposed to a single channel a la Kaj, then I suggest Adding the Tangent and Normal Map and Normalizing them, or just ditching it totally and going with a generic Aniso setup instead, it will cost 4 instructions more, but it won't 'glance' the highlight at angles.
Also, how do you plan on keeping the 'sharpness' of the highlights in a tweakable manner? I tried using a Smoothstep, but even at 'open' values, it dulls my highlight and makes it slightly smaller, did you find a magic formula?
Also, do you plan on using a Half-Lambert term for the Diffuse or go with a full SSS?
Lastly, are you going for a two terms specular or something else? I suggest 3 if possible, you'll see why in the long run.
Ace: Specular is Kajiya Kay-based and the diffuse term is a really soft half lambert (scale: 0.75, bias: 0.25). It works for now, and maybe in the long run I'll look into transmission or SSS, depending on what Max allows me to do. I'm not worried about instruction count as you shouldn't use this shader in a game, it's merely meant for presentation in Max.
The softness of both the primary and secondary highlihts is controlled individually. I'll have to look at the formula as I don't have it on hand right now.
2 specular is fine for now as I'm keeping it a bit at the standard Marschner observations. But I'll give triple spec a go at some point.
Quick question... I'm using Xoliul Shader 2 for the character I'm currently working on, but after reading this thread, I now want to use the custom Xoliul Shader with a comb map so I can have anisotropic specular for the hair. The body/hair are one mesh so I can't just apply two separate materials.
Is there any way to blend between two directx materials using a black/white mask that would allow me to use the standard XS2 for everything else and use the custom XS2 for the hair, allowing this blended material to display in the viewport?
Is there a better way to do this?
And has there been any recent progress on that hair shader, Maph?
I've uploaded a new version of the Xoliul mod that fixes up a number of issues with the shader. Thanks Saman for kicking me off my butt to fix them
I don't think it's quite as nice as Maph's (I think Maph's uses a blended specular and mine is additive).
ablaine: I've added that feature to this mod, so you can plug a black/white image into the Anisotropy texture input to fade the anisotropy in and out. (The image below shows it in use.)
sorry to necro this thread again. but just want to let people know that you can do this in Krita. Although by default it's a flow map, you just need to invert the green channel for direction map https://www.youtube.com/watch?v=193e1uzzGAk
Replies
In any case, it's just a tweaked standard Kajiya Kay specular powered to some factor and then smoothstepped to control the sharpness.
Funkies & Haz: I'll try and get an alpha version out soon. There are still some scenarios I need to test out and add some more general features like tweaking the shading model of the hair, add linear color space support, shadows, fake translucency, etc...
CW: Thanks! Interesting thoughts on using splines to define tangent direction based on geometry, but that leaves a lot to be desired when it comes to workflow then being able to just paint it. The latter case wont't be 100% correct mathematically of course, but if it looks good, it is good I always say.
But I dunno, trying to crack this nut is going to be tough one for whoever takes it upon him/herself!
If you don't mind me asking, what terms are you using for the Diffuse and Specular? If you plan in making the light information Normal Map dependent, as opposed to a single channel a la Kaj, then I suggest Adding the Tangent and Normal Map and Normalizing them, or just ditching it totally and going with a generic Aniso setup instead, it will cost 4 instructions more, but it won't 'glance' the highlight at angles.
Also, how do you plan on keeping the 'sharpness' of the highlights in a tweakable manner? I tried using a Smoothstep, but even at 'open' values, it dulls my highlight and makes it slightly smaller, did you find a magic formula?
Also, do you plan on using a Half-Lambert term for the Diffuse or go with a full SSS?
Lastly, are you going for a two terms specular or something else? I suggest 3 if possible, you'll see why in the long run.
Hazardous: see PM
Ace: Specular is Kajiya Kay-based and the diffuse term is a really soft half lambert (scale: 0.75, bias: 0.25). It works for now, and maybe in the long run I'll look into transmission or SSS, depending on what Max allows me to do. I'm not worried about instruction count as you shouldn't use this shader in a game, it's merely meant for presentation in Max.
The softness of both the primary and secondary highlihts is controlled individually. I'll have to look at the formula as I don't have it on hand right now.
2 specular is fine for now as I'm keeping it a bit at the standard Marschner observations. But I'll give triple spec a go at some point.
Is there any way to blend between two directx materials using a black/white mask that would allow me to use the standard XS2 for everything else and use the custom XS2 for the hair, allowing this blended material to display in the viewport?
Is there a better way to do this?
And has there been any recent progress on that hair shader, Maph?
Thanks in advance.
I don't think it's quite as nice as Maph's (I think Maph's uses a blended specular and mine is additive).
ablaine: I've added that feature to this mod, so you can plug a black/white image into the Anisotropy texture input to fade the anisotropy in and out. (The image below shows it in use.)
Download: Right here
Yes Gir, would work for feathers very well also.
Thanks, man!
Although by default it's a flow map, you just need to invert the green channel for direction map
https://www.youtube.com/watch?v=193e1uzzGAk