# Per Instance Custom Data in Material

**URL:** <https://forums.unrealengine.com/t/per-instance-custom-data-in-material/457125>\
**Category:** Asset Creation\
**Tags:** hism, Instanced-Mesh, unreal-engine, question, CPP\
**Created:** [October 18, 2019, 4:35pm UTC](https://forums.unrealengine.com/t/per-instance-custom-data-in-material/457125 "2019-10-18T16:35:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sean\_Kealey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Kealey](https://forums.unrealengine.com/u/Sean_Kealey)\
**Post date:** [October 18, 2019, 4:35pm UTC](https://forums.unrealengine.com/t/per-instance-custom-data-in-material/457125/1 "2019-10-18T16:35:39Z")

</div>

Looking for a way to assign a custom value into a HISM material. PerInstanceRandom, does this on a per instance level, but the value is a random seed. Basically i have a few texture samples and what im trying to do is have control over which texture sample each instance is using.

i found this, which is what im needing to do but in 4.22 is causing the engine to become unstable, using foliage will crash the engine, along with some other issues:

[https://forums.unrealengine.com/community/community-content-tools-and-tutorials/1526732-per-instance-custom-data-inside-of-material](https://forums.unrealengine.com/community/community-content-tools-and-tutorials/1526732-per-instance-custom-data-inside-of-material)

If anyone has any ideas, or could point me in the right direction, it would be very much appreciated.
