adding grid of points on a surface

   11002   11   2
User Avatar
Member
11 posts
Joined: Oct. 2012
Offline
Hi Guys,

what I need is basically what the scatter sop does but without the randomness, I need the points to be in a grid.

what I've tried is subdividing and then deleting not needed points.. this sort of works but I just know houdini can do it smarter..

any tips?

Attachments:
gridpoints.PNG (208.0 KB)

User Avatar
Member
166 posts
Joined: March 2013
Offline
Subdivide -> Add SOP -> “Delete geometry but keep the points” is probably the easiest and fastest way.

Points From Volume SOP does seem to work nicely though if you only have a flat grid.
User Avatar
Member
11 posts
Joined: Oct. 2012
Offline
Hi Skybar,

thanks for your input but the problem is with a subdivide is that i dont get a correct layout of the points, see image
or am i doing something wrong there?

thanks..

Attachments:
gridpointssubdiv.PNG (342.8 KB)

User Avatar
Member
166 posts
Joined: March 2013
Offline
Oh, that looks strange. You could just increase the Rows/Columns on your Grid SOP as well. Or on your Subdivide SOP, turn on “override crease weight attribute” and pull it to the max.

edit: I suppose I didn't get that you have your own geometry. In that case you can just do the above, and then Ray SOP the points on the geometry. That is, create a grid above your geo, subdivide it, make it into points, and Ray SOP in negative Y.
User Avatar
Member
789 posts
Joined: April 2020
Offline
Perhaps you can try the “bricker” options in the divide sop before deleting the polygons in the add sop.

You could group the existing points first to remove them later and only keep the new ones.

Cheers,
koen
User Avatar
Member
8594 posts
Joined: July 2007
Offline
use Divide SOP
uncheck Convex Polygons
check Bricked Polygons and adjust Size to get grid as you want
then you can remove border points

EDIT: koen was faster
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
11 posts
Joined: Oct. 2012
Offline
ray sop to the rescue!

cool thanks! didn't know about that one yet!




edit: but i'll try the other methods too, thanks guys!
User Avatar
Member
11 posts
Joined: Oct. 2012
Offline
ok, so the bricker option looks good too.

but the thing is that i'm getting geometry from maya
so this has to work on rotated geometry (see image)

I've noticed the angle option in the divide sop but I'm not sure what values are needed.. I would guess I need to use the normal of the plane and calculate this into angle values..

any tips on that?

thanks again!

(i've attached a simple setup)

Attachments:
stadiumgrid.hipnc (55.5 KB)
gridbricker.PNG (94.1 KB)

User Avatar
Member
11 posts
Joined: Oct. 2012
Offline
Hi Guys,

I've found a better solution to my problem: remesh does a good job for what i need.

but I still would like to know more about the bricker angle, i can't wrap my head around the values it needs..

well anyway thanks again!
User Avatar
Member
166 posts
Joined: March 2013
Offline
martinuz
Hi Guys,

I've found a better solution to my problem: remesh does a good job for what i need.

but I still would like to know more about the bricker angle, i can't wrap my head around the values it needs..

well anyway thanks again!
If it doesn't have to be 100% perfect you could just eyeball it
User Avatar
Member
11 posts
Joined: Oct. 2012
Offline
lol, that's what I did before I found the remesh solution.

but I'm quite anal about these things.. hehe.. :twisted:
User Avatar
Member
789 posts
Joined: April 2020
Offline
To get the direction vectors, you can use a bound sop to create an oriented bounding box. Since you know the topology of the box, you can use the point numbers to construct an local coordinate system (for example x-axis = point3.pos - point0.pos, y-axis = point4.pos - point0.pos, etc)

These you can feed into an align vop (or sop) to axis align your geometry, run the bricker , and then run the inverse. You could also just extract the rotations from the matrix you get from the vop and plug those into the divide.

Anyways, I think you should get pretty far with the align vop and sop, or look at the extract transform obj if you have a rest position.

Have fun.

Koen
  • Quick Links