I’m doing a project at Unreal, and my camera teleports extremely fast, but I noticed that the Landscape’s grass takes some time to load around the camera when I teleport the camera, it appears slowly, but I want it to load instantly, I don’t want to see any grass streaming at all, is there any console or C++ command for that?
Not that I know of, because it would mean all the grass is loaded all the time, which would be a nightmare.
Seeing as it’s teleporting, why not use a postprocess effect to mess with the viewport? It would add to the teleport feeling and give the grass time to load.
Please tell me how to load all the grass at the same time if you know, I don’t care at all about performance impact, it’s a cinematic work not a game.
Another option is to freeze the camera while the grass is loading, so the camera always capture the landscape when fully loaded, but I don’t know how to check it.
If you’re using the foliage tool, make sure the cull distance is set to zero.
If you’re using a landscape grass type, start the start cull distance to 0, and end cull distance as high as you can.
Hmm, not sure if that’s the solution, now the grass will not be culled by distance, but it doesn’t mean the grass will be fully loaded at the start of the game.
Create a giant terrain filled with grass, then create a simple blueprint to teleport the camera to a random point on the terrain each second: you will notice that each time the camera teleports, the grass is streamed bit by bit. Or you can type grass.FlushCache on console, you will see the streaming.
If I could at least tell if it’s loading or not by code…
I have this ( extremely simple landscape and grass ):
If you pan the camera quickly in edit mode, do you see it spawning? ( I don’t ).
Just tried it with very lush grass, same thing…
How big is your LS?
I think I found the problem, looks like my grass is “different”, it’s not on the foliage tool, it’s inside the terrain material somehow…
Right, this is what I’m saying. Click the grass node and find all the ‘landscape grass’ types. You have to change the cull settings in all of them
I tried, but no success I configured all the Start / End cull distances as you said. BUT I noticed something interesting (that may help at finding the solution), the spawning only happens if you have different “Grass Varieties”. If you have only one type of grass on the landscape, you can’t see the spawning.
My theory is that unreal spawns each grass type one by one each frame. So if you have only one grass type on your landscape, it will spawn immediately, but if you have two grass types, it spawns the first type on the first frame and the other one frame later, etc. I’ll test this theory later, if it’s correct then I just have to wait about 100 frames each time I teleport the camera.
My theory doesn’t work btw, I’m not sure why my grass is streaming
Hmm, not sure I’m afraid. I did only have 1 grass type… I’m thinking it might be the material?
Like I say, what kind of teleport effect is it supposed to be? If it’s an ‘actual’ teleport, then adding some sort of effect would make it look much more like teleporting and hide the grass…
Grass is loaded based on generated grass maps. If you change tile in world comp you will be forced into streaming.
as such, you can only hope to achieve a seamless effect by using a single closed level, and using the Foliage tool to place grass instead of the grass node.
re your theory. Grass is run with instanced static meshes. As such, it could be possible that the different instance is not pre-loaded in memory, causing the jump to occur.
if that is the case, paint a bit of the second grass material under the camera where it is visible but barely.
this will force the editor or game to load the instance.
after that, when transitioning you May not have the loading time.
Hmm but I don’t think I can replace the grass node easily, because I would lose the foliage distribution.
I am teleporting the camera on tick to random places and taking screenshots, I want to take thousands of screenshots of my landscape, and of course I want to take each Screenshot with the grass fully loaded. I don’t want to wait 5 seconds each time I teleport the camera to take a screenshot, this is not efficient, would take a lot of time to finish.
Does Unreal have no option to force the grass to load in a single frame (even if it means blocking the game thread)? I tried some console commands such as ForceLOD, TextureStreaming 0, but no success
No. What you want to do is not a common use case.