Atom 1,209 Posted November 7, 2017 (edited) I have this oval shape that I would like to be more rounded. I have tried selecting some points and increasing the Soft Radius in the Edit SOP but that just does not give me the result I am looking for. Basically I would like to push the points out from the center sphereically. Can this be done with the Edit SOP or is there a better node for that? Edited November 7, 2017 by Atom Share this post Link to post Share on other sites
konstantin magnus 809 Posted November 7, 2017 @P = normalize(@P); //turns your mesh into a sphere Share this post Link to post Share on other sites
Atom 1,209 Posted November 7, 2017 Thanks, that kind of works but it also kind of messes up some of the edges. Does this also remove scale? It seems like my overall size diminished quite a bit. Share this post Link to post Share on other sites
konstantin magnus 809 Posted November 7, 2017 27 minutes ago, Atom said: Does this also remove scale? Yes, it places all points exactly one unit away from the world center. A compromise would be interpolating between the current state and a spherified shape. @P = lerp(@P, normalize(@P), chf('mix')); While it might lead to geometrical collisions, you can for sure create really cute baby pigs with it 1 Share this post Link to post Share on other sites
iamyog 59 Posted November 7, 2017 Not fixing the overlapping edges of course, but a revised version of the code could be vector _min, _max; getbbox(0, _min, _max); vector _ctre = _max - ((_max - _min) * 0.5); // compute centroid vector _size = _max - _ctre; // find longest distance to centroid float _radius = length(_size); @P -= _ctre; // realign to centre of the world @P = lerp(@P, normalize(@P) * _radius, ch("bias")); // spherify @P += _ctre; // reposition in world It will spherify any object wherever it is in the world while maintaining a sense of scale. 1 Share this post Link to post Share on other sites
Atom 1,209 Posted November 7, 2017 Cool, thank you both for those additional options. Share this post Link to post Share on other sites
konstantin magnus 809 Posted November 7, 2017 1 hour ago, iamyog said: It will spherify any object wherever it is in the world while maintaining a sense of scale. Useful idea. I compressed the code a little.. vector center = getbbox_center(0); float size = max(getbbox_size(0)); vector sphere = center + normalize(@P - center) * 0.5 * size; @P = lerp(@P, sphere, chf('spherify')); Share this post Link to post Share on other sites
konstantin magnus 809 Posted November 7, 2017 (edited) btw: Another option would be offsetting the spherification center. vector center = getbbox_center(0) + chv('offset'); float size = max(getbbox_size(0)); vector sphere = center + normalize(@P - center) * 0.5 * size; @P = lerp(@P, sphere, chf('spherify')); Edited November 7, 2017 by konstantin magnus added screenshot 1 Share this post Link to post Share on other sites
Atom 1,209 Posted November 8, 2017 I like the addition of the vector. It is like having an invisible metaball influence you can move around. Share this post Link to post Share on other sites