Jump to content

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:

Link to comment
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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...