Jump to content

Is there a way to create uniform, evenly sized voronoi pieces in H13?


magneto

Recommended Posts

Hi,

 

Is it possible to create voronoi pieces like this for a 3d geometry without inner pieces, but evenly sized and distributed:

 

m8ShKFh.png

 

Does this require one to be able to uniformly scatter points on a 3d geometry which Scatter SOP can't?

 

Either way I would appreciate some pointers.

 

 

Thanks :)

Link to comment
Share on other sites

Thanks papicrunch. No my object is not a grid unfortunately. I posted that pic because I couldn't find anything else :)

 

But still grid or not, this would require a uniform distribution of points, right?

 

How do you guys do this in Houdini since there is no way to do this using the Scatter. Scatter + Fuse trick works only to a degree and is not as high quality as a true uniform point scatterer.

Link to comment
Share on other sites

I usually do just pointcloud lookip in pointwrangle or anything VEX/VOP based to separate points based on their mutual distances, then repeat it multiple times within Foreach SOP  to get stable iteration

and if you need it on the object just reproject it back every iteration

  • Like 1
Link to comment
Share on other sites

Thanks anim, do you project with Minimum Position? Just moving points doesn't work great because they move outside the surface. It's hard to measure the distance on the surface.

 

Also how do you know how much point you need in the first place to fill it? Or do you just fill the entire surface based on the number of points, without specifying a radius?

 

It would be nice if we could just say, distribute points that are x unit away from each other using the Scatter.

Link to comment
Share on other sites

you can control the input points, so if you space them evenly you should be able to do it.
(like for example a points from volume which would give you evenly sized cubes)

to do it with scattered points, you can do a pretty dense scatter, and then do say 3 fuse sops in a row with the same size.
it won't be exact but everything should be approximately the same size and seperation.

Edited by freaq
  • Like 1
Link to comment
Share on other sites

you can guess number of points by measuring total surface area  and knowing the particle separation

then just generate them with scatter

and separate/reproject a few times as mentioned

for reprojecting you can use Minimum Position VOP as you mentioned, or XYZ Distance VOP or Ray SOP

  • Like 1
Link to comment
Share on other sites

Thanks guys. I did the relaxation technique of anim but I am getting holes that I don't know how to fill. It's working pretty good but I didn't guess the number, just used 10k points. Is it because I used more points than necessary?

 

I would appreciate how to generate the points by measuring the surface area too. I am guessing that has to do with circles?

 

B1FiTgP.png

Link to comment
Share on other sites

Assuming you're doing this with a ForEach and a pcfilter, you can just increase the iterations on the ForEach. Also, this purely anecdotal but I found setting max points to 4 yielded the best results.

As for the number of points you can turn on Compute Number of Points in the Scatter and set Points per Area instead of explicitly choosing the point count.

 

 

relax_em.hip

  • Like 2
Link to comment
Share on other sites

Thanks tjeeds, mine was pretty much the same except pcfilter and the number of max points. I was using 2, so that I would only get the closest point within the threshold.

 

In your file you are using 3 as max points but by 4, do you basically mean 3 of the closest points within the threshold? Because I tried 3, and I could spot 1-2 problem areas on a deformed grid, but still a great improvement. 4 seemed to work great. I set it to 5 because I somehow assumed averaging using the 4 closest seemed more logical.

 

In any case thanks for your method. It's pretty smart :)

Link to comment
Share on other sites

Guest mantragora

Thanks mantragora, that looks good. Is that superior to this method? There must be a non-approximate method out there. I am sure someone has an OTL for this.

I have no idea. It was 4 years ago and while I don't drink, I'm not getting younger also, so my memory is a little shady on this topic today. I didn't compared it with what you uploaded here.

 

Do you have something written using the HDK? :)

Nope.

Edited by mantragora
  • Like 1
Link to comment
Share on other sites

I checked it out, it's pretty similar except it was averaging point positions manually instead of using pcfilter and was using the Ray SOP instead of the Minimum Position VOP which I assume wasn't available at the time.

 

But is there a non-approximate method for doing this where you generate points instead of relaxing them iteratively?

 

I was thinking maybe you could start with a single point and then add new points stemming from this point that follows the surface?

Link to comment
Share on other sites

If someone is actually gonna try to recreate what Cristian did but in HDK I suppose the following link would interest him

 

http://graphics.uni-konstanz.de/publikationen/2009/capacityconstrainedpointdistributions/website/

 

It even has the C++  source code! I wish I knew how to compile this into a Houdini plugin/dso or whatever ....

 

I beleve their results are amazing!

  • Like 1
Link to comment
Share on other sites

Guest mantragora

If someone is actually gonna try to recreate what Cristian did but in HDK I suppose the following link would interest him

 

http://graphics.uni-konstanz.de/publikationen/2009/capacityconstrainedpointdistributions/website/

 

It even has the C++  source code! I wish I knew how to compile this into a Houdini plugin/dso or whatever ....

 

I beleve their results are amazing!

Hmmmmmmmmm...

  • Like 1
Link to comment
Share on other sites

I checked it out, it's pretty similar except it was averaging point positions manually instead of using pcfilter and was using the Ray SOP instead of the Minimum Position VOP which I assume wasn't available at the time.

 

But is there a non-approximate method for doing this where you generate points instead of relaxing them iteratively?

 

I was thinking maybe you could start with a single point and then add new points stemming from this point that follows the surface?

 

the only way i can think of how you would get perfect equidistant points is to use a circle packing. but if you don´t want any approximation this could become quite challenging on arbitrary 3D meshes if it´s done right...

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...