PCG Runtime HiGen - Handling points outside active grid cells

I’m working with two PCG graphs:

  • GENERATOR - an offline graph that generates a large, static set of points for the entire map.
  • SPAWNER - a runtime graph using hierarchical generation, intended to ingest the precomputed points from GENERATOR and vary spawning behavior based on proximity to the player (via a Runtime Generation Source).

With a grid size of 3200, I see the expected behavior. Only cells within the runtime generation radius around the player are created and evaluated. Cells outside that radius are not generated at all, and for the active cells it’s necessary to intersect each grid cell volume to restrict processing to only the points contained within that cell.

My question is about handling points outside those active cells.

Right now, any points that fall outside the generated 3200 sized grid cells are effectively not processed at all. Is there a way to still access or process those “far” points differently without increasing the grid size?

If I introduce a second grid size of 25600, I run into a different problem. The larger cells overlap the near-field region, causing both near and far-spawning logic to apply in the same area. I understand the intended use case is finer detail near the player and coarser detail farther away, but what I’m looking for is two distinct spawning behaviors based on a distance threshold, not overlapping behaviors driven purely by cell size.

Is there a supported way in PCG to:

  • Use hierarchical/runtime generation for near-field spawning, and
  • Apply a separate spawning or processing path for points beyond that radius, without overlapping cell evaluation?
    [Attachment Removed]

Hey Carlos,

Unfortunately, there is no official way to do this, the hierarchical generation is expected to happen top-down, so you can’t pass info from the smaller cells to the larger ones.

However, there’s a workaround that we also used in the Witcher 4 demo.

You can set a minimum draw distance and a cull distance in the mesh descriptors for each type of mesh that the static mesh spawner generates.

Using these you still generate overlapping instances, but the coarse ones use a minimum draw distance and the fine ones have a cull distance set, so only one of them is ever visible for a specific location.

[Image Removed]Let me know if this helps!

Kind Regards,

Sebastian

[Attachment Removed]

Glad to hear that!

I’ll mark this as closed then.

Cheers,

Sebastian

[Attachment Removed]

Thank you for the reply, Sebastian. This is the same solution I came to independently and it has been working really well, so that’s great.

[Attachment Removed]