How to properly use Save PCG Data Asset node in partitionned PCG

Hello,

We currently use a partitionned PCG with Hierarchical Generation on a fairly huge map, I need to export some of my points as a PCG data asset to be used by one of our systems at runtime. My problem is because of the partitionned system, the data asset is saved every each grid cell and that’s not what I want, I would like all the points and not just those in the last grid cell.

My only solution so far is to set my graph unbounded to be able to register all my points and then change the grid size to populate statics meshes with my PCG, my concern is the performance hit, with our big map there’ll be definitively too many points that the unbounded version will not be able to handle.

I would like to know if there is a cleaner way to do that ?

Thank in advance,

Bastien

Hello,

I found a solution, simply use an output node, setup your pins as wanted, then use a second pcg to read theses output with “Get Data on All Grids” boolean checked and write them with a “Save PCG Data Asset” node.

Bastien

Hi Bastien,

Sorry for the late answer, I had missed this ticket.

In your case you might want each partitioned actor to get all the data that’s relevant only (ex.: could use cull points with actor bounds, for example) and serialize the data per partition actor if it makes sense.

However, it seems in your case having a single source of truth was easier and that might be better this way.

A side-note: if you’re loading a large set data asset (points, especially), you can not only do it at the unbounded level (so once only) but if you can trigger the data to compute its octree creation, then any downstream (partitioned) query using Cull Points Outside Actor Bounds will be optimal because it’ll use the octree. We’ve used that trick in the Cassini Sample demo, you can look it up (it’s a subgraph that computes distance to nothing..)

Cheers,

Julien

Hi Julien,

Thanks for your answer and the tips !

I’ll definitively take a look at it.

Cheers,

Bastien