Is there a way to randomise the Length field in the Resample SOP?
I've got a bunch of curves radiating out and I want to have a random resample distance per point.
What I have done is oversample it and then delete points randomly but this creates loads of extra geo and is still somewhat random.
The length of the curves changes so using Density in Scatter doesn't do the trick. I want to utilise the resample distance so I have a more or less stable number of points per area.
Thanks
Simon
Randomize Resample
5088 5 1- Simon Russell
- Member
- 164 posts
- Joined: Feb. 2014
- Offline
- Konstantin Magnus
- Member
- 670 posts
- Joined: Sept. 2013
- Offline
How about moving the points after you have created them?
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
- Simon Russell
- Member
- 164 posts
- Joined: Feb. 2014
- Offline
Konstantin Magnus
How about moving the points after you have created them?
That would certainly be an option. How would I go about doing that?
They can't just jitter, they'd need to stay on the curve.
I can imagine you could create a UV for the curve, measure where the point is then offset a little but not quite sure technically what this would look like.
Edited by Simon Russell - Feb. 16, 2017 04:46:28
- tamte
- Member
- 8449 posts
- Joined: July 2007
- Online
point wrangle
then create needed parms
there is sample geo parm to optionally sample other geo than the first input
so if your curve in first input is already resampled polygon, then the offset points will follow this linear polygonal edges
therefore you can plug smooth NURBS version to second input and set samplegeo to 1 to sample that instead
then create needed parms
there is sample geo parm to optionally sample other geo than the first input
so if your curve in first input is already resampled polygon, then the offset points will follow this linear polygonal edges
therefore you can plug smooth NURBS version to second input and set samplegeo to 1 to sample that instead
int samplegeo = chi("samplegeo"); float uoffset = chf("uoffset"); int seed = chi("seed"); int pid; vector puv; xyzdist(samplegeo, @P, pid, puv); uoffset *= fit01(random(set(@ptnum, seed,0)), -.5, .5); puv.x = (puv.x + uoffset) % 1; v@P = primuv(samplegeo, "P", pid, puv);
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- Aizatulin
- Member
- 470 posts
- Joined: July 2005
- Offline
- Simon Russell
- Member
- 164 posts
- Joined: Feb. 2014
- Offline
-
- Quick Links