Skip to content

riccardolops/UnityMATRendering

Repository files navigation

UnityMATRendering

Medial Axis Transform rendering, implemented in Unity3D.

Pls refer to link for detailed generation process.

And this post for the strategy of detecting degenerated slab.

This package will generate medial meshes & interpolated MATs from MA files in unity

MA file(Different from mayAscii) stores the the information of medial mesh. It can be generated using Q-MAT or Q-MAT+.


If UnityMATRendering contributes to an academic publication, cite it as:

@misc{UnityMATRendering,
  title = {UnityMATRendering},
  author = {Riccardo Lops},
  note = {https://github.com/riccardolops/UnityMATRendering},
  year = {2023}
}

Results

this addon will import medial axis transform as several objects:

  • Medial mesh
  • Medial sphere
  • Medial cone
  • Medial slab
medial mesh sphere cone slab result
medial mesh medial spheres medial cones medial slabs combined

Requirements

  • Tested on Unity 2022.3.9f1

MA file structure

/# number of vertex(medial sphere)/edge(medial cone)/face(medial slab)

vertices edges faces

# v/e/f indicates the type represented by current line

/# (x,y,z): center of the medial sphere; r: radius

v x y z r

/# two end vertices of the edge

e v1 v2

/# three vertices of a triangle face

f v3 v4 v5

# comment lines in MA file should start with #

About

Medial Axis Transform rendering, implemented in Unity3D. Python-to-C# adaptation from the "blender-mat-addon" repository: https://github.com/songshibo/blender-mat-addon

Resources

License

Stars

Watchers

Forks

Packages

No packages published