V-HACD Tool for creating accurate convex collision meshes for real-time physics in games etc

Well, the only thing I can think is that maybe you installed the old 2.79 version of the addon, or it got copied in your settings when you upgraded from 2.79 to 2.80. Make sure the version is 0.35 and the authors are ‘Alan Ducharme (original author), Andrew Palmer (Blender 2.80)’. If not, then you need to remove the addon and install this. If it is the right version, then I really don’t know why you get an error about the addon requiring an upgrade.

Hi again when we installed from the same link you provided I zipped up the whole contents of the github install and unziped to Blender Foundation folder. Blender 28 is within this Blender Foundation folder . Blender 2.79 is not in here by default. we have downloaded your 35 downloded which was not in our addon folder and is much later dated and smaller 17kb containing the words "This has been converted to work with Blender 2.8… " The other in the addon folder does not contain this ! We can be happy again as the file now reports no error.

We note the executable has to now be located in preferences under the app in a new area which you expand on the app. Thank you very much for providing this . We have not worked out how to operate this in Blender 2.8 as the interface is quite different than 2.79 . Can you please assist and share how to operate and obtain the setting menu please in this fabulous addon?

Please note in the blender 2.8 consol it reports:

fake module: addon missing ‘bl_info’ gives bad performance ! ‘C:\…\…\AppData\Roaming\BlenderFoundation\Blender\2.8\scripts\addons\run.py’

Is this ‘run.py’ file you are using different too ours from v-hacd-master zip is 1.25kb and without bl_info? Do you have a later version please?

Yes, you need to download the version from the releases page, not the Github repo :smiley:

The options for the addon are almost exactly the same as the 2.79 version, as it is simply a port with a couple of extra features. The V-HACD settings are explained on the V-HACD github page, and the options and extras specific to this version are explained on the github page for this addon, here.

I’ve no idea what has caused your run.py error, but it sounds like it might be because you tried to install the github repo from the addon menu in preferences. First, try deleting any folder called ‘blender_vhacd-master’ from your C:\Users\ [USERNAME] \AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons folder, and if that doesn’t work, maybe try restoring Blender 2.80 to factory settings.

I have posted here to see if i get an answer https://github.com/kmammou/v-hacd/issues/65

Hi Mr Flamey

As I said the run.pl is exactly the same file that is in my archive from github therefore there would be no difference restoring and or resetting. The error fake module: addon missing ‘bl_info’ gives bad performance ! ‘C:\…\…\AppData\Roaming\BlenderFoundation\Blender\2.8\scripts\addons\run.py’ refers to the python operator bl_info which you will find in your [35 downloded /blender_vhacd-v035.zip) if you read the python script therein absent from the zip archive and the installed version of run.pl. I hope this helps. This is why I asked you to check your copy of run.pl?

I was hoping that a hull generated by the addon could be used for the Mesh Deform Modifier (to build a simplified cage around one object). It works, but the problem seems that not one hull is generated but several.
Is it possible to generate just one hull, and if so, what setting should I use?

Hi Mr Flamey

Firstly we downloaded "kmammou(slash)v-hacd "
I quote contents of run.pl here without python bl_info:

import sys
import os
import shutil
import subprocess

def cmake(platform_dir, src_dir, arg):
if not(os.path.exists(platform_dir)):
os.mkdir(platform_dir)
os.chdir(platform_dir) # go to platform directory
cmd = “cmake " + arg + " …/” + src_dir
print(“cmd”)
subprocess.call(cmd, shell=True) # run cmake

def clean(platform_dir):
if os.path.exists(platform_dir):
shutil.rmtree(platform_dir)

if name == ‘main’:
src_dir = ‘…/src/’ # source code directory
bin_dir = ‘…/build/’ # binary directory

if not(os.path.exists(bin_dir)): 	# binary directory is created if not found
    print("Creating bin directory: " + bin_dir)
    os.mkdir(bin_dir)

platform = sys.platform
cmd = ""

if (platform == 'darwin'): 			# platform directory is created if not found
    platform = 'mac'
    cmd = '-G Xcode' 

platform_dir = bin_dir + platform

if len(sys.argv) == 1:
    print("Invalid arguments to run: please specify --cmake or --clean")
    sys.exit(-1)
else:
    for arg in sys.argv:
        if   (arg == '--cmake'):
            cmake(platform_dir, src_dir, cmd)
        elif (arg == '--clean'):
            clean(platform_dir)

from the new 35 file object_vhacd.py

