Transparency issue with jit.gl.gridshape


    Jul 24 2013 | 6:09 pm
    Hi guys,
    I am in need of a little help!
    I have created a large 5-sided cube (with a 6th, front side to be added) out of 5 flattened cubes from jit.gl.gridshape objects, and have placed a sphere inside which bounces about, reporting collisions with each face of the cube as it hits them. I am attempting to make each face transparent so that the sphere inside can be seen, but when it hits a face, I wanted that face to flash a certain colour, then return to being transparent.
    I have managed to work out the collision reporting, but I am stuck on this one transparency issue. I have searched about the forums and the only thing I’ve found is how to make a whole cube from one jit.gl.gridshape object transparent, which isn’t what I’m after as I would want to trigger each face separately. Basically just need some idea on how to make a flattened cube shape transparent so that the black areas are see-through, but colours become visible when collisions occur.
    I have posted the patch, hope it’s okay to read. Thanks in advance for any assistance given!

    • Jul 24 2013 | 8:22 pm
      Hey man, there are a couple of issues that your patch has. 1. jit.gl.material is not set to take up transparency, there is a process you need to follow to set it up. https://cycling74.com/forums/jit-gl-material-alpha-transparency-possible/
      Here is their example applied to your patch
      2. Another way to deal with it is to remove material all together and just use transparency values of the objects
      Ohh and play with blending modes attributes
      Have fun