/MacaqueBlender

A Python library for parametric control of a 3D rigged macaque face model for visual and social neuroscience

Primary LanguagePython

A Python library for parametric control of a 3D rigged macaque face model for visual and social neuroscience

This repository contains Python code for automated control of a Blender (www.blender.org) file containing a fully rigged, realistic 3-dimensional Rhesus macaque avatar, as described in Murphy & Leopold, 2019. The mesh surfaces were generated from CT scans of live anesthetized Rhesus macaques, and edited in collaboration with a professional CGI artist (Julien Duchemin). The code allows quick setup of viewing geometry to match the experimental context, parametric manipulation of body, head and gaze direction, facial expression, facial identity, skin and fur appearance, environment variables, and offline rendering of images and animations using the Cycles engine. Continuous morphing of facial identity is acheived based on an empirically-defined PCA "face-space" representation.

The following parameters of the model can be varied continuously:

  • Body position and orientation (Cartesian coordinates relative to world origin)
  • Head orientation (spherical coordinates relative to body)
  • Gaze direction (spherical coordinates relative to head) + eye vergence angle (determined automatically for gaze target distance)
  • Pupil dilation and blinks
  • Blend shapes for stereotypical facial expressions (besdides the default 'neutral'):
    1. open-mouthed threat (aggressive)
    2. bared teeth display (submissive or fearful)
    3. pursed-lips /coo vocalization (affiliative)
    4. lip-smack (affiliative)
    5. yawn (anxious)
    6. chewing (ingestive)
    7. tongue protrusion (disgust)
  • Additional independent control of brow, ears, and jaw movement.
  • Fur length, density, color, texture map
  • Skin color, material reflectance (including sub-surface scattering), and texture
  • Lighting direction, intensity, color, and type

Access

Please note that the .Blend files are not yet in the public domain. Pre-rendered stimulus sets containing a large quantity of high quality static and animated renders can be downloaded from Figshare.com and further details are provided on the MF3D-Tools repository. For specific experimental needs that are not met by the currently released stimulus sets, please contact Dr Aidan Murphy to discuss opportunities for possible collaboration.