offseting some pixels in a plane , if between a range

Jan 20, 2013 at 5:34am

offseting some pixels in a plane , if between a range

hi all ,
i think this can be done using jit.op , but i can’t find how .
i am distorting a mesh , squeezing the z plane of a matrix .
i’ts fine i’m having fun , but , in the process , there are some voxels that aren’t acting , and i would like them to disappear .
i’m drawing points .
i don’t want to use textured alpha on these voxels (for the moment) .

i’ d like to do the following :
“voxels that are in the z range “0. –> 0.4″ get an added offset of 100 . Voxels above that z range stay the same”
the voxels in the range would go out far from the rendering area .

i don’t want the voxels to be killed , as i want to keep the same dimensions of the matrix .

here is a simple patch that may illustrate my question .
i have put 2 panels so that it is a wonder to look at it .

– Pasted Max Patch, click to expand. –

if anyone could help me , …
cheeeers

Matthieu

#66137
Jan 21, 2013 at 10:57am

bump up the jam ,
what would be the good combination of jit.op ‘s , ( maybe jit.expr is a better box ) ,
to get :
“voxels that are in the z range “0. –> 0.4″ get an added offset of 100 . Voxels above that z range stay the same”
Matthieu

#238085
Jan 21, 2013 at 7:01pm

yeah !
got it

– Pasted Max Patch, click to expand. –

possible to get this into fewer boxes ? …

anyway ,
made my dayyyyi

#238086
Jan 21, 2013 at 9:08pm

here’s how you can do this with a simple gen patch.
gives you the added bonus of easy parameter adjusting.

– Pasted Max Patch, click to expand. –
#238087
Jan 21, 2013 at 11:22pm

thanks Rob ,
a good way for me to learn some basic gen .
this increased my patch ‘ efficiency a lot !
i’m impressed !

#238088

You must be logged in to reply to this topic.