Home Technical Talk

Creating "Comb" maps

2

Replies

  • Maph
    Options
    Offline / Send Message
    Maph polycounter lvl 8
    Mike: Hahahahah, no, you really don't at this point in time. :D 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!
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Nice one Maph!

    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
    Options
    Offline / Send Message
    Hazardous polycounter lvl 12
    I'm working on Miku's hair atm, how goes your progress maph :D:D:D
  • Maph
    Options
    Offline / Send Message
    Maph polycounter lvl 8
    Super late, but you know.

    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. :)
  • ablaine
    Options
    Offline / Send Message
    ablaine polycounter lvl 14
    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?

    Thanks in advance. :)
  • Xoliul
    Options
    Offline / Send Message
    Xoliul polycounter lvl 14
    That would require the shader and UI to be rewritten. Just have 2 materials ID's with 2 separate shaders.
  • Kurt Russell Fan Club
    Options
    Offline / Send Message
    Kurt Russell Fan Club polycounter lvl 9
    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.)

    Download: Right here

    KRFC_Xoliul_Aniso_Mod.png
  • almighty_gir
    Options
    Offline / Send Message
    almighty_gir ngon master
    you would use this shader for feathers too, right? except you'd want to paint from the stem outward?
  • poopinmymouth
    Options
    Offline / Send Message
    poopinmymouth polycounter lvl 19
    Can I have your babies Kurt!? :-)

    Yes Gir, would work for feathers very well also.
  • ablaine
    Options
    Offline / Send Message
    ablaine polycounter lvl 14
    That was some excellent timing, Kurt! Thank you. :D
  • Saman
    Options
    Offline / Send Message
    Saman polycounter lvl 13
    Awesome, some cool new features as well ;)

    Thanks, man!
  • EarthQuake
    Options
    Offline / Send Message
  • Saman
    Options
    Offline / Send Message
    Saman polycounter lvl 13
    Hey, guys! I wrote down a breakdown for the hair of my recent character. I used Maph's shader for it;
    KhandaHairWorkflow.jpg
  • womball
    Options
    Offline / Send Message
    Can you do this in photoshop?
  • EarthQuake
  • reanimate
    Options
    Offline / Send Message
    reanimate polycounter lvl 10
    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

2
Sign In or Register to comment.