Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

[BUG-202864] Change Mesh Uploader to preserve Scene File object names when a full linkset is uploaded. #3147

Open
sl-service-account opened this issue Jan 4, 2018 · 7 comments

Comments

@sl-service-account
Copy link

sl-service-account commented Jan 4, 2018

How would you like the feature to work?

When a mesh is uploaded ~ if it's number of faces/Material IDs exceed 8, it is broken up into the original mesh, plus an appropriate number of child-meshes inside a linkset in SL where all they are all named "Object". It would be convenient for organizational purposes, if instead of all being named "Object" they all inherited the name of the object that they are fragmented from IE

If the primary mesh was named:
"MyOverlyHighPolyDoggo"
then it's subsequent subcomponents from excess material faces would be put into a linkset ( as they presently are ) but would instead be named:
"MyOverlyHighPolyDoggo_Pt002" , "MyOverlyHighPolyDoggo_Pt003" etc etc.

Also ~ it would be nice if other elements in the scene file that were cobbled together in the linkset were also not renamed "Object" and retained the name that the originally had in the source file.

IE : If my scene file has 4 meshes named "
"MyOverlyHighPolyDoggo"
"MyOverlyHighPolySweater"
"MyOverlyHighPolyBooties"
"MyOverlyHighPolyHeadCap"

And I group them all together into a DAE file and upload it ~ It'd be nice if all those names carried over into being in world.
Presently if you do that you get the root object named "MyOverlyHighPolyDoggo" all the sub-objects of the linkset are renamed "Object"

Why is this feature important to you? How would it benefit the community?

It would help people with enormous complex multipart meshes. Personally I use a script to assemble and swap out components ~ and it uses item names to identify which part belongs with what.

Attachments

Original Jira Fields
Field Value
Issue BUG-202864
Summary Change Mesh Uploader to preserve Scene File object names when a full linkset is uploaded.
Type New Feature Request
Priority Unset
Status Accepted
Resolution Accepted
Created at 2018-01-04T22:04:51Z
Updated at 2021-07-27T23:33:53Z
{
  'Business Unit': ['Platform'],
  'Date of First Response': '2018-01-10T18:58:50.209-0600',
  'How would you like the feature to work?': 'When a mesh is uploaded ~ if it\'s number of faces exceed 8, it is broken up into the original mesh, plus an appropriate number of child-meshes all named "Object".  It would be convenient for organizational purposes, if instead of all being named "Object" they all inherited the name of the object that they are fragmented from IE \r\n\r\nIf the primary mesh was named:\r\n"MyOverlyHighPolyDoggo"\r\nthen it\'s subsequent subcomponents in the linkset would be named \r\n"MyOverlyHighPolyDoggo_Pt002"  , "MyOverlyHighPolyDoggo_Pt003"  etc etc.\r\n\r\n\r\nAlso ~ it would be nice if other elements in the scene file that were cobbled together in the linkset were also not renamed "Object" and retained the name that the originally had in the source file.',
  'ReOpened Count': 0.0,
  'Severity': 'Unset',
  'Target Viewer Version': 'viewer-development',
  'Why is this feature important to you? How would it benefit the community?': 'It would help people with enormous complex multipart meshes.  Personally I use a script to assemble and swap out components ~ and it uses item names to identify which part belongs with what.',
}
@sl-service-account
Copy link
Author

Beq Janus commented at 2018-01-11T00:58:50Z, updated at 2018-01-11T01:02:12Z

The SLM produced by the viewer (tested with Firestorm) includes the original object name assigned to the mesh in the instance data section. This would appear to suggest that the data loss (renaming to Object) is happening on the server not in the Mesh Uploader.

The following output is a decoding of the SLM for two simple cubes.


