# foliage instance meshes orientation

**URL:** <https://forums.unrealengine.com/t/foliage-instance-meshes-orientation/452701>\
**Category:** Rendering\
**Tags:** Instanced-Mesh, unreal-engine, Foliage, question\
**Created:** [July 23, 2019, 9:47am UTC](https://forums.unrealengine.com/t/foliage-instance-meshes-orientation/452701 "2019-07-23T09:47:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nevertuna](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nevertuna](https://forums.unrealengine.com/u/nevertuna)\
**Post date:** [July 23, 2019, 9:47am UTC](https://forums.unrealengine.com/t/foliage-instance-meshes-orientation/452701/1 "2019-07-23T09:47:48Z")

</div>

Hi, there.

I am trying to find orientation of each foliage instance meshes.  
283098-  
four cubes in above picture are foliage instance meshes. I found foliage instance mesh local position, the material of the cubes shows local position pixel coordinate. however when the meshes create, they randomly rotate, so the pixels are distorted.

![283099-unreal2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/a/28a78f327238a62ef34b1842fa15758ac5ba5303.png)

I want to make pixels be like above screenshot, I want all cube material become same shape

To do this, orientation of each instance meshes or direction vector(not Z axis vector of the objects) seems to be needed to rotate pixels.

I found the nodes ‘Object orientation’ in UE4 material editor just indicates orientation of ‘InstancedFoliageActor’, not each meshes orientation.

Using ‘vertex interpolator node’ makes same result.

I tried to do another way, I found ‘Vertex Normal’ node gives the direction vector of each vertexes, I tried to find orientation of each meshes by comparing some normal vectors with x,y,z axes unit vector But It’s hard to break vertex normal vector and use loop to compare in UE4 material editor.

Is there any way to find the orientation of each foliage instance meshes?
