SH3D on Windows 10 on ARM works using DirectX

This topic has been viewed 15228 times and has 10 replies
Thread status: Active
Still a problem with your graphic card? [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
arm64appcompatguy
Posts: 7
Joined: Fri Jun 08, 2018 12:54 am

SH3D on Windows 10 on ARM works using DirectX

Post by arm64appcompatguy »

Hi,

I'm one of the Microsoft employees tasked with getting various apps to work well on Windows 10 on ARM. Sweet Home 3D is on my list.

One of the unfortunate limitations of the current ARM64 Windows devices is that they have no OpenGL support in their drivers. This means that the amazing Windows installer provided by Sweet Home 3D works fine, but the application tends to either crash on start or leave the rendering area blank. Because of this I added an app compat shim to block the current major revision of the installer from running.

Not satisfied with this, I went digging on the forum and found this wonderful post:
http://www.sweethome3d.com/support/foru ... 8_offset,7

The instructions there for using the JAR version of the program with -Dj3d.rend=d3d work beautifully, and Sweet Home 3D actually performs quite well under our emulation.

I hope this helps someone out. Sweet Home 3D is really a neat product.

Thanks!
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: SH3D on Windows 10 on ARM works using DirectX

Post by Puybaret »

Thanks for your tests [:)]

The DirectX version of Java 3D requires to run Sweet Home 3D in 32 bit.
Isn't it a problem under ARM64?
Did you run Sweet Home 3D with its JAR Executable version or from the installer running with [font=courier new]/j3d.version=1.5.2 /os.arch=x86[/font] flags and a [font=courier new]SweetHome3D.l4j.ini[/font] file containing DirectX properties placed in Sweet Home 3D installation folder?
Emmanuel Puybaret, Sweet Home 3D creator
arm64appcompatguy
Posts: 7
Joined: Fri Jun 08, 2018 12:54 am

Re: SH3D on Windows 10 on ARM works using DirectX

Post by arm64appcompatguy »

Glad I can help :)

ARM64 Windows has 32-bit Intel/AMD CPU emulation software. This allows it to run normal 32-bit Java programs quite well.

Sadly, in all of my research and experimentation I did not see those installer flags and I'm not sure what to put in the INI. I'll work on that since the EXE installer is quite preferable to what I got working!

