Search - User list
Full Version: Vertex Animation For Unity - Transparency?
Root » Houdini for Realtime » Vertex Animation For Unity - Transparency?
quack_
Hey, how do I export @Alpha to use with the soft shader with LWRP?

Using VAT 2.0 in H17.5 and Unity 2019.2.16f

from reading through the generated shader code the only place where alpha shows up is for the Base Map but there is no map export option for that? I tried using color map alpha in the Base Map slot inside the unity shader to try and get some alpha to show up but it didn't do the trick.

since I don't have much experience with shader code and am not a programmer, I don't really know what to try next! scene file attached (excuse the huge mess)
mikelyndon-sesi
Hi. The shader is setup as opaque by default. If you're willing to modify the shader code the following changes will pass the Alpha through to Unity.
In SimpleLitVATSoftForwardPass.hlsl on line 149
half alpha = diffuseAlpha.a * _BaseColor.a * input.color.a;
In SimpleLitVATSoft.shader on line 73
Tags { "RenderType" = "Transparent" "Queue"="Transparent" "RenderPipeline" = "LightweightPipeline" "IgnoreProjector" = "True"}
And line 82:
Blend SrcAlpha OneMinusSrcAlpha



quack_
https://imgur.com/nfRWA7w [imgur.com]

transparency working perfectly now

may I ask why this is not in the standard workflow? is it just trivial to fix up the shader for anyone with shader coding knowledge, am I overvaluing the use case for this? from an artist POV it seems essential to have alpha for vertex animations
mikelyndon-sesi
Transparent shaders are more expensive. It’s better to have the default be opaque and make the change to transparent only when necessary.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB