Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.

Unity performance issues with large (full-screen) hologram

Hi all,

I've started the process of bringing our app up to the requisite 60 fps, and I've been having some strange issues. It seems I simply can't draw a full screen's worth of pixels with the holotoolkit-unity/standardFast shader - no matter how minimal the scene:

Repro steps

Create a new scene in Unity
Setup for Hololens (Holotoolkit settings/camera etc)
Delete all lights
Add FPSCounter prefab
Create a default sphere (GameObject ->3D Object->Sphere)
Set sphere position to (0, 0, 2.35), reset any other transform components
Create a new material (Assets->Create->Material), assign a Holotoolkit->StandardFast shader and apply to the sphere.
Add the following script to the sphere:

public class TestPerf : MonoBehaviour {
void Update () {
float sinScale = (float)Math.Sin(Time.time);
transform.localScale = new UnityEngine.Vector3(sinScale, sinScale, 1.0f);
}
}

The point of this script is simply to create a varying draw load – the sphere will go from 0% of the screen to nearly 100%.

Build, set to release, deploy to device. Watch the sphere scale in and out, and notice the FPS drop to 30fps each time the sphere fills the viewpoint.

Note: I can maintain 60FPS with the unlit shaders. However, it seems rather strange that the GPU could not handle the load of a single object/no lights/no textures on the standard shader. Is this expected behaviour?

Whats really strange is that we drop to 30fps over this trivial load, but as I load the scene up with the rest of the scene (100s of thousands of poly's) it stays pegged at 30fps and doesn't miss a beat.

I would suspect the FPSCounter prefab was not 100% accurate, but the scene definitely feels like 30fps when it says 30fps.

Tagged:

Best Answer

Answers

  • Make sure you are building in Release mode (in Visual Studio) rather than Debug - it made a HUGE difference for me, far more than with any other device I've used. My app went from choppy as heck to smooth as butter.

  • Thanks for the suggestion - yes, I saw the difference between debug and release too (and was surprised it was so big). But this is different - the bottleneck is (almost) certainly the fragment shader, so even if I was running in debug mode it shouldn't affect the GPU's performance.

  • @MrSteveT did you set the project quality settings for Unity to Fastest?

    Windows Holographic User Group Redmond

    WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
    WinHUGR YouTube Channel -- live streamed meetings

  • @Holosheep - yes, I set the quality settings to fastest. I also tried disabling any other performance related items. As far as I can tell, there is a single instruction being executed per pixel shade to get 60fps.

    I guess this is -not- an expected result then? I'll keep digging to see if there is any further options.

  • I've had similar issues MrSteve, and ended up doing the same.

    Stephen Hodgson
    Microsoft HoloLens Agency Readiness Program
    Virtual Solutions Developer at Saab
    HoloToolkit-Unity Moderator

Sign In or Register to comment.