bl_info = {
‘name’: ‘V-HACD’,
‘description’: ‘Hierarchical Approximate Convex Decomposition’,
‘author’: ‘Alain Ducharme (original author), Andrew Palmer (Blender 2.80)’,
‘version’: (0, 35),
‘blender’: (2, 80, 0),
‘location’: ‘Object Mode | View3D > V-HACD’,
‘warning’: “Requires Khaled Mamou’s V-HACD v2.0 executable (see Documentation)”,
‘wiki_url’: 'wont let me post,
“tracker_url”: wont let me post
‘category’: ‘Object’,
}

You don’t need run.pl at all. I don’t know what that is for or where you got it from. All you need are the object_vhacd.py installed in Blender and the vhacd.exe somewhere on your computer and linked in the addon preferences. I don’t know which version of the executable you need for your particular hardware, but I suggest the regular Windows x64 version is the most likely to be compatible if you are running Windows, and it can be directly downloaded here.

For a full explanation of how to install the addon correctly, please read the installation guide on Github here.

Hi Mr Flamey ,

The run.pl is in the install directory for the whole master repository . It seems to create the temporary directories for the executable from Khaled to work in . I have now added bl_info from other file 35 update for blender 28 ( maybe only beta) and lost this error However I understand this tool has moved in 2.8 to Object Mode | View 3d --> V-HACD.

However I cannot seem to locate V-HACD in blender 2.8 can you please assist me as to its new location in object mode as it is not as obvious in location as it was in 2.79?
?
Do You have contact for creator Andrew Palmer?

Thank you for your assistance

Just open the operator search menu and type ‘hull’, and all three operators should be available. Operator search is on F3 by default in Blender 2.80.

Brilliant :))))))))))))

Hello, hope it is still alive!
I have this error with blender 3.0.1

Python: Traceback (most recent call last):
  File "C:\Users\\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\object_vhacd.py", line 366, in execute
    bpy.ops.import_scene.x3d(filepath=outFileName, axis_forward='Y', axis_up='Z')
  File "C:\Program Files (x86)\Steam\steamapps\common\Blender\3.0\scripts\modules\bpy\ops.py", line 132, in __call__
    ret = _op_call(self.idname_py(), None, kw)
AttributeError: Calling operator "bpy.ops.import_scene.x3d" error, could not be found

location: <unknown location>:-1

Thanks for mentioning this. I don’t know what x3d is, but import plugins recently changed a bit and some were rewritten in c++, so it may have been removed from Blender. I will try to investigate, but I haven’t been using this plugin for a while now (I tend to just make colliders manually, or use game engine tools), so it may be a while before I get around to it.

Heh, thank you. In my case, I need to do precise collisions for pretty curve objects, I’m ending up with 20-40 hulls. so I’m trying to ease this process. was experimenting with cell fracture addon. :slight_smile:
And with this addon, no matter how I change my setting I couldn’t get the desired result.

hehe, yeah I know what you mean. It was an addon made for 2.79 that I ported thinking I was going to use it all the time, but actually it’s quite hard to control the results, so I actually never use it.

@Mr_Flamey
I found something weird, the addon exporting .off file, while V-HACD are looking for .obj file is this intended?
is that the main reason we keep getting “no meshes to process” error msg?
i’m on 3.1.2 btw

I’m not sure what could be going wrong. I’ve briefly tested locally with 3.1 and also 3.2 alpha and it seems to work fine. I see now that the Github repo has a few issues that could be related. However, I really don’t know what could be the problem, and I’m sorry but I just haven’t had much motivation to investigate this stuff lately :sweat:

Oh no worries, i was just modifying the V-HACD v4 source and make my own build then curious about the blender integration since i use blender as my main tool.

Hey there,
I’ve been trying to get this to operate for a little while now, but it seems to not work for the life of me. I’ve tried both VHACD with and without openCL, I’ve uninstalled and reinstalled the addon a couple times, I’ve completely restarted blender a couple times, and yet no luck. I can’t tell what I’m doing wrong here. Any ideas?
(Attached picture to show everything seems to be set up properly, yet checking the operator menu, “Convex Hull (V-HACD)” yields no results)
image

I’ve also not been able to get it working on recent versions of Blender, and I’m not sure what’s up. The addon itself installs correctly, and the collider renaming functions are working, but the main V-HACD tool doesn’t for some reason and it’s not immediately clear what changed.

I think I mentioned in a previous post that I don’t really have much time to work on this addon as I don’t really use it any more, but if I do figure it out, I’ll update the addon and post here.