Generating and managing GL shapes
Help me conceptualise something. I’m trying to do the following:
A bang generates a 3D shape (a cube) which will animate for a while, time out and then die. Any number of 3D shapes can be generated independent of each other.
Not necessarily looking for code just tips on how this might be done.
i’m not sure why you think the jit.p.* objects won’t allow you to be flexible the the 3d shape. they simply output matrices, which can be position values for anything.
the conventional solution is to use jit.p with jit.gl.multiple, and the 3d shape can be anything that is compatible with jit.gl.multiple. you can enable/disable shapes using the scale parameter.
i wouldn’t worry about dynamically changing the number of voices. simply allocate the most you will ever need, and use the @enable attribute to turn shapes on and off.
here’s a little patch demonstrating the p objects with gl.multiple and gl.model:
----------begin_max5_patcher---------- 870.3oc0X9sjZBCEF+Z8oHCWaYRBxerW4SQuoyNNQIpwECzPPscm8cugDbEa 2Ux.BidiLDhIe4WNjy2g2FOxYY5IZtC36feBFM5swiFoaprgQU2OxYO4zpDR ttaNb5wzk6blXdjjdRpaNIkDumlmCftnyOLiHWskw2rPPWIMyANB5Bm.7P5K Hn9BF4BAuT8mVmxkbxdpdT+AUDS3jyCHKV2pZ9+FFdtQdwdFOgJ0xCUaTxY+ QOJHrZR9nuoEx+syllj+NiZDoiC3kxm793wk+LoajYGS5tmHErS.OvZEmjdX fMLZpgQdAslQntyH7WwH0xZgYY4LoGH1lD28owzDv70rDJHtX0qtwDJXtZNo BFIYQ4iAd2fiHCGmVEjMq0bDE8bywhDIKKg1Lp7B0WlgZMoB+TRguKjpW3SF Y0q.DXd5504TI.CluqXe1k3pDFmtJsfq+Gd23k1p2VmU+fMeXKPn+yYvl.rj v23zHg7Ljo8gXS+T9.e7N3OuIhfvUmv2Uj308PFXujvKScE0bLAJn5slYsFA Owo5xbOvx2xKrfSdc01zSblr5gT.+KNofP.tYzEVgrVSNum4.r7srCDKhufc 1V9CNkJKQgrg9+Yunpr+25nZSfSvGo0KS02hiovc2ezvU0hx63VBO91NGMfI JriANHXOF4z93EY5lM2b8aRgi8tXswqtouZqvYWFEghGppXVP4jkIz51W9zE uk6+rRSp2wP.IXIfJH4Mu7MldCl11M+vdbu23AC3XVI2S97K0lnHE32HdLmZ Dz55OC5wCMz34devwQFON8npz8bB41epiqJZB62VBMc.Bf5iiWETdLUzLf5r uOzCKfHRonf0LBB5JBtcc0k6LKNxhkaKaMHxsUETVtXzSn1cJ6R0eMjrVuVz eqg+4awp4QY6WSv7zBwpyCUUxEvEhDSyUStR.o7Z8I3p9rkEGS40y8DyxKSG E+0kCZqZhrPMkUrMPxIzF438XImAUMnGF0DXAaBGL03agZlNXpwyB0fGL0fQ 1DFeczUupGnM3Y3hjwVHmnASMHqNzY.0iusQOCjdlZgdFtTDHahdPvgSOV8x t+voGXOlC0XFijkcfJxqFRsRTFW2kp82ENQeKiatUOhNB5A149aZgHTlYkJm rEBi6zSQANiKmm2G+WfUl+TL -----------end_max5_patcher-----------
Forums > Jitter