Using PCG to do grass does a huge fps drop when moving camera compared to material layered grass

I´m getting really bad fps drop while moving the camera on the viewport since I started using grass on PCG. I have other plants on PCG too, in the same volume.

Is there a workaround about this?

Here are the steps on PCG that I´m doing

  1. Cover the entire terrain with the PCG volume
  2. Get texture sample, put it a grass mask of choice
  3. Put it to 64 texel size
  4. Project the texture points to the landscape
  5. Bring a density filter
  6. Spawn static mesh and set it to grass type
  7. Put culling to 10000 or so

Even if I do static shadow invalidation behavior, or turn off dynamic shadows, doesn´t matter, I get a big fps drop when moving the camera in the viewport. Although rotating the camera doesnt do that.

Any ideas?
Shall I come back to the material layered grass instead? I wanted to use some cool noise to scale the grass on PCG, but…

My project has virtual shadow maps on, I tried turning it off, no change.

1 Like

I’m currently running into this but on much smaller scale. I have a static mesh that is 1000x1000 cm and scattering foliage on it tanks my fps something crazy. Even though they get converted to HISM it doesn’t seem to optimize the foliage. I think there might be a bug where they might be drawn as single instances.

I fixed my lag by changing some settings that were causing the GPU to work harder. These settings are for my Static Mesh Spawner in my PCG graph

2 Likes

As well as activating Nanite for the meshes.