1

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.

user877329
  • 1,378
  • 3
  • 14
  • 30
  • 1
    Two possible workarounds I can think of is to use either Dynamic Paint (never used it myself, not sure if you specific case can be achieved) to have an image texture drive particles, or the Vertex Weight Proximity modifier https://blender.stackexchange.com/questions/165827/using-a-b%c3%a9zier-curve-to-raise-lower-height-of-vertices/165831 https://blender.stackexchange.com/questions/153177/worms-crawling-under-skin/153181 – Duarte Farrajota Ramos Mar 27 '20 at 19:37

2 Answers2

0

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.

Frederik Steinmetz
  • 2,879
  • 1
  • 8
  • 11
  • So something similar to https://stackoverflow.com/questions/58654905/listing-vertices-per-face-in-python-blender-bpy and assign vertices to a vertex group, which should be possible through the python API? – user877329 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 – Frederik Steinmetz Mar 27 '20 at 21:14
0

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
leaf_veto.add(verts, 1.0, 'ADD')

Now, ban particles from leaf_veto vertex group

user877329
  • 1,378
  • 3
  • 14
  • 30