Getting rid of material indexes ?

Hi guys,

material indexes are one of these quixotic functions reminding that Blender was originally designed by techies for techies. Now that Blender 2.5 puts more focus on user and usability, I think time has come to weigh in and - at least in upcoming 2.5x or plus versions - have Blender purged from this counter-intuitive system and allow user to simply assign a material to a face. In term of design workflow speed - one of the features Blender excels in - it seems to me it would be a major improvement
On the other hand, I’m a kind of newbie in this forum and I know that many guys out here are very much attached to the way Blender has always been working. Maybe I’m missing something and indexes are indeed of precious use.

Any thoughts?

I realize that people vote without leaving a message. Maybe because I set the poll so it is not anonymous? Can a moderator set the poll back to anonymous?

Something you loose if you drop material index is the ability to have different objects with their own materials for an index.
the feature isnt used THAT much but it can be handy at times.

With direct material pointers to have the same functionality youd need some replacement table for materials instead (slower and more of a hassle to manage).

The workflow could be improved keeping indices’s, where you apply a material to selected faces and blender re-uses an existing index, or adds a new one if the material is not yet used in the mesh.

Thanks for your answer. :slight_smile:

Your post illustrates what I was talking about: you are answering to me in technical terms. IMHO what’s happening under the hood is of little interest to the designer as long as it does not have an impact on render times.

So why not decide that, internally, Blender will keep on using indexes, but that its use will be transparent for the user? We might even consider the possibility of a collapsable panel bringing back all the index-related information… Leaving the unsuspecting designer assign a material to a set of faces in - what? - two clicks?

Yeap. I agree.
Make it possible to assign materials directly to face, which results in delegating the creation of new indexes to blender, not the user.
If that is the user’s whish, also let him/her create the index.

EDIT* There’s no need to ditch material indices, just don’t require the user to interct with them…*EDIT

You guys should check out the script i wrote that allows you to assign materials directly to faces…
I’ll port it to 2.5 when the api lets you assign materials to meshes (at the moment it’s read only)
Here’s a link to the script thread…

It gives you a pulldown list of all the materials in the scene and assigns that material to the selected objects in object mode or the selected faces in edit mode… it also removes any un-used material indices…

IO have a gui script that call s this amongst other scripts common to my qworkflow (some are proprietry tools so I can’t release that…

Forgive my ignorance but I feel a panic attack coming on at the idea of deleting or hiding some function in the existing materials system.

I’ve been using Blender for about 2 years now and done a lot of exploring materials but I have no clue what you mean by ‘material index’. As for assigning materials to individual (or groups of) faces, it seems to me that is how it works already.

If you are referring to the selectable menue of existing materials under the material buttons, I use that option whenever I can rather than always making a new material…

If you are referring to the material selector in the edit mode buttons, I use that too.

In short, I can’t think of anything you could drop in the materials system that would make assigning, reassigning or changing materials less complicated. Sometimes, you just have to bite the bullet and learn how to use the tricky bits.

The thing is that you have to create a group of vertices, then chose the material and assign to that group.

Instead of “select face (thus, vertices) -> create group -> assign material”, why not make it possible to “select face -> assign material” and let blender create the group.

In my opinion material index is key feature that give you more control over material assigning and selecting parts of mesh and only thing I wish to see in 2.5 is ability to give it unique name instead of using just numbers - e.g. names of parts in mesh.

I have assigned materials to faces simply by selecting the faces and using the ‘assign’ button; no vertices; no groups.

EDIT: Creating a vertex group is just an extra step that may be useful if you want to select those faces fairly often.

you an only do that (click the assign button) if the material is already attached to the mesh or object…

first you have to create a material and attach it to the mesh, then (if you want more than one material on the mesh you need to fiddle about with assigning…

… the capability is good , it’s just convoluted…

Try my script from the first post… I’m pretty sure you’ll like it whether or not you’re a fan of material indices…

Tried the cleanup script on my particle hair test figure. She suddenly got very pale.

What is strange is that the face material is still in the list of materials for this mesh. The material itself looks normal as far as I can see. It appears to have just been ‘unassigned’ to the faces of her face (don’t know a better way to say that):spin: There are seven materials for this mesh and there were still seven materials after cleanup even though it said it removed 2 (I have no clue what the second one was.)

Blender V-2.49a; Fedora 11 rpm distribution.

is the data attached to the mesh or the object?

I think this is another stupid 3dsmax thing.

Endi …

I do not agree that material index should be removed. What you ask for you worded wrong.
Blender is object based and material are like objects which can be linked to an object or
a face selection - while the object would include all faces.

But I agree that it might be faster to select a face or faces and than have a apply material button
which than for us would generate the material index automatically.

I would see this as a welcome addition but NOT remove the old system because it works fine
and is what you have with other systems as well.

I agree material indices are not that intuitive and I think two suggestions above would make significant improvements.

The first is that you can assign materials directly to selected faces and Blender creates the appropriate group.

The second is that you can name these groups so that you can select them easily and know what they represent at a glance or just have a mode where you can see them visually.

The vertex groups seem to be setup a bit better although there are improvements that can be made there too.

Having vertex group names match armature bone names makes a lot of sense as you can drop in another armature with the same bone names and have it deform with the same groups. But, the vertex group panel doesn’t really need to exist either.

Same with the shape keys. Why aren’t these all one and the same thing?

They are all groups of vertices with 3 different properties (materials, keyframes and bone weights).

So let’s for example assume there is a vertex group mode. When you enter this mode and you hover over the mesh, it highlights the groups. If a vertex is part of multiple groups, there can be a list and you can choose to view only material groups, armature groups or keyed groups - maybe even generic groups to allow you to UV map complex meshes easier.

To assign materials, you just go into edit mode, select faces and assign a material by going to the material scroll box (in 2.5), right-click and assign. To edit the group, go into vertex group mode and say you assigned a material to the face, when you hover over the face, it highlights that group. When you click to select it, it becomes the active group and there could be a brush to add/removes verts from that group - if they are removed, they become part of the closest vertex group or none if there are no others.

To deal with armatures, the weight paint mode already works very well. Although you wouldn’t need to manually put the armature into pose mode - what’s that all about? When in weight paint mode, you select the bone and paint your group of associated verts and just as it does now, it would auto-create the groups and maintain the link if you decide to rename a bone. Go into vertex group mode for complete assignment or removal of verts using a brush. If for whatever reason you need to move a group to another bone, that can be an easy option (e.g select group, hit m and select new bone)

To deal with shape keys, you would store a base key. Then you’d move various verts and create a number of shape keys. Blender would automatically setup groups for these shape keys based on the verts that had moved from the base key. You then go into group mode, select a group to make it active and set a keyframe using I > insert keyframe at the specified frame. This way you get an idea of which shape keys do what.

For times you need to visualize the groups as a list, the outliner is there and is very well setup for it. You should simply be able to select an auto-created material, bone or shape group and rename it or delete it in the outliner.

There will probably be scenarios the above setup won’t address but I’m all for moving towards more visual (‘artistic’) ways of linking data instead of copious amounts of squashed interface panels.

I think the material indexes are a good way of getting a quick overview of what materials are on the object.

At least keep the old way, it’s not THAT counter-intuitive the way I see it.

I’m with you on this. The function of the material indices is useful and important, but the anonymous numerical interface is confusing. Names would be good.

Best wishes,

2.5 has the material indicies in something that looks like a little browser and it now shows the names of the materials instead of just numbers.

According to the material buttons, the material is linked to the object. it’s the same for the other materials on this figure. Is there some other way I should check it?
EDIT: the material is UV mapped to the face