jit.gl.material – alpha transparency possible?

Dec 28, 2011 at 1:56am

jit.gl.material – alpha transparency possible?

is it possible to use load a texture with an alpha channel into jit.gl.material so that it renders transparent areas?

I assumed that it might have something to do with the shader attribute of jit.gl.material, so:

On this thread, Wesley Smith provided a link to a patch with some demo alpha channel shaders:

http://cycling74.com/forums/topic.php?id=7428

here’s the link:

http://www.mat.ucsb.edu/~whsmith/DepthTransparent.zip)

the shaders work in Max 6 (they generate an error, but they work) – so I would have thought that if I set the shader attribute of a jit.gl.material object to a jit.gl.shader @file mat.alpha.jxs, then objects using that material would have the same transparency – no luck.

Advice?

#60881
Dec 28, 2011 at 5:54am

jit.gl.material in its current incarnation sums that alpha of the emissive, ambient, diffuse, and specular components. Arguably, it should ignore the emissive and ambient components when calculating the alpha channel, but in its current incarnation it doesn’t, so you may need to explicitly set them to 0 to get alpha effects. Here’s an example:

– Pasted Max Patch, click to expand. –

The shader attribute of jit.gl.material has no effect. jit.gl.material generates a shader internally.

#219203
Feb 18, 2012 at 12:56pm

Thank you Wesley. I have been oh so much wanting transparency support like this with textures when in 5.x it just didn’t work well in Windows on videoplanes.

I’ve immediately started using it in my current project.

#219204

You must be logged in to reply to this topic.