Download

Enable/Disable culling volume within blueprint

Hi. I’m trying to trigger a culling volume from within a blueprint but I can’t seem to get it working. I added a Destroy Actor node to make sure they were communicating and that worked so I’m not sure where I’m going wrong.

b181b8fc5c5142345e0ee45565ed5c521deb310f.png

Hello,
As your destroy actor is linked to end overlap event, i wonder if you would not have interverted your enabled checked unchecked.

Edit : If they are well set then i would try to cast to character from the other actor node to be sure that there isn’t an overlap event interfering.

Hi Fen, I added the Destroy Actor at the end just to make sure the blueprint was communicating with the culling volume. I’ve even tried offsetting the volume and that doesn’t seem to work either. Destroy Actor is the only node so far that I’ve managed to affect the volume with.

Hi Mark,

I believe the best course of action here would be to use Level Streaming Volumes rather than cull volumes. The use of Level Streaming volumes will give you the kind of results you’re wanting with the overlap box and making the level visible while loaded.

The Content Examples > Open Level > Level Streaming map is a great resource for setup and usage.

I did however submit a bug report for the set node not working with CDV’s (UE-5539).

Thank you!

Tim

Hi Tim,

I’ve been trying a setup with level streaming but my game will have in excess of 80 rooms and I’m worried about it becoming an unmanageable mess.

Thanks for sending the bug report. I wouldn’t mind seeing how far I get with the culling volumes, it just seems like an efficient way to hide rooms, NPCs etc.

In all honesty, I used Culling Volumes for a while but found that using level streaming worked better in so many ways. I definitely found it to be more convenient using “levels.”

To clarify a bit, I don’t want there to be a misconception that levels need to be a completely different load and wait type of thing. Epic has used Levels in almost every, if not all, of it’s projects released through the launcher. If you look at Vehicle Game or Strategy game you can go to the menu bar > windows > Levels.

Once you have this window open you can see a list of “Levels.” These levels can hold different elements in them. They can be loaded separately or as a whole under the Persistent Level (This is the main level you’ve created that other levels can be under).

Sorry if this seems a little convoluted or confusing.

To better illustrate the way Epic has done it. If you open Strategy Game or Vehicle game with the levels window open you’ll see multiple levels here.

You’ll have your persistent level which you can think of as your base parent that other levels will be under. Then under that Epic has used additional levels that only have Lights or Particle Effects, or rooms in your case.

To trigger these you would open the Level BP and place a trigger volume that when overlapped loads the next room. This is a very similar setup to your cull distance volumes.

I would highly recommend this method for creation and organization. Since you would want each room to be a level you can name each level/room accordingly. When you’re not working on it or don’t want to see it you can click the “eye” to make it not visible and you can lock the level so that if you’ve finished with it you don’t accidentally move or adjust something you didn’t mean to.

I’ve set up a simple project to demonstrate. There is the Content Examples one that I would highly recommend anyone to take a look at, but this is a not as pretty version of that and the levels are named as rooms for demonstration.

When you open the project. Go to menu > Window > Levels and you will see how the levels are labeled. Here you can also right click and set the levels to always be loaded or load via BP which is demonstrated in this example.

Link to project: https://www.dropbox.com/s/3ovc5gwetx3gxxy/BP_LevelStreaming.zip?dl=0

Thanks so much for setting that up - I’ll have a look at it when I get home.

I’ll give levels another go - the setup I had was getting a little convoluted. It worked fine when I was just using volumes to toggle the visibility of the individual rooms as you enter and exit, but it got complicated when I wanted to switch the visibility of multiple rooms.

I’ve drawn a little diagram to illustrate travelling between two rooms, the transparent rooms are the ones I intend to hide:
a16a7612b0630a449ec5719881f041cfb6ac4140.jpeg

1: 1st Room and part of hallway visible (I use a black unlit plane to hide the parts of the room I don’t want to show).
2: Hallway and adjoining rooms visible, 1st room hidden.
3: 2nd room and outdoor area visible, adjacent rooms and hallway hidden.

Having an enter and exit overlap event for volumes in each room was fine while trying to toggle only one level, but I found that with trying to toggle multiple levels that got messy. The character would be somewhere between two volumes both competing to activate and deactivate separate levels. I’m still pretty new to blueprints so I haven’t yet figured out a way to get them to flow properly.

Hi Tim,

I’ve been looking at the example you made and it’s very easy to follow. I’ll spend some time trying to tailor it so it works like the diagram above.

Thanks for your time and patience!

Give it a go and if you have any questions feel free to ask. I don’t mind helping you get something working! :slight_smile:

Tim

I had to step away from the project for a while but I recently started working on it again. I have some issues with streaming levels to hide my rooms.

Firstly, there doesn’t seem to be a way to keep the level active but hide the visibility which means that any NPCs in the room fall when it’s inactive. Some of the NPCs will move from room to room so it’s important that the rooms are only hidden. Also any changes to the level aren’t saved, so everything resets when I return to it.

I’ve tried toggling the visibility of the meshes via blueprints but I haven’t found a way to toggle groups of objects, meaning that if I have to switch off multiple rooms and its contents the blueprint gets really messy.

There’s likely a solution I’ve overlooked but if you can think of anything it would help immensely.

Though I am aware of this thread having been dead for quite the while now it is still the first one you encounter when you google this problem and in the interest of being a good guy and all I have figured out the solution to OP’s original problem:

If you change a Cull Distance Volume or indeed even Destroy it through Blueprints it will have no effect in game (though it will if you play from editor, launch as a stand alone to see the problem). Objects will still be culled from the player’s view, in other words. The reason for this is because while the volume itself is destroyed and affected the world actually isn’t told about this, so you have to then call the UpdateCullDistanceVolumes() function of the current UWorld for the change to have any noticeable effect for the player. This unfortunately is not possible through Blueprint without first coding your own custom class to handle it, so you’ll have to resort to C++ to do it.

Hopefully this post will save some other Unreal developer a bit of frustration in the future. :slight_smile:

Thank you. Saved me some time