Download

Mask model by camera vector - alternate falloff solution?

I’m working on a visual effect that needs to generate a mask where the model facing directly towards the camera is lit with a slow falloff to the models’ midpoint, and then the entire back side of the model is clamped out. Normally I’d use fresnel, but my situation requires 2-sided transparent alpha planes at angles perpendicular to the model’s surface. In short, I need to make a material that can generate a mask based on the camera’s position and the absolute world position of the model’s vertices, without any regard to the surface normal. If this can be done, any help on a solution would really be appreciated.