ViveSoftware / ViveInputUtility-Unity

A toolkit that helps developing/prototyping VR apps.
http://u3d.as/uF7
Other
357 stars 81 forks source link

Camera Input on a quad inside unity is scaled 3 times when viewed inside HTC VIVE #82

Open junglee372018 opened 5 years ago

junglee372018 commented 5 years ago

Hi,

I am trying to get the camera input from Logitech USB Cam and displaying onto a quad inside Unity. The Camera Input on a quad is scaled 3 times when viewed inside HTC VIVE, when trying to get a full screen VR Effect.

How to fix it?

Upgrading to HTC Pro is the only option or is there any way to render 2D images on to the HTC vive screen with over scaling the image for getting a AR effect same as HTC Pro.

kindly waiting for your reply.

chengnay commented 5 years ago

Do you have sample project for us to test on HTC VIVE and HTC VIVE Pro, so that I can quickly figure out what is the best way to help you on this issue.

junglee372018 commented 5 years ago

Hi,

I want to get the AR effect into HTC VIVE using external USB logitec CAM.

Is there any way possible to replicate the ar effect in HTC vive in unity same as the effect we get when using the HTC VIVE PRO SRWORKS

https://www.youtube.com/watch?time_continue=108&v=xkw133wvPYM

Project link:

chengnay commented 5 years ago

Hi,

I want to get the AR effect into HTC VIVE using external USB logitec CAM.

Is there any way possible to replicate the ar effect in HTC vive in unity same as the effect we get when using the HTC VIVE PRO SRWORKS

https://www.youtube.com/watch?time_continue=108&v=xkw133wvPYM

Project link:

Project link is empty? Can you provide a scene for us to test? It is kinda hard to imagine from your description.

junglee372018 commented 5 years ago

Project link: https://www.dropbox.com/s/pd7g1m5zr9c5mbt/HTCVive_AR.unitypackage?dl=0

chengnay commented 5 years ago

Can you provide a screenshot on what you will see on Unity preview screen? I use Vive Pro and get the result as below, image

The camera seems to render upside down.

junglee372018 commented 5 years ago

hi , I too got the same inverted,we are fixing it.

The main Doubt we have is, the output shown in the htc vive pro when using srworks and internal HTC VIVE PRO camera, can we get the same one in HTC VIVE (old) using external Logitech cam as shown in the below video.

https://www.youtube.com/watch?time_continue=108&v=xkw133wvPYM

by using the srworks sdk we get the above output but the sdk only supports HTC Vive pro.

So i am trying to display the Logitech camera input onto a quad and using the default unity camera i am trying to render into HTC Vive, but the images are looking very large.

Is there any way to render the quad with the same aspect ratio as shown in the desktop.

kindly waiting for your reply. htcsnap

chengnay commented 5 years ago

@junglee372018 Can you trigger a new thread in SRWORKS forum, I think your problem is more related to SRWORKS than VIU.

junglee372018 commented 5 years ago

Hi,

thank you for the responce.

SRworks does not work with HTC Vive(old) ,so only way is to render the camera input on a quad and showing in the HTC VIve.

My issue is the image is over-scaled when viewed through HTC Vive, like the the image is scaled exponentially, i cannot take a snapshot of it. Play the test scene and wear the HMD you clearly see that the image is rendered very big with respect to the aspect ratio of the game view and scene view.

As you can see in the scene view and game view in the above attached image and crosscheck with the output of HTC Vive HMD.

kindly waiting for your reply.

chengnay commented 5 years ago

Hi,

thank you for the responce.

SRworks does not work with HTC Vive(old) ,so only way is to render the camera input on a quad and showing in the HTC VIve.

My issue is the image is over-scaled when viewed through HTC Vive, like the the image is scaled exponentially, i cannot take a snapshot of it. Play the test scene and wear the HMD you clearly see that the image is rendered very big with respect to the aspect ratio of the game view and scene view.

As you can see in the scene view and game view in the above attached image and crosscheck with the output of HTC Vive HMD.

kindly waiting for your reply.

I will try to see if I can help adjust the scale, but I am not Pro at this part, so I need more time to check. By the way, no guarantee that I can fix it. I suggest that you still can start a new thread at that forum, I am sure there will be SRWORKS engineers to help out too.

junglee372018 commented 5 years ago

Thank you for the help.

Will post also in SRWorks form.

dariol commented 5 years ago

did you see this dated blog: https://medium.com/@dariony/augmented-virtuality-119febdc1b17

(may also check out previous one blog as well) basically you have to account for the downward angle of the original Vive camera, and there won't be an easy way to bypass that without distorting the image.