x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Object Radius doesn't work with foliage painting

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.

Product Version: Not Selected
Tags:
more ▼

asked Jun 26 '15 at 06:33 PM in Bug Reports

avatar image

Davision
930 100 147 200

avatar image AndrewHurley Jun 29 '15 at 08:25 PM

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,

Andrew Hurley

avatar image Davision Jul 08 '15 at 03:54 PM

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.

avatar image AndrewHurley Jul 09 '15 at 05:26 PM

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.

avatar image Davision Jul 10 '15 at 12:42 PM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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

https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/ExpressionReference/Coordinates/index.html#objectradius

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

alt text

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

https://docs.unrealengine.com/latest/INT/Engine/Rendering/LightingAndShadows/DistanceFieldAmbientOcclusion/index.html#foliageocclusion

https://docs.unrealengine.com/latest/INT/Engine/Rendering/LightingAndShadows/RayTracedDistanceFieldShadowing/index.html

Cheers,

Andrew Hurley

more ▼

answered Jul 10 '15 at 06:30 PM

avatar image oxygencube Mar 29 '16 at 10:09 PM

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!

alt text alt text alt text

avatar image AndrewHurley Apr 03 '16 at 03:53 PM

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,

Andrew Hurley

avatar image Hyperloop Jun 16 '17 at 10:58 PM

Any update on this?

avatar image AndrewHurley Jun 19 '17 at 01:21 PM

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

Thank you,

Andrew H.

avatar image Spoondog Apr 22 '18 at 08:22 PM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question