Note: This is actually a conversion of an old add-on released for Blender 2.64 back in 2014 by Phymec. You can find the original thread here
Since convex decomposition is incredibly useful for making collision meshes for games, I thought I would spend a few hours getting this old add-on working with 2.80. It takes any old mesh as an input, passes it to an external application for processing, then reimports the resulting convex collision hull suitable meshes back into Blender. Although most game engines support some form of convex decomposition, it’s nice to have full control in Blender, and in any case, the results I’ve seen in UE4 leave a lot to be desired, so it’s best to manually create collision meshes for all but the simplest shapes
As with the original add-on, you will need to get a copy of the testVHACD executable from the V-HACD github page, or by clicking one of these direct links: Win | OSX (Requires OpenCL), Win | OSX (No OpenCL required). Set its location in the add-on preferences in Preferences>Add-ons>V-HACD and it should all work.
Although I removed a few features to do with physics from the original add-on, mostly due to the removal of the game engine from Blender 2.80, I added a little tool to help with naming generated hulls, so that you can easily use it to name a bunch of generated colliders to work with game engines like UE4 (which uses a UCX_<mesh_name>_# format for colliders) or whatever.
I hope this is useful to some of you guys that might have (like me) missed the original add-on and been a little frustrated with the apparent lack of good convex hull generation in Blender. I’ve wasted plenty of time splitting meshes into chunks by hand, but thanks to the work of Khaled Mammou, Phymec and to a lesser extend, myself, it’s now quite easy to get good results in Blender 2.80.
Thank you for this addon to integrate super useful tool. Couple of things: the installation is the .py file from Blender, the .zip doesn’t work. For Windows the .exe for V-HACD can be found at https://github.com/kmammou/v-hacd/tree/master/bin/win64, it doesn’t need to be compiled. Import-Export: Web3D X3D/VRML2 format addon must be enabled.
Also: is there a way for the addon to not also push the surface outward so much?
Thanks for pointing that out. I forgot that the direct download from github gets nested inside another folder and so won’t work. I’ve fixed the links to a release file instead.
The add-on doesn’t do anything to the convex hulls generated by v-hacd, other than rename them, so I’m not sure what you mean. You might try playing with the settings to see if you can get better results. To be honest, I haven’t used it very extensively and porting the add-on was sort of a Sunday evening hobby thing really
I’ve released a new version which restores the ability to save operator presets for the main convex hull generator, as well as adding an operator which will select existing convex hulls based on selected objects, so you don’t have to manually select a bunch of objects, which can be fiddly at times.
I have installed the addon (v0.35) and testVHACD.dms (No Open CL) on macOS 10.13.6 & Blender 2.80.64, when I run the addon with operator search menu, it appears the pop-up window with the options, I press OK but it nothing happens, it appears a message “No meshes to process!” but I have selected Suzanne, see the image.
I don’t have a Mac to test this on, but I tried to run it on the latest version of Blender 2.80 (2019-05-14) on Windows and couldn’t reproduce the issue. I don’t know why this would happen on your machine and not mine, since checking the selection contains valid meshes should work the same regardless of platform.
The only thing that springs to mind here is that there might be some incorrect permissions set on the dmg file, preventing it from being launched as an executable by Blender. As I’m not a Mac user, I’m not sure how you would go about changing it, but I do remember that this caused issues for me on a few occasions in Linux.
Thanks for the reply but the file has Read and Write permissions for everyone, the file has extension .dms, it isn’t a .dmg file (disk image on Mac), I don’t know this extension on Mac (I’m Mac user since 1990), the system associates the extension to The Unarchiver, it’s a RAR extractor application for Mac but the applicattion can’t extract the content.
testVHACD.dms isn’t an executable file or that I think.
I found this article https://github.com/kmammou/v-hacd/issues/24 perhaps it can help.
I’m afraid I can’t really help here. I am not sure what could be causing the issue, and now I wonder if the Linux version also suffers from a similar issue. If I get around to testing it on Linux, I’ll let you know if it works. It would also be great if anyone else using the addon on a platform other than Windows would let me know if it works or not
Thanks for your time, I’m in the same point, I suppose that the problem is the missing library and I don’t know how install it. I’ll request help to Rombout, a Thea4Sketchup beta tester (like me), he made some addons for Blender and he is working in Thea for Blender 2.80 now.
I’ll inform you.
V-HACD is not about remeshing a model to reduce polygons. It takes your model and breaks it down into convex volumes. Convex volumes are often used in video games and physics simulations instead of the original mesh because physics solvers can work much more efficiently on convex shapes.
I would love your updated version for 2.79, since the amazing FBX bundle addon hasn’t been updated for 2.8 yet. having the two together would speed things up a huge amount!
The original version of the addon, by Phymec should still work in 2.79. You can get that version here.
My version of the addon does add a few things to organising the scene though, so the colliders generated by the original addon don’t have particularly great names. However, I’ve not really got time to port to 2.79, but the code for both addons is available if anyone feels like getting their hands dirty. Let’s just hope the FBX bundle addon is updated soon
This used to work beautifully with blender 2.79. However the current version does not work with an error listed on preferences. I believe this the python file and RDB wrote this I have searched their website https://pybullet.org/Bullet/phpBB3/viewtopic.php?f=4&t=6619&start=30 and cannot find a workable update for 2.8 blender just 2.2 which is a shame as its fantastic software and too good to be removed by a simple python problem. Can you help , please provide object_vhacd.py.zip which works with Blender 2.8? Thankyou
I just checked it out on a clean install of Blender 2.80, and the last release (version 0.35) is working just fine. Have you set up the path to the v-hacd executable?
Please check the installation instructions here to make sure you have installed it correctly.
Yes Mr Flamey . I had right path setup but in preferences after installing it it had an error “upgrade to 2.8x required”. I could not find the tool box with it in in 2.8 to load the exe into V-HCAD. It also worked with 2.79 beautifully. from the download location you suggested . I have the latest release 2.8 I can download . My friend has the same problem too.