[Bf-committers] Proposed Noise Modifier
Patrice Gmail
patrice.bertrand.eu at gmail.com
Sat Feb 15 22:01:45 CET 2014
Hello, I have submitted a patch for a proposed "noise modifier". Hope
it gets some (positive) feedback ! And a question regarding deform vs
non-deform modifier is included at the end. Many thanks.
Here's what it does:
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.
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.
More information about the Bf-committers
mailing list