Forums > Jitter

debris & jit.gen & jit.gl.pix

August 7, 2012 | 9:56 pm

Hi, I made a gen port of the Recipe 27: Debris.
Now, with jit.gen it works perfectly, but when I port this in gl world it lose the pixel aesthetic that I love so much.

Why?

Here are the two patch.

NO GL patch

– Pasted Max Patch, click to expand. –

GL patch

– Pasted Max Patch, click to expand. –

August 7, 2012 | 10:37 pm

nice work!

The GL version is smoothed because of linear interpolation of your "story" matrix, which is much smaller than the image. If you setup nearest filtering on that matrix, you’ll get the hard pixel edges:

– Pasted Max Patch, click to expand. –

August 7, 2012 | 11:41 pm

oh, great! but it still too smoothed, don’t you agree?

the matrix also miss a @adapt 1 flag to work correctly.

– Pasted Max Patch, click to expand. –

August 7, 2012 | 11:59 pm

Looks like I forgot one input:

– Pasted Max Patch, click to expand. –

August 8, 2012 | 12:07 pm

Excellent, was hoping someone would do this. Nice work!


August 8, 2012 | 6:10 pm

Sweet! Glad to see you digging into this stuff. Pretty simple Gen patch too! Another solution would be just to resize that matrix input to be 640×480.


August 8, 2012 | 8:27 pm

Great! I’m happy you enjoy my work!


August 8, 2012 | 8:53 pm

But, exist a way to integrate the nearest filter in jit.gl.pix?


August 8, 2012 | 8:56 pm

nearest in gl.pix depends on the filter mode of the texture it’s sampling. This is why I set @filter nearest in the patches I posted.


August 9, 2012 | 6:55 pm

Nice & simple. Thanks!


October 7, 2012 | 5:57 pm

Hi, I keep working on this, I wish to make a full GL patch, so, at this time i’ve got some unexpected behavior, instead of pixels I get crosses!!!

O_O

Why? I can’t figure out, can you?

– Pasted Max Patch, click to expand. –

October 12, 2012 | 6:03 pm

Can I do an UP ? :P


October 13, 2012 | 3:05 am

nearest in gl.pix depends on the filter mode of the texture it’s sampling. This is why I set @filter nearest in the patches I posted.

____________________________________________________________________________________

[url=http://www.reliabletop.es]Producto Chino[/url]
[url=http://www.reliabletop.es/-tablet-pc_c37]Tablet PC [/url]


October 13, 2012 | 9:19 am

This is exactly what Wesley Smith said about the nearest stuff question…

I repeat the problem:

Hi, I keep working on this, I wish to make a full GL patch, so, at this time i’ve got some unexpected behavior, instead of pixels I get crosses!!!

O_O

Why? I can’t figure out, can you?

– Pasted Max Patch, click to expand. –

October 15, 2012 | 9:26 pm

Hiya,
Not sure exactly what was going on there, but I took some time to simplify things a little and lean a little more on jit.gl.pix to do the heavy lifting in the patch. You will notice that the jit.gl.pix object that was converting rgb2luma now handles both the current frame and the previous one and packs the luminance maps together into a single texture (like using jit.pack). Also, it uses the built-in vector "dot" operation which is just a little more efficient and easier to read. Instead of downsampling the textures going into the main jit.gl.pix object, I use the "blocks" param to do a pixelated sample of the incoming textures. It’s a pretty simple idea once you get how it works, and it really simplifies the patch. I hope this helps.

Andrew

– Pasted Max Patch, click to expand. –

October 16, 2012 | 2:31 pm

Wow!
Great, to know math is essential.
And I also like the way you use planes.
Thank you very much!

At this point, is texuring and slabbing before the luma conversion useless? Or is better because translate the works on the gpu before the shader?


Viewing 16 posts - 1 through 16 (of 16 total)