Landscape scaling and textures

Hi,

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?

I am not sure it is possible to robustly generalize this approach. I see other problem: render target has fixed resolution, the higher your landscape is, the higher resolution the render target should have for the displacement to look good. Have you thought about this issue?

I have thought about it, but didn’t try to resolve it yet since the other problem exists. For large landscapes I thought about using a rendertarget for each component of the landscape though I don’t know how I’m going to implement that.