Grasshopper

algorithmic modeling for Rhino

Hi everyone.

Recently there was a very productive discussion about linking GH to other software and indeed hardware, via User Datagram Protocol (UDP). Giulio Piacentino, Miguel Vidal, Olivier Pasquet, and Luis Fraguada (how are you, man?) did some brilliant work in coding the necessary C#.NET components for GH, setting up external senders / receivers, doing basic tests, and extending some capability.

Unfortunately, that discussion has expired. But the topic is much too exciting and promising to be left for dead. Plus, a few questions were left open, so the challenge is still out. I hereby propose to reopen the UDP discussion.

Views: 1156

Replies to This Discussion

One of the questions / challenges left open was that Giulio's UDP receiver accepts strings only. Miguel extended it to accept other data types simultaneously, but unfortunately, I couldn't get Miguel's component to work. So, I've been putting together strings in Processing (e.g. point coordinates as a string: "000.0,000.0,000.0"), sending them to the UDP receiver, then using the Branch component to separate the input (in this case, the Branch component separates the string into three variables that can be used as floating-point numbers). Of course this is not ideal, but the C# code is still way over my head. Any ideas for an enhanced UDP receiver that accepts multiple data types simultaneously?
Attachments:
Personally, I am still actively working with UDP for some paying gigs...when I get some free time I will work on making it more adaptable, but for my purposes, the one I set up has worked well for ll types of info...just the way you format the string...

by the way...Hello Joao! Its been a long time since London!

And, can you outline some situations and data types you'd like to see handled?
luis
Here are two stumbling blocks in the UDP functionality:

1: So far, I've been able to send only strings via UDP. That's good enough for passing, for example, "{32.435,64.234,64.23}" into GH, and using it as the input to a point or a vector parameter. But that's all I get! A single point for every exchange between Processing and GH! That's obviously not much. So, my question is: can we send other data types (e.g. floating-point numbers) through the UDP connection? How about arrays (of any kind of data)?

2: As soon as I try to work in 3D with Processing, the UDP connection fails. All it takes is adding, for example, size(100, 100, P3D) to setup(), and I get the error message: "opening socket failed! > address:null, port 6001 [group:null] >Address already in use: Cannot bind"
This is really puzzling, and very limiting. Is there any way to overcome it?

Thanks for answering this.
since you have decided to declare this a UDP revival thread. I would like to chime in/continue this discussion aswell.
Ive tried your modification of the UDP GH/PDE file to send over some data streams. Although I didnt get errors sending information (frequencies collected from Audio Analysis script in Processing) and find that I can get Processing to see/send the messages to Grasshopper. However I find it that grasshopper doesnt communicate with Processing. Ive tried to modify the C# code and it didnt produce any better results.
this look interesting i will give it a try. i would be much more interested in the maya version, where can i get that.

i did see a few questions about the fact that data gets returned as strings. since the component is in a c# node .net can translate the sting into a double, int or others. so in this example the information is "messageText". if you want that as an actual double and not string just write double.parse(messageText); so then you can build the points in the UDPreciver component
ehem...

http://www.grasshopper3d.com/forum/topics/ghowl-interoperability

For parsing strings, try to create an a array of string delimiters, then split the incomming message string...

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service