# Foliage Actor Instance Pivot? Help with foliage wind material

**URL:** <https://forums.unrealengine.com/t/foliage-actor-instance-pivot-help-with-foliage-wind-material/422424>\
**Category:** Rendering\
**Tags:** unreal-engine, Foliage, UE4, question, Blueprint, wind\
**Created:** [April 12, 2018, 2:15am UTC](https://forums.unrealengine.com/t/foliage-actor-instance-pivot-help-with-foliage-wind-material/422424 "2018-04-12T02:15:34Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChrisSweetwood](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ChrisSweetwood](https://forums.unrealengine.com/u/ChrisSweetwood)\
**Post date:** [April 12, 2018, 2:15am UTC](https://forums.unrealengine.com/t/foliage-actor-instance-pivot-help-with-foliage-wind-material/422424/1 "2018-04-12T02:15:34Z")

</div>

Hey guys, hope someone can help me with this rather specific and tricky problem.

> **[Imgur](https://i.imgur.com/TgT8TFu.gifv)**
>
> 684 views on Imgur

I’m trying to achieve a wind like effect on my foliage actors within the material. I’m using the “Rotate About Axis” node to achieve this simple nodding effect. (see above) Ideally I want all of my foliage to use this effect.  
Here is what the “World Position Offset” of the material looks like

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/6/3/063035f6ee75afcf8c10739c2f8fccbb466ec90d.jpeg)

The only problem is, while using this function for foliage instanced actors, the pivot point of the “Rotate About Axis” node becomes the global foliage actor pivot… (see below) in other words, on an individual hand placed actor this effect works fine, however when using the foliage tool to “paint” foliage the effect breaks.

> **[Imgur](https://i.imgur.com/KmNKz3K.gifv)**
>
> 511 views on Imgur

I imagine there may either be a simple fix for this that I’m overlooking, or no real way to fix this issue.

-Chris

---

<div class="post-metadata">

**Author:** ![Deathrey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Deathrey](https://forums.unrealengine.com/u/Deathrey)\
**Post date:** [April 12, 2018, 3:14am UTC](https://forums.unrealengine.com/t/foliage-actor-instance-pivot-help-with-foliage-wind-material/422424/2 "2018-04-12T03:14:01Z")

</div>

You can get instance pivot location by transforming 0,0,0 from local to world in a vertex shader.

---

<div class="post-metadata">

**Author:** ![ChrisSweetwood](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ChrisSweetwood](https://forums.unrealengine.com/u/ChrisSweetwood)\
**Post date:** [April 13, 2018, 1:17am UTC](https://forums.unrealengine.com/t/foliage-actor-instance-pivot-help-with-foliage-wind-material/422424/3 "2018-04-13T01:17:21Z")

</div>

I tried this method and it resulted in the same problem occurring.

-Chris

---

<div class="post-metadata">

**Author:** ![witch-dev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/witch-dev/32/465106_2.png) [@witch-dev](https://forums.unrealengine.com/u/witch-dev)\
**Post date:** [April 13, 2018, 7:52am UTC](https://forums.unrealengine.com/t/foliage-actor-instance-pivot-help-with-foliage-wind-material/422424/4 "2018-04-13T07:52:23Z")

</div>

Use the “object position” node instead of “actor position” for your pivot point.

Edit: As noted “object position” will rotate around the center of the mesh, for a rotation around the object origin use the “object pivot point” node instead.

---

<div class="post-metadata">

**Author:** ![ChrisSweetwood](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ChrisSweetwood](https://forums.unrealengine.com/u/ChrisSweetwood)\
**Post date:** [April 14, 2018, 4:38am UTC](https://forums.unrealengine.com/t/foliage-actor-instance-pivot-help-with-foliage-wind-material/422424/5 "2018-04-14T04:38:23Z")

</div>

This is really close!! Although this does work, it also adjusts the pivot from the actor pivot to the center of the actor.

![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/5/1/65103dddf98a610963041f8ca0b7f323ce4b3374.png)

Here is what that looks like (below)

> **[Imgur](https://i.imgur.com/N625vnV.gifv)**
>
> 751 views on Imgur

I can probably solve this problem with some math, but if you know any simpler solutions please let me know. Thanks for the help!

-Chris

---

<div class="post-metadata">

**Author:** ![witch-dev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/witch-dev/32/465106_2.png) [@witch-dev](https://forums.unrealengine.com/u/witch-dev)\
**Post date:** [April 14, 2018, 10:47am UTC](https://forums.unrealengine.com/t/foliage-actor-instance-pivot-help-with-foliage-wind-material/422424/6 "2018-04-14T10:47:56Z")

</div>

The simplest solution would be to either change the model in your 3D tool so that it starts at the origin or you can change it directly in Unreal for your static mesh with the “import translation” setting so that the origin is where you want it to be (you’ll have to reimport the mesh for it to take effect, I think).

---

<div class="post-metadata">

**Author:** ![ChrisSweetwood](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ChrisSweetwood](https://forums.unrealengine.com/u/ChrisSweetwood)\
**Post date:** [April 14, 2018, 7:38pm UTC](https://forums.unrealengine.com/t/foliage-actor-instance-pivot-help-with-foliage-wind-material/422424/7 "2018-04-14T19:38:49Z")

</div>

Not sure I quite understand what you are asking me to do. The current Pivot of the mesh is also where I want it to rotate from, however the “Object Position” node ignores the pivot and instead uses the center mass of the object, adjusting the pivot has no effect. Again if I’m misunderstanding you let me know.

-Chris

---

<div class="post-metadata">

**Author:** ![witch-dev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/witch-dev/32/465106_2.png) [@witch-dev](https://forums.unrealengine.com/u/witch-dev)\
**Post date:** [April 14, 2018, 8:19pm UTC](https://forums.unrealengine.com/t/foliage-actor-instance-pivot-help-with-foliage-wind-material/422424/8 "2018-04-14T20:19:44Z")

</div>

Ah, sorry, you are right, in this case it’s simplest to use the object pivot point node (it’s just a transform of (0.0, 0.0, 0.0) from local to world space).

---

<div class="post-metadata">

**Author:** ![ChrisSweetwood](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ChrisSweetwood](https://forums.unrealengine.com/u/ChrisSweetwood)\
**Post date:** [April 14, 2018, 9:00pm UTC](https://forums.unrealengine.com/t/foliage-actor-instance-pivot-help-with-foliage-wind-material/422424/9 "2018-04-14T21:00:22Z")

</div>

PERFECT! That worked like a charm, thanks so much witch-dev for the help really appreciated! I’ll add some more screen, for anyone in the future looking for the same solution.

-Chris

---

<div class="post-metadata">

**Author:** ![ChrisSweetwood](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ChrisSweetwood](https://forums.unrealengine.com/u/ChrisSweetwood)\
**Post date:** [April 15, 2018, 1:29am UTC](https://forums.unrealengine.com/t/foliage-actor-instance-pivot-help-with-foliage-wind-material/422424/10 "2018-04-15T01:29:35Z")

</div>

Here is how the final WORKING structure looks, for future reference.

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/8/c/e8ca09820fa902cd2007b73e8bccdc15faa81ddd.png)

-Chris

---

<div class="post-metadata">

**Author:** ![Slava\_Go](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/slava_go/32/1179930_2.png) [@Slava\_Go](https://forums.unrealengine.com/u/Slava_Go)\
**Post date:** [May 18, 2024, 9:24am UTC](https://forums.unrealengine.com/t/foliage-actor-instance-pivot-help-with-foliage-wind-material/422424/11 "2024-05-18T09:24:43Z")

</div>

Unreal Engine 5.3 update:  
This code in Material (in Shader) returns pivotPoint of mesh (manually placed single mesh) and mesh instance pivotPoint (if mesh instances are placed using Foliage tool, for example). Basically, it is compatible with UE5 Foliage tool.

 ![UE5 - Materials - owner instance mesh pivot - crop](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/4/e/84e5ff42bc4c6cd0c0f7cd9e89126e300269eb5b.png)

---

<div class="post-metadata">

**Author:** ![Fransferdy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fransferdy](https://forums.unrealengine.com/u/Fransferdy)\
**Post date:** [July 21, 2024, 7:18pm UTC](https://forums.unrealengine.com/t/foliage-actor-instance-pivot-help-with-foliage-wind-material/422424/12 "2024-07-21T19:18:41Z")

</div>

Thank you good sir. Just saved my day. I wonder why the usual “object pivot point” doesn’t work like this normaly.
