material-maker icon indicating copy to clipboard operation
material-maker copied to clipboard

Unreal 5 Export : No module named 'mm'

Open RomualdDub opened this issue 2 years ago • 5 comments

Material Maker 1.3 Windows 10

When exporting a material for Unreal 5. Following the documentation : https://rodzill4.github.io/material-maker/doc/export.html?highlight=unreal%205#unreal-engine-5 I have an error when executing the clipboard content into the Unreal Python prompt :

LogPython: Error: Traceback (most recent call last):
LogPython: Error:   File "D:/material_maker_1_3_windows/export/term.py", line 2, in <module>
LogPython: Error:     import mm
LogPython: Error: ModuleNotFoundError: No module named 'mm'

RomualdDub avatar May 24 '23 14:05 RomualdDub

"mm.py" is located in "material-maker-master\material_maker\misc\export" in the source .zip, but missing in the release files. Copying the "mm.py" file in the "export" folder solves the problem.

RomualdDub avatar May 25 '23 08:05 RomualdDub

not working for me image image image

phil123456 avatar Dec 25 '23 10:12 phil123456

Has there been a solution to this issue?

The first time I tried to export to UE5, I got these Python messages in UE after executing the line loaded in the clipboard;

LogPython: Error: Traceback (most recent call last): LogPython: Error: File "E:/MatMake/material_maker_1_3_windows/export/bricks_unreal5.py", line 4, in LogPython: Error: reload(mm) LogPython: Error: File "C:\Program Files\Epic Games\UE_5.3\Engine\Binaries\ThirdParty\Python3\Win64\lib\importlib_init_.py", line 168, in reload LogPython: Error: raise ModuleNotFoundError(f"spec not found for the module {name!r}", name=name) LogPython: Error: ModuleNotFoundError: spec not found for the module 'mm'

So I tried copying mm.py to the above referenced importlib directory, Then I got these error messages;

LogPython: "E:/MatMake/material_maker_1_3_windows/export/bricks_unreal5.py" LogPython: Error: Traceback (most recent call last): LogPython: Error: File "E:/MatMake/material_maker_1_3_windows/export/bricks_unreal5.py", line 2, in LogPython: Error: import mm LogPython: Error: ModuleNotFoundError: No module named 'mm'

Progress I guess but still no joy. Thinking it's a symptom of installing MM my E drive while UE is installed on my C drive, I deleted mm.py from the importlib directory and installed MM on my C drive with material_maker_1_3_windows as the main directory. I got the same error messages as the attempt before. I know next to nothing about Python so I don't know what else to try.

rlr71353 avatar Apr 11 '24 20:04 rlr71353

Has there been a solution to this issue?

You have to add the path to the mm.py file in Unreal Engine's Python path.

RodZill4 avatar Apr 12 '24 04:04 RodZill4

Thanks, I forgot about that while doing different installs.

I had a faint hope that you had found a way to import an editable procedural UE material with MM's fantastic nodes (that put UE's to shame), it was a bit of a let down to just see three (admittedly great) texture images attached to a PBR output. I realize my expectations were unrealistic.

The imported UE material has a two disconnected nodes, Default Texture Object and ParallaxOcclusionMapping. How do these relate to the original MM material?

rlr71353 avatar Apr 13 '24 01:04 rlr71353