Search Issue Tracker

Won't Fix

Votes

0

Found in

2021.3.36f1

2022.3.22f1

2023.2.15f1

6000.0.0b13

Issue ID

UUM-67753

Regression

No

Optimise gameobject breaks skinned mesh when the root bone is changed

--

-

Reproduction steps:
1. Open the attached “Repro“ project
2. Open the “Assets/OutdoorsScene.unity“ Scene
3. Enter the Play Mode
4. Observe the Game View

Expected result: The Pink and White meshes move in the same way
Actual result: The Pink meshes have a pivot offset, and are not in the correct position

Reproducible with: 2021.3.36f1, 2022.3.16f1, 2023.2.15f1, 6000.0.0b13

Reproducible on: M1 MacOS 14.3.1
Not reproducible on: No other environment tested

*Work Around*
The issue does not reproduce if the root bone field is left to the default. A work around would be to have the importer select the desired root bone by default. The default root bone is picked out of the list of assigned bones to the SkinnedMeshRenderer. With the current (default) settings only bones that are referenced by skin influences are assigned to SkinnedMeshRenderer. In the case of this mesh for example this does not leave good candidates. There are two options to include the desired bone into the bones list during import:

_option 1:_ Add a triangle that is skinned to the desired root bone in each mesh (or skin an existing vertex in each mesh with a small influence to the desired root bone). The root bone will then have a non-zero influence and will be included in the bones array.
_option 2:_ (not recommended) Disable "Strip Bones" option on the importer. This will assign all transforms as bones to the SkinnedMeshRenderer. This option might have a larger performance impact as it could assign many more bones to SkinnedMeshRenderer.

In both cases, the changes in bones can be monitored through SkinnedMeshRenderer.bones. Once the desired bone is included in the bones array it will be selected as the root bone because it is the 'most' common ancestor.

  1. Resolution Note:

    The implementation of "Optimise GameObjects" does not account for changes to the root bone field in SkinnedMeshRenderer. The system locks into the root bone that was selected at import time. Modifying this behavior will entail significant changes that can impact the broader area and regress other behaviors. This is due to how information for this feature is stored today. After import not enough information is available to handle a root bone change. Furthermore, the way the information is stored won't allow for per-instance (prefab/game-object) changes. Please make use of the work arounds mentioned below.

    _Work Around_
    The issue does not reproduce if the root bone field is left to the default. A work around would be to have the importer select the desired root bone by default. The default root bone is picked out of the list of assigned bones to the SkinnedMeshRenderer. With the current (default) settings only bones that are referenced by skin influences are assigned to SkinnedMeshRenderer. In the case of this mesh for example this does not leave good candidates. There are two options to include the desired bone into the bones list during import:

    - option 1: Add a triangle that is skinned to the desired root bone in each mesh (or skin an existing vertex in each mesh with a small influence to the desired root bone). The root bone will then have a non-zero influence and will be included in the bones array.
    - option 2: (not recommended) Disable "Strip Bones" option on the importer. This will assign all transforms as bones to the SkinnedMeshRenderer. This option might have a larger performance impact as it could assign many more bones to SkinnedMeshRenderer.

    In both cases, the changes in bones can be monitored through SkinnedMeshRenderer.bones. Once the desired bone is included in the bones array it will be selected as the root bone because it is the 'most' common ancestor.

Comments (1)

  1. evelynmartinez9911

    Mar 23, 2024 18:59

    GET RICH WITH BLANK ATM CARD, Whats app: + 1 8 0 3 3 9 2 1 7 3 5

    I want to testify about Dark Web blank atm cards which can withdraw money from any atm machines around the world. I was very poor before and have no job. I saw so many testimony about how Dark Web Online Hackers send them the atm blank card and use it to collect money in any atm machine and become rich I email them also and they sent me the blank atm card. I have use it to get 500,000 dollars. withdraw the maximum of 5,000 USD daily. Dark Web is giving out the card just to help the poor. Hack and take money directly from any atm machine vault with the use of atm programmed card which runs in automatic mode.

    You can also contact them for the service below

    * Western Union/MoneyGram Transfer

    * Bank Transfer

    * PayPal / Skrill Transfer

    * Crypto Mining

    * CashApp Transfer

    * Bitcoin Loans

    * Recover Stolen/Missing Crypto/Funds/Assets

    Email: darkwebonlinehackers {AT} gmail {DOT} com

    Telegram or Whats App: + 1 8 0 3 3 9 2 1 7 3 5

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.