2D Pixel Grid Effect Based on Video Shape Edges – Advice Needed

Hi everyone,

I am currently working with a high-contrast black-and-white video and I want to use the outlines of the shapes within the video to draw pixelated boxes. My goal is to highlight the boxes located on the grid of the shapes, making it appear as though they are part of a grid. It would be similar to the push pin tutorial, but in 2D and image-based. I’d like the effect to make the pixels look as if they are “turned on” based on the edges from the input video. What would be the best approach to achieve this effect, and what tools or techniques could you recommend for efficiently drawing and aligning the pixelated boxes to the shape outlines?

Thanks in advance!

I put together this based on the push pin tutorial, but I would like it to be just an image and not 3D.

Hi @nanocontroller,

not sure if I understand this correctly, but there is a pixelate component in the Palette>ImageFilters which might already be enough for your purpose.

Otherwise you could also use a Grid SOP and set its Primitive Type parameter to “Polygon”. You now have an x amount of primitives and vertices based texture coordinates. Now use a Vertex SOP and select “Add Texture” filling the mapu and mapv parameters with expressions:

me.inputVertex.prim.center.x

and

me.inputVertex.prim.center.y

This will set each vertex’s texture coordinate to the center position of the primitive the vertex belongs to effectively creating a pixelated effect. Now since uv coordinates are usually 0-1 normalized, you will either have to transform the texture with a Texture SOP or normalize size and position of the original grid.

Hope this helps
cheers
Markus
base_pixelate.tox (1.2 KB)