# Get foliage instance mesh position

**URL:** <https://forums.unrealengine.com/t/get-foliage-instance-mesh-position/349430>\
**Category:** Rendering\
**Tags:** unreal-engine, Instanced-Mesh, question\
**Created:** [March 3, 2016, 4:53pm UTC](https://forums.unrealengine.com/t/get-foliage-instance-mesh-position/349430 "2016-03-03T16:53:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_1809391b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1809391b](https://forums.unrealengine.com/u/anonymous_user_1809391b)\
**Post date:** [March 3, 2016, 4:53pm UTC](https://forums.unrealengine.com/t/get-foliage-instance-mesh-position/349430/1 "2016-03-03T16:53:31Z")

</div>

Is there a way to get position of foliage instance in material editor? There are per instance data in the HLSL shader, but I can’t find a way to use them in the material editor.

---

<div class="post-metadata">

**Author:** ![Fisher007](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fisher007](https://forums.unrealengine.com/u/Fisher007)\
**Post date:** [March 26, 2016, 2:32pm UTC](https://forums.unrealengine.com/t/get-foliage-instance-mesh-position/349430/2 "2016-03-26T14:32:13Z")

</div>

I’m interested in this too, it would be good to have custom distance based mipmaps.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1809391b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1809391b](https://forums.unrealengine.com/u/anonymous_user_1809391b)\
**Post date:** [March 28, 2016, 12:51am UTC](https://forums.unrealengine.com/t/get-foliage-instance-mesh-position/349430/3 "2016-03-28T00:51:39Z")

</div>

I have found out that object position expression gives you instance position if you use it in vertex shader (vertex offset input). Still, I think there is no way of acquiring that information when using base color input.

---

<div class="post-metadata">

**Author:** ![Shalivan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shalivan](https://forums.unrealengine.com/u/Shalivan)\
**Post date:** [May 4, 2018, 11:08pm UTC](https://forums.unrealengine.com/t/get-foliage-instance-mesh-position/349430/4 "2018-05-04T23:08:07Z")

</div>

You can use Vertex interpolator node:

 ![239941-ue4editor-2018-05-05-01-06-54.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/8/7/38757dc0366401399bb93170bf6c638d54eaee06.png)
