Showing posts with label voronoi. Show all posts
Showing posts with label voronoi. Show all posts

Tuesday 15 November 2022

Cutting/slicing up an object in equal divisions

 Houdini Quick tip - slice equally - YouTube

Sometimes the Boolean Fracture lets you down, so use the Voronoi Fracture, and feed a line into the second input. That is pretty much the gist of the video.

Wednesday 20 March 2019

RBD Clustering, an "update"

Instead of using the cluster attribute found in Sam's notes...

Add a primitve VOP to your constraint primitives.
Create a voronoi noise and promote the frequency to the top level.
Plug the output (dist1 is good) into a ramp float node and then mess around with the curve to create some interesting patterns (try adding noise to this), which will essentially operate as clusters.. Export this to Strength, or multiply it by a pre-existing value.

Monday 22 May 2017

voronoi fracture woes & exporting alembics to maya

Voronoi fracturing is often used to create destruction fx. It also creates a lot of dirty geometry, which leads to pain when exporting your geometry to Maya -

"UVs aren't per-vertex or per-polygon per-vertex, skipping"

 This also plays havok with motion blur and any other vertex attributes you might have in play.

Using a For-Each loop, or For-Each subnetwork (if using the subnetwork, attach a Connectivity SOP first, with a "class" attribute, so the For-Each knows what pieces to run over. You type "class" into the Attriubute field of the ForEach Subnetwork parameter box) use Clean SOPs to fix any nasty geo that might have been generated. You'll want to tick most of the boxes - your mileage may vary with the Non-Manifold option.

This probably won't fix the problem still - the fracturing process can make a lot of stray edges - 2 point primitives, which don't play nice.

drop down a Primitive Wrangle and use this code-
i@vertnum = primvertexcount(0,@primnum);

It creates a variable called vertnum that counts how many vertices you have in each primitive.

Follow this wrangle with a blast that has
@vertnum==2
in it's Group box. This will kill any stray edges & hopefully fixes everything!

Tuesday 16 May 2017

voronoi shatter pieces not staying as a chunk

Sometimes..most of the time, your voronoi shatters that have thickness won't behave correctly. The sides will fall off. Boo.
What you have to do is run all the pieces through a Foreach loop and Fuse the verts back together.

This could go just before your assemble node

Sunday 8 January 2017

Getting point values from primitives

Here's a way to get point values from specific vertices. The application here is quite specific actually..
When you make glue constraints for Bullet simming you get a bunch of 2 vertex lines and one method I've been ripping off is to use voronoi noise patterns to cluster the vertices. The aim of this is to check what voronoi cluster value i've assigned to the vertex.

primvertex(0,@primnum, 0);
returns the vertex number, of @primnum's primitive.

vertexpoint(0, vertexnumber);
returns the point number of the vertex you feed it.. Cos points and vertices aren't the same :)

so.. to get a point number from a primitive (say the first point in a line), we combine it all a bit..

int pt= vertexpoint(0,primvertex(0,@primnum,0));

Then you might access some values

float value=point(0, @something, pt);