# Object Radius doesn't work with foliage painting

**URL:** <https://forums.unrealengine.com/t/object-radius-doesnt-work-with-foliage-painting/323163>\
**Category:** World Creation\
**Tags:** object, unreal-engine, bug-report, question\
**Created:** [June 26, 2015, 6:33pm UTC](https://forums.unrealengine.com/t/object-radius-doesnt-work-with-foliage-painting/323163 "2015-06-26T18:33:02Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Davision](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Davision](https://forums.unrealengine.com/u/Davision)\
**Post date:** [June 26, 2015, 6:33pm UTC](https://forums.unrealengine.com/t/object-radius-doesnt-work-with-foliage-painting/323163/1 "2015-06-26T18:33:02Z")

</div>

I’m not sure if this is a bug or a limitation?  
The object radius node of a material doesn’t work on terrain foliage painted objects. No matter the scale you set in the painting settings the object radius in the material will always be the same.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [June 29, 2015, 8:25pm UTC](https://forums.unrealengine.com/t/object-radius-doesnt-work-with-foliage-painting/323163/2 "2015-06-29T20:25:24Z")

</div>

Would you mind providing me with a screenshot of the set up you are mentioning. Including your Material Editor Graph and what your reasons for object radius are?

Are you attempting to only render certain foliage at a specific radius around the player? This can be done using the PerInstanceFade node in the material editor in conjunction with setting up cull distances within the foliage mode itself.

Let me know if you have any other questions.

Cheers,

---

<div class="post-metadata">

**Author:** ![Davision](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Davision](https://forums.unrealengine.com/u/Davision)\
**Post date:** [July 8, 2015, 3:54pm UTC](https://forums.unrealengine.com/t/object-radius-doesnt-work-with-foliage-painting/323163/3 "2015-07-08T15:54:53Z")

</div>

I just wanted the material to change a parameter based on how big the asset is in the world. To be more specific, there is some distortion going on that I want to be less for smaller objects. I will then have to make different sized meshes with different materials I guess.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [July 9, 2015, 5:26pm UTC](https://forums.unrealengine.com/t/object-radius-doesnt-work-with-foliage-painting/323163/4 "2015-07-09T17:26:19Z")

</div>

You could create another Material instance and set the parameters how you would like, and then apply that material to your LOD’s. This way it applies that material instance and its parameters based on the size of the mesh on your screen. You will definitely want to have a few LOD’s when it comes to foliage to help with performance when viewing from a distance.

---

<div class="post-metadata">

**Author:** ![Davision](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Davision](https://forums.unrealengine.com/u/Davision)\
**Post date:** [July 10, 2015, 12:42pm UTC](https://forums.unrealengine.com/t/object-radius-doesnt-work-with-foliage-painting/323163/5 "2015-07-10T12:42:52Z")

</div>

Yea, but that is not what I want. I paint the objects with different scaling settings. Like I have a stone and I paint that mesh at 1.0 scale and 0.2 scale. Now I will have to make 2 meshes with it with 2 materials. So the 0.2 scale has the material that has the distortion parameter less.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [July 10, 2015, 6:30pm UTC](https://forums.unrealengine.com/t/object-radius-doesnt-work-with-foliage-painting/323163/6 "2015-07-10T18:30:58Z")

</div>

You might be misunderstanding how object radius is calculated, which is based on the Static Meshes scale set within the Static Mesh Editor, and not the scale set within the Foliage Paint. These are not linked on purpose as they operate differently at their core functionality.

**Object Radius**

> **[Coordinates Material Expressions](https://docs.unrealengine.com/5.1/en-US/coordinates-material-expressions-in-unreal-engine/)**
>
> Expressions that perform actions on texture coordinates or output values that can be used as, or to modify, texture coordinates.

The typical workflow is to create multiple meshes to be computed as your levels of detail based on screen size. You don’t need to create multiple materials, but only one master material, instance that material , and have that applied to the LOD mesh based on the screen size/scale which you can set up within the Static Mesh editor.

Uncheck the Auto Compute LOD Distance, so you can manually set at what screen size your material instance is applied.

**LOD Settings**

 ![49819-lod_distance_screensize.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/7/8/a78fed5fce487adc5fccbcbc8e770d91785fe0bf.jpeg)

I really suggest looking into Mesh Distance Fields in conjunction with foliage as it improves performance greatly. We used this feature in our recent Open World GDC demo to create a visually stunning and asset heavy scene.

**Mesh Distance Fields**

> **[Distance Field Ambient Occlusion](https://docs.unrealengine.com/5.1/en-US/distance-field-ambient-occlusion-in-unreal-engine/)**
>
> An overview of using Mesh Distance Fields to create dynamic ambient occlusion for SkyLights.

> **[Distance Field Soft Shadows](https://docs.unrealengine.com/5.1/en-US/distance-field-soft-shadows-in-unreal-engine/)**
>
> An overview of using Mesh Distance Fields to create dynamic soft area shadowing.

Cheers,

---

<div class="post-metadata">

**Author:** ![oxygencube](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@oxygencube](https://forums.unrealengine.com/u/oxygencube)\
**Post date:** [March 29, 2016, 10:09pm UTC](https://forums.unrealengine.com/t/object-radius-doesnt-work-with-foliage-painting/323163/7 "2016-03-29T22:09:07Z")

</div>

I am having the same issue as OP. I am using object radius to create scaling textures. They work great on static objects but when used in the foliage tool the texture scale breaks. See these images…

Thanks!

[![](https://d3kjluh73b9h9o.cloudfront.net/original/3X/a/5/a5a598b95d88affff2b84da7c047a5db6c2e1060.jpeg) ](https://i.imgur.com/4VmC2nf.jpg)

[![](https://d3kjluh73b9h9o.cloudfront.net/original/3X/6/3/63033bf549cb29549ac683cc91457ce290bda3dc.png) ](https://i.imgur.com/8Iz5j1v.png)

[![](https://d3kjluh73b9h9o.cloudfront.net/original/3X/9/2/92809fc6aa383afcfffbe750ce532ad28491eddf.png) ](https://i.imgur.com/qaheExd.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [April 3, 2016, 3:53pm UTC](https://forums.unrealengine.com/t/object-radius-doesnt-work-with-foliage-painting/323163/8 "2016-04-03T15:53:13Z")

</div>

Hello oxygencube,

I was able to verify the issue you are reporting here and have entered a feature request to allow painted foliage instances to use the ‘Object Radius’ input data node (UE-29023).

This is a limitation of the instance rendering system and the ObjectRadius isn’t available per instance. The engineer said that he can get it to work, similar to the way the ObjectPosition node does correctly give the position for individual instances when used in the vertex shader.

Once the fix has been implemented either myself or another user with respond with an update.

Thank you,

---

<div class="post-metadata">

**Author:** ![Hyperloop](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hyperloop/32/1203427_2.png) [@Hyperloop](https://forums.unrealengine.com/u/Hyperloop)\
**Post date:** [June 16, 2017, 10:58pm UTC](https://forums.unrealengine.com/t/object-radius-doesnt-work-with-foliage-painting/323163/9 "2017-06-16T22:58:36Z")

</div>

Any update on this?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [June 19, 2017, 1:21pm UTC](https://forums.unrealengine.com/t/object-radius-doesnt-work-with-foliage-painting/323163/10 "2017-06-19T13:21:54Z")

</div>

Below is a link to the report on the Issues Tracker. It is currently marked as backlogged and I have not further information on the issue.

**[UE-29023](https://issues.unrealengine.com/issue/UE-29023)**

Thank you,

.

---

<div class="post-metadata">

**Author:** ![Spoondog](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Spoondog](https://forums.unrealengine.com/u/Spoondog)\
**Post date:** [April 22, 2018, 8:22pm UTC](https://forums.unrealengine.com/t/object-radius-doesnt-work-with-foliage-painting/323163/11 "2018-04-22T20:22:48Z")

</div>

Since the issue/feature request is no longer public - would just like to say, this would still be a nice thing to have.

Not only for texture scaling as oxygencube mentions above, but also because it’s another way to get a random constant value for an instance - I have a situation where I need more than one random value on my instances, but I can’t use ObjectPos because the instances get moved. So I only have the single PerInstanceRandom value to work with. I can hack random-but-still-related values by using some math, but another constant value to work with, like ObjectRadius, would be great.

---

<div class="post-metadata">

**Author:** ![EtherionDesigns](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/etheriondesigns/32/1060899_2.png) [@EtherionDesigns](https://forums.unrealengine.com/u/EtherionDesigns)\
**Post date:** [November 1, 2021, 11:50pm UTC](https://forums.unrealengine.com/t/object-radius-doesnt-work-with-foliage-painting/323163/12 "2021-11-01T23:50:41Z")

</div>

Its a shame this hasnt been fixed yet. I use ObjectRadius to control Vertex Animation speeds for differing plant scales.
