Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign Skin of SkinnedMeshRenderer #2100

Merged
merged 9 commits into from
May 21, 2024

Conversation

GuoLei1990
Copy link
Member

@GuoLei1990 GuoLei1990 commented May 18, 2024

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

  • Completely solve the historical design issues of Skin related interfaces, all skin related information is officially migrated to Skin.
  • Redesign Skin’s operation logic,performance improve 20%.
  • Opt skeleton find performance when load parse glTF.
  • Improve the cloning mechanism. For deep cloning, the reference relationship after cloning can be kept unchanged.

Performance Improvements

Before: FPS: 39 Memory: 103M Load: 300ms
Now: FPS: 48(Up 23%) Memory: 97M(Down 6%) Load: 280ms

Case:
image

Enviroement:
image

@GuoLei1990 GuoLei1990 added the enhancement New feature or request label May 18, 2024
Copy link

codecov bot commented May 19, 2024

Codecov Report

Attention: Patch coverage is 55.84416% with 68 lines in your changes are missing coverage. Please review.

Project coverage is 66.08%. Comparing base (4b28345) to head (1bdeecc).
Report is 6 commits behind head on main.

Current head 1bdeecc differs from pull request most recent head b44a62a

Please upload reports for the commit b44a62a to get more accurate results.

Files Patch % Lines
packages/core/src/mesh/Skin.ts 52.83% 18 Missing and 7 partials ⚠️
packages/core/src/mesh/SkinnedMeshRenderer.ts 66.03% 8 Missing and 10 partials ⚠️
packages/core/src/Entity.ts 40.00% 12 Missing ⚠️
packages/core/src/clone/CloneManager.ts 33.33% 6 Missing and 2 partials ⚠️
packages/loader/src/gltf/parser/GLTFSkinParser.ts 50.00% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2100      +/-   ##
==========================================
- Coverage   66.09%   66.08%   -0.02%     
==========================================
  Files         460      461       +1     
  Lines       23013    23058      +45     
  Branches     3370     3385      +15     
==========================================
+ Hits        15211    15237      +26     
- Misses       6637     6650      +13     
- Partials     1165     1171       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@GuoLei1990 GuoLei1990 added the animation Built-in animation system related functions label May 19, 2024
@GuoLei1990 GuoLei1990 changed the title Improve skin related logic Redesign SkinnedMeshRenderer logic May 19, 2024
@GuoLei1990 GuoLei1990 changed the title Redesign SkinnedMeshRenderer logic Redesign Skin of SkinnedMeshRenderer May 19, 2024
shaderData.enableMacro("RENDERER_HAS_SKIN");
shaderData.setInt(SkinnedMeshRenderer._jointCountProperty, <number>value);
} else {
debugger;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@GuoLei1990 GuoLei1990 merged commit 747877e into galacean:main May 21, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
animation Built-in animation system related functions enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants