How to use Windows-made Maxwell Render MXS models in Linux

Updated: February 23, 2024

This tutorial may sound a bit complicated. Perhaps unnecessary. But here it is. You create a model in SketchUp, which you intend to export to Maxwell Render. You apply various materials onto your model, using the palette available in Maxwell Materials Editor. You export your model. You open it in Maxwell Studio in Windows, and everything seems fine. But then, you open the same model in the same program in Linux, and you get an error.

I've been testing Maxwell Render in Linux, and part of that adventure, I wanted to see how flexible my configuration is. Namely, can I move between the Windows machine (with SketchUp running natively), a WINE setup (with SketchUp installed in Linux), and a native Linux setup, since Maxwell is available for that platform, too. By and large, I encountered no major issues when it comes to renders, however, the materials usage did create a wee snag. I opened the MXS file, and Maxwell told me it could not find the materials. All right, let's resolve this.

Teaser

How to recreate the problem

I created a simple model in SketchUp, just a couple of blocks. Then, I applied two Maxwell materials onto them (MXM files). In SketchUp, you won't really see the textures, but they are there, and will be correctly shown inside Maxwell.

No texture shown, materials applied

Export your model. Open it in Maxwell Render under Linux. You may see this error:

Material not found

The error popup reads (bear in mind the specific material name):

The following file could not be found:
C:/users/[username]/Documents/Maxwell/mxmgallery\Aged Bombay_Rosewood.mxm

Used in material: Aged Bombay_Rosewood

Do you want to find a replacement?

The problem occurs for SketchUp-exported MXS models, with Maxwell materials, created in Windows or WINE. If you just use SketchUp materials, there will be no issues. Similarly, if you export to Maxwell Render or Maxwell Studio installed in your Linux machine under WINE, there won't be any issues, either.

Via WINE, materials look fine

Running with WINE ...

And how to fix it - solution

The error is similar to what I've encountered with Windows-created exports for Kerkythea, another awesome 3D rendering program. Much like SketchUp, it's not intended for Linux, but works just fine. There, I fixed the issue by editing the model XML file directly, and replacing the Windows paths for materials with the correct ones for the WINE installation of Kerkythea.

In Maxwell, you cannot directly edit the MXS files, but you can definitely replace the "missing" materials simply by searching for them in their correct path in your Linux filesystem. When you export your SketchUp model, by default, Maxwell will create the following:

When presented with the dialog that says: Do you want to find a replacement, click Yes, and then navigate to the output/textures folder, and for each material, select the correct MXM file. In my case, there were two, so I only had to repeat the process twice.

Correct path

Once you sort this out, your model will preview correctly, and once you render it, you will see the materials as they should be. Hint: You can also quick-check if your materials look the way they should using the FIRE instant preview functionality inside the Studio. But please note that it only works with CPU and not with GPU.

Rendering

Conclusion

And there you go. Mixin' operating systems can introduce its share of complications into any workflow, even if you use the same program. Then, furthermore, if you use WINE, there's another layer to take into account, namely how Windows program see the filesystem (C: drive) and how WINE actually presents it inside Linux. Normally, things are fine, but I've encountered some issues with 3D rendering programs, twice now, and in both cases, it had to do with paths that reference materials used in different models.

With Maxwell Render, the solution is quite simple, so to speak, but you do need to know where your model textures are, and how to re-apply them. Most people probably won't encounter this issue, but if you happen to be one of them, you now have a method on how to gracefully fix the textures errors, and have fully working models in your Linux build. Well, that would be all for this time. See you around.

Cheers.