# Calculating the screen size of a foliage instance using object bounds?

**URL:** <https://forums.unrealengine.com/t/calculating-the-screen-size-of-a-foliage-instance-using-object-bounds/1275886>\
**Category:** Rendering\
**Tags:** unreal-engine, question\
**Created:** [August 28, 2023, 11:12pm UTC](https://forums.unrealengine.com/t/calculating-the-screen-size-of-a-foliage-instance-using-object-bounds/1275886 "2023-08-28T23:12:26Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![RecourseDesign](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/recoursedesign/32/1194503_2.png) [@RecourseDesign](https://forums.unrealengine.com/u/RecourseDesign)\
**Post date:** [August 29, 2023, 5:27am UTC](https://forums.unrealengine.com/t/calculating-the-screen-size-of-a-foliage-instance-using-object-bounds/1275886/13 "2023-08-29T05:27:40Z")

</div>

None of the scale values reflect the instance either, the transform matrix is the same - almost back to square one.

Even stranger is that it has stopped working in the ISMs and HISMs! (I’m sure I didn’t change the code either, but it does now act as I thought it has in the past at least)

There’s something I saw in the UE code which seemed to get the InstanceManager and Instance Index and find the transform from there - I’ll take a look at that this evening…

Otherwise - you could add UVs to the mesh as I did in my tool to give you the position (0-1) of the pixel (it would take 2 sets of UVs to get all 3 dimensions oc) - or another method could be to store the scaled radius in the instance custom data…

Anyway, here’s a link to rdMeshTools which can create those UVs - but I’d still like to try the InstanceData access way anway.

> **[rdMeshTools in Code Plugins - UE Marketplace](https://www.unrealengine.com/marketplace/en-US/product/rdmeshtools)**
>
> rdMeshTools is a UnrealEngine plug-in that adds tools to help make working with StaticMeshes quicker and easier.

---

_[View the full topic](https://forums.unrealengine.com/t/calculating-the-screen-size-of-a-foliage-instance-using-object-bounds/1275886)._
