I’m trying to find a way to distort only a part of a grid. Something like the gridworm example, in a way, but more… “rectangular” and more controlled.
Or something like LinearSpread -> Cross -> ArbitraryPoint but only on a subset of the spread/matrix/transformation.
The thing is, I don’t know what is the best approach for this. Creating a Transformation Matrix ? Using GetSlice & SetSlice (3D Vector) ? Or actually, PixelShaders ?
Any ideas ? Am I missing something pretty obvious ?
you’ve lost me a little with ‘…something like LinearSpread -> Cross -> ArbitraryPoint but only on a subset of the spread/matrix/transformation.’ but GridEditor(EX9) will certainly let you distort only a part of a grid.
create the node GridEditor(EX9), select it and press F1 to get the help patch for it. All is explained.
I have tried the GridEditor, but from what I see, it lets you move single points of a grid by point&click.
I tried to look inside the GridEditor patch, but it quickly gets messy… well maybe I should lurk more ;)
See the picture in attachment for a crude simulation of what I’m trying to do. I want to move several (and always contiguous) points according to certain parameters, not manually.
Well the aim, in the end, is to distort the texture of the grid, as a very very crude way to animate a picture (or actually, any picture… I can’t prerender that).
So far, I’ve found :
- that I can modify the coordinates of a single point with Vertex (3D join) + SetSlice + VertextBuffer (join)
- that I can apply a transformation to the whole grid with ArbitraryPoint (so to do what I want I would need to work on spreads)
- that I can morph 2 shapes together… but then I would need to be able to give more or less “weight” to a shape in the morph (is that possible?)
- that vertexshaders allows to play with vertex too… but so far it sounds a little confusing
I realize that I have to dig deeper around those solutions, I was just wondering if anyone knew on which one I should focus my attention ? ;)
crude-simulation.png (2.5 kB)
I did wonder if you meant manually or auto.
CPU > I would have thought going down the Vertex Join route will work. I haven’t had much experience with vertex stuff other than digging around in a few examples.
GPU > This could def be done faster via a vertexshader but again I do have the experience to give advice as to how.
“not manually” as in “not pointing & clicking”, but accordingly to a couple of (changing) float values.
and thanks, i’ll have a look ;)
in the girlpower folder there is this “small pitch on pole” patch.
it does quite complex transformatios with the texture. the grid points are not affected only their texture coordinates.
so you can do quite complex things already with a DX9 grid and arbitrarypoint.
maybe try an attractor or an inputmorph and feed the resulting coordinates into the arbitrarypoint node(?)
In the end, the morphing (through vertexshaders) worked perfectly for what I was trying to achieve. Thanks for you help !