Face/Edge groups proposal

提供: wiki
移動先: 案内検索

Edge and Face groups proposal

While vertex groups are available in blender since a long time, there are now no edge and face groups in the mesh structure. However, there are many edge and face related data stored in special structures. This proposal is very simple, and is done rather to show the reasons why to have these groups, from a user perspective and hopefully also coder perspective.

For the beginning a single groups type for each element would be enough(float weights), but boolean and vector types (2d and 3d) would be possibly usefull for memory and organisation uses. proposed ideal state is, where all data, that can be fit into groups, uses the same system.


current state

Vertex groups

are used in approximately 22 modifiers, can be used to influence many simulation parameters(particles, hair, e.t.c.), can be used in rendering. I estimate this to 50 and more different use cases in blender. Sometimes groups are used only as boolean values(a vertex is in a group or isn’t), sometimes with weight. There are exceptions, like skin modifier weights - this is per vertex data , and probably because it uses 2 values per vertex(x and y) it is now a custom data. This could be potentially stored in a “vector 2D” group


Edges

Currently, there are several edge custom data uses:

- Crease

- Seams

- Sharp (bool)

- Bevel

- Freestyle edge marks


Faces

are grouped so far in these cases

- materials

- sculpt mask

- Freestyle face marks

Potential uses of Edge and Face groups are all the cases that are above, but also many more. The fact that modifiers don’t use often face/edge custom data is the complexity of adding a new data layer. Mask modifier would be much more usefull in many cases if it could work with faces. Similar to bevel modifier, many edit-mode tools could potentially become usefull modifiers - Extrude, Inset, and more. Many cases where are now used vertex groups are not optimal - e.g. in particle/hair system, it would be in some cases more logical to define faces for emission and have a sharp border between the groups. so, in some cases, edge or face groups would replace vertex groups.


Display of the groups

Currently, edge marks-weights have their distinct colors so the user can see where the weights will be applied. This is a functionality that should be replaced and be at least as good as now. Per-group colors and visibility could easily solve this. currently, this also causes too many options in the mesh display options, while per-group visibility and color could be in a list view.

Coding aspect of the problem

I am not sure about how complex it would be to implement, but this change would save a lot of time for many blender core and addon coders in the future.

Also, it would probably mean a significant code cleanup in many areas.

Good thing is also the fact that the change doesn’t have to be done in one step, the migration to the system could happen in a longer term.


Face and edge groups as vertex groups and opposite.

it might be usefull if users don’t have to define a new vertex group, if they want to use a face group which they allready have for a different purpose. since face groups can be interpreted as vertex groups releatively easily, with a simple interpolation of the weights.

Same could go oposite but the advantage of not having interpolated values would get lost.