How can you achieve the effect seen in games like Honkai Star Rail where characters' hair is semi-transparent, allowing their eyes to be visible?Example pic
>>988776She's my waifu I saw her first
>>988776It likely involves things like multi-pass depth stencil test and rendering the eyes twice sorted so the 'eye-ontop of hair' is rendered after the opaque eyes and hair.
>>988820And how do you go about doing that?
>>988854DirectX is what I'm familiar with and it that case the official HLSL documentation can be found at Microsoft Docs. Exactly how the shader needs to be implemented depends on what package you're in tho. berried You write each pixelshader/fragmentprogram you need and call them in order from 'pass{}' within 'teqnique{}'.But each software tend to handle depthstencils and appdata a bit different so the details of exactly what you need to accessrequires you to get familiar with how your engine works.Usually this isn't well documented but you can piece together most of it by dissecting working shaders that does something adjacentto what you're trying to achieve and read old forum posts where people who have had similar ideas in the past have had it answered.Only the answer is a few pages down after 12 people argue about why the poster even wants an answer to their question.It's just the nature of the game. You will need lot of patience tenacity and prob a bit of savvy too to get into doing custom things like this.
is the hair transparent just for the eyes/brows or for anything behind it?
>>988858It's never a easy solution, huh?Aside from me crying, do you think someone could do this in like maya or some other tool like that? I'm guessing you'd have to write your own custom rendering engine to achieve the same results. Either that or use some custom shading.
>>988864It can be done in Maya, your over thinking on the basic principles for lighting and shading. https://www.youtube.com/watch?v=j_x4sHWZqvg&t=574
>>988864There's no need for an entire offline renderer. Most rendering engines allow GLSL/OSL shaders
>>988776Since eevee doesn't have depth buffer manipulation in the default distribution blender users usually do this by making the front of the hair marginally transparent and the eyes death ray emissive. Emissive materials are generally used as a way to force shadeless looking materials in PBR scenarios.
>>988776Go learn japanese then read the many japanese books on this very technique Now go kys.