zoukankan      html  css  js  c++  java
  • shave Hair fake occ

    the hair fake occ code from

    http://mattrm.blogs.3dvf.com/

    Hello,

    It’s really easier, it’s really a big fake. I just used the “v direction” that drive the mix of root and tips color to drive a black and white mix along the hair, with a coefficient to drive the color along the hair.
    So if you use a very furry creature, works very well because you not see the skin of the character and it’s really fast. But if you use low fur, the better result is to use PTC occlusion with a low shading rate, and a large maxisoangle.

    Here the code I putted in my hair shader (the core of fake occ) :


    float SHAVEopacity = mix( shaveOpaRoot, shaveOpaTips, (v * shaveOpaOffset));
    color OverColor = mix(OverRoot, OverTips, v);
    color fakeOcc = mix(baseOcc, tipsOcc, (v*spreadOcc)); // here the fake occ
    mixed = mix( rootcolor, tipcolor, v);

    It's a trick I explained on 3delight forum, and it's really easier, the more difficulty was just to have the idea ;-)

    Best regards,

    Matthieu

    PS : You can also use a map to control it but it's more difficult to drive it between uv space and vertex color space.

  • 相关阅读:
    SA(后缀数组)专题总结
    LCT总结
    多项式全家桶
    fft.ntt,生成函数,各种数和各种反演
    P3939 数颜色
    P1879 [USACO06NOV]玉米田Corn Fields
    主席树模板
    P2633 Count on a tree
    P1972 [SDOI2009]HH的项链
    数论
  • 原文地址:https://www.cnblogs.com/rdRoad/p/1606745.html
Copyright © 2011-2022 走看看