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.

  • 相关阅读:
    poj 1037 三维dp
    poj 3311 floyd+dfs或状态压缩dp 两种方法
    HDU 5761 物理题
    HDU 5752
    Codeforces Round #328 (Div. 2) C 数学
    cakephp中sql查询大于
    cakephp获取最后一条sql语句
    iconv()错误
    sql时间戳转日期格式
    接口报错
  • 原文地址:https://www.cnblogs.com/rdRoad/p/1606745.html
Copyright © 2011-2022 走看看