Unity and Grasshopper

Hey Guys,

I am sure it was done previously and I wonder if someone can guid me to word recourse I need.

I would like to create a plugin (script) for Rhino/Grasshopper to save a model with specified variables and then be able to open this file in Unity and being able to adjust these variables. Something like Substance files. You can save out specific parameters to play with later.

So Grasshopper and Rhino can use C# which is good as I have some experience in Java.

My question is what technology or what approach should I use to be able to connect two programs? (Unity and Grasshopper) And just to be clear I don’t what a realtime connection.

See attached screen shot. I was thinking to start with something basic, I have a sphere with translates over Z axes with a slider. I want to save this file, open it in Unity and have same slider with controls Z translation.

Thank you,

I have created a diagram to illustrate what I am trying to get. I know it might take some time to develop. If someone tried something similar can you point me in the right direction.
I will probably will have to develop a new file format or some kind of archive which will hold all possible variants of the geometry.
Please see attached diagrams.

your main problem will be that you cant rely on any components beyond the most basic vector operations.
Moving a sphere would work, but imagine something simple like evaluate a point on a curve. This exists only inside rhinocommon - so no way you get that in unity unless you rewrite every grasshopper node in unity.

Sure you can get some spheres moving, some vector operations - maybe even more with external geometry libraries that link into unity… but eventually you will hit a wall

here the text from the mcneel developer site regarding their opennurbs library:


Although the openNURBS toolkit appears to be a full-featured geometry library, it is not. The toolkit does not include a number of important features, including:

  • Closest point calculations
  • Intersection calculations
  • Surface tessellation (meshing)
  • Interpolation
  • Booleans
  • Area and mass property calculations
  • Other miscellaneous geometry calculations

openNURBS is an open source toolkit for only reading and writing 3DM models. Our full-featured development platform is Rhinoceros® . All of the above features are found in the Rhino SDKs, the toolkit used to build plugins for Rhino.

and i see in your proposal to write out every possible combination of results - sure possible, but not very elegant… and one slider with 10 results, two sliders 100, three 1000…

You can use this Jhorikawa Mesh Streaming: