[vex] turn grid to sphere

grid [0] – sphere [1]

apply uv for grid while sphere should be primitive or mesh (doesn’t work with polygon option)

use swizzle to re-arrange the relative bouncing box of the grid from XYZ to XZY.

use primuv to interpolate position of sphere based on attribute “P” and apply to the grid

vector toXZY = swizzle(relbbox(0,v@P),0,2,1);
vector prim_uv = primuv(1,”P”,0, toXZY);
v@P = prim_uv;

Leave a Comment