Showing results for 
Search instead for 
Did you mean: 
Honored Contributor III

Unity Tip: Enhancing Your RealSense Project's Graphics Further In Unity 5

Hi everyone,

I came across a simple tip that can easily upgrade the performance of the graphics in your project in Unity 5.  I noticed that at the top of my Unity window was the text <DX9>'.  This refers to an obsolete Windows graphics API called DirectX 9.  It is years old, and the majority of modern PCs use the superior DirectX11, with support for the latest DX12 coming soon in Unity 5. 

If your project has not been set to DX11 by default when you created it, here is how to adjust the setting.  Doing so does not seem to have any negative impact on the performance of RealSense-controlled objects.

!.  Go to the 'Edit' menu and select the 'Project Settings' option, then the 'Player' sub-option.  This will display the 'Player' category of project settings in the Inspector panel.

2.  Go to the bottom 'Other Settings' section and left-click on it to expand open the settings in this category.


3.  Go to the 'Graphics API for Windows' setting.  Beneath it is a '+' button and a '-' button.

Left-clicking on the '+' button opens a list of graphics APIs, including DirectX, from which you can select 'Direct3D11' to set your project to use DirectX 11 instead of DirectX 9.

If you wish, you can left-click on the existing 'Direct3D 9' setting to highlight it and then click the '-' button to remove support for that older standard from your project (like I did below in my own settings).


4.  When you select the 'Direct3D11' option, Unity 5 will tell you that the graphics in the project have to be reloaded for DirectX 11 and give you the chance to save your project.  After a short pause, the word '<DX9>' at the top of the Unity window will be replaced with '<DX11>' and all of the graphics in your project will now be using the modern graphics standard (assuming you have DirectX11 installed on your computer, which you likely already do if using Windows 8.1 and newer).

Here is a comparison of my RealSense-powered full-body avatar in DX9 (top) and X11 (bottom).  It is clear to see that DX11 brings out deeper detail in textures, especially ones with a rough-grain surface such as the wood ceiling, kitchen floor tiles and the avatar fur.


0 Kudos
0 Replies