Mesh blend

Forum for users who have migrated or are migrating to Houdini
Post Reply
User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Mesh blend

Post by Mathaeus » 12 Feb 2017, 14:56

And yet another one from H 13 or 14 times, for playing when waiting for Houdini 16 release. I think this one will worth to be polished for general use, utilizing new booleans in H 16.
As it is probably noticeable, it performs NURBS style fillet / blend on polygon meshes. Exactly it is G2 blend, or six point Bezier curve, between cuts created by distance from intersection. So, in Rhino-MoI world, more a 'blend between custom trims'. Setup is a sort of typical Houdini mix of factory SOPs and custom Point VOP operators. Cuts are performed by PolyCut SOP, that's SOP able to cut the polygons by scalar attribute, let's call them 'weightmaps' in SI - because Cookie SOP (that's boolean) in older H wasn't enough. As I said, I think it definitively worth to revamp this thing in H 16, perhaps to add some welding functionality as well. Ten loooong days to wait....... :(

get it here

Image

tarkovsky
Posts: 59
Joined: 05 Oct 2012, 20:02

Re: Mesh blend

Post by tarkovsky » 12 Feb 2017, 22:22

Very cool! Would two or more fillets be able to "meet"?

t

User avatar
rray
Moderator
Posts: 1774
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: Mesh blend

Post by rray » 12 Feb 2017, 22:24

very cool - thanks for sharing

grass is getting greener and greener on the other side
softimage resources section updated Jan 5th 2024

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: Mesh blend

Post by Mathaeus » 12 Feb 2017, 23:10

Thank you guys
tarkovsky wrote:Very cool! Would two or more fillets be able to "meet"?

t
No. For now it is able to detect multiple intersections, thing in pic is composed from two meshes. *Might* (perhaps with a small adaptation) be possible to do fillet across previous fillet in next step, once result is merged, similar to blends in NURBS apps. In any case I'm planning to rebuild it in H16, will see to which level is possible to go, still having so so compact setup. Generally I wouldn't expect wonders from this, there's always immanent drawback of having to have subdivided meshes to emulate NURBS, while there's also an 'advantage' of not be bounded by accuracy of CAD apps. Will see in next weeks.

tarkovsky
Posts: 59
Joined: 05 Oct 2012, 20:02

Re: Mesh blend

Post by tarkovsky » 13 Feb 2017, 18:09

Mathaeus wrote:Thank you guys
tarkovsky wrote:Very cool! Would two or more fillets be able to "meet"?

t
No. For now it is able to detect multiple intersections, thing in pic is composed from two meshes. *Might* (perhaps with a small adaptation) be possible to do fillet across previous fillet in next step, once result is merged, similar to blends in NURBS apps. In any case I'm planning to rebuild it in H16, will see to which level is possible to go, still having so so compact setup. Generally I wouldn't expect wonders from this, there's always immanent drawback of having to have subdivided meshes to emulate NURBS, while there's also an 'advantage' of not be bounded by accuracy of CAD apps. Will see in next weeks.
Ok - cool. While being a regular CAD user, I often go to SDS in SI for many things. Precision is fine for a lot of stuff, and so much stronger than T-splines or similar...
Just installed Houdini Apprentice today - I really like the Nuke-ish node graph, and hope to find the time to get into it :)

t

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: Mesh blend

Post by Mathaeus » 13 Feb 2017, 23:20

tarkovsky wrote:
Ok - cool. While being a regular CAD user, I often go to SDS in SI for many things. Precision is fine for a lot of stuff, and so much stronger than T-splines or similar...
Just installed Houdini Apprentice today - I really like the Nuke-ish node graph, and hope to find the time to get into it :)

t
That's a bit of nitpicking from my side, I was thinking about 'fitting into tolerance' with NURBs blends. Afaik NURBS app like Rhino or MoI, performs a walking along trimmed edge, adding a new points/cross sections for blends, trying to keep the distance between trimmed edge and edge of blend, inside predefined distance. This thing here, works reversely, it just re samples the intersection curve to get as much smooth orientations, at end it tries to fit edge points, which probably is not by CAD rules, but gives a smoother result, without bulging (well, in some cases...). For now I was able to live without custom normals.

