Transparency on jit.gl.gridshape with gl_color
Hi There,
In a little Patch:
I was trying to change the Transparency of a texture of a jit.gl.gridshape object. So i was expecting the Test Pattern should get invisible through setting the Alpha value of gl_color from 0. to 1. or vice versa.
So i am wondering if there is something missing in my patch or is it impossible to adjust the Transparency of the Test Pattern through the Alpha Value of gl_color???
Hope anybody can give me a Hint...

Best Regards
C.
disable depth on your transparent object (@depth_enable 0)
Thanks for your reply!
I tried to set @depth_enable = 0 on the jit.gl.gridshape object in my Patch:
But transparency still does not responds when i change the alpha Value.
I modified the patch above with replacing the jit.gl.gridshape to jit.gl.videoplane:
In this patch changing the Alpha Value does change the transparency how it should. But i would need to get it to work with jit.gl.gridshape to use it with jit.gl.multiple:
or if it works setting Alpha values of multiple spheres:
Any Ideas?
I am still having troubles with the Alpha channel of jit.gl.gridshape in my Patch
Changing the Alpha value should change the Transparency of jit.gl.gridshape (@shape plane).
Is anybody able to give me a hint how to fix it?
both the patches you posted are working as expected in both gl2 and gl3 from what I can tell. adjusting the alpha component of the color attribute adjusts the transparency of the object. I'm not sure what you are seeing or expecting that is different.
For example in this patch:
changing the Alpha value to 0.0 i would expect, that the displayed red rectangle should be completly transparent, but it is still visible as you can see here:
OS version, Max version, glengine version and GPU specs please
[edit] - Ok I am now able to reproduce with gl3 engine and jit.gl.gridshape if lighting is enabled. Not sure what is going on there but we'll take a look.
for now you can workaround by using jit.gl.material for shading instead:
Windows 10 Pro (21H2)
Max Version 8.3.1
gl3
OpenGL Version 4.6.0 NVIDIA 512.92, GLSL Version 4.60 NVIDIA
{
"version" : "Version 8.3.1 (f487da5cc84) (x64 windows)",
"platform" : "windows",
"arch" : "x64",
"osversion" : "Microsoft Windows 10 Professional (build 19044), 64-bit",
"samplerate" : 44100,
"iovs" : 512,
"sigvs" : 64,
"scheduler_in_audio_interrupt" : "off",
"audio_drivername" : "ad_mme",
"audio_driver_subname" : "",
"license" : "permanent full",
"machine_id" : "36250225b4c135bd7f3515821d89ad23",
"eventinterval" : 2,
"schedinterval" : 1.0,
"overdrive" : "off",
"pollthrottle" : 30,
"queuethrottle" : 10,
"sysqelemthrottle" : 1000,
"refreshrate" : 33.333332061767578,
"schedslop" : 25.0,
"eventprobing" : 0,
"mixerparallel" : "off",
"mixercrossfade" : 0,
"mixerlatency" : 30.0,
"mixerramptime" : 10.0,
"videoengine" : "viddll",
"glengine" : "gl3",
"packages" : {
"BEAP" : "1.0.4",
"gl3" : "0.3.1",
"jit.mo" : "1.1.6",
"Jitter Tools" : "1.0.3",
"max-mxj" : "8.2.0",
"maxforlive-elements" : "1.0.6",
"min-devkit" : "0.6.0",
"Mira" : "1.2.1",
"Node for Max" : "2.0.4",
"VIDDLL" : "1.2.7",
"Video & Graphics" : "7.2.0",
"Vizzie" : "2.2.1"
}
}
cool, thanks, I edited my reply above as your reply was posted, please take a look
Alright, does work with the workaround now!
Thanks a lot!
hi rob,
i m trying to do this basic thing as well with alpha on a simple sphere, in Glcore, but in js.
With light enable for the sphere, strangely the parameter gl_color for the alpha seems to take only negative value to work, means you have to send 0.5 0.5 0.5 -0.5, for instance.
i went from that patch above to make the comparison
Is it something normal, or am i doing something wrong here?
the js code :
nevermind i also use jit.gl.material go around.
but still interested to know about what going on with gl_color
you should be able to get what your expected behavior by setting sphere.auto_material = 0
Hello, I have a similar problem-- I've been using opacity 0 in the erase_color attribute of jit.world to draw shapes without erasing them on every change. This no longer works after Max 8.1, and I cannot install versions prior to 8.2 on my current machine without encountering other errors. Please advise!
{
"boxes" : [ {
"box" : {
"maxclass" : "newobj",
"text" : "loadmess 0.",
"numoutlets" : 1,
"id" : "obj-23",
"outlettype" : [ "" ],
"patching_rect" : [ 487.0, 205.0, 73.0, 22.0 ],
"numinlets" : 1
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "loadmess 1",
"numoutlets" : 1,
"id" : "obj-20",
"outlettype" : [ "" ],
"patching_rect" : [ 433.0, 300.0, 70.0, 22.0 ],
"numinlets" : 1
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "loadbang",
"numoutlets" : 1,
"id" : "obj-53",
"outlettype" : [ "bang" ],
"patching_rect" : [ 318.0, 202.0, 58.0, 22.0 ],
"numinlets" : 1
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "gl_color 1 1 1 1",
"numoutlets" : 1,
"id" : "obj-50",
"outlettype" : [ "" ],
"patching_rect" : [ 311.0, 234.0, 91.0, 22.0 ],
"numinlets" : 2
}
}
, {
"box" : {
"maxclass" : "flonum",
"numoutlets" : 2,
"id" : "obj-12",
"parameter_enable" : 0,
"outlettype" : [ "", "bang" ],
"format" : 6,
"patching_rect" : [ 548.0, 234.0, 50.0, 22.0 ],
"numinlets" : 1
}
}
, {
"box" : {
"maxclass" : "flonum",
"numoutlets" : 2,
"id" : "obj-9",
"parameter_enable" : 0,
"outlettype" : [ "", "bang" ],
"format" : 6,
"patching_rect" : [ 474.0, 242.0, 50.0, 22.0 ],
"numinlets" : 1
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "pak f f",
"numoutlets" : 1,
"id" : "obj-6",
"outlettype" : [ "" ],
"patching_rect" : [ 528.0, 272.0, 41.0, 22.0 ],
"numinlets" : 2
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "erase_color $1 $1 $1 $2",
"numoutlets" : 1,
"id" : "obj-4",
"outlettype" : [ "" ],
"patching_rect" : [ 532.0, 307.0, 138.0, 22.0 ],
"numinlets" : 2
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "loadbang",
"numoutlets" : 1,
"id" : "obj-38",
"outlettype" : [ "bang" ],
"patching_rect" : [ 206.5, 135.916649580001831, 83.0, 22.0 ],
"numinlets" : 1
}
}
, {
"box" : {
"maxclass" : "flonum",
"numoutlets" : 2,
"id" : "obj-14",
"parameter_enable" : 0,
"outlettype" : [ "", "bang" ],
"format" : 6,
"patching_rect" : [ 114.0, 133.499982833862305, 80.208332180976868, 22.0 ],
"numinlets" : 1
}
}
, {
"box" : {
"maxclass" : "flonum",
"numoutlets" : 2,
"id" : "obj-10",
"parameter_enable" : 0,
"outlettype" : [ "", "bang" ],
"format" : 6,
"patching_rect" : [ 22.791667819023132, 133.499982833862305, 80.208332180976868, 22.0 ],
"numinlets" : 1
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "pak f f",
"numoutlets" : 1,
"id" : "obj-5",
"outlettype" : [ "" ],
"patching_rect" : [ 64.0, 171.499982833862305, 58.0, 22.0 ],
"numinlets" : 2
}
}
, {
"box" : {
"maxclass" : "toggle",
"numoutlets" : 1,
"id" : "obj-13",
"parameter_enable" : 0,
"outlettype" : [ "int" ],
"patching_rect" : [ 459.0, 339.0, 24.0, 24.0 ],
"numinlets" : 1
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "jit.world y",
"numoutlets" : 3,
"id" : "obj-1",
"outlettype" : [ "jit_matrix", "bang", "" ],
"patching_rect" : [ 485.395833909511566, 498.0, 59.0, 22.0 ],
"numinlets" : 1
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "scale 0.1 0.1",
"numoutlets" : 1,
"id" : "obj-22",
"fontsize" : 18.0,
"outlettype" : [ "" ],
"fontname" : "Arial",
"patching_rect" : [ 206.5, 175.624986052513123, 111.0, 29.0 ],
"numinlets" : 2
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "position $1 $2 0.",
"numoutlets" : 1,
"id" : "obj-16",
"fontsize" : 18.0,
"outlettype" : [ "" ],
"fontname" : "Arial",
"patching_rect" : [ 64.0, 207.499982833862305, 141.0, 29.0 ],
"numinlets" : 2
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "jit.gl.gridshape y @shape sphere",
"numoutlets" : 2,
"id" : "obj-7",
"fontsize" : 18.0,
"outlettype" : [ "jit_matrix", "" ],
"fontname" : "Arial",
"patching_rect" : [ 6.0, 257.499982833862305, 271.0, 29.0 ],
"numinlets" : 1
}
}
],
"lines" : [ {
"patchline" : {
"source" : [ "obj-50", 0 ],
"destination" : [ "obj-7", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-22", 0 ],
"destination" : [ "obj-7", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-16", 0 ],
"destination" : [ "obj-7", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-4", 0 ],
"destination" : [ "obj-1", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-13", 0 ],
"destination" : [ "obj-1", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-10", 0 ],
"destination" : [ "obj-5", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-12", 0 ],
"destination" : [ "obj-6", 1 ]
}
}
, {
"patchline" : {
"source" : [ "obj-14", 0 ],
"destination" : [ "obj-5", 1 ]
}
}
, {
"patchline" : {
"source" : [ "obj-20", 0 ],
"destination" : [ "obj-13", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-23", 0 ],
"destination" : [ "obj-12", 0 ],
"order" : 0
}
}
, {
"patchline" : {
"source" : [ "obj-23", 0 ],
"destination" : [ "obj-9", 0 ],
"order" : 1
}
}
, {
"patchline" : {
"source" : [ "obj-38", 0 ],
"destination" : [ "obj-22", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-5", 0 ],
"destination" : [ "obj-16", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-53", 0 ],
"destination" : [ "obj-50", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-6", 0 ],
"destination" : [ "obj-4", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-9", 0 ],
"destination" : [ "obj-6", 0 ]
}
}
],
"appversion" : {
"major" : 8,
"minor" : 2,
"revision" : 2,
"architecture" : "x64",
"modernui" : 1
}
,
"classnamespace" : "box"
}