A new modifier for adding randomness to mesh objects, duplicated objects and arrays

Hello, I’d like to share with you a proposition for a new modifier. To save you some reading, I posted a short video presentation on Youtube.

In short:

This a proposition for a new modifier to be added to Blender.

The “Noise Modifier” will make it possible to add some randomness into mesh objects, duplicated objects and arrays of objects.

It may be used in one of three modes, or scopes.

In vertex mode, each individual vertex will be shifted by a random amount, somewhere between zero and the set maximum. The probability that a given vertex is altered can be defined, and the scope of the modifier can be limited to a vertex group, with vertex weight acting as a multiplier to the translation.

In whole mesh mode, the mesh is transformed as a whole, while it’s origin remains. Transformation may be a combination of translation, rotation and scaling. This is mostly useful when duplicating objects, either with Shift-D or Alt-D. However, for each object to have it’s own random transformation, the “Use ID as seed” checkbox must be used.

Finally, the loose parts mode is used mostly with arrays of objects. Indeed, this appears to be the only way one can add randomness into arrays, due to the way the modifier stack operates. Each loose part, i.e. set of vertices connected by edges, will be transformed as a whole.

Your feedback most welcome. I do hope this gets into the trunk some day.

The premise alone means this holds more promise than than the advanced array modifier patch seen here a while ago (because it’s a completely separate modifier type that can work on array modifier instances and more, meaning there’s no potential bloat or complexity added to existing modifiers, that is providing the loose parts mode takes the modified mesh data into account).

The only thing about posting it now is that if it’s already been coded, it’s too late for it to make it into 2.70, but is is possible it could go into 2.71 if the code is clean enough.

Sounds great! With an array modifier, it could be an imperfect factory! Cool stuff.

Hi, thanks for the quick feedback. The code is quite clean, I believe. I do have one area where I would like the advice of experienced developpers, that is whether to make it a deform or a non-deform modifier. In theory, it is deform only, meaning vertices are just moved around, never created, and neither are edges and faces. But deform-only modifiers receive as input an array of vertex coordinates, not the actual BMVert objects. For Vertex mode and Whole Mesh Mode, I could do with a deform-only modifier, which is probably a lighter modifier in terms of memory usage. But for loose parts mode, I need to identify loose parts by walking the mesh through BMW_CONNECTED_VERTEX, which I did not manage to do with deform-only. So I switched to non-deform modifier. Don’t know exactly how much of an issue this is.

Other than this, the only features that are not included at this point is rotation and scaling in loose parts mode. It will require finding the bounding box center for each loose part.

Would be great to see this into 2.71 !

I would advise that you go to developer.blender.org, submit your patch to the patch tracker, and ask any remaining questions there, there’s also a Blender developer IRC channel where you can chat with the devs. directly.

It seems like there could be a case where another function or two can be placed under the deform category, but it’s best left to the experts.

It would be fantastic if accepted.

i’m intersted too :smiley:

Just checked the mailing list and I saw that the idea has already be shot down. I knew it was too good to be true.

on that page : https://developer.blender.org/D320 it seems Cambell did review it. Where did you see it was rejected ?

This is really useful,I hope it can be soon accepted.

@@matali to see what Campbell said.

In short, for those interested in the discussion, Campbell basically said that he was against adding a new modifier for this, and it would better to add it in the displacement modifier, to allow displacing without textures as an option. Another way of formulating it: implement already existing modifier better, with better fonctionnalities, before adding a new one.

Hopefully, I’ve not confused anyone.

@KWD : Thanks for the link, so it’s not rejected, just going to be implemented in a better way. So a good news in the end. It’s rare someone makes a good proposition with patch ready, I hope such behaviours get rewarded.

This is great but why not add this to the list of optional plug-ins rather than add it to the generic build?

This likely wouldn’t work as a pure python plugin. I’m upset it got shot down, I don’t see the per loose parts noise being easy to integrate into the displacement modifier, and personally I don’t think it makes any sense there.

I haven’t yet seen one way or another that Campbell has rejected this idea in its entirety, he just wants potential new developers to investigate whether or not the functionality can be added to an existing modifier before coming to the conclusion it needs a new one.

Of course, it’s not surprising that Campbell needs to gain a bit of understanding from users on how it’s useful, as I don’t know if he actually does much in the way of constructing complex scenes and doing artistic work (ie. leaning heavily towards the ‘programmer’ mindset).

My understanding of this is that Patrice (@@patb) started to work on improving the array modifier and adding some randomness to it. Then he decided that it would be better to have a dedicated modifier for it. So actually, some parts of his code (i.e. per loose parts noise) could be implemented in the array modifier, and the other parts could be implemented in the displacement modifier.

As for the displacement modifier, Campbell envisions three modes :

  • Textures, which we already have;
  • Noise, what Patrice has done/is doing;
  • Constant, I don’t know what he meant by this one, but I came accross a (old) patch in the tracker that could be it, see T24177.

I believe he’s got a point there, so he kinda understands what artists want in the end! :slight_smile:

Anyways, it’s not rejected, it’s not shot down, it just needs to mature.

Please, somebody tell me how you can use the displace modifier to shift, without deformations, a whole mesh along a axis? this modifier does (could have done) things that the displace modifer does not even dream of doing.

this modifier does (could have done) things that the displace modifer does not even dream of doing.

If I’m not mistaken, this will be an improvement to the displace modifier, so yes you could shift a whole mesh along an axis no problem with the displace modifier once this is implemented.

It’s not clear to me why somebody has to use a displace modifier to do a thing different that displacement,ok if it’s the only possibility,but if someone codes something dedicated I don’t see the problem.
This modifier maybe look similar but has nothing to do with diplacement,it’s a way to offset randomly objects and loose parts.
Much better to keep as is instead of putting the functionaly on the displace modifier.

Yes. We could get rid of this nonsense with the Scatter modifier and keep current modifiers as they are.