7
$\begingroup$

I have a (baked) particle cache, I can enter "Particle Edit" mode, but I can't seem to be able to delete selected particle trajectories. Can it be done? How?

Example

I've created a minimal example: there's an emission object and a "kill particles" collision object. A "dupli" object is added just for visibility.

enter image description here

Let's say I want to remove retroactively all the particles that aren't killed by the obstacle.

Attempts

Several other related questions have answers that mention Select+X and Select+Del (in Particle Edit mode) as ways to remove trajectories or trajectory points: it wasn't specified. I'm unable to do either.

In "Path" select mode, I can't seem to select anything, with either RMB or C+LMB:

enter image description here

In "Point" select mode, I'm able to select trajectory points (but I wouldn't know how to select all the trajectories: there's no Ctrl+L functionality). However, X and Select+Del show no effect.

enter image description here

Same for "Tip":

enter image description here

The "cut" brush also seems ineffective:

enter image description here

File

you can download my minimal example here:

$\endgroup$
3
  • $\begingroup$ (An answer like "that's not currently possible", if that's the case, would be good as well, as long as it's sourced) $\endgroup$ – Nicola Sap May 16 '18 at 10:15
  • $\begingroup$ I think you can remove them not physically, but make invisible inside material (fully transparent). Ugliest solution is to select particles by their ID and assign Transparent shader $\endgroup$ – Serge L May 16 '18 at 11:30
  • $\begingroup$ @SergeL And how would I target those ones specifically in my material setup? (I mean: say I make a Mix node with Transparent + My material as shaders. What would the 0/1 variable be that I should use for the Mix Factor?) $\endgroup$ – Nicola Sap May 16 '18 at 11:35
3
+50
$\begingroup$

Via a Frame change handler

Here is a frame change handler to set the size of any particle still alive at frame 27 (arbitrary choice from sample file) to zero. Needs to change frame to 27 at least once to set the list.

System console print from sample file

27 [5, 12, 15, 16, 18, 21]

states on frame 27 particles 5, 12 etc are still alive, and will be zeroed in size each and every frame from now on. Once this is known it could be hard-coded into the handler instead of calculated each time.

import bpy

context = bpy.context
ob = context.object
parts = []

def particle_remove(scene):
    global parts
    ob = scene.objects["Emits"]
    ps = ob.particle_systems.active
    for i in parts:
        ps.particles[i].size = 0
    if scene.frame_current == 27:

        parts = [i for i, p in enumerate(ps.particles)
                if p.alive_state.startswith('ALIVE')]
        print("27", parts)       
bpy.app.handlers.frame_change_post.append(particle_remove)

to remove the handler (and all frame change post handlers)

bpy.app.handlers.frame_change_post.clear()

enter image description here

$\endgroup$
0
3
$\begingroup$

As far as I know, there is no way of deleting individual particles.

BUT - possible workaround: In particle edit mode, deselect "Keep Root", hover your mouse over a strand, press L to select the whole strand (you'll have to repeat this for every single strand) and move them somewhere else. They'll still be in the scene, but out of the way at least.

enter image description here

$\endgroup$
2
  • $\begingroup$ I'll test it later, but this seems -- if not a solution -- at least a good workaround! (It scales up quite badly for large numbers of particles though, if you need to select them individually) $\endgroup$ – Nicola Sap May 16 '18 at 11:44
  • $\begingroup$ True, but moving/hovering over the strands and repeatedly pressing "L" works okay-ish. But that is the only solution that comes to mind $\endgroup$ – tobkum May 16 '18 at 12:00

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.