I’ve been trying to make a portal between two areas so I’ve been using a scene capture 2d to display the other area. However, the other area is faraway and so when seen through the portal the grass is culled so you only see really thin grass compared to when you walk through it and it loads the rest of the grass making it thick how it should be.
Is there a way to make the area around the portal not distance culled or act as though the player is there so its not culled in the area?
I’ve tried cull distance volume but it doesn’t override foliage/landscape grass type culling it seems.
I feel like the people behind Pyschonauts 2 did a presentation on how they managed to create their coherent portals system, there might be something good there. I know there’s a feature that lets you hold actors persistant in world space around an actor (basically make an actor act as a frustrum where culling is important) but I am forgetting the name currently.
I did watch that presentation haha. It’s what got me wanting to make one as well. Unfortunately, there wasn’t anything mentioned in the video itself, but I eventually might reach out to the person as they also posted it to reddit and have answered some of my questions already. I didn’t want to continue bombarding them with questions and it didn’t seem there was much culling needed in the scenes they showed, so I haven’t asked yet.
That feature sounds like exactly what I might need. Do you know any part of the name so I could look it up or what it’s related to?
I don’t, but look up some of the work done with world partition around UE5.EA, I know they discuss their usage of ‘streaming beacons’ (informal name I heard, not what they’re actually called), but I believe they document it decently well.
I looked into it and it was world partition streaming component that could be added to actors and it does work for landscape but not for foliage. Fortunately, I did ask the dev for the portals for pysconauts and he was able to give some directions on where it can be done for both.
So if anyone had the same issue with culling due to long distance between areas and are fine with adding a little c++ I was able to get the landscape and foliage (i e. landscape grass type) to stop culling by making a custom local player class and override the CalcSceneViewInitOptions and just added this in the cpp file:
{
if(GetControllerId() > 0)
{
//Taken from gameviewportclient in the draw function 1566
I turned off split screen in project settings and spawned a new hidden player on the other side of the portal destination so it would be rendered as though the player was already there. A little hacky I guess but works decently for me. Local player class needs to be changed to the custom one in project settings as well.
Huh, it’s interesting that WP doesn’t support foliage, although truth be told I’ve been struggling immensely with world partition since launch, including losing multiple weeks of work due to UE5EA not supporting incremental save. I’d like to follow up on that conversation, I’m especially curious how they managed to get portals working in-editor with what appears to be a fair bit of robustness. And correct me if I’m wrong, but doesn’t PN2 support ray-tracing? That would be extremely interesting to optimize for given these circumstances.
Yeah I thought world partition would too, especially cause I was using landscape grass which is connected to the landscape directly I would’ve thought it would work.
Dang, that sucks you lost so much work. I’ve lost a some a couple days work and it was annoying, I just had to take it as an opportunity to redo it even better. But weeks of work must’ve been crushing though. Hopefully, you bounced back from that alright.
I’m not sure about the raytracing, but yeah the portals working in the editor was crazy to see in the video, I’m not very far along on mine to be trying to look into that, but I’m sure the guy that posted it would be more than likely to help shed more on how they did it in a bit more depth and on the ray tracing. He’s been extremely helpful and open to questions, I’ve been bothering him a lot in the comments if you check haha and has answered within hours every time.
It was, it was really brutal. The stupid thing was that it was the incremental save itself that broke WP- the exact measure to avoid dumb corruptions like this. More than WP though, it appeared to be something with Epic’s One File Per Actor system. Of all the innovations that UE5 came with, from lumen to nanite to data layers to everything else, that’s the system I know the least about.
I went on the forums and it appears people have found out how to recover those corrupted files, but I haven’t understood their instructions, much less whether or not it will happen again in the future (this was during EA). I know WP and Large World Coordinates and the other systems enable vastly larger world sizes and ease of use, but they’ve sure been a headache for me.
I would love to reach out to that guy. Psychonauts 2 is both a technically clever and aesthetically pleasing game, and the way they’ve done what they’ve done is fascinating to me. I also wonder how their use of GlobalClipPlane would play into Nanite. Without making any claims as to how the two systems could interplay, I wonder if cheaper planar reflections might be on the table, as Nanite’s high levels of efficiency could facilitate really cheap culling, and VSMs cheap lighting.
Oh man, that’s annoying. I’ll have to be careful then.
I might have to try it soon if it’s such a good game. They were using UE4 it seems based on the video, but I’m sure he has some insights on how they might synergize. That would be great if it helps with those things, would make it easier to not have to meddle with the engine code.
They were using UE4, and I’d imagine there are specific codepaths that might not make sense in UE5 anymore, but I do believe they were editing engine code directly to make some of their work happen. I wonder if some UE5 features might allow for a blueprint-native portals implementation, because if so, it could be worth a fair bit on the marketplace (I haven’t checked if they exist already however).
I played a small amount of it with a friend but have yet to dive in myself. I’m excited, I love how they managed to create such visual interest with stylized meshes and engineering. It’s quite impressive to me.