Jump to content

MacBread

Verified Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by MacBread

  1. Hello! I have a critical problem about SDK in Unity editor. When I run SDK's sample scene, It occurs very often even if there are no errors or cautions starting unity project. Headset sees sensors very well and Steam VR shows no problems about that. If you know about this error, please inform me your valuable tips! At least, if I know what occurs this error, I may be cautious about that. Hope you all safe in pandemic. @Daniel_Y
  2. Hello developers! hope you safe from corona virus. I found a difference between older SRwork api and newest (0.9.3.0) and wonder if you have same issue. I put additional objects as a child of each camera, so let them be fixed on camera always. But, when I put them on "Dual Camera", there is some delay between turning head and linked objects. While not on "Render Camera". In older api, I remember that cameras were not separated into two like picture above. Is it intended or sth strange? Do you have same issue? @Daniel_Y @Jad @Corvus
  3. Hi and happy new year! I did stereo calibration with 2 webcams through opencv dll import in C# script refering SRWork SDK's stereo calibration method and OpenCV tutorials from Google. Then I meet a severe frame drop. As I know and understand from "ViveSR_DualCameraImagePlane.cs" and "ViveSR_DualCameraImageCapture.cs", SRWork SDK uses opencv dll import also. (Of course mine is surely poor) And VR front camera stereo calibration doesnt have any frame drop or lag. I re-mapped texture in OpenCV dll. 'cause I heard processing in dll is faster than in C#. But, when I run in Unity, SRWork works perfect while what I did works very poor.. May I ask How can I approach this problem? sorry for vague question T.T @Daniel_Y @zzy @Andy.YC_Wang @Sean_Su
  4. I solved that using 'PlayerPrefs'. (https://forum.unity.com/threads/playerprefs-saves-registry-name-strange.784061/) or Image below I get reply and some tips from Unity forum and C# tutorial blogs about 'PlayerPrefs' has a security weak point. Get in mind about this problem first. Anyway in my case, I get no more errors about 'Registry'. But It still can not update its relativeangle or absoluteangle. If you want to get rotation values of VR HMD, I think to get values from a Object 'Camera (eye)' using this method may help you. ps. @Daniel_Y May I ask you when next version of SDK will be released?...
  5. Thx Daniel! After copying ViveSR\Plugins\Model folder in my own EXE's Plugins folder, It works very well. I wonder why my build needs these files. I thought I didn't use any of AI.Vision function while modification. 😛 And problem on example build is done. I moved Vive_SRWorks.exe and Data folder to desktop. I guess maybe some special symbols( such as + or _ ) disturbed it. Again really thx Daniel 🙂
  6. Hi developers! I modified SRwork sample scene adding some objects and script. Build was successful and It runs very well on Unity editor as I want without any error on Unity console. But on .exe file SRwork doesnt work at all like below. Even 2 examples in Build-Unity-0.8.0.2\Plugin or \Experience show same. I run that on 1050Ti (Pascal), i7-7700, and Windows 10. They dont give any clue to solve problem.. need your help! @Daniel_Y @Andy.YC_Wang
  7. [ Solved? ] I find a method "PlayerPrefs"... Except security problem (key modification on Regedit), It works quite well!... Trying to reading value from Labview side. I hope they work fine in real-time.
  8. I 'm connecting Unity with Vive pro to Labview to control external camera. I knew very conventional way to send value(X, Y, Z rotation value) through text file output. but It is a bit slow and not real-time. text file should be closed for reading from Labview. So I found some on google way to send value. but I wonder these are available and what do you think which method is best way for real-time connection. 1) Read registry As I know, SRwork updates its internal value to registry. (HKEY_CURRENT_USER\\Vive_SRWorks) No need to make complex function. some works needed on Labview. but It seems not work. registry values are still 0 while running and can't build at now. like a topic below. sad.. ;( 2) Command line (Communicate through CMD) 3) TCP/IP - http://www.ni.com/tutorial/10060/en/#toc6 NI shows examples to connect Labview. but these seems to hard from tutorial.. anyway I'm studying about this. How do you think? I need your help! 🙂 @Jad, @Daniel_Y, @Dario, @Corvus @Andy.YC_Wang
  9. You're right, I checked 3 layers are made(left, right, eye). sad to hear no better version exist.. thx for reply! @Daniel_Y
  10. Since I update Unity to 2019.2.12f from 2019.2.4f SRwork cant work properly from initial setting. I think I may found recommend version in sdk download link. But it says nothing..
  11. Thx Corvus! I read Dario's article and I success to project front camera's video stream on HMD with Dario's tutorial and ViveSR sample both!... I think ViveSR sample code may be fit for me more. Dario's one doesn't seem like for Pro with 2 cams... ps. Where can I access more detail examples and "how to" about Pro/Pro-eye's API? Vive's API just shows me "Func A is for B."... Or I need to learn more C#?
  12. I'm trying to show 2 kinds of screens(external camera - or webcam / front camera on HMD) on lens. I find a function? class? "WebCamDevice" - https://docs.unity3d.com/2020.1/Documentation/ScriptReference/WebCamDevice.html and also a project using that on Oculus VR. Anyway I imitate that project for study how to use that. I thought front camera is connected with PC so may they capture that cameras as webcams. but It doesnt. how can I project a texture on any object with a video from front camera? Is "WebCam" sth function right? this is an example what I want to do... that 2 Main Camera means 2 lens for stereoscopy and 2 quads are for screen sth(from Webcam or Front camera). I will attach a code I found at the bottom. It is tooo long to put here... I'm beginner in VR and Unity so I may think wrong about that. hope your wisdom and know-how!... thx developers! ------------------------------------------------------------------------------------------------------------------------------------------------- using System.Collections; using System.Collections.Generic; using UnityEngine; public class WebcamTexture : MonoBehaviour { WebCamTexture webcamTexture; public int webcamNumber; float cameraAspect; private float margin = 0f; public float scaleFactor = 1f; public bool rotatePlane = false; public bool fitting = false; //Transform cameraOVR; //public static Vector3 cameraPos; // Use this for initialization void Start() { WebCamDevice[] devices = WebCamTexture.devices; webcamTexture = new WebCamTexture(); if (devices.Length > 0) { webcamTexture.deviceName = devices[webcamNumber].name; Renderer renderer = GetComponent<Renderer>(); renderer.material.mainTexture = webcamTexture; webcamTexture.Play(); } if (rotatePlane) transform.Rotate(Vector3.forward, 180); if (fitting) FitScreen(); // camera position //cameraOVR = GameObject.Find("OVRCameraController") as Transform; } void FitScreen() { Camera cam = transform.parent.GetComponent<Camera>(); float height = cam.orthographicSize * 2.0f; float width = height * Screen.width / Screen.height; float fix = 0; if (width > height) fix = width + margin; if (width < height) fix = height + margin; transform.localScale = new Vector3((fix / scaleFactor) * 4 / 3, fix / scaleFactor, 0.1f); } // Update is called once per frame void Update() { //cameraPos = cameraOVR.position; //print(cameraPos); } } @Corvus @Daniel_Y
×
×
  • Create New...