# Query Landscape layer weight in Blueprint?

**URL:** <https://forums.unrealengine.com/t/query-landscape-layer-weight-in-blueprint/342035>\
**Category:** World Creation\
**Tags:** weight, unreal-engine, layer, Landscape, Blueprint, question, CPP\
**Created:** [December 21, 2015, 1:55am UTC](https://forums.unrealengine.com/t/query-landscape-layer-weight-in-blueprint/342035 "2015-12-21T01:55:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PowerDesign](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PowerDesign](https://forums.unrealengine.com/u/PowerDesign)\
**Post date:** [December 21, 2015, 1:55am UTC](https://forums.unrealengine.com/t/query-landscape-layer-weight-in-blueprint/342035/1 "2015-12-21T01:55:08Z")

</div>

- I have a snow layer on other layers.
- I can do LineTrace, check the Phys Mat and Physical Surface Type, however it indicates snow even if it is not 100% snow.
- I can Break Hit Result, Cast Hit Component to LandscapeComponent, but there seems no layer weight information.

Or if Blueprint cannot do it, how do I do it with C++?

Thanks!

===================================================

If I paint a snow layer (e.g. a round continuous snow area), **on 1 side of the area, I have to go to deep snow to get Snow surface type, on the other side of the area, just shallow snow gives me Snow surface type**.

> **[Paint Mode](https://docs.unrealengine.com/4.27/en-US/BuildingWorlds/Landscape/Editing/PaintMode/)**
>
> Guide to the Landscape tool's Paint mode.

“The Physical Material (if any) assigned to areas of Landscape where this layer is dominant.”

So, what I see is, in certain area/direction, it does not assume the dominant layer’s physical material.

===================================================

So, my test result on 4.9:

- Take LandscapeMountain’s M\_Landscape\_Master material.

- Assign Snow physical material to the snow layer info.

- If I paint snow on a small part of a component, the **whole component’s physical material is snow**.

- If I paint grass on the whole component, then painting **snow on top of the grass does not give me snow physical material** at all, have to remove grass where snow is (but you don’t see if there’s grass below snow).

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [September 28, 2022, 3:20am UTC](https://forums.unrealengine.com/t/query-landscape-layer-weight-in-blueprint/342035/2 "2022-09-28T03:20:05Z")

</div>

The procedural foliage volume does this.  
Check the function in FoliageEdMode.cpp “LandscapeLayerCheck” and “GetMaxHitWeight” (which seems similar to what youre trying to do)  
And more specifically ULandscapeComponent::GetLayerWeightAtLocation and ULandscapeComponent::GetLandscapeInfo().GetLayerInfoByName(…)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/2/c/92c7ba08b0e97bf952997501bcbbaaeff271de33.jpeg)

you would need to have layers in your landscape, which you achieve by adding a “sample layer” node in your material using a chosen name.

(related [xkcd: Wisdom of the Ancients](https://xkcd.com/979/) )
