Jump to content

Can automatic sorting of material names be disabled?


Cain Maven
 Share

You are about to reply to a thread that has been inactive for 2435 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Is there a known way of disabling the recently introduced automatic sorting of material names in the uploader? This "feature" is breaking existing content.

I did try the ImporterLegacyMatching debug setting, but that did not seem to disable alphabetic sorting.

Link to comment
Share on other sites

Could this be what is causing my weird issues here: https://www.dropbox.com/s/vhiwas42lp9fkmq/WTFFFF.gif ?

Recently, any multi faces mesh I upload to SL has been acting weirdly, where a texture gets applied to all the other faces whenever I take the object back to inventory, take a copy of it to inventory, drop a texture on one of the faces, or use local textures and save over a texture.

What's the naming guideline with this new feature ? Is there a memo somewhere ? First I hear of it.

 

PS. I checked ' ImporterLegacyMatching' in my Firestorm viewer Debug setttings and it is set to False. And if I set it to True and re-upload the mesh, what happens is when I take a copy of the object to inventory, all the faces get cleared and set to blank on both the original and the copy.

Link to comment
Share on other sites

I'm not sure what's causing the problem you're seeing, but some of the details of "improved" process can be found here: 

https://community.secondlife.com/t5/English-Knowledge-Base/Uploading-a-mesh-model/ta-p/974185

The original idea was to allow more than 8 faces per mesh. Instead, the uploader will now split your mesh into two or more meshes so that each has a maximum of 8 faces.

Additionally, the uploader is now supposed to recognize LODs stored in separate .dae files based on a file naming convention (I haven't gotten that to work, but maybe I'm doing something wrong; I confess I haven't tried very hard.)

This would be fine and well (although I don't really see the upside) if it hadn't been for the fact that it now reorders your materials alphabetically, which means that you can't reupload existing content and get the same face order. This quite obviously breaks scripts that rely on face numbers, for example.

The uploader has also adopted the annoying habit of suffixing the mesh name with "_0" for reasons that I do not understand.

Maybe I'm missing something here, but I actually wish they would roll back this whole update until they can solve the original problem, which was to allow more than 8 faces per mesh.

Link to comment
Share on other sites

Sorting of materials by name is mentioned in this kb article. It also mentions ImporterLegacyMatching. While I guess it is ambiguous as written, I think that applies only to the object names (which are now also used to sort the object list) matching, not the material names. There is no common code involved in getting the names of objects and materials.

By the way, see my comment there - the new naming scheme applies to object names, not file names.

Link to comment
Share on other sites

Toggling 'ImporterLegacyMatching' between TRUE and FALSE is affecting how the faces change, although both still end up being broken, so it might be what's causing it ? Or not ?

Nobody else seems to be having this issue, but this is a major hindrance. I had not been creating anything for the past 4 months and I had not heard about any of those changes. I don't think we needed more than 8 faces that much that it was worth breaking everything else for it.

Should I create a seperate thread for my issue then, if my issue is not related to the original post ?

Link to comment
Share on other sites


Drongle McMahon wrote:

Sorting of materials by name is mentioned in
. It also mentions ImporterLegacyMatching. While I guess it is ambiguous as written, I think thast applies only to the object name (which are now also used to sort the object list) matching, not the material names. There is no common code involved in getting the names of objects and materials.

By the way, see my comment there - the new naming scheme applies to object names, not file names.

I guess I was hoping for a debug setting or other workaround to disable the material sorting. I'm not even sure why this requirement was added, as it's trivial to compare two unsorted lists.

Thanks for the clarification on object/file name matching. I assumed this feature would look for files with the specified file names ("duck_LOD2.dae" etc. when I select "duck.dae" for upload) and automatically populate the UI. Now that would have been a time saver... :)

Link to comment
Share on other sites


Elsa Wellesley wrote:

I don't think we needed more than 8 faces that much that it was worth breaking everything else for it.

Should I create a seperate thread for my issue then, if my issue is not related to the original post ?

I *think* this is a separate issue and so probably deserves its own thread so other with the same problem can see it and respond.

I would have loved to have more than 8 materials... but not at the expense of content breaking :)

Link to comment
Share on other sites

Ok, I have renamed my materials alphabetically and it seems to have fixed the issue. I'm going to test furtuer just to make sure the faces continue to behave as they should. But I may finally be seeing the light at the end of the tunnel. 

 



PS. And sorry for hijacking your thread !!! ^^

PPS. It really looks like that fixes it, I'm giddy with relief.

Link to comment
Share on other sites

I just want to get this clear in my head since I have read a lot about it here but have happily had no issues.

 

Is the reason why I have no issues::::::

 

 

A. I only upload less than eight materials (typically 2 to 4 - using Cycles so materials are pretty much necessary)

B. Am using an OLDER version of Firestorm which I believe doesn't recognize the new uploader code?

Note, the spaces in material name issues isn't Universal as while I seldom add spaces after so many years of NOT adding spaces, I just did and everything worked just fine (3 materials).

 

So IF you only use 8 or less materials is there still an issue on a current viewer? And is this just for SOME (Mac versus PC for example - different viewers etc) or for everyone.

 

Thanks for the clarification. I think I have read all that has been said since the change took place but I can't say I am clear on things :D.  

Link to comment
Share on other sites

To be clear, my issue is not related to meshes with more than 8 materials. It's the fact that the newest uploader automatically sorts the materials alphabetically rather than preserve the order in Blender (or whichever app you're using.)

This change was made when the uploader was revised to split meshes with more than 8 materials into several meshes; a change we think we could have survived without.

The result is that you cannot upload an existing file and be guaranteed that the face order is the same. If you had, say, the materials "wood", "metal", and "glass", the old face numbers would have been 0, 1 and 2, respectively.

With the current uploader, the list is sorted and becomes "glass", "metal" and "wood", i.e. "glass" is now face 0 instead of face 2, and "wood" has become 2 instead of 0. Consequently, any scripts that rely on the original order break if you reupload the mesh. 

This is not good and there should at least be an option to disable it. I'm guessing that this was done to simply the comparison of material lists in LODs, but as I said in a previous post, comparing two unsorted lists isn't hard.

As for material names with spaces, I have not seen any issues, so that is perhaps related to the applications' exporters rather than the importer?

Link to comment
Share on other sites


Cain Maven wrote:

As for material names with spaces, I have not seen any issues, so that is perhaps related to the applications' exporters rather than the importer?

It's indeed possible that Blender removes any spaces in material names during export. Not everybody is using Blender though.

While the material sorting can be annoying with older collada files, the real issue is the new object sorting, to associate LODs.

Again, this might not apply to Blender users, since Blender has that option to sort objects alphabetically on export. In 3ds Max for example, the export order of objects was determined by the order of their creation in the scene. There used to be a method to re-order them, which didn't had anything to do with naming conventions. These files are definitely broken now. :matte-motes-dead:

Link to comment
Share on other sites

I checked -- Blender does indeed replace spaces in material names with underscores. 

I usually export LODs to separate files, so I don't really see the association issue. I guess what I'll do as a workaround is to write a python script that temporarily renames the materials during export so the original order is preserved. 

Wish I didn't have to, though:)

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2435 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...