RodZill4 / material-maker

A procedural textures authoring and 3D model painting tool based on the Godot game engine
MIT License
3.34k stars 215 forks source link

Unreal 5 Export : No module named 'mm' #615

Open RomualdDub opened 1 year ago

RomualdDub commented 1 year ago

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 commented 1 year ago

"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.

phil123456 commented 6 months ago

not working for me

image image image
rlr71353 commented 2 months ago

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.

RodZill4 commented 2 months ago

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.

rlr71353 commented 2 months ago

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?