- All versions of PhotoMesh
When using a remote desktop connection to operate PhotoMesh, some reconstruction tiles fail and you get an error message in the log “Could not create Direct3D.”
In some versions of Windows, a bug in the Windows Display Driver Model (WDDM) prevents remote desktop sessions from connecting multiple times. While the first remote desktop connection after a reboot or power up will work, subsequent connections to the remote desktop protocol (RDP) will fail. As a result, reconstruction tiles may fail and you may receive the log error: “Could not create Direct3D.” Direct3D is used to render the 3D graphics of the 3D reconstruction. Since WDDM is preventing the connection to the remote desktop, the Direct3D surfaces cannot be shared.
There are two available solutions:
- Disable WDDM - When WDDM is disabled, the Remote Desktop Connections will automatically use the XDDM graphics display driver, which supports multiple reconnections to the RDP.
- Create a batch file - Disconnect from RDP using a batch file. This will enable the graphic device to continue processing PhotoMesh tasks, even upon RDP disconnect. This solution can be used if you cannot change registry or group policy (usually because you don’t have admin rights or the necessary permissions).
- In the Windows search box, type gpedit.msc, and press Enter. Then navigate to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Remote Session Environment.
- In the main window, double-click Use WDDM graphics display driver for remote Desktop Connections. The following dialog box is displayed.
- Select the Disabled option, and click OK.
- For this change to take effect, you must restart Windows.
- Alternatively, you can run the following instruction from CMD/PowerShell with Admin rights:
REG ADD “HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services” /v “fEnableWddmDriver” /t REG_DWORD /d 0 /f
Create Batch File
- Create a text file with the following -
for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do (
%windir%\System32\tscon.exe %%s /dest:console
- Save the text file on your desktop as a batch file (.bat).
- Run this batch file when you are about to disconnect the machine.