Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by $$anonymous$$ · Nov 02, 2020 at 10:24 AM · unityeditorconnectionrealtimevicon

Realtime Datastream Vicon Nexus and Unity

I am trying to connect in realtime Vicon Nexus with Unity for datastream of data from markers from Vicon environment to Unity project. Any suggestions?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
â–¼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by anxine · Feb 16, 2021 at 08:52 PM

@konchatzinikolaou
You can use Vicon's "Datastream SDK" to stream Nexus marker (and other) data into Unity. Vicon offers a third party plugin (Unity Plugin 1.3) which contains this "Datastream SDK" and shows some examples on how to stream segment data to Unity (can be easily adapted to marker data). Find the step-by-step instructions on how to setup the third party plugin here (Unity Plugin 1.3 Instructions). Ignore or remove the code for the head-mounted displays.


Follow these steps to aquire your marker data. First setup a datastream client and connect to the Vicon server. Then you enable streaming of marker data before querying Vicon frames in the update function. After getting the current frame you can obtain a marker's global translation by providing its name:

 ViconDataStreamSDK.DotNET.Client MyClient = new ViconDataStreamSDK.DotNET.Client();
 MyClient.Connect( "localhost"); //or the "hostname:port" e.g. 192.168.0.60:801
 MyClient.EnableMarkerData();
 MyClient.GetFrame(); //for repeated querying put in update function
 Output_GetMarkerGlobalTranslation Output = MyClient.GetMarkerGlobalTranslation( "Alice", "LASI" );
 //for subject "Alice" and pelvis marker "LASI"
 float xPos = (float)Output.Translation[0]/1000f; //marker global x-position in meters
 float yPos = (float)Output.Translation[1]/1000f; //marker global y-position in meters
 float zPos = (float)Output.Translation[2]/1000f; //marker global z-position in meters
 

Google for the Vicon DataStream SDK Developer’s Guide to have all available functions for interacting with Vicon data from Unity (look at the .NET example code).

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
â–¼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by unity_essLHl_lC4Qw5A · May 10, 2021 at 04:18 PM

Dear members, my question is a follow up on the current one, and I couldn't post it as a separate question for some reason. Specifically, the question is regarding how can I properly map the segments in Vicon and the bones in my fbx model in Unity. Apologies if it is out of place here.

Hi, I am trying to work with data streaming in real time from Vicon Nexus to Unity. My ultimate goal is to display a hand model in Unity which would move according to the real-time motion of a real hand tracked by Vicon. I am using the Vicon Unity Plugin which includes the Vicon DataStream SDK.

So far I managed to connect to the Vicon server from Unity and I am able to get in Unity real-time coordinates of specific markers or segments. However, I have trouble when it comes to the hand model. I created in Blender a hand .fbx model with armature. For simplicity, the armature consists of two sets of bones constituted by 6 markers: one set has two bones for the index finger, and another set has two bones for the thumb. I imported the model in Unity.

In the meantime I recorder a trial in Vicon Nexus software of a moving hand. Specifically, I created a skeleton template consisting of two separate linked segments: one for the index finger and one for the thumb. I attached this template to my subject in Vicon. Each segment has the same amount of markers as the number of vertices in the .fbx model (3 markers each segment to make two bones for each finger). So, I have a Subject with two segments named "index" and "thumb".

To "make the hand move" in Unity, I attached the SubjectsScript.cs from the Unity plugin and set the respective Subject name. My trouble now is to properly match the segments in Vicon to the bones of the model in the Unity scene. In particular, in Unity I have a GameObject containing the hand mesh and the Armature. Further, the Armature has as children different bones of the index finger, as well as different bones of the thumb. But a bone of the model is defined as a "line" between two vertices whereas a segment in Vicon is a set of bones for the whole index finger of the thumb. Could anyone give me a tip, how exactly I can properly map the Vicon segments and bones of my fbx model? Do I need to modify Motion tracking in Unity using Vicon fbx model / skeletal configuration in Vicon? Or am I missing something basic? Thank you very much in advance!

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
â–¼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

142 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity 2019 sqlite3 connection android 0 Answers

Unity Editor show following error, during Developement 0 Answers

connect a cube and a circle in unity editor ( not by code please) 0 Answers

What's the best way to communicate with server in real time sending and recieving string data ??? 2 Answers

cannot connect asset store via unity editor ( it is just loading) 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges