Chrissy Ambrose Posted June 25, 2013 Share Posted June 25, 2013 I wonder if anyone can help, having problems finding a way to change the order of materials in Blender. I want to make sure that face numbers remain consistant within similar objects uploaded in various combinations. I can see the oder of materials in the menu, but how can I change this order before exporting an object to collada. Sorry for this simple question. Thank you in advance for assitance Chrissy Link to comment Share on other sites More sharing options...
Drongle McMahon Posted June 25, 2013 Share Posted June 25, 2013 I can't swear that this is true, but (Blender 2.66a): It appears to me that the order of material names in the <polylist> sections for an object (a <geometry> section) is the order that the materials appear in the material slot list for the object. It is the order in the polylists that determines which face number they are assigned to, the first being face 0 etc. The order of the material/effect sections should not matter. So, if you have a set of materials that you want to apply to faces with the same numbers, it should be sufficient to make sure they are all loaded into the material slots in the same order. Create the materials with one object, and then use the selector to enter them into other objects' material lists in the same order. If you omit any from the list, then the following numbers will be wrong. They will get omitted from the upload if there are no triangles with them assigned. So you need to have all the materials used in each mesh, unless you take special care to make sure the consequent differences in numbering are acceptable. I checked this with a few examples, but I can't guarantee it will always work that way. When it comes to LOD meshes, the situation is different. The material names in the lower LODs are re-sorted by name into the order they appear in the high LOD. So, in theory, the order in these should not matter. 1 Link to comment Share on other sites More sharing options...
Chrissy Ambrose Posted June 26, 2013 Author Share Posted June 26, 2013 Thanks Drongle, for your help I still have a question and I have not found an issue with not using all the materials within the file. I make jewelry and put together gemstones and metals in combinations before upload. Some are appended from a master file with bits and pieces I made for use. In any blender file there maybe several materials, not all used for every model depending on what is needed. Say, I have 2 objects, one uses a metal, a pear gemstone and a brilliant cut gem occupying slots 1 , 2 and 3. The next model only uses a metal and a billiant cut stone so using again face 1 and 2, but this does not match model one where the brilliant cut stone is face 3 in the previous object. It becomes important if I use a script later to change texture on identical objects at the same time. Is there a way in blender to alter the order, of materials for each object so that I can always plan that identical faces have the same number? Or do I always need to plan in what order I need to add them when creating the file? Thank you for any help Chrissy Link to comment Share on other sites More sharing options...
Drongle McMahon Posted June 26, 2013 Share Posted June 26, 2013 As long as the materials are on something (you could use a special object just to store them all), then they can be selected from the thingy below the material list (see the picture, yello box). So you can (remove all materials in object mode, if necessary, then) just add them in the right order using that. It will show all the available materials for you to choose from. Link to comment Share on other sites More sharing options...
Gaia Clary Posted June 26, 2013 Share Posted June 26, 2013 To clarify: The Collada exporter generates the <polylist> entries in the same order as in the material stack. About changing material order: Currently the only way to reorder materials in the stack is to reorder the materials by hand in the stack. Maybe we can get a "change material order" feature in the user interface of the material editor... Link to comment Share on other sites More sharing options...
Gaia Clary Posted June 26, 2013 Share Posted June 26, 2013 Drongle McMahon wrote: As long as the materials are on something (you could use a special object just to store them all), then they can be selected from the thingy below the material list (see the picture, yello box). So you can (remove all materials in object mode, if necessary, then) just add them in the right order using that. It will show all the available materials for you to choose from. But then you have to recreate the material -> face association... or i do misunderstand you. Link to comment Share on other sites More sharing options...
Drongle McMahon Posted June 26, 2013 Share Posted June 26, 2013 Yes you do, if you already have it. I think you can be clever by selecting, deleting, the reassigning, switching modes in between, to save a bit of work, but that's still a pain. Best thing is to get it right the first time, of course. An option to export <polylist>s in alphabetic order of the associated material names would make it much easier. Not sure what you would call it to make the meaning clear. Maybe "Export geometry in material order"? Your suggestion of a re-ordering in the stack would be the simplest. It could just be an up/down arrow on the selected material, like the way it works in the modifier stack. Link to comment Share on other sites More sharing options...
Chrissy Ambrose Posted June 26, 2013 Author Share Posted June 26, 2013 Thank you everyone for helpful replies. Will have a go and hopfully things will work out better. I think perhaps planning order of appending objects before adding them will be helpful, more thought needed before putting items together may pay dividends. Thanks again Chrissy Link to comment Share on other sites More sharing options...
Domsson Lean Posted July 10, 2013 Share Posted July 10, 2013 Gaia, a feature to reorder the materials would be awesome. How often did I go to the struggle to manually remove, then re-assign the materials again, just to please the mesh uploader? Two simple arrows, as Drongle suggested, would be really helpful there. Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now