# How do I sample LocalPosition in material of SkeletalMesh before pose deformation is applied?

**URL:** <https://forums.unrealengine.com/t/how-do-i-sample-localposition-in-material-of-skeletalmesh-before-pose-deformation-is-applied/484439>\
**Category:** Rendering\
**Tags:** unreal-engine, skeletalmesh, question\
**Created:** [June 5, 2021, 12:37am UTC](https://forums.unrealengine.com/t/how-do-i-sample-localposition-in-material-of-skeletalmesh-before-pose-deformation-is-applied/484439 "2021-06-05T00:37:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sknejnagrom](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sknejnagrom](https://forums.unrealengine.com/u/sknejnagrom)\
**Post date:** [June 5, 2021, 12:37am UTC](https://forums.unrealengine.com/t/how-do-i-sample-localposition-in-material-of-skeletalmesh-before-pose-deformation-is-applied/484439/1 "2021-06-05T00:37:22Z")

</div>

I’m working on a simple rigged cube with a squash-and-stretch UE material. I’ve got my material working the way I intend in the bind pose, using the local coordinate space to mask the world position offset. However, when I pose the mesh, it seems that the local position stretches with the pose rather than being the original mesh’s object space.

How should I keep sampling the original model’s local position regardless of pose?

Material graph:

 ![340717-localspacesquashandstretchmaterialgraph.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/3/c/33c7390540a917769bcef67f03d8b7209954ce3d.png)

Actor in scene with no pose:

![340718-squashscenenopose.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/2/2/222fee6e6110772e931ca42322b17bc86271212c.png)

Actor once the pose has been moved…:

![340719-squashscenewithpose.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/2/d/72dd7ce55892553ed0d1798ffb39224290f290cd.png)

Thanks!

---

<div class="post-metadata">

**Author:** ![sknejnagrom](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sknejnagrom](https://forums.unrealengine.com/u/sknejnagrom)\
**Post date:** [June 5, 2021, 12:45am UTC](https://forums.unrealengine.com/t/how-do-i-sample-localposition-in-material-of-skeletalmesh-before-pose-deformation-is-applied/484439/2 "2021-06-05T00:45:44Z")

</div>

Would just using a second UV set projected across the vertical axis be the way to go?

---

<div class="post-metadata">

**Author:** ![sknejnagrom](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sknejnagrom](https://forums.unrealengine.com/u/sknejnagrom)\
**Post date:** [June 5, 2021, 12:57am UTC](https://forums.unrealengine.com/t/how-do-i-sample-localposition-in-material-of-skeletalmesh-before-pose-deformation-is-applied/484439/3 "2021-06-05T00:57:03Z")

</div>

…Second UV set did the trick. This is a simple case, but I wonder if there is a way to get bind-pose local position in Materials.
