# Emit particles from faces with a specified normal

Is it possible to only use faces whose normal points in certain directions, for example, only emit particles from faces pointing in the positive z direction. or some other condition, like it must lay in the x-y plane with z the z component within -0.5 to 0.5? It could be done by manual selection and using vertex groups, but that would be quite time consuming. Another solution would be to select vertices that fulfill the condition.

The particle options in Blender are rather limited at the time (they promised to change that in 2015...) so the only solution I can think of is Animation Nodes or Python, delete the particles depending on their start direction.

• So something similar to stackoverflow.com/questions/58654905/… and assign vertices to a vertex group, which should be possible through the python API? Mar 27 '20 at 19:52
• yes, that's one way. My suggestion was much more blunt, but it would work with deformed meshes, so that's why it came to my mind Mar 27 '20 at 21:14

Here is a script to do it

import bpy
import bmesh

# Get the active mesh

current_object = bpy.context.object
leaf_veto = current_object.vertex_groups.new(name = "leaf_veto")

me = bpy.context.object.data

# Get a BMesh representation
bm = bmesh.new()   # create an empty BMesh
bm.from_mesh(me)   # fill it in from a Mesh
verts = []
# Modify the BMesh, can do anything here...
for v in bm.verts:
if v.normal.z > 0.5 or v.normal.z < -0.5:
verts.append(v.index)
# Finish up, write the bmesh back to the mesh
bm.free()  # free and prevent further access