/HumanRibModeler

Blender add-on that procedurally generates models of human rib bones based on subject characteristic

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Description

This Blender add-on generates models of human rib bones based on subject's age, sex, height, and weight (based on research published by Holcombe et al. in 2016 and 2017).

Rendered example below:

alt text

Add-On Setup

Install Third-Party Python Libraries (scipy, pandas):

  1. In Blender's Python console, run:

    import sys
    sys.exec_prefix
    

    This should return the location of the Blender's python package, e.g.,

    /Applications/Blender.app/Contents/Resources/2.90/python
    
  2. In a regular terminal, run:

    cd /path/to/blender/python/bin  # Don't forget to add '/bin' to the path
    ls
    

    This should output the Python executable used by the Blender, e.g.,

    python3.5
    
  3. To enable pip and install the packages:

    ./python3.5m -m ensurepip
    ./python3.5m -m pip install scipy
    ./python3.5m -m pip install pandas
    ./python3.5m -m pip install numpy   # the most recent version of Blender should come preinstalled with this
    

Load Rib and Periosteum Plugins in Blender:

  1. Open midterm_project.blend

  2. Go to 'Scripting' tab

  3. rib.py and periosteum.py should already be loaded in the Text Editor.

    • If not, open the two files, which should be located in the 'Source Code' folder within my project folder
  4. Change the path to the folder containing the linear regression parameters. In rib.py, change the path_to_data variable on line 45 to the 'RibLinReg' folder in my project folder, e.g.,

    path_to_data = '/Users/cecegao/Downloads/Gao_Cecily_Graphics_Project_1/RibLinReg/'
    
  5. Run both scripts.

  6. Two tabs titled 'Human Rib' and 'Periosteum' should appear in the Properties Panel.

How to Use Rib Plugin:

  1. Toggle to the 'Human Rib' tab in the Preferences Panel.

  2. Change the input parameters to the subject of interest. Change the subject's demographics (sex, age, height weight). You can also toggle to the 'Custom' mode to modify individual parameters.

  3. Change the rendering settings. Choose whether you want to generate the full set or a single rib or just the outline (no lofting).

  4. Click 'Create Rib(cage)' button at the bottom to generate your rib(cage)!

How to Use Periosteum (Texturing) Plugin:

  1. Make sure Blender's built-in 'Node' add-ons are enabled:

    1. Go to Blender Preferences: Edit > Preferences
    2. Search 'Node'
    3. Check all three Node add-ons
  2. Toggle to the 'Periosteum' tab in the Preferences Panel.

  3. Select the objects you would like to texture with the periosteum material.

  4. Check 'Cracks' if you want to add the cracks in addition to the Periosteum texture.

  5. Click 'Texture Object(s)' to add the bone texture to your selected objects!