Arena to Unity streaming

NatNet, VRPN, TrackD, and Plugins
stefan_s
Posts: 3
Joined: Thu Oct 02, 2014 1:46 am

Re: Arena to Unity streaming

Post by stefan_s » Thu Oct 02, 2014 6:08 am

Hello Everybody,

i have updated the script from Morgan to the current NatNet 2.6 datastream, cause we want to stay platfrom independent from windows. Everything runs smooth...when it runs..i cannot figure out why, but sometimes when i am running the unity application and a test server, the asyncReceiveCallback cets called, and sometimes not. Client connects successfully to the server, i start streaming frames on the server and sometimes the callback gets called, sometimes not. Anybody has had this behaviour and any ideas about it?
But

morgan
NaturalPoint Employee
NaturalPoint Employee
Posts: 199
Joined: Tue Jun 24, 2008 2:01 pm
Location: Corvallis, OR, USA
Contact:

Re: Arena to Unity streaming

Post by morgan » Thu Oct 02, 2014 4:28 pm

We have seen this on some network topologies where multicast packets (the Motive default) get filtered by smart switches or routers. One test for this would be to switch to Unicast. On the Motive side it can be set in the streaming panel options, on the script side Unicast uses the same port as the data command channel (1510).

Modern antivirus / firewall services can also filter packets intermittently (Kaspersky has tested here to cause intermittent packet filtering).

You might also test some of the NatNet samples out of the box to see if they exhibit the same behavior.

stefan_s
Posts: 3
Joined: Thu Oct 02, 2014 1:46 am

Re: Arena to Unity streaming

Post by stefan_s » Mon Oct 06, 2014 7:48 am

Thanks for the reply morgan, i figured it out. The problem was that my computer has more than 1 local interface and i just used different interfaces for the local server connection.

morgan
NaturalPoint Employee
NaturalPoint Employee
Posts: 199
Joined: Tue Jun 24, 2008 2:01 pm
Location: Corvallis, OR, USA
Contact:

Re: Arena to Unity streaming

Post by morgan » Mon Oct 06, 2014 10:46 am

Ah yes that would do it to. Thanks for updating on what resolved.

As more machines now have multiple NICs we've been updating the NatNet samples to include a local interface adapter selection. We'll add a note to the docs as well.

bteitler
Posts: 18
Joined: Thu Jun 12, 2014 12:57 am

Re: Arena to Unity streaming

Post by bteitler » Sun Oct 12, 2014 6:11 pm

Can someone post a working C# Unicast packet client example? I can't use multi-cast because I am doing wireless networking, and multi-cast has horrible performance on wireless networks (at least I can't find any setting combination on my router that doesn't just destroy my wireless network - reading up on multi-cast it seems this is somewhat expected for wireless networks however).

I tried to adapt the posted code by Johny3212 to Unicast, but it is not clear how the connection is bootstrapped in Unicast mode, and I can't seem to get data to be sent. For multi-cast, it seems Motive is just always sending so the code works fine as it just registers to the multi-cast group and data comes in. However, for Unicast it seems like there is some sort of ping registration going on to get data to come back, and it is not clear to me how to replicate it. I tried sending a ping packet similar to the C++ packet client example, but I still don't get data. It is also not clear to me how Motive knows how to stop sending to a Unicast client when they disconnect (I don't see any code in the packet client example to de-register, or a continuous keep alive).

If someone could post an example I would be grateful - also any insight to how the handshake really works for Unicast in Motive would be nice.

Thanks

Post Reply