Plugin to send Grasshopper mesh to Unity in realtime.

Hi all,

I'm making this new plugin for Grasshopper recently to connect with Unity to send mesh data in realtime. You can send the mesh geometry as it is to Unity and view it any app which includes VR app, IOS app... etc that are built by Unity.

This plugin is using Socket.IO to send geometry through network so not only you can send the mesh locally but you can send it through internet as well. I haven't made a component yet but technically you can also send and receive geometry between multiple grasshopper files in realtime as well (not sure if this function is useful though).

Still in early beta but if anyone who's interested in testing let me know.

  • Anastasios Kokkos

    Hi Junichiro,

    your work looks great and very useful! I would be very interested in testing it! 

    Let me know! 

  • Junichiro Horikawa

    Hi Anastasios Kokkos,

    I can send a link to the package by DM. 

  • Max Rudolph

    Hi Junichiro,

    great that you are working on it - if it's possible I would like to test it! :)

    keep working on it - really interesting!

    best,

    max

  • Mathias

    Hi Junichiro,

    I am interested too! I am testing Unity with the oculus rift and htc vive at the moment. Exporting the data from rhino takes too much time... Would be great if u could send me the script.

    Thanks,
    Mathias
  • Pacôme Gerard

    Hi Junichiro,

    This seems to be exactly what i am searching for. Would it be possible for me to try it?

    Thank you,

    Pacôme

  • Jeian Jeong

    Hi Junichiro,

    This is perfect - could you please send me the package to test?


    Thank you,

    Jeian

  • Chris

    Hi Junichiro,

    I am am graduate student and I this would be a huge help to me, could I test this out as well? 

  • Brice Pannetier

    Great work!

    Very interesting process. I would love to try it. Would you be interested in sharing it with me ?

    Thank you,

    Brice

  • Juan Pablo Ugarte

    Hi Junichiro, amazing work! I am very interested, I am developing an AR application as part of a school project, and precisely need to send some geometry from gh to unity. I would very much appreciate if you could share the beta version of the plugin with me. Thanks!!

  • Junichiro Horikawa

    Hi Mathias, Pacôme GerardJeian JeongChrisBrice Pannetier, and Juan Pablo Ugarte.

    I'm sorry for being late to reply you all.

    It's still a source code but I've uploaded the package in the GitHub repo for now, you can build the plugin from it. I might upload the built version in Release section soon.

    https://github.com/jhorikawa/MeshStreamingGrasshopper

    From some of the people I hear that the plugin is not working and it seems like it has some conflict with other Grasshopper plugin but I haven't been able to nail down which plugin it is.

  • Junichiro Horikawa

    Just added binary data in release section.

    Since it's not fully tested it might not work correctly but let me know when it doesn't work.

    https://github.com/jhorikawa/MeshStreamingGrasshopper/releases

    Thank you,

  • satolas

    Hi Junichiro Horikawa,

    I tried your pre-realased plugin.

    So, i got a "server started" into the node.js command prompt, and I can see with Glasswire that the bytes streaming seems to work (see screenshots below):

    But in Unity side, when I open your exemple I'm not getting anything.

    Then, I tried to add the ReceivedMesh prefab and add the Mesh Receiving (Script) into the Main camera, but still nothing. It is strange, since the communication between Rhino and the nodejs server seems to work.
    Here is the setup in grasshopper, seems to be ok :

    If you could help me for Unity's side could be nice.

    Thanks for your amazing tool :-)
    I hope that my tests will help you to improve it.

    Best regards,

  • Juan Pablo Ugarte

    I think you may need to add the socketIO prefab as well

  • satolas

  • satolas

    Thanks for your help, I tried to add the socketIO prefab... but it doesnt work yet :-/

  • Junichiro Horikawa

    Hi Satolas, 

    It seems like there was a problem with Unity project in github so I updated the repo. Pls download the latest package from following url.

    https://github.com/jhorikawa/MeshStreamingGrasshopper

    I also added some notes in order to use the plugin.

    Thank you!

  • Yuxiang Zhang

    Hi Junichiro! I've been trying your application but got stuck at the MeshStreamingServer part. I couldn't open the app.js file, each time the node.js window only appears for a millisecond and disappears. I'm using a win10 pc, do you have any suggestions for me to fix this? Doing a studio project and really hoping to get this working. Thank you in advance and look forward to your replyy X)

  • Roxane

    Hi Junichiro,

    Your plugin looks exactly like what I've been looking for in the past year. I am a student and need something exactly like your plugin to bridge between grasshopper and unity in order to take my design to AR. I would greatly appreciate it if you could share it with me as well. That would be a huge help.

    Thanks,

    Roxane

  • Ryota Kawamura

    Dear Junichiro

    I very appreciate your work and wannna use it.

    Then, I have three questions about this.

    1. Is it possible to use sent data to Unity as Rigidbody?

    2. What is each name of components you use?

    3. For usage, you told us put all dlls and gha files inside Libraries folder for Grasshopper. Do these dll files include all of them you provide?

    Thank you,

    Ryota

  • Ryota Kawamura

    If you use self-component, please tell me the details

  • Amaraa

    Hello,

    I am really interested your plug in and tried to use it. However, I wasn't able to find gha files from your github page. Could you send it to me please.

    Thanks in advance,
    Amaraa

  • Junichiro Horikawa

    Hi Amaraa

    You can go to the release page to download the gha file.

    https://github.com/jhorikawa/MeshStreamingGrasshopper/releases
  • Amaraa

    Thanks for letting me know where the gha was. I will test it and get back to you soon. ^^ Have a great weekend.

  • hendro trieddiantoro putro

    Hello, thanks for sharing sir, 
    I've conduct a project about interactive design that driven from daylight using firefly grasshopper and to sync in real time with unity3d to project it in VR view

    i'd like to learn this plug in 

  • Kaijie Qian

    Hi,thanks for sharing it.it is super awesome

    could i ask how to run app.js. i create a mesh in gh and using processing with js(i am not sure how to run app.js) plug in to run this,and in unity,attach the Recieved mesh on main camera,here is the screen shot,how can i run this,it is super important for me.many thanks for your here.

  • Bonny

    Hello, Thank you for your work! I am having a similar problem to Kaijie Qian...I have set everything up and installed node.js but when I run app.js, nothing happens in Unity. I have unblocked all files.

  • Ariel Bintang

    for those of you who can't run app.js u need to go to command prompt and type 'node C:/**file path to app.js**'

    However now I can't find the module 'socket.io' anybody could help? i tried to download it but i cant

  • Bonny

    I did npm install for the json package, ran app.js in the command line. I'm able to connect to grasshopper but in Unity, I still do not see anything streamed in play mode. Does anyone have any idea what I could be missing?

    Ariel are you missing socket.io in unity or gh?

  • satolas

    Hi Bonny :-)
    In Unity you should look for the receive component (c#) and make sure that the ip adress there is the same as the one on your computer and as grasshopper. (www.whatismyip.com)
    Btw I changed the Ip variable to be public into Unity's editor to be able to change it easily.
    Also try by launching the command prompt as administrator.
    If I see something else that could help I'll let you know.
    Cheers,

  • Bonny

    Hi Satolas,

    Thank you so much! I think launching the command prompt as administrator did the trick :)

  • Viola Cambié

    Hey Satolas and Bonny

    I'm new of Unity so apologize in advance for my question :)

    I'm having problem to connect gh. As @Bonny, I did npm install for the json package, ran app.js in the command line, and the server is running.

    I have also changed the ip address in GH with my own ip but I'm not sure where to change in Unity. @Satolas suggest to look for "receive component (c#) " but I'm not sure where can I find it.

    Any suggestion?

    Thanks