Grasshopper

algorithmic modeling for Rhino

-=NIK'S ZBRUSH COMMANDER=-

Work in progress, but I wrote a little Python script that can command the astoundingly powerful mesh modeler ZBrush to operate on meshes from within Grasshopper. It takes some work to create a ZScript macro for custom routines, but you can record those in ZBrush and then merely need to edit them into my script, inline, as bulk multiple-lines you just paste in, no problem as long as you strip the ZBrush button definition at the beginning.

ZBrush has a very high initial learning curve because of its non-standard interface. However, it has the world's most powerful quad remeshing and now mesh Booleans too. I needed a replacement for slow and especially non-robust marching cubes (Cocoon/Monolith/Dodo/Aether etc. on Grasshopper) that tended to bog down or blow up. IntraLattice was a step in a good direction but it can't merge fattened lines that merely cross each other with no breaks or that physically overlap on purpose to have many curve on in to a hub. But with $800 ZBrush 4R8, the latest version, that I can create English language ZScripts for, I suddenly have, often in the blink of an eye, or at worst a few seconds, right back into Rhino Grasshopper, a perfectly joined, airtight and smoothed mesh blending of upwards of thousands of input mesh pieces that overlap in ways Rhino will never Boolean union.

There is no complicated installation of anything since it's all done in Python.

The ZBrush program itself pops up while it works, and is then automatically backgrounded to bring you back to Grasshopper. It keeps running though, for fast iterations with no program startup time.

This is a general toolkit to expose myriad very advanced features of ZBrush into being just another Grasshopper plug-in like the rest.

It works by accepting a Grasshopper mesh and writing it to disk as an OBJ file, then incorporates ZBrush settings for a given command into a text format ZScript file, also written to disk from Python based on Grasshopper inputs, then ZBrush is told to run the script via Windows command line, and the exported OBJ output is read back from disk back into a Rhino Grasshopper mesh, in about a hundred lines of code.

Despite a change in mesh definition in Rhinocommon from version 5 to 6, I made it work on both versions.

So far this is only one command, the newly improved mesh Boolean union. It gives quad meshes, but they still look healthy when quickly triangulated in Rhino (as seen on top, above).

The ZBrush ZRemesher is utterly astounding in ability to transform any mesh into a direction following, error free quad mesh that can be converted to NURBS actually, via T-Splines smooth mode. That will be the next port to Grasshopper. I hope architects pick up on this more orderly manner of patterning surfaces than the alien slime of random point Voronoi.

Commercial software has the best code, not open source stuff, so far, so this is serious work to bring world class tools into Grasshopper where we can rapidly prototype computational strategies.

Here is a thread with several examples of ZBrush Boolean union remeshing applied to 3D trusses, compared to both IntraLattice and marching cubes:

http://www.grasshopper3d.com/forum/topics/custom-unit-cell-bug-in-i...

The same strategy of generating script files I used to port OpenFlipper, here, for triangle remeshing, which can now be combined with ZBrush Boolean unions of arbitrary assemblies of mesh units:

http://www.grasshopper3d.com/forum/topics/best-uniform-remesher-for...

UPDATE: I revamped the workflow so now components feed raw ZScript into a sequencer. Then only a single ZScript is assembled and sent to ZBrush so Python never gets ahead of ZBrush (!):

It is easy to DIY roll your own now:

Views: 12013

Replies to This Discussion

If you search the component reference (http://rhino.github.io) for "point cloud," there's no hits.

FYI, this page is not maintained by McNeel, thus you should not count on it being updated with every new GH add-on that is published. This page was an effort by members of the community to extract the component documentation from every existing component. https://github.com/rhino/rhino.github.io was last updated in 2015.

Thanks!

I actually sent you message last week about point clouds. I'm currently using cloud compare to trim down and segment e57 files to bring in to grasshopper using volvox. The clouds are rather large and typically curved structural members and wall facades. These are used to position our work visually and so far rather crudely, a multi-resolution meshing process would be ideal.

This process recently gave me a very detailed mesh with minimal steps. I haven't tried it on larger clouds as of yet.

http://www.cloudcompare.org/doc/wiki/index.php?title=Poisson_Surfac...(plugin)

This is very interesting.  Am I missing something, or are there no sample scripts?

As Nik seems to have been banned most of his work seem to be lost :-(

Yes, a great shame on all fronts, but in the end Nik was doing more damage than good to this community.

So does anyone have a copy of the script?  This would be an amazing little utility.  

He's pretty active on Twitter, if you contact him there I'm sure he'd be happy to share: https://twitter.com/nikwillmore

attached :)

Attachments:

Thank you Daniel

Thank you very much Daniel ;)

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service