feat: Configure preserve border edges per bone#25
Merged
Conversation
Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements per-bone configuration for border edge preservation during mesh simplification, specifically targeting avatar finger bone preservation to prevent holes. The key changes enable selective preservation of border edges based on bone indices rather than global settings.
- Adds bone-specific border edge preservation functionality to the mesh simplification system
- Introduces a new
PreservedVertexPredicatorstruct to determine which vertices should be preserved based on bone indices - Updates the NDMF cascading avatar mesh simplifier to default to preserving finger bone border edges
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Runtime/MeshSimplifierOptions.cs | Adds required imports for collections and mathematics |
| Runtime/MeshSimplifier.cs | Adds BitArray parameter for per-bone border edge preservation and method overloads |
| Runtime/MergeFactory.cs | Refactors to use PreservedVertexPredicator for vertex preservation logic |
| Runtime/Jobs/SimplifyJob.cs | Implements PreservedVertexPredicator struct and updates merge logic |
| Runtime/Jobs/ComputeMergesJob.cs | Updates job parameters to include bone-specific preservation data |
| Ndmf/Runtime/MeshiaCascadingAvatarMeshSimplifier.cs | Adds default finger bone preservation configuration |
| Ndmf/Editor/Preview/MeshiaMeshSimplifierPreviewBase.cs | Updates preview interface to support BitArray parameter |
| Ndmf/Editor/Preview/MeshiaMeshSimplifierPreview.cs | Updates preview implementation for new interface |
| Ndmf/Editor/Preview/MeshiaCascadingAvatarMeshSimplifierPreview.cs | Implements bone index mapping for avatar mesh simplifier preview |
| Ndmf/Editor/MeshiaCascadingAvatarMeshSimplifierRendererEntryEditor.uxml | Adds UI foldout for bone preservation settings |
| Ndmf/Editor/MeshiaCascadingAvatarMeshSimplifierEditor.cs | Implements UI logic for bone preservation toggles |
| Ndmf/Editor/Meshia.MeshSimplification.Ndmf.Editor.asmdef | Adds Unity.Mathematics dependency |
Comments suppressed due to low confidence (1)
Runtime/Jobs/SimplifyJob.cs:1
- Missing space before the documentation comment. Add a newline between the closing brace and the XML documentation comment.
using System;
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With this feature, we will no longer see holes in avatar fingers by default.