I’d like to understand how landscape scaling, landscape components interacts with the landscape material. I’ve got the following use case:
A landscape uses a material with a displacement map that is drawn during runtime using render targets. Let’s say white circles are drawn onto the rendertarget where white indicates that vertices of the landscape are pushed up.
The drawing occurs when the landscape gets hit ( eg by a linetrace) . Given a hit with location in World Space, transform it into the UV-Space of the render target texture. The circle is then drawn at that UV-position. Ideally the vertices of the landscape are then pushed up at the location of the hit.
For some fixed landscape resolutions I can approximate the transformation, so that the vertices around the hit are pushed up.
But I’d like to generalize it to be able to use it with all landscapes. Unfortunately the method “Get UV from hit result” doesn’t work with landscapes.
How does scaling work when a landscape has more than 1 component? Will it be scaled from each components centre?