Triangular meshing

Hi all,

For a while now I’ve been developing some remeshing tools in Grasshopper, but thought some of this work might be of interest to other Rhino users, so I’ve made a first attempt at turning it into a Rhino plugin.

This tool performs an iterative remeshing to generate a mesh of triangles which are approximately equal sized and equilateral, while preserving sharp features. For now it works only on Breps, and the only setting is for the target edge length. The original script contains several other options though, and if there is interest more of these could be exposed.

This tool makes uses of the Plankton mesh library, which is a collaboration between myself and Will Pearson (hi @will !)

I would emphasize that this is a very early test release, and probably likely to crash or fail. However, if you do want to try it out, any feedback is welcome.

MeshMachine.zip (33.6 KB)
You will need to unblock all 3 files
To run, type MMTriangles from the command line

13 Likes

Hi @Daniel,

Works like a charm, for a prototype… Is that something you plan to develop into regular Rhino command?

It would be great to see some sort of calculation progress (now Rhino just freezes for a bit) and also to be able to select many objects to process at once. Also - now it does not work with meshes - is that a possibility as well ??

I could see this very useful in many cases of our workflow.

Thanks for sharing,

–jarek

Very interesting!

Hi Jarek,

Thanks for trying it out, good to hear.
Just testing for now, so no definite plans yet.
Yes - I think showing the progress is something that could be added.
Since the algorithm is iterative it can be nice to watch it doing its thing in realtime (as it does in Grasshopper, like this).
Right now MMTriangles just performs a fixed number of iterations - I set it at 30, which is usually enough to reach a good result, but if it is a very large mesh you might be waiting for a while.

Taking a mesh as input would certainly be possible, it might just require a bit more input from the user to specify the feature edges and vertices. With Breps this is easier because smooth curves for edges and corners are already identified. Also, if the starting mesh has really bad aspect ratios or lengths very far from the target, the remeshing struggles sometimes.

2 Likes

This is very good.
I’m using it in gh, but have the same directly in Rhino it’s absolutely good!
Thanks.

These videos / meshing results are phenomenal.
I hope at some point it will all make it to Rhino as a stand-alone command. Great work.

~j

Daniel, this looks very good! Could this be added to standard Rhino? Or even better, could it be added to Rhino core?

just made a quick test - works like a charm !
would indeed be nice to have in in the rhino mesher …

@DanielPiker this is great, it works very well. A very useful addition would be to adapt the face density based on local curvature: more resolution where it is needed.

Hey @menno, this dynamic functionality exists in the Grasshopper version. It’s quite flexible. The question is how best to expose it as a Rhino tool :slight_smile:

A couple of Dan’s images below…

Sweet - I’ll give the GH tool a spin. Did not know it existed :smile:

This is probably my limited experience with grasshopper, but I can’t find the create plankton mesh component after installing the plank plankton gha. I did see it in the example .gh file though.
Also I have not figured out how to create meshes like the pictures you show above. Is there some form of documentation, other than skimming the grasshopper forum?

Hi menno,
here there’s the MeshMachine:

:wink:

@daniel:
any chance to pick up the UV information of the orininal NURBS polysurface ?

Aha, thanks for pointing that out, I only had the plankton gha.

Sorry there’s not much documentation for this yet beyond what I’ve posted in the GH forum - I’ll try and upload some more examples and explanations soon.

@brt1 Do you mean to do this to drive the edge lengths from the curvature of the NURBS, or something else?

@danielpiker1
i use the UV information for mapping. parametric UV layouts (rectangular) as derived from nurbs have advatages in special situations: example: pumpkin

I’m still not sure I follow. Do you mean mapping texture information to the triangular mesh, or actually having the meshing aligned with the UV directions?
This plugin is just for triangulated meshes, and is quite different from David E’s quad mesher.

no, i am not asking for alignement of the mesh edges. it is only about the 2d UV space used for texture mapping. here is an example, a single NURBs surface and the mesh generated with the rhino mesher:

when using the rhino mesher the mesh contains the UV information derived from the NURB.
this UV layout is parametric, meaning it is transformed into a 2d square, trims are cut out from the square, there are no real lenghts, but the relatve distances between the vertives are stretched in order to obtail the square. the following screenshot is from 3dsmax, it shows the mesh exported from rhino with a texture map (checker red/black) :

i used a checker map, to make things clearer but of course it works with any other picture:

when reducing the mesh, the remaining vertices obtain their position in 2d (=UV) space and the mapped picture keeps it position and scaling :

did you understand this explanation or are there any more questions?