000005{ MAP (len:4)
000018	Key:instance
000023	[ ARRAY (2 elements)           # This is a scene/linkset consisting of two objects
000028		{ MAP (len:4)
000038			Key:label
000051			String: Cube.003 (8) # Name of root mesh in the link set (the resultant linkset will carry this name)
000064			Key:material
000069			[ ARRAY (1 elements)

*** SNIP ***

000212			]
000224			Key:mesh_id
000229			Integer:0
000243			Key:transform

*** SNIP ***

000394		}
000399		{ MAP (len:4)
000409			Key:label
000422			String: Cube.004 (8)  # The name of the second mesh in the linkset. This will be lost after upload.

*** SNIP ***

000765		}
000766	]

@sl-service-account
Copy link
Author

Beq Janus commented at 2019-05-25T00:27:46Z

More information:

The SLM may preserve the names (as shown above) but the name is not present in the uploaded data.

The following images show the input collada and the resultant upload (prettyprinted LLSD)

 

Firstly the collada 

https://i.gyazo.com/1f05eeeb423dc178e66158bcbb479c32.png

Secondly the resultant upload

https://i.gyazo.com/7f82ba6d30d3af8c6f67a8aab4326c70.png

 

Note that the name is in the header section and is thus the name assigned to the composite linkset. The uploader returns a single UUID as a result of the upload, which again is the reference to the object. However, given that the linkset can, at any time, be unlinked, the asset server must be creating individual mesh assets for each instance in the list of meshes.

 

Suggested Fix.

on the viewer:

Add a 'mesh-name' key to the instance_list repeating block alongside the integer "mesh" index.

then in the server code:

In the post Asset Upload handler, for all but the root instance, use the mesh-name rather than "Object".

 

I should be able to provide a test version of Firestorm (and a patch for LL viewer) to help with implementing this.

 

For reference, 

It would appear from a brief code inspection (untested as yet) that OpenSim handles this slightly better, but is still pretty much useless to a builder.

The OpenSim UploadAssetComplete handler will assign the "name" to the root and "name"+i to the children where i is the instance number 1-N

 

 

 

@sl-service-account
Copy link
Author

polysail commented at 2021-06-08T16:18:21Z

Appended Test meshes, and an auto-coloring script that spits out mesh names as well.

@sl-service-account
Copy link
Author

polysail commented at 2021-06-23T04:40:25Z, updated at 2021-06-23T04:42:39Z

I tried uploading the "SinglePlaneManyMats_WIthOtherStuff" DAE file from this JIRA @jigglypuff and the plane name didn't import.

 

https://gyazo.com/e9de9852a5be456493bb9454b85f4880

 

You can see it in the DAE file.  The geometryid is "SinglePlaneManyMats"  but because the mesh itself has greater than 8 faces, when it gets parsed in the viewer, those faces get split into two objects due to the 8 submeshes ( faces) per mesh restriction on the mesh asset format.  One of the pieces still defaults to "Object" which is less than ideal, and the plane object itself inherits the name of the root object (APlatonicSolid in this case) , which is an improvement over "Object", but it is also less than ideal.    Ideally the plane keeps it's name that it has specified in geometryid, and the "extra" object generated by the excess faces, also inherits that name, possibly with a numeral afterwards to indicate that it's an extra entity.   Overall looks very promising though!

@sl-service-account
Copy link
Author

Alexa Linden commented at 2021-06-23T15:07:13Z

Thanks Polysail - I'm passing this along to the team.

@sl-service-account
Copy link
Author

Beq Janus commented at 2021-07-19T11:00:19Z

Liz's latest report adds a viewer change on top of what was previously a server-side only change. As the auto conversion of excessive face geometry is broken in a million other ways (try using user-generated LODs with these for example) and should probably never have been a supported feature I would vote strongly to get the server-side portion of this resolved so that the majority of use-cases are enabled, and transfer the special case to a new Jira for further investigation. 

@sl-service-account
Copy link
Author

Dan Linden commented at 2021-07-27T23:33:54Z

This feature has shipped. Please file a new jira if this is still broken in some way or if you have viewer side feature suggestions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant