XaiJu
entagma
entagma

patreon


VEX101 - Pixel Sorting

Surely you've seen those gloriously glitchy images over the past years. They are the result of different algorithms but one of the more popular ones is called Pixel Sorting.

For each line (or column) in an image, we sort it's pixel's brightness - this results in those interesting, slightly off patterns.

In today's tutorial we'll go over how to build a pixel sorter in VEX.

VEX101 - Pixel Sorting

Comments

Hi Entagma, newbie question here. Is there any way to cull out parts in order to achieve something like this https://sinnephi.tumblr.com/post/132719610279/modempunk-jdabstraction-my-dream-youre . Or in other words extract each colour tone in an output separately?

Mirabela Vasilie

Thank you very much for this video and for the whole course! The expectation of learning pixel sorting technique kept me motivated through all the previous parts :) I am new to Houdini and have a question regarding rendering in Mantra. When I hit render, I get a very bleak picture of low quality. What settings do I need to change to get the result similar to what we get in the viewport?

Anastasia

Heyhey, how did you read out the started-values in the spreadsheet? Cheers, Mo

Entagma

Did you found a way? i animated the v@P.y using $FF but its jittery

Alkaid D'arooGa

Hi there ! First of all thank you so much for your courses, they are really cool and well explained :) I guess it will be a stupid question but there is something I don't get, within the code you tell houdini to make started = 1 if started == 0 and brightness >= startval (which is 0.2 at the moment). But when I check the spreadsheet it triggers "started" at 1 even if the brightness value is 0.0037... in another hand a value with 0.0048 doesn't get a started = 1. Why is that ? Is there something I’m missing or a concept/logic I don’t get ? Thank you very much for your answer and sorry for bothering you with newbie questions. Regards.

Alexandre NGUYEN

same here. This series started so good with good explanation about basic stuff. And then it just went. This is array and let`s just go mad with it. would be nice if the examples just got more complex gradually. As after watching this one I just feel like I understand less... I think I need to get my understanding about arrays and foreach loops elsewhere and then come back to these tutorials.

Jānis Čudars

Sorry newbie question: the intro scene shows the pixel moving. how do we fade the three images as you have done in the intro as a simulation? Thanks

Akarsh Sabhaney

Thanks for all these illuminating tutorials! I had a question, not strictly related to this particular tutorial, but to arrays in general. The manipulation of data in arrays seem to be a fairly common use for VEX wrangle nodes. It seems it would make life much easier for VEX coders, and make the code much more elegant and readable if VEX offered Array functions which could take functions as arguments. I'm thinking of functions that one could find in Ruby, Javascript, Python, etc.. such as map(), include(), reduce(), find(), filter(), etc... which give to the programmers built-in functions to manipulate and extract data from arrays with a very concise, intuitive and flexible interface. I was thinking of creating a small library to emulate these in VEX, but it seems that passing a function as an argument is forbidden. Would you have any suggestion? Would creating such a library involve using Houdini' SDK with C++? Or do you know of such a library which already exists? Thanks again guys for your time and dedication!

Loïc Seigland

Yes, indeed! I believe those are perception based - however there are a few quite interesting variations on this. For example in BW photography, when you put a blue/green filter in front of your lens (thus increasing the amount of blue light contributing to your greyscale image) you'd end up with high contrast skin in portrait photography: <a href="https://i.pinimg.com/originals/34/86/4d/34864d91ed652cb5283bc5f9dc6dd972.jpg" rel="nofollow noopener" target="_blank">https://i.pinimg.com/originals/34/86/4d/34864d91ed652cb5283bc5f9dc6dd972.jpg</a>

Entagma

And for the luminance / greyscale conversion i Google-stumbled upon this article that I found very interesting: <a href="http://www.tannerhelland.com/3643/grayscale-image-algorithm-vb6/" rel="nofollow noopener" target="_blank">http://www.tannerhelland.com/3643/grayscale-image-algorithm-vb6/</a> Instead of using Gray = (Red + Green + Blue) / 3 he recommends a few variation on the formula that resembles this one: Gray = (Red * 0.2126 + Green * 0.7152 + Blue * 0.0722)

Mr Racecar

Hi Manish, does it work now? Just checked in Chrome and there's no problem when switching to fullscreen. Which browser are you using? Cheers, Mo

Entagma

It not allowing me to make fullscreen.

Manish Singh

COuld we make this fullscreen please?

Manish Singh

A really good explanation of Pixel Sorting and a very good way to make us, the students, practice our arrays ;)

Mr Racecar

I feel the info giving in this tut are flowing out of my brain, im trying to store them in array in my brain but its too much indexes to store in one array , I have to rewatch this tut 200 times to fully understand what happen :) thank you for this tut. I also learned a lot from a tutorial called space colonisation in entagma Vimeo chancel. it kinda helped me to understand the array a little bit more after I rewatch it everyday for a week,

Ash


More Creators