My steps:
  1. Install a 32-bit x86 JRE (like Oracle's Java SE JRE)
  2. Use the downloads page to download the "Sweet Home 3D executable jar"
  3. Invoke the JRE on the JAR file with D3D options:

    Code: Select all

    java -Dj3d.rend=d3d -jar SweetHome3D-5.7.jar

    [/list=1]
arm64appcompatguy
Posts: 7
Joined: Fri Jun 08, 2018 12:54 am

Re: SH3D on Windows 10 on ARM works using DirectX

Post by arm64appcompatguy »

I was able to use the normal Windows installer just like you suggested:
  1. Download (but don't run!) Windows installer from the downloads page.
  2. Follow the instructions on the page you listed to install with J3D 1.5.2
  3. Create a text file next to SweetHome3D.exe named SweetHome3D.l4j.ini with these contents:

    Code: Select all

    -Dj3d.rend=d3d
  4. Start Sweet Home 3D normally
    [/list=1]

    Would you be OK with the OS compatibility layer automatically adding the needed installer arguments and INI entry on ARM64? This wouldn't be applied once the version exceeds, say, 5.7.

    I still haven't figured out how to get High DPI support working right using the INI file. The INI entries suggested in the FAQ have no effect and don't seem to track changes in the OS' DPI settings.
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: SH3D on Windows 10 on ARM works using DirectX

Post by Puybaret »

Actually, I think that the list of properties in the [font=courier new]SweetHome3D.l4j.ini[/font] should be a little longer:

Code: Select all

-Dj3d.rend=d3d
-Dsun.java2d.d3d=true
-Dsun.java2d.noddraw=false
-Dsun.java2d.ddoffscreen=true
-Dsun.java2d.ddscale=true
but maybe [font=courier new]-Dj3d.rend=d3d[/font] is enough in your case...
Would you be OK with the OS compatibility layer automatically adding the needed installer arguments and INI entry on ARM64?
As it's possible to test ARM64 architecture in Inno Setup, it should be even possible to change the installer in such a way that when running under ARM64, it will install by default Sweet Home 3D in 32 bit with Java 3D 1.5.2 and [font=courier new]j3d.rend[/font] property set to [font=courier new]d3d[/font].
I still haven't figured out how to get High DPI support working right using the INI file. The INI entries suggested in the FAQ have no effect
Do you mean you tried to add the following properties:

Code: Select all

-Dcom.eteks.sweethome3d.resolutionScale=2.5 
-Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel
-Dswing.plaf.metal.controlFont=Dialog-11  
-Dswing.plaf.metal.userFont=SansSerif-11  
-Dswing.plaf.metal.systemFont=SansSerif-11
to [font=courier new]SweetHome3D.l4j.ini[/font] file?
Emmanuel Puybaret, Sweet Home 3D creator
arm64appcompatguy
Posts: 7
Joined: Fri Jun 08, 2018 12:54 am

Re: SH3D on Windows 10 on ARM works using DirectX

Post by arm64appcompatguy »

Hi again!

While -Dj3d.rend=d3d gets it minimally working in the ARM64 case, I defer to your judgement.

Getting the installer to automatically set it up right would be magnificent. The less the OS does special, the better! If you go this route, please post here when the new installer is up. :)

As for high-DPI, yes, I believe that was the combination of settings I tried...but I'll try again. It's been a while. (This is plain high-DPI trouble, not ARM64-specific, so I'm not particularly worried about it myself.)
arm64appcompatguy
Posts: 7
Joined: Fri Jun 08, 2018 12:54 am

Re: SH3D on Windows 10 on ARM works using DirectX

Post by arm64appcompatguy »

Confirmed: those settings don't fix high-dpi issues in SH3d on ARM64.
arm64appcompatguy
Posts: 7
Joined: Fri Jun 08, 2018 12:54 am

Re: SH3D on Windows 10 on ARM works using DirectX

Post by arm64appcompatguy »

I hope you'll excuse that last response; my testing environment was not sane and the standard entries work magnificently. More in a moment.
arm64appcompatguy
Posts: 7
Joined: Fri Jun 08, 2018 12:54 am

Re: SH3D on Windows 10 on ARM works using DirectX

Post by arm64appcompatguy »

So, until the installer is fixed, here's how to get Sweet Home 3D working on Windows 10 on ARM:
  1. Make sure you are running the latest Windows updates.
  2. If you have already installed Sweet Home 3D, uninstall it. (Start -> Settings -> Apps -> Sweet Home 3D -> Uninstall)
  3. Download and save the Sweet Home 3D installer file. (for example, SweetHome3D-5.7-windows.exe)
  4. Right-click on the Start button and select Run.
  5. Type the location and name of the installer file, then add "/os.arch=x86 /j3d.version=1.5.2". (Downloads\SweetHome3D-5.7-windows.exe /os.arch=x86 /j3d.version=1.5.2)
  6. Once the installer has finished, open Explorer and find SweetHome3D.exe. ("C:\Program Files (X86)\Sweet Home 3D\SweetHome3D.exe")
  7. Create a file next to it named "SweetHome3d.l4j.ini".
  8. Open the new file and add this text to it (might have to run Notepad as Administrator):

    Code: Select all

    -Dj3d.rend=d3d
    -Dsun.java2d.d3d=true
    -Dsun.java2d.noddraw=false
    -Dsun.java2d.ddoffscreen=true
    -Dsun.java2d.ddscale=true
    -Dcom.eteks.sweethome3d.resolutionScale=2.5 
    -Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel
    -Dswing.plaf.metal.controlFont=Dialog-11  
    -Dswing.plaf.metal.userFont=SansSerif-11  
    -Dswing.plaf.metal.systemFont=SansSerif-11
    (This tells Sweet Home 3D to work with the limited OpenGL support and sweet high-DPI screens these devices come with.)
  9. Save and close the file.
  10. Launch Sweet Home 3D like normal.
    [/list=1]
    Hopefully that gets you rolling!
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: SH3D on Windows 10 on ARM works using DirectX

Post by Puybaret »

I integrated your proposal in the version 6.0 Beta 12 found here.
Could you test it please?
Emmanuel Puybaret, Sweet Home 3D creator
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 2 guests