Monday, 22 September 2025

make grid into sphere

 

MAKE THESE NODES PLUG THEM IN BLAM
just in case the image is dead, assuming a grid lying on XZ plane
A loose relbbox with "input" set to "First Input", plugs into a vecToFloat.
The X and Z outputs plug into the U and V of a fromPolar.
Output of fromPolar goes into a Multiply. A loose makeXForm goes into 2nd input of the multiply.

Output of Multiply goes into the GeoVopOutput P input.

I think this post explains a bit more about how this works, but the rough dummy explanation is that you're making "sort of UV coordinates based on the position of your grid" (hence the relbbox), then you move your points to the uv of the target object.

https://www.sidefx.com/forum/topic/60740/?page=1#post-272057


 

How to move point/points along a curve

Some wise words from Toadstorm on the odforce forum. 

Make your main curve, blast some points off that you want to move along this main curve..
The main curve goes into input "one" (2nd input) of both wrangles. The points wrap round too, which is cool.
Good for a stream of things moving along a curve constantly. Things to consider, different u-increment values per points.

If you want to do it manually, what you probably want to do is create a duplicate set of disconnected points via the Add SOP or whatever, and then use xyzdist() to determine their relative positions along the parametric U of the curve. This would be done in a point wrangle, with your disconnected points in input 0 and the original curve in input 1:

int posprim;
vector primuv;
float dist = xyzdist(1, @P, posprim, primuv);
f@u = primuv.x;

Then after that's been established, you can use a second wrangle with a parameter to add to that starting @u value and lock each point to the position along the curve that matches the new parametric U value:
 

float add_u = ch("add_u");
float new_u = (f@u + add_u) % 1.0; // wrap points if they go past 1.0
vector new_P = primuv(1, "P", 0, new_u);
@P = new_P;


a quick addition - it's probably worth making a new_N and getting the Normal from the curve too!
vector new_N=primuv(1,"N",0, new_u);
@P=new_N;