mapping colors from TOP to SOP

Hello,

Let’s say I have a 20*20px image.

I’d like to build a custom 3D geometry that would be displaying each pixel of the image.

For instance, each vertex would be linked to its corresponding texture coordinate, and rendered as a (big enough) point.

I don’t know if that’s a good idea, or if I should make a geometry (like a little box) for each pixel of the image.

Any advice ?

Thanks

One way you could do it is run your image into a top to chop which pulls one horizontal line of pixels and gives you a sample for each one. The crop tab lets you say what line of pixels you are pulling.

So you could lay down a top to chop for each line of pixels and use the samples it gives you to instance geometry and assign color.

You just need to figure out a way to assign each sample a x y position. Could be made with constant chops and beat chops or maybe written as an expression.

thank you very much.

it seems to work nicely : i can set a color to a cube by specifying its coords (X,Y in pixels frop a TOP) in a CHOP.

the main problem is now to, somehow, generate it.

Let’s say I have a 40*40 pixels image that i need to map on cubes, i can’t just copy/paste this 1600 times and change the X,Y values.

Any ideas ?

thanks

I think i am going to directly code it in openGL, using the CPlusPlus TOP.

but is there a simple way to use a SOP viewer, or something similar, to send its view matrix to my openGL code ? The idea is to be able to zoom, move and rotate the view inside the CPlusPlus TOP.

Any tip ?

Thanks !