Clipping Plane Issue
Overview
Since I've updated to Unity 2017.2.0f3 now my clipping plane has become extremely large.
Expected Behavior
I have set the clipping plane near setting to 0.01 on the MixedRealityCamera and I want the hologram to clip just inches in front my my face.
Actual Behavior
I have set the clipping plane near setting to 0.01 on the MixedRealityCamera however the hologram clips out 2-3 feet in front of me.
Steps to reproduce
Described above.
Unity Editor Version
Unity 2017.2.0f3
Mixed Reality Toolkit Release Version
HoloToolkit-Unity-v1.2017.2.0
Part of the problem is that you're using the wrong editor version for both Hololens and IMHD development
I do not really know what you mean. If you mean the wrong versions of Unity and MRTK then what do you suggest I be using?
I swear you guys don't really read the release notes.
That helped! What I did in the first place was based off of your suggestion...
What you'll need to install Unity Editor 2017.2.0p1 MRTP4 or later - I will try again. This did not allow me to compile in VS so I had to change to Unity 2017.2.0f3 Running the Windows Fall Creator's Update Build 1709 or later - Done Visual Studio 2017 build 15.3 or later - Currently build 15.4.4 Window 10 SDK 10.0.16299.0 or later - Done
Stephen, Since I know that you are the most knowledgeable individual on the planet with regards to this. I took another stab at it and this is what happened. After installing I still ended up with issues so I decided to uninstall Unity, VS, and run a cleaner to make sure that my registry was clean of any reference of each software. I then reinstalled the following based off of your release notes: Unity Editor 2017.2.0p1 MRTP4 or later - 2017.2.0p1-MRTP4 Running the Windows Fall Creator's Update Build 1709 or later - Done Visual Studio 2017 build 15.3 or later - Currently build 15.4.4 Window 10 SDK 10.0.16299.0 or later - Done Download of the most up-to-date version of MRTK - https://github.com/Microsoft/MixedRealityToolkit-Unity
Issues: Although I am able to compile and run the hologram on my HoloLens the same issue is happening. Clipping is happening 2-3 feet from head. Over 70 other warnings regarding cursor and animation.
One major issue I also had is that I lost the ability to connect to Universal Windows Platform after reinstalling Unity 2017.2.0p1-MRTP4. The reason this happen is that I used the "Unity Editor 64 bit" standalone installer instead of the UnityDownloadAssistant.exe. The DowloadAssistant.exe gives the option of installing the component while the standalone did not.
Please tell me what I am doing wrong? I would like to reduce this clipping plane to almost nil.
Thank you in advance!
Are you changing the clipping plane on the MixedRealityCamera GameObject settings in the scene, or on the MixedRealityCameraManager script in the Inspector? The script will overwrite any settings set on the GameObject itself.
This script will be visible in the Inspector when you select the camera GameObject. The Transparent settings there will be the ones working on HoloLens.
That updated info really helped get us closer to understanding your problem.
Sorry if I came across as rude, but not acknowledging the correct editor build has been a real problem lately. Knowing you've tried other builds does help us zero in on your issue though.
Do you have a sample project you're willing to share with us on github regarding this issue?
It'd be much easier to just see how you've got things setup to better understand what's happening.
Try resetting the camera prefab as well, making sure there are no changes to it saved in your scene.
Thank you for the replies! Keveleigh - I am not making the changes on the manager script. Just on the MixedRealityCamera Clipping Plane Settings. I am setting it to 0.01. Stephen - Your suggestion was correct as per usual! :) The issue that we have is when you add the Mixed Reality Camera Prefab through Mix Reality Toolkit>Apply Mixed Reality Scene Settings>Add the Mixed Reality Camera Prefab it does not add the HoloLensCamera component of the Prefab. When I manually reset/added the camera prefab the additional camera component showed up with a clipping plane of 0.85. Once I changed that to 0.01 I was good to go. I hope I described the issue well here? Thanks again for your help! Now off to my other main issue... Anchoring!
Wait, I'm not sure that's the right thing to do. You now have both the MixedRealityCameraParent prefab and the HoloLensCamera prefab in your scene? You likely only want one.
If you just use the HoloLensCamera, then yeah, you can change the clipping plane directly on the GameObject. If you just use the MixedRealityCameraParent, then you'll want to change the clipping plane in the Inspector on the MixedRealityCameraManager component, NOT the script itself and NOT the camera's clipping plane. That'll solve your original issue using the prefab you had before.
@keveleigh I think it goes back to the MRCP editor not serializing properly. See #1258
@stephenhodgson Wasn't that fixed?
Also, I disagree because @tspaddock stated:
I am not making the changes on the manager script. Just on the MixedRealityCamera Clipping Plane Settings
Which sounds like it has nothing to do with an issue in the script, just setting the clipping plane in the wrong place. Any change on the camera will be overwritten by the script on launch.
It was fixed, but not in the the release he said he was using (v1.2017.2.0)
Ahh yes, that's true.
@StephenHodgson
I'm using unity editor 2017.4.1f1 and MixedRealityToolkit-Unity version 2017.4.0.0, after I changed the 'Clipping Plane - near' field to 0.01, the MixedRealityCamera still has the same issue, but HoloLensCamera works very well. I know that HoloLensCamera will be deprecated, so it not good to use it.
In my scenario, I hope user can see the very near hologram, which even near 20cm in front of their face.
Could you please tell me why?
thanks,
@zhangalex You need to set the clipping plane on the MixedRealityCameraManager script in the Inspector. The script will overwrite any settings set on the GameObject itself.
This script will be visible in the Inspector when you select the MixedRealityCamera GameObject. The Transparent settings there are the ones being set on HoloLens.
EDIT: Though I forgot to mention, definitely make sure to check @ChimeraScorn's comment below.
@keveleigh
Thanks.
Be careful setting the clipping plane that close… Rendering holograms there will make most people somewhat uncomfortable because of accommodation/vergence conflict.