jit.noise to jit.gl.mesh, staying centered

Jan 22, 2014 at 11:42pm

jit.noise to jit.gl.mesh, staying centered

Hi!

This is surely a stupid problem, but I’ve been dying to get a handle on processing 3D geometry and keep running into this issue. I want to play with jit.gl.mesh by feeding it generative matrices. It likes float32 3 plane matrices as input for its vertex array so I’ve been trying to create those and then run them through jit.ops. Very important is also to interpolate the values via something like jit.slide, but when I do a slide and crank up slide_down, the whole thing becomes tiny and recedes to the upper right corner of the screen, and slide_up to the lower left. Does anybody know the best way to avoid this? Ideally, when you crank up slide_down, the noisey mass would stay roughly the same size but just kind of undulate softly instead of explodish-ly.

[mod - removed uncompressed patch]

#278922
Jan 28, 2014 at 6:46am

hi,
Yo should use copy compressed, to post patches here…

#279347
Feb 3, 2014 at 12:57pm

jit.noise creates random values between 0 and 1.
if you want to keep that centered using gl.mesh and the default gl.render view, simply pass through a jit.expr or jit.op chain.
eg: jit.expr @expr in[0]*2-1, which scales the values to -1 to 1

#279996

You must be logged in to reply to this topic.