Particle toggle

Hey everyone,
Just wanted to post quick link to patch I wrote that allows particles to be toggled off in the 3d view. For me its a huge help. While my computer isn’t that slow it is with 300k hair particles on multiple meshes. Figured I’d post it here for anyone that wanted to build it in, in case it doesn’t make main stream trunk.

https://developer.blender.org/D337

Feel free to comment, love it, hate it, etc.,

Why not just change the display percentage? Could be done via python if you wanted to.

import bpy

D = bpy.data

for i in range(0,len(D.particles)):
    D.particles[i].draw_percentage = 0

Or a check box right here =)


Where it doesn’t load any of the particle data at all so the cpu doesn’t cook for no reason and easily toggled on and off.

You could set up a checkbox with python, too. Just seems like it’d be easier to deploy as an addon, rather than a patch.

How is this different than toggling visibility from the modifier tab?

If you have 40 objects with hair on them, to toggle them on and off you have to go to all 40 and do so. This is a system wide toggle to instantly save clutter and cpu. I’ve already used it on a large scene I’ve been working on and saved me a ton of frustration.

Very useful. It’s the little things like this that matter a lot when you stop playing with Suzanne heads and start putting together real scenes.

For sure. Well said and to the point Ecaspersen. I couldn’t have said it better myself, cuz’ I would have been way to wordy! ; )

I think for some it might be a why all the sudden this patch, and I’ll explain…

I was working on a blend file that has a squirrel in it. As you can imagine I have body parts all with fur on them. I also use particles for grass and other things too. If you have a scene with all this in it even if you have a powerful computer scenes of this type can wreck your computers performance. On mine the chop was so bad I couldn’t even work on it anymore. I still wanted to take glances at the fur in OpenGL so I could judge where the boundaries were on the mesh as I sculpted my object. Going through each to change the display is just more time than I have. I use particles all the time and I wanted a system wide option that allowed me to quick toggle my particle assets. In this case my drawing had become unusable on my system so I did something about it.

Sure I can understand it when using many objects with particles, and even if I haven’t needed this display toggle yet (max 5 objects some with multiple psystems), or found other ways to deal with performance, such a display toggle would be great, especially if it is per editor like “Only Render”.

Question is how many need to toggle particle display regularly, which I guess is where the “use python” suggestion comes in. I wouldn’t mind having the option, but Brecht’s answer makes sense IMHO.

That could be done as a python AddOn. Another checkbox to reside under the Simplify panel of the Scene context.

The Simplify panel of the Scene context does not have similar settings for the workflow that the toggle effects. The Display panel definitely looks like the best place to put the toggle. It is among more similar items there.

An update to the particle toggle. I’ve updated the particle toggle to go in the simplify pane and it shuts down the particle system. You can type 2000000 into particle count and it takes immediately because it won’t calculate until the particles are toggled back on. It allows you to work on high particle count system offline or a scene with multiple particle meshes eating up resources. The patch is:

https://developer.blender.org/D355

Hopefully will make it in next version.

So looking at the developer patch, Brecht had an excellent point about context and underlying code execution. I still think the option grouping from a UI and artist use case is better in display. But I understand the code underneath also determines where it needs to be placed and therefor the simplify panel works best for code execution context.

Good work sundiego47

I REALLY hope this makes it in. If what you say is true, in that particles are being calculated behind the scenes even when hidden (which has been my experience), then this is a godsend if you have furry characters in a scene and you want to focus on animation without any particle overhead.

Exactly fahr. We have our hopes up and sundiego47 is working with core devs to make it happen. It also will toggle off other things to make for a more rapid development workflow. Kind of like wireframe viewport rendering. You only have on what you need at the moment in complex scenes. This makes for a very fast workflow. Something I am a total advocate for since I work in the live event industry. I can only think that Project Gooseberry will use this extensively. It may effect other workflows in a minor way. But the benefit on particles as fur/hair should be tremendous.

It was a good idea borne out of necessity on a project. One of the best reasons to improve Blender IMHO.

Its been very useful to me already. The one thing that really can’t be changed is since its not calculating during the simplify if any changes are made then animations will need to rebuild after any changes.

As for 2.70 I wouldn’t get my hopes up but it is checked in and ready to go.

Could you elaborate on that? What do you mean my animations needing to be rebuilt?

If you change the mesh or particle I’ve made it so that the calculations aren’t involved while you making those changes so the lag that you experience goes away completely while editing the mesh or the particles even themselves. The get rebuilt as soon as you toggle it back on to fit the changes. What I mean by rebuilt is if you had an animation that cached the hair dynamics then it will need to recache with the new changes once it is unsimplified. The goal really was if you had a scene with multiple particle system a way to quickly toggle those interactions off because they seem to be the ones that make changes impossible if not turned off.