Foliage scale affects Z Offset positioning

When applying scale to a mesh in the foliage tool, it applies the scale to the z-offset as well.

In the attached image I have the scale set from 1-10… I want to make clouds of different size.

I have min and z-offset set to 2000…

The bigger clouds go up way higher than the small clouds even though they should be placed at the same height.

But please… make this an option… even though it is the wrong behavior… it is actually useful… for placing clouds for example :slight_smile: It looks very nice this way

Is this happening with every mesh that you use in the foliage tool and could you probably post your steps how you did it, because in my case it works as it should ^^

Hi ,

I was able to reproduce this effect, however, it is working as intended. Because foliage keeps the origin on the ground, not where the mesh lies via Z offset, as you scale you are effectively scaling the origin point itself, which affects the mesh you used. So the further you scale the origin, the larger the mesh gets but it is also pushed further away from the point of origin to maintain the Z offset ratio. This is why the scale also does not move the object upwards when z offset is 0. The object is directly on it’s origin point, therefore it does not need to move upwards (or downwards) to compensate for any scaling changes. I hope this helps!

Hi .

When you speak of the “point of origin”. You speak of the pivot point of the mesh? the point that get’s placed on the landscape right?
So my tree, which has a part under this point looks, as if it is coming up from the ground.

My logic tells me that if I place my entire mesh above this point… That air is also multiplied by the scale. However, my pivot point, (point of origin?) is inside the cloud, so no air is multiplied, if anything, the bottom of the cloud should be close to the ground since this point is 2000 units above the ground.

I have attached a screenshot of my cloud mesh and a screenshot showing 2 pillars and my cloud spread.

the lower pillar is 2000 units, the taller one is 20000.

So unless I misunderstand “point of origin”. I believe something is wrong.

Because it says maximum offset… and I set that to 2000… but it ends up being offset by 20000 when the scale hits 10.

This was where my confusion was as well. The point of origin in your mesh does not necessarily change. If you were to place it as a simple static mesh this would be true. However, foliage only works when attached directly to the landscape, so it forces the point of origin directly onto the landscape. With the z offset you are literally telling the mesh to appear a certain range away. In your case, you stated 2000 units, which means that the z offset is 2000 units away from wherever the original point of contact between the foliage and the ground was.
So, continuing the example, the cloud now floats 2000 units above the actual point that the foliage is resting. When you scale that, the 2000 units must be multiplied by the value of the scale itself to maintain the scaled distance from the now larger origin point. So 2000x10 scale = 20000, which produces an equivalent distance from the point the foliage is actually resting to the amount offset on the Z axis. However if you leave the z offset at 0 the scale for z offset becomes 0x10 scale = 0, so it does not have to move upwards to compensate for the increased size of the origin.

Scaling the location or in this case the offset is not scaling… that is moving.

By following this logic all meshes placed in the world should be moved when it is scaled?

It is an issue. Either the text explaining the setting is wrong, or the functionality is wrong.

When I offset something with 2000 I expect 2000 to be the offset, not 2000*“the scale I choose”

Please reconsider this.

Hi,

The Z offset was intended to be used to move trees up and down to adjust their origin (pivot location) and to provide slight variation. For this usage case, the Z offset needs to scale with the tree’s scale to ensure the tree’s trunk remains in the ground.

I understand you want to use it for providing a fixed Z offset randomly scaled clouds, which is a great idea, but as it is the tool can’t do that.

We intend to add support for foliage blueprints, which would be the best way to support this. I will also consider adding a checkbox next to the Z offset to toggle whether you want scaled or non-scaled Z offset behavior.

Cheers,

Ok,
I understand the reasoning behind the descision. It does make sense… a little :slight_smile:

Thank you for taking your time to come back to me and explain(again) why it behaves the way it does.

Props to you and your team.