Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 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 Eco-Editor · Mar 28, 2017 at 02:49 PM · vrpluginoculuslogexternal-application

Getting log from unity and ECG physiological markers using VB script

Hello all,

I'm doing a project for my masters, where we use unity for VR, and we want to have people to be in the trial and experience this VR space and be connected to ECG, for reading their heart beat as a physiological marker.

My questions are thus, 1. Does anyone knows of such a pipeline of unity and external machine like ECG or EEG, and what logs can I get? (it's a tough one, not sure I understand it myself) 2. Can I record the trial using a plugin maybe, so all the time the user in the VR, his trial is recorded and I can watch it latter on.

EDIT: Does anyone knows if I can integrate VBscript API's with UNITY3D?

Thanks!

Comment
Add comment · Show 2
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 meat5000 ♦ · Mar 28, 2017 at 03:22 PM 0
Share

Not sure I quite understand your question.

https://www.google.co.uk/search?q=unity+output+to+usb&ie=utf-8&oe=utf-8&client=ubuntu&channel=fs&gfe_rd=cr&ei=oH_aW$$anonymous$$C$$anonymous$$EsqstgehnyE&gws_rd=ssl

The nature of the external machine is irrelevant. You just need to know if and how you can output the data through an IO port.

Please do not rely on Unity for Realtime $$anonymous$$edical Diagnosis/$$anonymous$$onitoring. It is a loosely ticking Game Engine and most definitely does NOT have the accuracy required for actual medical devices. (Of course for something non-critical as you are suggesting, Unity should be great; just don't stake peoples' lives on its operation).

avatar image Eco-Editor meat5000 ♦ · Apr 06, 2017 at 07:35 PM 0
Share

Hi,

Thanks for the link, its really helping focusing my search.

It's really nothing operational or intrusive, it's a psycho-biological trial, when people experience a VR environment and their heart rate is measured, and I need to see that there's a relation between their heart rate and the events (trigger) in the simulation, to see if there's any causality. So, I need to learn, how do I record the trigger, once the user is experiencing an event. It's very common in psychology, to for example show a picture and see the physiological reaction to the picture on the exact time it shown, this is called a trigger. How do I generate triggers with Unity? How can I synchronize unity3D, with the ECG (heart activity recorder) "time wise" - so it's synchronized per each event?

I'm going to look farther into what you've suggested, any help is great here. Thanks.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by FortisVenaliter · Apr 06, 2017 at 10:49 PM

I would definitely recommend separating the processes. You can run the ECG/EEG from a program that's completely separate from the Unity program. You could even run them from different computers due to @meat5000's concerns. But unless the ECG/EEG will affect anything in the game, it would likely be much easier to do run them separately, then combine any data after the fact. Plus, the added bonus of that would be that the machine likely already comes with monitoring software you can use out of the box.

Comment
Add comment · Show 4 · 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 Eco-Editor · Apr 06, 2017 at 11:45 PM 0
Share

Hi,

Let's see if I understand the whole pipeline here: After the simulation is build (like a game), it can run on any computer, one fit for VR. The ECG is on a separate device with a software (I have these). VR computer is connected to the recording device with a USB, the same device that records the Heart Activity and translates it into a signal. While the simulation is running, the user is entering a trigger collider and the machine needs to "register" that time. Will it be by a code? Perhaps a c# code that says: when a user is in the collider, send log with exact time and date. So I look back at the trial and be able to analyze, maybe even print that/these "log/s".

Also the connecting of the "build" environment with the USB to the recorder, requires a script?

I think this tutorial might be helpful: https://www.youtube.com/watch?v=6vl1IY$$anonymous$$pwVQ and this one: https://www.youtube.com/watch?v=Qffgl_vz$$anonymous$$QE

If you have more please share.

avatar image FortisVenaliter Eco-Editor · Apr 07, 2017 at 03:52 PM 0
Share

Yeah, that was basically what I was suggesting. Just have both programs separately write out logs with timestamps. Then you can correlate the data afterwards separately, or even write a quick C# program to combine and analyze them if it's a lot of data.

I wouldn't even bother connecting the two though, until after the simulation. Let them run separately and combine after.

avatar image Eco-Editor · Apr 07, 2017 at 10:02 PM 0
Share

Just have both programs separately write out logs with timestamps.

How do you get unity to create these "logs with timestamps"?

avatar image FortisVenaliter Eco-Editor · Apr 07, 2017 at 10:30 PM 0
Share

If you're running on Windows, then the same as any program. Use the System.IO namespace, particularly the StreamWriter class.

avatar image
0

Answer by agirault · Jun 17, 2019 at 09:25 PM

Very late to the game here, but if you want to "simulate" an ECG or any other vitals in Unity, this asset it now available for free: https://assetstore.unity.com/packages/tools/integration/pulse-physiology-engine-139773

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

85 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

Related Questions

XR Management package not importing correctly 1 Answer

2019.3 Oculus XR Plugin play mode does not work for Oculus Quest 0 Answers

How can I resolve Fence ReleaseSync error in VR mode? 2 Answers

[Oculus Rift] AvatarSurfaceShaderSelfOcluding.shader will not import 0 Answers

Connect OVRGearVrController to Scene 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