# Warping my reference mesh to validate model

**URL:** <https://shapeworks.discourse.group/t/warping-my-reference-mesh-to-validate-model/175>\
**Category:** Uncategorized\
**Created:** [September 27, 2023, 6:06pm UTC](https://shapeworks.discourse.group/t/warping-my-reference-mesh-to-validate-model/175 "2023-09-27T18:06:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SLaranjeira](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@SLaranjeira](https://shapeworks.discourse.group/u/SLaranjeira)\
**Post date:** [September 27, 2023, 6:06pm UTC](https://shapeworks.discourse.group/t/warping-my-reference-mesh-to-validate-model/175/1 "2023-09-27T18:06:44Z")

</div>

Hello shapeworks community,

I am developing an SSM of vertebrea and have been following the deepssm example for python.  
After fitting and optimization I reconstruct all the meshes from the reference.  
In most cases, it does a great job.  
However, there are some cases where there are connections between particles that are not desired (example attached: the particles within the red circles should not be connected).  
I was wondering:

1. what is the best way to avoid these errors? Should I further groom the meshes before fitting the SSM?
2. Is there a metric to spot these errors automatically?

Thank you very much,  
Best wishes,  
Simão

 ![Screenshot 2023-09-27 at 19.02.08](https://global.discourse-cdn.com/free1/uploads/shapeworks/original/1X/de4ff273dc5c81cec008bd488c56b00537a923b4.jpeg)

---

<div class="post-metadata">

**Author:** ![amorris](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@amorris](https://shapeworks.discourse.group/u/amorris)\
**Post date:** [September 29, 2023, 3:02am UTC](https://shapeworks.discourse.group/t/warping-my-reference-mesh-to-validate-model/175/2 "2023-09-29T03:02:09Z")

</div>

Usually this type of bad warping is due to the particle system not being in good correspondence. I would check that first. When you look at the PCA modes, are the particles crossing at all or do they stay in correspondence across the PCA values?
