Giter Site home page Giter Site logo

ruisebastiao / blender_vhacd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andyp123/blender_vhacd

0.0 2.0 0.0 1.58 MB

Blender 2.80 add-on that enables the use of V-HACD inside Blender to generate accurate convex hulls quickly.

License: GNU General Public License v3.0

Python 100.00%

blender_vhacd's Introduction

V-HACD For Blender 2.80

Blender 2.80 conversion of Phymec's add-on that enables the use of V-HACD for quick and accurate convex decomposition of arbitrary meshes inside Blender. It uses the V-HACD algorithm, developed by Khaled Mammou.

Installation

Note: This add-on requires Blender 2.80 and the V-HACD executable to work. Before installing the add-on, make sure you have a copy of V-HACD installed somewhere on your computer. You will only need a single file (testVHACD.exe) for this add-on to work. You can directly download the required executable from the following links: Win | OSX (Requires OpenCL), Win | OSX (No OpenCL required)

  1. Download the add-on here.
  2. In Blender, open the Preferences window (Edit>Preferences) and select the Add-ons tab.
  3. Press the 'Install...' button and select the .zip file you downloaded.
  4. Enable the add-on and set the VHACD Path to point to the testVHACD.exe file that you previously downloaded.
  5. Save preferences so that the add-on is always enabled.

Add-on Preferences

This addon stores some general settings inside its entry under the Add-ons tab of the Blender Preferences window.

V-HACD Preferences

  • VHACD Path The path to the V-HACD Executable. This is required for the add-on to be able to generate convex hulls for objects. See the above installation notes for a download link.

  • Temp Path A Path for temporary files created by the add-on and V-HACD executable while in operation. By default, Blender's temp directory is used, so you shouldn't need to change anything in most cases.

  • Name Template A name template used when creating, renaming and selecting convex hulls. Change this to align with any external application (such as a game engine) you may be generating colliders for. For more details on the format of the name template, see explanation in the Rename Hulls operator below.


Usage

Once the add-on is installed correctly, it can be used very easily by selecting meshes and running the 'Convex Hull (V-HACD)' operator, which can be found from the Blender operator search menu.

V-HACD Operation

Convex Hull (V-HACD)

Takes one or more meshes of arbitrary geometry and generates convex hulls which are suitable for use in real-time applications such as games. Generated hulls will be named based on the 'Name Template' setting in the add-on preferences.

  • Remove Doubles (On) - Remove duplicate vertices from the mesh before running V-HACD on it. This may improve the resulting convex hulls. Note that this operates on a duplicate mesh, so the original data will be untouched.

  • Apply (None) - Apply transformations on the mesh before running V-HACD on it. Note that this operates on a duplicate mesh, so the original data will be untouched.

For a full description of what all the V-HACD parameters do, please see the documentation on the V-HACD Github page. Note that you can save the parameters to a preset using the dropdown menu at the top of the operator panel if you find particular settings that work well for your use.

Rename Hulls

Renames objects in the selection based on the name of the active object and a name template. This is useful if the name of the original object changes. The name template defaults to the 'Name Template' setting in the add-on preferences, but can be changed directly in the operator redo panel.

  • Name Template (?_hull_#) - The name template to use. '?' in the template will be replaced with the name of the active object and '#' will be replaced with the id of each hull. For example, '?_hull_#' becomes 'Suzanne_hull_3' for the third hull of the object named 'Suzanne'. Only the first occurence of each character will be replaced.

  • Set Display (On) - Set the draw mode of selected objects to wireframe to make it easier to see that they are hulls of another object.

Select Hulls

Selects existing convex hulls in the scene based on the name template set in the add-on preferences. This will only work if the name template contains a '?' character, which represents the name of the selected object. For example, if the name template is '?_hull_#' and the selected object is named 'wall_1', then it would match hulls named 'wall_1_hull_2', 'wall_1_hull_63', etc. and select them all.

  • Only Hulls (Off) - Select only the hulls of the selected object(s), and deselect everything else.

blender_vhacd's People

Contributors

andyp123 avatar

Watchers

James Cloos avatar Rui Sebastiao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.