UE5 Niagara How does Neighbor Grid 3D GetCellSize working? It always return 0

When I follow tutorial about Niagara, I found my Niagara System completely comes to error.

I found the reason is that NeighborGrid.GetCellSize always return 0, it results in value is divided by 0 in my hlsl.

So here is my debug hlsl about GetCellSize:

I use Niagara System ColorQuery in offical project ContentExample for testing.

I disable all other emitter, only leave Grid_Write Emitter.

Then in Neighbor Grid 3D Set Resolution module, no matter set Resolution Method choose Independent, Max Axis or World Cell Size, the strange thing is, only when I set WorldCellSize = 75 or Num Cell = 2, can I get NeighborGrid.GetCellSize return 75. If I set other value, such as WorldCellSize = 60, then NeighborGrid.GetCellSize always return 0.

You can see particles’ attribute that velocity is 0 when I set WorldCellSize = 60, it means NeighborGrid.GetCellSize return 0.

屏幕截图 2023-12-27 155904

Why is there such a difference? How exactly does GetCellSize work? I don’t seem to have found a way to directly set the size of Neighbor Grid 3D. There is only a way to set the number of grid cells SetNumCells. I feel that Neighbor Grid 3D itself should not store length dimensions, and I looked in the Neighbor Grid 3D Set Resolution module. , and only SetNumCells is directly related to Neighbor Grid 3D.

Thanks for your attention.

I definitely can pass an WorldGridExtent value into module, and divide it by NumCells, then get right value of CellSize.

int3 NumCells;
NeighborGrid.GetNumCells(NumCells.x, NumCells.y, NumCells.z);

float3 CellSize = WorldGridExtent / NumCells;

But the problem about GetCellSize is still weird.