# Can you use the radius/scale of an instanced static mesh instance in the material editor?

**URL:** <https://forums.unrealengine.com/t/can-you-use-the-radius-scale-of-an-instanced-static-mesh-instance-in-the-material-editor/427279>\
**Category:** Rendering\
**Tags:** Instanced-Mesh, unreal-engine, question\
**Created:** [June 13, 2018, 12:34pm UTC](https://forums.unrealengine.com/t/can-you-use-the-radius-scale-of-an-instanced-static-mesh-instance-in-the-material-editor/427279 "2018-06-13T12:34:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Conor202](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Conor202](https://forums.unrealengine.com/u/Conor202)\
**Post date:** [June 13, 2018, 12:34pm UTC](https://forums.unrealengine.com/t/can-you-use-the-radius-scale-of-an-instanced-static-mesh-instance-in-the-material-editor/427279/1 "2018-06-13T12:34:29Z")

</div>

I’ve been having issues trying to use the radius or scale of an instanced static mesh instance in a material. Both object radius and object scale get the size of the whole instanced static mesh component, is there a way to get the scale or radius of the individual instance? I’ve included an image of the material if that helps, it’s approximating the temperature of the star based on the radius of the instance, or rather it is meant to.

 ![244098-ue4starmat.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/f/d/cfdb84b5796e56d99d1f846ab01195a93ad627be.png)

---

<div class="post-metadata">

**Author:** ![ChopinDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ChopinDev](https://forums.unrealengine.com/u/ChopinDev)\
**Post date:** [June 13, 2018, 6:22pm UTC](https://forums.unrealengine.com/t/can-you-use-the-radius-scale-of-an-instanced-static-mesh-instance-in-the-material-editor/427279/2 "2018-06-13T18:22:40Z")

</div>

No. You can on the other hand extract the information about world position of an instance, but only for pixel shader not vertex shader (so for base color, not world displacement). Additional you can try to do something out of WorldAlignedTexture.

---

<div class="post-metadata">

**Author:** ![LaRanaRica](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LaRanaRica](https://forums.unrealengine.com/u/LaRanaRica)\
**Post date:** [June 14, 2018, 10:31am UTC](https://forums.unrealengine.com/t/can-you-use-the-radius-scale-of-an-instanced-static-mesh-instance-in-the-material-editor/427279/3 "2018-06-14T10:31:10Z")

</div>

As mentioned, per instance information is only available in vertex shader calls. For example for World Position Offset.  
[Deathrey](https://answers.unrealengine.com/users/47447/deathrey.html) mentions in this [thread](https://answers.unrealengine.com/questions/469664/material-local-space-and-instanced-static-meshes.html) that you can pass information from vertex shader to pixel shader by using custom UVs. I think this should also work with Object Scale.

---

<div class="post-metadata">

**Author:** ![Pendali](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pendali/32/765848_2.png) [@Pendali](https://forums.unrealengine.com/u/Pendali)\
**Post date:** [September 20, 2024, 7:00am UTC](https://forums.unrealengine.com/t/can-you-use-the-radius-scale-of-an-instanced-static-mesh-instance-in-the-material-editor/427279/4 "2024-09-20T07:00:18Z")

</div>

This is how you get it.  
Use the transform node.  
Change source to Instance & Particle space.  
 ![Capture](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/a/4/4a49373e6f850f46eb4fd0cf8a5de4e5f022a91d.jpeg)

---

<div class="post-metadata">

**Author:** ![brisck1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@brisck1](https://forums.unrealengine.com/u/brisck1)\
**Post date:** [September 20, 2024, 6:06pm UTC](https://forums.unrealengine.com/t/can-you-use-the-radius-scale-of-an-instanced-static-mesh-instance-in-the-material-editor/427279/5 "2024-09-20T18:06:19Z")

</div>

I’ve been struggling with this also for a while - I got pretty close with this:

> [@Calculating the screen size of a foliage instance using object bounds?](https://forums.unrealengine.com/t/calculating-the-screen-size-of-a-foliage-instance-using-object-bounds/1275886/14):
>
> The ObjectScale node seems to reflect the correct scale, so something like this kind of works: The Custom node is just “return GetPrimitiveData(Parameters).InstanceLocalBoundsExtent.xyz;” The only problem now is that the rotation is wrong… Is that the desired effect?

but I should note it’s not perfect…

---

<div class="post-metadata">

**Author:** ![EN6A6E](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/en6a6e/32/867956_2.png) [@EN6A6E](https://forums.unrealengine.com/u/EN6A6E)\
**Post date:** [May 19, 2026, 6:49pm UTC](https://forums.unrealengine.com/t/can-you-use-the-radius-scale-of-an-instanced-static-mesh-instance-in-the-material-editor/427279/6 "2026-05-19T18:49:41Z")

</div>

That doesn’t work because an Object Radius node is a different float value and will not plug into it.

---

<div class="post-metadata">

**Author:** ![Pendali](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pendali/32/765848_2.png) [@Pendali](https://forums.unrealengine.com/u/Pendali)\
**Post date:** [June 17, 2026, 7:00am UTC](https://forums.unrealengine.com/t/can-you-use-the-radius-scale-of-an-instanced-static-mesh-instance-in-the-material-editor/427279/7 "2026-06-17T07:00:16Z")

</div>

Oh, I might have missunderstod what you ment.  
What if you do this? Still, might not be what you are after..

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/d/1/dd1766d7235ba3a6319e6dae845f38bf791907b4.png)

---

<div class="post-metadata">

**Author:** ![EN6A6E](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/en6a6e/32/867956_2.png) [@EN6A6E](https://forums.unrealengine.com/u/EN6A6E)\
**Post date:** [June 17, 2026, 1:15pm UTC](https://forums.unrealengine.com/t/can-you-use-the-radius-scale-of-an-instanced-static-mesh-instance-in-the-material-editor/427279/8 "2026-06-17T13:15:20Z")

</div>

ObjectRadius doesn’t work with instanced objects or it takes the giant spawner box into account. No transforms can be put on it to make it work.

I figured out another way to get it to sort of work, but it didn’t really do what I wanted. I decided not to worry about doing it that way.

> [@How do I get object world position with an instanced foliage actor?](https://forums.unrealengine.com/t/how-do-i-get-object-world-position-with-an-instanced-foliage-actor/2719890/27):
>
> Would you happen to know how to tether the leaves from their connecting pivot, so if I add another effect to them that they stay connected to their branch? Right now I just have the simple grass wind at a minimal height strength so they don’t displace as much. It still looks great but if I were to increase that effect it can cause them to float away. The only thing I could think of is importing the model to blender and going through an intensive process of figuring out how to vertex paint the …
