blend mode, alpha, & jit.gl.texture.
i’m reposting a similar patch to one of the past posted re: how to use alpha channels to create transparency in GL.
i’m noticed that certain faces/angles of the grid shape seem to be non-transparent and i’m not sure why, nor am i sure how to rectify this..
Is there another facet to this that I’m not considering? It seems like there is some other form of distortion when the object is rotating…
if you want to draw a gridshape with transparency and back-facing polygons, your best bet is to create two identical gridshapes, set @cull_face 1 on one and @cull_face 2 on the other.
this will make one only draw front-facing polygons, and the other only draw back-facing.
you can then use the layer attribute to force the back-facing one to draw first.
----------begin_max5_patcher---------- 907.3ocyYssbZCCD8Y3qPim9XJikuB8gNteGcxvHaqXTFijqrbfzL4eu5hcJ sQPDDvvDvxVVd8YO6pUGQdY5Dub1VbqG3afeBlL4koSln6R0wj9qm3sFssnF 0pGlGEugk+n2claIvaE5tejHlUUOqhSJaWgZvfLSSQWt570LlX0RYWkDZE.B xpIUqDxyWhon7Zrpq1Bj7D+Ygu8MqfUy3x6Y9KqD2HsR+S3CxjMzxcrPQWc8 xGPEXPf7MfdFqd1LEF63X.JGM.6ZBEWv5nZrC866kTpcEo68UXvvPefQETzZ r9V+fSP0C2g1slPqwBMu.+amrNwPuA6XjVxu0FAFLa3EZFo34FrIBnXwkqQB NYq2c.OOv88CrAIJVoXKNtPXFaTfuzN.3hXcSnoIBNyGbu5gdc5T0g6bLrJX UU0XOKLQj2affK4AAl2y3pg36NW.2mSSTggC3oP+.su4GpZLts53I4m6I8sl gJyQzJaDf+YIU.djoBZzbPZApHh4pCIeNNIuSHXTKtdXp2YH95nmDDlb4hup xSrFPl762AMxAuygrmP0xxMI1HfniL1GL1kALbWnugB0F8hPdTFoECh.EqPb 4KP9wFcEeqW0rOUKdgthR.7SQWqwssnJ763KTmfsjyDHAF7EnsRJKNKoUGaI EmpxZlENWWWAN+DYl1MpWfMOGdzqlDdvbj26jxTfGjkyO7ZJooJ+qOKP6qgA m2IMMbbiTcB.yQs3kZgLV3i3qxZKNPMoQmiYHGVr3fvrLkiuq7rcHnEWsJJU 0K6AnqEgCW7lFrKFmcqHvFNHvN3zDXO+Vekhfzyp958DUEfbSEBKo9oWEJxn BF3YP0Gm0CMROhS+TI86c6GIW8cencun4WNso+R5VblTCmE2O5pHTvQE6IlM eDeAK2wk0ev1V3L7pN4vk4EQ5jkzK11Y1PnkrMVnlfadpwjxjDdASbVgnk1+ 8LtJryGyL8xui0TSpcIDZCnWa8+9I6zFT0++xWsrNdw.D5cd4x5CvnD2JUHf DD4l+2YLA+yfVQJKwzcq1VRZUEf0Tpu0.24DNyGMzj5.ZBGUz.uYPShCbSzn gl3apHUjCnIczPSnSowwiGdbJXMd4NgtDtVLdk.W3RI4wCNtvNvQjdbYIhwK YV8+B3CgSxsEbBO0ZOF0Fnllmv71dapghTG1iLt5xj6zWRnlK0VziiehLL94 SUV60o+A5eNrpC -----------end_max5_patcher-----------
Rob, if i disable the depth_enable, then if i add another object to the scene then one will cover the other independently of their Z position…
i had problems with this already… do i make something wrong, or if an object’s depth_enable is off then the only way i can place it to it’s righ place (behind another one or the camera side) if i change the layer depending on postion every render?
thanx in advance!
Hey, fwiw setting depth_enable to 1 in Rob’s example seems to give a satisfying transparency. I’m curious about this as well, i want to have a scene with several openGL objects, some of which should allow to partially see objects behind them. Is that the way to go ? With a jit.gl.texture ?
So, it seems indeed to be the way to go – feed a matrix with a minimized alpha channel to a texture, which is to be applied then.