Skip to content

uec-media-design-lab/MMAPs_Module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MMAPs Generation Module for Blender

  • This is a module to reproduce Micro-Mirror Array Plates (MMAPs), which are mid-air imaging optical elements, in Blender.

  • 日本語解説はこちら

  • See here for details.

    • Shunji Kiuchi, Naoya Koizumi. Simulating the appearance of mid-air imaging with micro-mirror array plates. Computers & Graphics, Vol. 96, pp. 14--23, 2021.
  • mmaps/ ... The directory of MMAPs generation Module (for developer)

    • __init__.py ... Initialization file
    • mmaps.py ... Module to generate/delete MMAPs
    • myutil.py ... Utility function module
    • mmaps_clearer.py ... Operator class to delete MMAPs
    • mmaps_launcher.py ... Operator class to generate MMAPs
    • mmaps_manager.py ... Panel class to manage parameters
  • vcf/ ... The directory of VCF generation module (Under development. This is very different from the optical properties of an actual VCF.)

    • __init__.py ... Initialization file
    • vcf.py ... Module to generate/delete VCF
    • myutil.py ... Utility function module
    • vcf_clearer.py ... Operator class to delete VCF
    • vcf_launcher.py ... Operator class to generate VCF
    • vcf_manager.py ... Panel class to manage parameters
  • mmaps.zip ... For installing MMAPs generation module

  • vcf.zip ... For installing VCF generation module

Verified version

  • Blender 2.8.1

Setup

  • In Blender, go to Edit -> Preferences and select Add-ons.
  • Select Testing, then go to Install.
  • Select mmaps.zip or vcf.zip in the Blender File View.

Parameters settings

Parameter Default
MMAPs size 48.8
Slit spacing 0.05
Height scale 2.5
Mirror detailing 10
Reflectance 0.87
IOR 1.52

For developer

  • If you'd like to implement additional features, please modify the python files under mmaps/ and/or vcf/.
  • Before installing them in Blender, compress each directory into a zip file after the modification.

Functions

clearMMAPs(mirror_name = 'Mirror', glass_name = 'Glass', parent_name = 'MMAPs')

Delete MMAPs composed of a mirror, a glass, and a parent (empty) object.

Paramters

  • mirror_name (string) - Mirror name [optional]
  • glass_name (string) - Glass name [optional]
  • parent_name (string) - Parent (empty) object name to control the MMAPs posture [optional]

createMMAPs(size, spacing, detailing = 10, height_scale = 2.5, isGlass=True, ior=1.52)

Create MMAPs that each slit mirror is divided.

Parameters

  • size (float) - Length of a side of MMAPs
  • spacing (float) - Slit spacing
  • detailing (int) - Number of parititions for each mirror. By default, each mirror is divided into 10 parts.
  • height_scale (float) - Ratio of slit height to slit spacing
  • isGlass (bool) - Presence or absence of the glass [optional]
  • ior - Refractive index of the glass [optional]

attachMirrorMaterial(obj, mat_name)

Attach a mirror material to an object. If the object with the name specified by mat_name does not exist, create a new one.

Parameters

  • obj (BlendDataObjects) - Object that the material will be attached
  • mat_name (string) - Material name

attachGlassMaterial(obj, mat_name, ior=1.52)

Attach a glass material to an object. If the object with the name specified by mat_name does not exist, create a new one.

Parameters

  • obj (BlendDataObjects) - Object that the material will attach
  • mat_name (string) - Material name
  • ior - Refractive index of the glass [optional]

addMirror(parent, verts, faces, obj_name = 'Mirror', id = None)

Generate a mirror inside MMAPs. The parent object (parent) is required because it is assumed that the mirror is inside MMAPs.

Parameters

  • parent (BlendDataObjects) - Parent object
  • verts (array) - Coordinates of vertices
  • faces (array) - Face indices of vertices
  • obj_name (string) - Object name
  • id (int) - Mirror number

addGlass(parent, size, height, obj_name = 'Glass')

Generate a glass inside MMAPs. The parent object (parent) is required because it is assumed that the mirror is inside MMAPs.

Parameters

  • parent (BlendDataObjects) - Parent object
  • size (float) - Length of a side of the glass
  • height (float) - Glass thickness
  • obj_name (string) - Object name

About

Add-on to manage (create, clear, etc...) MMAPs object in Blender.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5

Languages