1
$\begingroup$

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.

$\endgroup$
1
0
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ So something similar to stackoverflow.com/questions/58654905/… and assign vertices to a vertex group, which should be possible through the python API? $\endgroup$
    – user877329
    Mar 27 '20 at 19:52
  • $\begingroup$ 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 $\endgroup$ Mar 27 '20 at 21:14
0
$\begingroup$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.