Nicolas-Constanty / AutoRemesher-Blender

Blender addon for AutoRemesher by huxingyi
GNU General Public License v3.0
88 stars 3 forks source link

Error When Enabling the Addon on Blender 2.91 #4

Open filibis opened 3 years ago

filibis commented 3 years ago

Hi, I just wanted to test on Blender 2.91.0 (Windos 10 - 64bit) but had this error when enabling the addon at preferences:

Traceback (most recent call last): File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\modules\addon_utils.py", line 351, in enable mod = import(module_name) File "C:\Users\filibis\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\mesh_autoremesher__init__.py", line 3, in from .src.autoremesherui import AutoRemesherSettings, OBJECT_OT_autoremesher, MAINPANEL_PT_autoremesher File "C:\Users\filibis\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\mesh_autoremesher\src\autoremesherui.py", line 2, in from .autoremesher import generate_quad_mesh ImportError: DLL load failed: %1 ge├ğerli bir Win32 uygulamas─▒ de─şil.

I believe last sentence trying to say "DLL Load failed: It's not a valid Win32 file." I hope it'll be useful for debugging. Cheers!

toruki13 commented 3 years ago

It happens on 2.92 beta too,

Traceback (most recent call last): File "C:\Users\roger\Downloads\blender-2.92.0-5d215d522541-windows64\blender-2.92.0-5d215d522541-windows64\2.92\scripts\modules\addon_utils.py", line 351, in enable mod = import(module_name) File "C:\Users\roger\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\mesh_autoremesher__init__.py", line 3, in from .src.autoremesherui import AutoRemesherSettings, OBJECT_OT_autoremesher, MAINPANEL_PT_autoremesher File "C:\Users\roger\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\mesh_autoremesher\src\autoremesherui.py", line 2, in from .autoremesher import generate_quad_mesh ImportError: DLL load failed: The specified module could not be found.

Maybe we are following wrong installation steps

Nicolas-Constanty commented 3 years ago

Hi @filibis and @toruki13 , thank you for your feedbacks.

These kind of issues are pretty generics, usually it's related to :

@filibis I think that might be the first option, I tested the Addon with Blender 2.91 installed via Steam. I'm sure that this version of Blender is compiled with x64 also. Can you tell me which installer did you use (Steam, Blender.org, Microsoft Store, ...)? So I could debug it more easily. Maybe your version is built with x86, I this case all wind32 symbols might be indeed broken.

@toruki13 Maybe this version of Blender is using another version than python3.7. If this is the case I need to build the Addon with the version your Blender is using. You can check the version in Blender here :

image

Carne5581 commented 3 years ago

Hi, I also faced such a problem.

Traceback (most recent call last): File "C:\Program Files (x86)\Steam\steamapps\common\Blender\2.91\scripts\modules\addon_utils.py", line 351, in enable mod = import(module_name) File "C:\Users\marsel\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\mesh_autoremesher__init__.py", line 3, in from .src.autoremesherui import AutoRemesherSettings, OBJECT_OT_autoremesher, MAINPANEL_PT_autoremesher File "C:\Users\marsel\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\mesh_autoremesher\src\autoremesherui.py", line 2, in from .autoremesher import generate_quad_mesh ImportError: DLL load failed: The specified module could not be found.

My version of Blender: 1

filibis commented 3 years ago

@Nicolas-Constanty I always download from https://www.blender.org/download/ and I believe it's a ".msi" file that I launch to install.

Nicolas-Constanty commented 3 years ago

Hi @filibis, I noticed that zlib was installed in my path thanks to Inkscape and Blender was using zlib.dll of Inkscape to load the addon. I was able to reproduce your issue by removing Inkscape from my path, this version fixed the issue for me, can you test it? Edit: @Carne5581 that might work for you as well

mesh_autoremesher.zip

Carne5581 commented 3 years ago

Ok, the installation was successful, but an error occurred while generating the mesh:

image

Nicolas-Constanty commented 3 years ago

Thanks for helping me to improve the addon @Carne5581, I forgot to remove logs for release build. This version should be ok.

Edit : You will need to remove it first, since the installation work this time. When you remove it the first time you might have an error, if this is the case close blender and redo it again, it should work this time (I'm working to fix this). image

mesh_autoremesher.zip

Carne5581 commented 3 years ago

I am glad to help, Mesh creation was successful, and share the result:

Autoretopology

filibis commented 3 years ago

Hey @Nicolas-Constanty , I tested the latest zip you sent here but got the same error.

Nicolas-Constanty commented 3 years ago

Hi @filibis, I added some dlls from the Visual Studio redistribution in the package. They are installed in my system32 directory so I thought everyone had these DLLs too, but maybe not after all. You can try with this one :

mesh_autoremesher.zip

filibis commented 3 years ago

Thanks @Nicolas-Constanty , this one worked out fine, I could enabled the addon. However when I tested on a simple cube, Blender crashes. I then tested on a slightly sculpted rock and it remeshed okay. Simple cube might be an edge case maybe? Also even 0 density looks quite dense in my opinion. Isn't there an option to decrease it further?

Nicolas-Constanty commented 3 years ago

Hi @filibis, cool news 👍 This package is a Blender implementation of this tool, I haven't change the underlying logic of it. So, in short this solution does not work well for lowpoly meshes. I implemented this because I find out that it was a good tool for photogrammetry meshes (which are usally high density meshes but have lousy topology). The author of the original tool is aware of this issue with lowpoly and is apparently working on a new version to fix this kind of issues. If a new version of the original tool is released in open source, I will probaly try to implement it for Blender.

Also even 0 density looks quite dense in my opinion. Isn't there an option to decrease it further?

I agree with you, but unfortunately, I can easily increase the value above one, but as far as I understood from my first reading this is not the case if I want to go below zero. I won't be working on this project for at least 4-5 days, but I'll take a second look after, just in case I missed something.

Thanks for your help @filibis :smiley:.

caseybasichis commented 3 years ago

Hi, I'm also getting a dll error on windows on Blender 3 and 2.91. I tested the release version as well as the one in this thread.

Traceback (most recent call last):
  File "C:\Program Files\blender-3.0.0-alpha+master.118803893e65-windows.amd64-release\3.0\scripts\modules\addon_utils.py", line 351, in enable
    mod = __import__(module_name)
  File "C:\Users\casey\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\mesh_autoremesher\__init__.py", line 3, in <module>
    from .src.autoremesherui import AutoRemesherSettings, OBJECT_OT_autoremesher, MAINPANEL_PT_autoremesher
  File "C:\Users\casey\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\mesh_autoremesher\src\autoremesherui.py", line 2, in <module>
    from .autoremesher import generate_quad_mesh
ImportError: DLL load failed while importing autoremesher: The specified procedure could not be found.
diramazioni commented 1 year ago

The linux version has the exact same issue and can't be enabled. I've tested it with blender 3.3.1, it seems a path issue using the dot notation from .autoremesher import