# Blueprint/Code driven landscape visibility?

**URL:** <https://forums.unrealengine.com/t/blueprint-code-driven-landscape-visibility/96895>\
**Category:** World Creation\
**Tags:** unreal-engine, Landscape\
**Created:** [July 21, 2017, 2:22am UTC](https://forums.unrealengine.com/t/blueprint-code-driven-landscape-visibility/96895 "2017-07-21T02:22:05Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![BCullis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BCullis](https://forums.unrealengine.com/u/BCullis)\
**Post date:** [July 21, 2017, 2:22am UTC](https://forums.unrealengine.com/t/blueprint-code-driven-landscape-visibility/96895/1 "2017-07-21T02:22:05Z")

</div>

Hi all,

Is it possible to change the visibility map of a landscape chunk in blueprints or c++ code?

What I’m trying to do: build into a blueprint or code snippet (I’m comfortable in either domain) the “erasure” of the underlying landscape where I’m placing the entrance mesh for a cave-spawning object. It’s always the same mesh, so I can define a constant size brush if necessary, or drive it from the collision mesh. The landscape material already has the right settings to support editor-painted holes in the visibility, but my end goal is to avoid using any landscape material painting in favor of plopping down a cave seed mesh and letting it dynamically grow at game launch, creating random cave systems. “Nice-to-have” would let me give that tool to players as a built in simplified map editor mode.

Thoughts? Thank you!

---

<div class="post-metadata">

**Author:** ![jorbascrumps](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jorbascrumps](https://forums.unrealengine.com/u/jorbascrumps)\
**Post date:** [August 15, 2022, 12:06am UTC](https://forums.unrealengine.com/t/blueprint-code-driven-landscape-visibility/96895/2 "2022-08-15T00:06:29Z")

</div>

I know this is a very old thread but I am interested in this as well. From searching around this doesn’t seem possible but hoping UE5 introduced something? 🤞

---

<div class="post-metadata">

**Author:** ![Radsburied](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/radsburied/32/562456_2.png) [@Radsburied](https://forums.unrealengine.com/u/Radsburied)\
**Post date:** [August 16, 2022, 11:14am UTC](https://forums.unrealengine.com/t/blueprint-code-driven-landscape-visibility/96895/3 "2022-08-16T11:14:24Z")

</div>

Might be possible to drive using RVT or a render target of your choosing and hooking that render target texture up to the visibility in the landscape material. I have no idea if it would work run-time though.

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [August 16, 2022, 4:51pm UTC](https://forums.unrealengine.com/t/blueprint-code-driven-landscape-visibility/96895/4 "2022-08-16T16:51:53Z")

</div>

Resurrect a 5 year old topic to add nothing but silliness? Great work folks.

Its been possible to make cave entrances - including removing collision - since ue4.11 at the very least.

Look up tutorials online, there’s bound to be only about a billion.

Extrapolating from how you do it manually, to creating and setting up a render target to drive the actual landscape in real time takes maybe 10 minutes.

Anything that is driven by the material itself can happen in real time.

Anything that’s done by sculpting tools cannot.

---

<div class="post-metadata">

**Author:** ![Swornh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Swornh](https://forums.unrealengine.com/u/Swornh)\
**Post date:** [June 1, 2024, 10:36am UTC](https://forums.unrealengine.com/t/blueprint-code-driven-landscape-visibility/96895/5 "2024-06-01T10:36:28Z")

</div>

This guy does it in this video: [https://youtu.be/1U-5zxJCIN4?si=gCg7ARfqOEWSOw09&t=157](https://youtu.be/1U-5zxJCIN4?si=gCg7ARfqOEWSOw09&t=157)  
I’ve been trying to recreate this, with no luck ☹ yet

> [@Cut landscape mesh with blueprint (Like a dynamic boolean operation)](https://forums.unrealengine.com/t/cut-landscape-mesh-with-blueprint-like-a-dynamic-boolean-operation/1879690):
>
> Hi, so I basically have the exame same setup as in this video “[https://www.youtube.com/watch?v=9hwkFJ\_vxdg](https://www.youtube.com/watch?v=9hwkFJ_vxdg)”, where you have a building with some kind of underground passage, or a open world cave entrance. But from what I saw, people “cut” or hide the mesh visibility at the editor. I was wondering if it wouldn’t be possible to add a collision box or any other object at the blueprint, like the image below, and then just detect where it intersects with the landscape and cut it out, like the we ca…

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [June 1, 2024, 10:22pm UTC](https://forums.unrealengine.com/t/blueprint-code-driven-landscape-visibility/96895/6 "2024-06-01T22:22:08Z")

</div>

Depending on _if_ removing collision is done with a paint layer or a sculpting tool you should have the answer to the question of if it is possible or not to do it at runtime.

Either way, given how poorly the engine runs while using landscape I don’t really see any reason to delve into any of this.

Use something other than landscape.

Mesh can be cut up at runtime via c++ and the desired result is fairly trivial to achieve.  
The cut out of just about any geometry shape is possible. Complex ones too. Unlike on landscape.

---

<div class="post-metadata">

**Author:** ![Swornh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Swornh](https://forums.unrealengine.com/u/Swornh)\
**Post date:** [June 1, 2024, 10:54pm UTC](https://forums.unrealengine.com/t/blueprint-code-driven-landscape-visibility/96895/7 "2024-06-01T22:54:03Z")

</div>

Just projecting the opacity to zero at an arbitrary point would suffice for me.  
Was trying to achieve it with virtual textures, but I can’t make any sense of it :(.

Why would the landscape be poor? So instead of landscape what should be used? Just a plane with 1000 x 1000 division and deformed with noise? I did this but it renders insanely slow compared to just the world landscape.

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [June 2, 2024, 2:49am UTC](https://forums.unrealengine.com/t/blueprint-code-driven-landscape-visibility/96895/8 "2024-06-02T02:49:54Z")

</div>

You need to study up.  
1000 x 1000 = 1,000,000 quods which = 2,000,000 tris. And Probably _wasted_ tris at that.

Landscape is poor because it is pure and unmitigated ■■■■.  
It was designed nearly 20 years ago for the second sdk and it has hardly had any worthwile improvement since then.  
In fact, It had a lot of whatever the opposite of improvement would be - lets go with “sheer stupdity”. Which instead of producing a worthwile system made the whole thing heavier to render than it should be. By around 60 to 80%.

What you should do is produce an _analytical_ mesh - where there are verts only where verts are required.  
On top of that, usually you section the mesh(es) for occlusion following best practice standards.  
So in the end you have like 2k tris on screen and a handful of drawcalls instead of 1 drawcall of 2m tris.

There’s some decent (of all things one would never think of mentioning EA after decent, but here goes) EA talks on geo-rendering. And there are some perhaps better ones from Edios (hitman).

Anyway, only removing visibility can definitely be achieved with just a material.  
Lets see… if i find a link in the first search ill share it…  
You are in luck

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/b/9/bb96f23032b800969628ec49bd51d3c32d727833.jpeg "Building High-End Gameplay Effects with Blueprint") ](https://www.youtube.com/watch?v=67z5u8ZcEcw)

---

<div class="post-metadata">

**Author:** ![Swornh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Swornh](https://forums.unrealengine.com/u/Swornh)\
**Post date:** [June 2, 2024, 10:38am UTC](https://forums.unrealengine.com/t/blueprint-code-driven-landscape-visibility/96895/9 "2024-06-02T10:38:47Z")

</div>

Oh that is a interesting one,  
Was doing a similar thing with the material, with draw 3d box in the material itself, and using its coordinates to make the “hole”, which worked right aways, except I could not figure out how to stop each proxy of the landsacpe to also have a hole in it ☹ and the coordinates were quite off from what I expeted . Took it from here “[https://youtu.be/N\_pq2RYTG04?si=s\_k4WC0-Y4Jl9\_Bl&t=362](https://youtu.be/N_pq2RYTG04?si=s_k4WC0-Y4Jl9_Bl&t=362)”

the way he paint is the video you share is somewhat different, well maybe all that math with the map size and such is what I was missing.

Sad to know that the landscape is like “left a side” for 20 years. Most stuff I’m seeing are done with pcg over landscape and deforming landscape itself with pcg, and yet, landsacpe is that terrible as you mention.

Anyways, thanks for the feedback, wasn’t really expecting any answer from a topic that old.

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [June 2, 2024, 10:29pm UTC](https://forums.unrealengine.com/t/blueprint-code-driven-landscape-visibility/96895/10 "2024-06-02T22:29:26Z")

</div>

The proper math Murphy didn’t mention would be done using the Object Bounds.

You have to fuss with it because I dont remeber the exact formulae, but something like bounds x 2 divided the world position.

The result you want is that if you take a texture (any texture, any size), it is accurately stretched across the whole landscape actor you are currently dealing with.

The line trace process is likely still used to determine which landscape (or mesh) you are interacting with, so that coordinates/UV sizes can be adjusted for the render target you are using to work.

Actually you are in extra luck again. I found a screencap of the formulae.

> **[Gyazo](https://gyazo.com/a5a2f74a9727f2e46d427e1aaef018cb)**
>
> Gyazo is the easiest way to record screenshots & videos you can share instantly. Save time with async visual communication that's effortless and engaging.

Go play the lottery or something…

Obj position - obj bound defines one corner.  
You subtract that from wpo so you get the starting point, then you count up the bounds to define the area of interest…

---

<div class="post-metadata">

**Author:** ![Swornh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Swornh](https://forums.unrealengine.com/u/Swornh)\
**Post date:** [June 3, 2024, 5:04pm UTC](https://forums.unrealengine.com/t/blueprint-code-driven-landscape-visibility/96895/11 "2024-06-03T17:04:20Z")

</div>

holy fu@#, that is some weird math, I really need to try to make sense of it.  
hey, thanks for sharing those, I’ll play with it in a bit
