Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

[BUG-37631] Rigged mesh with partially transparent texture on it have 4 times higher complexity #11970

Open
sl-service-account opened this issue Aug 9, 2016 · 5 comments

Comments

@sl-service-account
Copy link

Steps to Reproduce

Checked why some mesh attachment have enormous amount of complexity.

Actual Behavior

Mesh avatar attachments complexity (counted to avatar complexity) rising 4 times when you apply texture with any amount of transparency to it, no matter of the size of that transparent part.

Expected Behavior

Expected complexity to be higher, but not 4 times more.

Other information

Original Jira Fields
Field Value
Issue BUG-37631
Summary Rigged mesh with partially transparent texture on it have 4 times higher complexity
Type Bug
Priority Unset
Status Been Triaged
Resolution Triaged
Reporter Nym Rieko (nym.rieko)
Created at 2016-08-09T17:31:51Z
Updated at 2016-08-16T16:45:19Z
{
  'Business Unit': ['Platform'],
  'Date of First Response': '2016-08-09T17:16:18.517-0500',
  'ReOpened Count': 0.0,
  'Severity': 'Unset',
  'System': 'SL Viewer',
  'Target Viewer Version': 'viewer-development',
  'What just happened?': 'Mesh avatar attachments complexity (counted to avatar complexity) rising 4 times when you apply texture with any amount of transparency to it, no matter of the size of that transparent part.',
  'What were you doing when it happened?': 'Checked why some mesh attachment have enormous amount of complexity.',
  'What were you expecting to happen instead?': 'Expected complexity to be higher, but not 4 times more.',
}
@sl-service-account
Copy link
Author

Whirly Fizzle commented at 2016-08-09T22:16:19Z

I think this is expected behaviour.
There is a 4x multiplier for alpha listed on http://wiki.secondlife.com/wiki/Mesh/Rendering_weight

@sl-service-account
Copy link
Author

Nym Rieko commented at 2016-08-10T00:36:35Z, updated at 2016-08-10T00:37:35Z

I think, it would be expected behavior, if this multiplier will be applied only to vertices that have material with transparency. But applying it to a whole thing, like avatar body, if it only have few vertices for lashes with transparency on them we cannot call "fair calculation". Perhaps it should be changed so only materials with transparency will be calculated with 4x multiplier. Well, we always can cut mesh to parts, but I am afraid that starting to do so we will end with separate triangles instead of a solid mesh, to how many pieces we should cut it to work around that miscalculation ?

@sl-service-account
Copy link
Author

Nym Rieko commented at 2016-08-10T01:03:54Z

It seems problem is much wider then. Mesh can have up to 8 materials, with different properties set to every of them, and with that prim based calculation every property will be applied to a whole mesh. The only way I see right now, is to separate meshes so each part will have only single material, but why to have 8 of them for meshes then ? Mesh is more complex object than prim, and I think for them rendering cost should be calculated per material, not per prim.

@sl-service-account
Copy link
Author

ainecaoimhe commented at 2016-08-10T18:11:59Z

It certainly seems counter-intuitive that having a tiny number of triangles of mesh would make it leap that drastically. For fun, try taking the basic avatar mesh and join each of the pieces and upload it as a single mesh. As soon as you apply the eyelash texture it suddenly quadruples in weight, even though those represent only a tiny fraction of the total surface of the avatar. Disabling the alpha of the eyelash brings it back down to a sane number. I could actually model mesh eyelashes as part of an avatar for a lower complexity value than using an alpha if it impacts the whole mesh.

As Nym says, all this does is ensure that all meshes will now have to be split by material and uploaded as linksets if there's any chance at all that one material might need to take a transparent texture, which I would imagine isn't going to improve server delivery efficiency very much. Pro-rating the calculation by the amount of surface area or even simply by number of triangles that have that alpha texture would seem far more reasonable.

@sl-service-account
Copy link
Author

Manwa Pastorelli commented at 2016-08-11T15:21:09Z

I have to agree that unless this really does add the kind of render cost suggested that making the avatar complexity work on a per material (face inworld) basis seams far more sensible.

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