Jump to content
aracid

transparency in VEX surface shader

Recommended Posts

hey all

im basically trying to create a shader that the opacity is based on the surface normal, just like water. simple eh <_<

in houdini theres a vex_super material that does the exact thing i want, with the alpha para and perp. etc

an example of this for those who are also using maya, it's just the sampler info node that does this.

but im tryin to do this with my own shader

so if anyone could just tell me how they do that, it would be great.

btw, ive really tried, but my results are ;)

all the best

aracid :blink:

Share this post


Link to post
Share on other sites

Try looking at the code for the VEX Super Material SHOP. Right-click on it in the network editor and choose Type Properties. Then go to the VEX Code tab.

Share this post


Link to post
Share on other sites

Basicly this done using dot product of N and -I. Both vectors must be normalized. To control falloff use pow function.

So classic RMC glow shader looks like:

opacity=pow(clamp(normalize(N).normalize(-I), 0, 1), falloff);

clamp used for drop off backfaces

Share this post


Link to post
Share on other sites

hey there edward and renderfox

thats exactly what i was looking for,

and thanks for the vex code tip aswell.

all the best

aracid :blink:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×