Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 1.64 KB

File metadata and controls

46 lines (30 loc) · 1.64 KB

Mesh To Particles

Maya api node for creating particles at mesh vertices. These particles are not emitted or simulated, rather the particle data is set directly by the input mesh. Any color sets on the mesh are converted to per-particle attributes which can be used for shading, driving instancers, etc.

The original purpose was for representing Bifrost point geometry natively in Maya. However it's made to be general purpose and may be useful for other applications.

For usage examples: https://www.youtube.com/watch?v=CB2TSgdEJPo

Install

  1. Copy MeshToParticles.mll to:
<documents>/maya/<version>/plug-ins

Note: the plug-ins folder may not exist and need to be created

  1. (Optional) Copy MeshToParticlesUtils.py:
<documents>/maya/<version>/scripts
  1. (Optional) Copy contents of Compounds to your bifrost compounds directory.

  2. Load via the plug-in manager

Utilities

import MeshToParticlesUtils as mtpu

# Creates particles from specified meshes, if None uses selection
# world_mesh determines which mesh attribute is used, .worldMesh/.outMesh.
mtpu.meshToParticles(meshes=None, world_mesh=True)

# Creates particles from the specified Bifrost graph's attribute, eg. 'bifrostGraphShape1.out_mesh'
mtpu.bifrostToParticles(bif_attr)

# Opens dialog window to select a port to create particles from, bifrost graph/board must be selected first.
mtpu.bifrostToParticlesDialog()