Point Repack question

trying to convert a ramp of 40000x1 to a square of 200x200. thought repack is supposed to do that but it generated some alpha values as if it ran out of pixels . What am i missing?

NewProject.toe (7.7 KB)

Hi there,

I think you hit the maximum width of a TOP. Depending on your video card there is a limit to how wide (or high) a TOP can be. In my case, this is 32k (32768 pixels) and so not fully using the 40000 pixels you want to create in your rampTOP. If you press middle mouse button on the operator, you can see the actual size. (or the ‘i’ icon in the parameters of the operator).

Another way would be to use the CHOPtoTOP operator. This has an option to create a squared TOP of your channel data:

Hope this helps.
Cheers,
Tim

Hi @timgerritsen ,

yeah thats what i ended up doing but i’d rather skip any CHOP operators as the number count might go a lot higher than 40000 samples. Maybe i could just do this in GLSL by assigning the correct values to each pixel depending on its ID

Yes definitely possible to do it in a glslTOP, but you still need to communicate the values to the shader in some way or another. Where is the data coming from? Is it some kind of log of the values so the amount of values increase over time?

Anyways to get the id of the pixel (starting from the bottom left going row by row) you can use something like:

ivec2 xy = ivec2(gl_FragCoord.xy);
int index = xy.x + xy.y*int(uTDOutputInfo.res.z);

If that index is the current index you want to update, you could write a new value to the pixel, else reading it from a feedbackTOP (keeping the value of the last frame).

CHOPs can however hold quite a lot of samples.For example TouchDesigner handles a long audio wave file easily which contains way more than 40k samples

Cheers,
tim

i was working on an algorithm to check point intersections and i had a 1024x1024 texture holding all my positions. I needed to convert that texture to a 2d array then fit it to square and subtract it from a flipped version of itself to get the distances from each point to every other point (its a technique i saw from paketa12 tutorials on youtube), but even if this worked the amount of pixels far exceeds the maximum TouchDesigner allows so i guess a different approach is needed all together.
probably need to decrease the search area for each point separately and check within a distance.
anyway basically i am new to touchdesigner and didn’t know about the resolution limit.