Can't get grasshopper autosending/autocommit to work

Hi @dmitry told me about auto-sending in speckle; way intriguing.

Unfortunately, I can’t get it to work. I could commit manually once, but can’t autocommit.

I have these red guys moving around on the surface of this white mesh. Their data (position) changes constantly and theoretically that should be broadcasting, no?

a swarm of boids is controlling their movement; so, it’s an animation

(please be aware that if a new starts sending before an old is finished, the previous operation is cancelled ← is that what’s happening the data change is too fast?) ← ah, that does seem to be what’s happening, is there a way to get this closer to real time? so I can send frame by frame to speckle? ← lol I put it on a 5 second trigger timer so it’s committing every five seconds, but would be great to commit it frame by frame

Also, is there a way to see a 3d web viewer that keeps automatically showing the latest commit? just shows it as it gets updated? right now I have to keep clicking to see the new commit and it reloads…

2 Likes

Hi @Delta_Ark,

first of all, welcome to the community! You can go ahead and Introduce yourself 🙆 if you feel like it!

As for your question, I see you’ve already semi-answered yourself:

There is a certain amount of time that is spent converting the Rhino objects to Speckle and sending them through the internet. I’m not sure you’ll ever get real-time communication via commits unless the amount of conversion/data sent is tiny, as they were not designed in that way (this would apply to almost anything really).

A commit is a Snapshot of all the data at a particular moment in time, the more data you send, more time would be required to process it. If you were to do this at 60fps, that would result in 3600 new commits per minute of “permanent” data.

Right now there is not, but I am aware @Kateryna has done some magic with the viewer in the past to get it to run animations based on the data of one single commit; meaning instead of sending one commit per “frame” you send 1 commit per animation, with all the information for each frame included. I’ll let her point you in the right direction for that :+1:

Final thoughts

After sending you my reply i realised you could get every frame sent if instead of using the Send node you used the Send Sync node.
This node will “block” the execution of the GH solution until it has finished, therefore it should prevent any other thing from happening until it has finished sending its data.

That may solve your “missing frames as commits” problem, but it still won’t really fix the “real-time” communication issue. :cry: Maybe @dim has some thoughts on this

3 Likes

Hi @Delta_Ark ! Indeed, as Alan explained, the real-time display of fresh commits is an unlikely feature. BUT as he mentioned, there is a walkaround if you want to run the viewer on localhost and add an extra button.

In GH you can simply run all your animations and collect the resulted objects in a list (1 united mesh per animation frame), then send it to Speckle (NOT auto-send). In the viewer you can set up a slider (min: 0, max: amount of loaded objects-1) and change visibility of each object based on it’s index. The order of the objects will be the same as the GH list you sent.

Feel free to ask questions if you’re stuck at any point!

1 Like