Viewport becomes unusable after moving cursor

In my project I created a spline-based PCG using data assets, because the scene consists of a number of islands, some close to each other, some further away from any other. I instantiated this PCG a number of times, covering either a single (small) island, or some adjacent islands together… (I could use a PCG volume but I wanted to have control over the settings per instance).
All objects spawned in the PCG have nanite enabled.

Now, when I move the cursor over the project, it can happen that the image on screen suddenly blurs and is filled with large planes, all details are gone.

It seems to happen if the content of the viewport changes fast when moving the cursor but also when I run a cinematic sequence and the scene changes fast, but I got it too when trying to move an object slowly.

I can save everything, and after reopening the viewport returns to normal.

UPDATE
As it turns out, the cause seems to be related to loaded and shown spline-based PCG’s. If I hide all of them, can do everything, also when I clear them. If I enable just a number of them, it seems to be fine too.

UPDATE
This is what a top-view in wireframe looks like normally:


and this when viewport went bazurk:

On occasion, I noted that assets near the cursor turn up in the wire frame, extended in size and rotated, not distorted.

This area has landscape material set to nanite, and looking on a spline- and dataset based PCG, but the PCG is not generated. It goes wrong if I zoom in too fast in persprective/lit mode. Unrael becomes very sluggy. Re-opening the level solves the issue - most of the time

I am now using the latest Nvidia Studio driver, can that be the problem?

The problem is also in 5.5.1. Here I have 16 PCG volumes, 530 x 530 in x/y scale, 12 using the same PCG graph, and 4 another (derived) one, to create decoration onto the landscape. I placed a number of cameras to have the ability to make screenshots in different lighting conditions showing exactly the same scene. All assets I use are nanite enabled (and set to use nanite).
Moving the viewport is no problem, as long as I don’t go to fast, as described earlier.
I set up a second viewport on another monitor,
and set that to cinematic view, and select one of the camera’s - then this happens:


Video is RTX4090 (ASUS TUF), driver is latest:

Global settings:

System video settings:

Hey there @WillemGr! It’s looking like there’s mesh distortion going on. This is reminiscent of a bug that occurred when scraping some scene limitations back in 4.27. Are you receiving any errors in the console while the occurs? It looks a bit like certain PCG elements could be the cause.

No errors in console. Reloading the level restores the viewport, but it will happen again and again. It seems to be PCG related, because it will only happen when PCG content is generated, probably over a certain threshold of instanciated assets. I do get messages on screen but too short to catch them. Also, i have the problem in partitioned worlds (8kx8k, 2kx2k) but in a non-partitioned world (24kx24k) it didn’t happen.
I had to stop 2 projevts because of this…

How’s your vram usage during this? Could it be that PCG has a memory leak and while switching cameras you are filling up the ram until max usage causing a slowdown?


Something worth checking is your cable connection between you GPU and monitor. Sometimes if it's not a 100% in it can cause stutter. Maybe it could have gotten loose while vacuuming or a tower shift. A bad cable could also cause the lag.

A further reddit thread has a possible fix if the cables are ok
https://www.reddit.com/r/buildapc/comments/o818h7/comment/hlz3dxw/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button


You could also verify your engine files.

As for the mesh artifacting looks like what is called a “vertex explosion”. The math regarding the mesh seems to suddenly be calculated with errors, shifting the vertex positions to extreme sizes. This could possibly either be a bug in variable conversion somewhere in the PCG or it could be a hardware problem (maybe corrupted vertex buffer).

Do you have any way of testing it on another GPU to rule out a hardware cause?

If you are using multiple monitors then maybe try enabling borderless window in the project settings.

1 Like

Not failing in non-world partition worlds? That’s an interesting data point. If you unload large swaths of the PCG/World partitions does this occur? Raven has the right idea when it comes to the mesh vertex buffer being corrupted.

I don’t think shortage of vram (64Gb used forless than 80%, 192Gb pagefile), and cabling is Ok, completely safe against being disrupted

Vram is in the gpu, not the type that you slot in on your motherboard.(statistics are elsewhere)

I can try on another PC, same amout of Vram and a 12 Gb RTX3080, older CPU (gen 10 i7)…
To me, i indeed think the main cause is indeed within PCG, I’m sure there are memory leaks somewhere (PCG, Splines) since memory consumption increased ever time a PCG is generated on whatever change (even when unrelated). An error in the script should manifest itself every time, as well as hardware issues. Maybe is the scale an issue?

Sorry, that’s correct. RTX4090, 24 Gb, and 20 Gb. It’s not always fully used, I’ll have a look, but what I’ve seen that at these moments not all is used

One thing that might come into play is that I get messages before that I need to increase r.nanite.MaxNodes, and after that r.nanite.MaxVisibleClusters. After I put these lines in DefaultEngine.ini, it seems to help, it could still happen if the amount isn’t increased enough and I get these messages again.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.