jitter object outlets, gl matrix output and jit.gl.lua

Nov 9, 2007 at 1:42pm

jitter object outlets, gl matrix output and jit.gl.lua

hi-

i’m in a study group studying jit.gl.lua and advanced
processes on the manipulation of vertices…

how do you access inlets / outlets (including matrix output from jit.gl.model – or any other gl object with matrix output – for instance…) in jit.gl.lua internally via code?

we could not find a demo patch example doing anything like this.
forgive me if im wrong.

does this seem to be the best way to handle advanced manipulations of vertices in lua?

for instance, we would like to take a complex model (.obj) and have access to all the vertices for procedural manipulation…would accessing the matrix output be the way to go?

thanks,

the gl study group

ps to be clear, we would also like to know, in general, how to handle inlets and outlets from jitter objects in jit.gl.lua…

#34539
Nov 9, 2007 at 6:04pm

i think it’s something like this:

model = jit.new(“jit.gl.model”, render_context)
model.matrixoutput = 1
mat = jit.matrix(“data”)
mat = model:draw()

#116791
Nov 9, 2007 at 7:26pm

jit.gl.lua has a matrixoutput object but it’s not really functional.
It’s there because of the way jit.gl code is structured. You can use
outlet(0, “msg”) just like in JS to send data out of jit.gl.lua and
you can set the number of outlets via the numoutlets attr.

wes

On 11/9/07, Robert Ramirez wrote:
>
> i think it’s something like this:
>
> model = jit.new(“jit.gl.model”, render_context)
> model.matrixoutput = 1
> mat = jit.matrix(“data”)
> mat = model:draw()
>

#116792
Nov 14, 2007 at 9:45pm

i think brian’s question was more about connecting *internally* in jit.gl.lua…

e.g. how do you connect from the outlet of a jit.gl.slab to the right inlet of another jit.gl.slab in code?

or in the case of matrix transformations, how do you gain access to the data coming out of a jit.gl object instantiated in jit.gl.lua with matrixoutput enabled?

cheers,
mark

#116793
Nov 14, 2007 at 10:08pm

ok for slab it goes as follows:

slab = jit.new(“jit.gl.slab”, this.drawto)
slab.texture = {“tex0″, “tex1″, “tex2″}
slab:draw()

in the case of slab, the inlets correspond to textures in the list for
the texture attribute.

For matrix output, I’m not sure and I’m inclined to say it doesn’t
work because hat’s part of the maxwrapper.

wes

On 11/14/07, m. cera wrote:
>
> i think brian’s question was more about connecting *internally* in jit.gl.lua…
>
> e.g. how do you connect from the outlet of a jit.gl.slab to the right inlet of another jit.gl.slab in code?
>
> or in the case of matrix transformations, how do you gain access to the data coming out of a jit.gl object instantiated in jit.gl.lua with matrixoutput enabled?
>
> cheers,
> mark
>
>
>

#116794

You must be logged in to reply to this topic.