# \[UE 5.9 PVE\] FPVMeshBuilder::ApplyDaVinciRule shrinks all plants except PlantNumber 0 due to hardcoded PointIndex == 0

**URL:** <https://forums.unrealengine.com/t/ue-5-9-pve-fpvmeshbuilder-applydavincirule-shrinks-all-plants-except-plantnumber-0-due-to-hardcoded-pointindex-0/2861341>\
**Category:** Issues and Bug Reporting (Unreal Engine)\
**Tags:** unreal-engine\
**Created:** [November 24, 2026, 7:38am UTC](https://forums.unrealengine.com/t/ue-5-9-pve-fpvmeshbuilder-applydavincirule-shrinks-all-plants-except-plantnumber-0-due-to-hardcoded-pointindex-0/2861341 "2026-11-24T07:38:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aborigen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@aborigen](https://forums.unrealengine.com/u/aborigen)\
**Post date:** [November 24, 2026, 7:38am UTC](https://forums.unrealengine.com/t/ue-5-9-pve-fpvmeshbuilder-applydavincirule-shrinks-all-plants-except-plantnumber-0-due-to-hardcoded-pointindex-0/2861341/1 "2026-11-24T07:38:04Z")

</div>

### Summary

[ProceduralVegetationEditor] ApplyDaVinciRule collapses trunk radius of all plants except PlantNumber 0 due to hardcoded PointIndex == 0

### What Type of Bug are you experiencing?

World Creation Tools

### Steps to Reproduce

1. Enable the Experimental ProceduralVegetationEditor plugin in UE 5.9 and create a new Procedural Vegetation asset.
2. Build a multi-seed graph: PointScatter → SeedGenerator → Grower → MeshBuilder → Export.
3. On PointScatter, set NumPoints = 5 and Grid Size = (120, 120, 10) so 5 separate plants/trunks are generated.
4. On Grower, set GrowthCycles = 25 and IncrementalRadius = 0.008 (so trunks grow noticeably thicker than 1 cm).
5. On MeshBuilder → BranchRadius, set DaVinciRuleStrength = 0.8 and execute/preview Export.

### Expected Result

All 5 plants (PlantNumber 0..4) should apply Da Vinci’s rule using each plant’s own trunk root radius (RootScale), resulting in 5 trunks of consistent, natural thickness.

### Observed Result

Only the first plant (PlantNumber 0) retains its thick trunk radius, while all subsequent plants (PlantNumber 1..4) collapse down to ~1 cm radius (plus MinRadius). Setting DaVinciRuleStrength = 0.0 immediately restores equal thickness across all 5 trunks.

### Affects Versions

5.9

### Platform(s)

Windows

### Upload an image

 ![image.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/a/8/9a8873873353bb79ec767ad6bbac675b392ffc8f.jpeg) ![image2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/a/c/1acecf322e2a5c140566d79bb1c8b9cd8b0670bc.jpeg)

### Additional Notes

Exact root cause in engine source:  
File: Engine/Plugins/Experimental/ProceduralVegetationEditor/Source/ProceduralVegetation/Private/Implementations/PVMeshBuilder.cpp  
Function: FPVMeshBuilder::ApplyDaVinciRule (lines ~2060-2088)

Inside the per-plant loop `for (auto& [PlantNumber, PlantBranches] : PlantToBranches)`:

```cpp
float RootScale = 1.0f;
for (const int32 BranchIndex : PlantBranches)
{
    for (const int32 PointIndex : BranchPointsAttr[BranchIndex])
    {
        if (PointIndex == 0)
        {
            RootScale = PointScaleAttr[PointIndex];
        }
        ...
        DavinciPscale *= RootScale;
        PointScaleAttr[PointIndex] = FMath::Lerp(PointScaleAttr[PointIndex], DavinciPscale, Bias);
    }
}

```

`PointIndex == 0` is a global point index belonging only to `PlantNumber == 0`. For every subsequent plant (`PlantNumber >= 1`), `PointIndex == 0` is never matched, so `RootScale` remains `1.0f` (1 cm), shrinking all branches of plants 1..N toward 1 cm when `DaVinciRuleStrength > 0`.

Suggested fix: initialize `RootScale` from the first point of the current plant’s trunk (`BranchPointsAttr[PlantBranches[0]][0]`, since `PlantBranches` is sorted by ascending `BranchHierarchyNumberAttr`) instead of checking global `PointIndex == 0`.
