# Instanced mesh material?

**URL:** <https://forums.unrealengine.com/t/instanced-mesh-material/659162>\
**Category:** Blueprint\
**Tags:** unreal-engine, Blueprint\
**Created:** [September 29, 2022, 6:05pm UTC](https://forums.unrealengine.com/t/instanced-mesh-material/659162 "2022-09-29T18:05:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![FlinnNew](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FlinnNew](https://forums.unrealengine.com/u/FlinnNew)\
**Post date:** [September 29, 2022, 6:05pm UTC](https://forums.unrealengine.com/t/instanced-mesh-material/659162/1 "2022-09-29T18:05:40Z")

</div>

How can i have so each one of my instanced mesh have its own material that i can change color on. Currently changeing for one change all of them

---

<div class="post-metadata">

**Author:** ![pladux](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pladux/32/1194519_2.png) [@pladux](https://forums.unrealengine.com/u/pladux)\
**Post date:** [September 29, 2022, 7:46pm UTC](https://forums.unrealengine.com/t/instanced-mesh-material/659162/2 "2022-09-29T19:46:08Z")

</div>

I guess that’s not possible because that’s what’s mesh instancing is all about. Afaik they can only differ in transform.

Somewhere I heard about the following analogy. Think about drawing your objects with pen on paper. Every material corresponds to a different colored pen. Drawing objects with the same pen is relatively fast, but always changing the pen between each object takes a huge amount of time.

---

<div class="post-metadata">

**Author:** ![Rev0verDrive](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rev0verdrive/32/907214_2.png) [@Rev0verDrive](https://forums.unrealengine.com/u/Rev0verDrive)\
**Post date:** [September 29, 2022, 7:50pm UTC](https://forums.unrealengine.com/t/instanced-mesh-material/659162/3 "2022-09-29T19:50:02Z")

</div>

You can’t with ISM’s.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [September 29, 2022, 8:11pm UTC](https://forums.unrealengine.com/t/instanced-mesh-material/659162/4 "2022-09-29T20:11:00Z")

</div>

You can use Per Instance Custom Data.

Example:

> [@How to add a hit count (health points) to individual instances?](https://forums.unrealengine.com/t/how-to-add-a-hit-count-health-points-to-individual-instances/227176/2):
>
> The name of the game is Custom Primitive Data (check docs at the bottom). The material for a brick: each instance stores a float which is used to Lerp between 2 colours (to visualise hits remaining) this can (and probably should) get prettified Making a brick wall: create a bunch of instances and store their data in an int | int Map instead of an integer, you could have a struct and hold all kind of data here; perhaps this brick is worth some coins, or explodes when destroyed and …

If you feed the vertex interpolator 3 floats, you get a color.

* * *

So, different material for each instance - no. Different colour, oh yeah. You can send more data than just a colour, ofc.