Anyway thanks for input from real experience. If there's interesting example on internet, I'll take a look. My personal 'source' for NurbS stuff is MoI and Maya - while there are many other solutions, of course.

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: Mesh blend

Post by Mathaeus » 18 Feb 2017, 12:41

Just a small update, this one features stacked operators, first blend is in between two sets of propeller blades, bubbles in middle are second blend. Now to do not lying here... To get entire thing to works properly, user probably should be on level of knowledge, already enough to build entire setup alone. And I don't see enough-fast-to-compute way to make it robust. Nothing new, we remember that can-do-everything-but-nothing-correctly from ICE, while problem is definitively emphasized in that disorganized Houdini mix of SOP VOPs Wrangle whatever, full of obscure solutions like getting a plain extract of border edge by especial option in Group SOP which then suddenly creates sequence of groups :-o . They never heard for proper exposing of arrays to user, or what... Anyway we will see what wonderland H 16 will have to offer.

Image

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: Mesh blend

Post by Mathaeus » 25 Feb 2017, 20:41

Ok, I think this is best what I was able to get. Finally it is in specific Houdini style to intersect volumes, it is VDB signed distance field. New booleans are great, but it wasn't easy to deal with them in stacked blending, over existing fillets - well this is expectable with any boolean operator. VDB sampling seems to be still the fastest method, compared to Booleans or Closest location on mesh (that's XYZ distance VOP in H). Especially with dealing with 'out of cut distance' positions, compared to spatial query by closest location or ray casting.

Get it here.

Image

How it is working, what it wants:

- it automatically creates NURBS style fillets around intersections of two polygon meshes.

- it wants two closed meshes as inputs, while second mesh has to be perfectly closed (no boundary edges) - will see is there a simple way to improve that.

- it is able to perform fillets over fillets - only in case of closed second input.

- it is able to deal with multiple intersections, or multiple (closed) volumes, let's say created by Merge SOP.

- it creates fillets from union, intersection or subtraction. Default is union.

- it creates UVs on fillets. If there are existing UVs on inputs, H will keep them.

- it aligns normals (or exactly, vertex order) of created fillet, to first input.

- each intersection has to be 'closed', that is, resulting in closed curve, in order to work properly.

- meshes has to be nicely subdivided before inputs. It's just cutting over supplied inputs, it won't create new, smaller polygons.

- it does not work well with sharp curvature - will see is there a way to improve that.

- fillets should not overlap.

- resulting meshes are just stacked, there is no any remeshing, at this point.

- DO NOT try to put the same mesh into both inputs. If this happens. ESC key is your friend.


More technical description:

First step is volume sample of VDB representation of another mesh. Sampled SDF is saved as float attribute, zero SDF is used by PolyCut SOP to create intersection curve. Intersection curve is re-sampled down and converted to NURBS, to get as much smooth fillet. From that curve, there's spatial query to cuts on meshes, to get closed points. In next step, curve is re-sampled again to final fillet resolution, also there's new spatial query to cuts, this time only to match the final position, while orientations are derived from low res curve. This is to avoid 'bulging', invoked by linear cuts over polygons. Last step is six point bezier curve, well known as G2 blend in NurbS world, used to loft the fillets, by Skin SOP.

Inputs:

1: closed, highly subdivided mesh, or result of Mesh blend.
2: closed, highly subdivided mesh

Parameters:

Reverse A, Reverse B: this is to get union, subtract or intersect functionality.
Reverse Poly A, Reverse Poly B: just an option for polygon/normal orientation of final result. Fillet's normals are automatically aligned to first operand.
Fillet Distance: Distance in world units, from intersection line to end of created fillet.
Shift: shifts the fillets between operands. Positive value shifts onto second operand.
Segments First: Initial re sample of intersection curve. Lower count is smoother, while too low can cause artifacts on highly curved intersections.
Segments Last: Final U resolution of fillets.
Cross Sections: Final V resolution of fillets.
Bulge Factor: 1 is maximum sharp.

Voxel Size: Size of VDB voxels, used to find intersection. Higher number is faster. In case of artifacts, try smaller value.
Search Distance Factor: Multiplier of fillet distance used as max searching distance, from intersection curve to cuts. In case of artifacts, try higher value.


Good luck!

Post Reply

Who is online

Users browsing this forum: No registered users and 34 guests