Description

Instance overlap functions for Foliage Instanced Static Meshes detects instances incorrectly. I was able to see this occur with both the Sphere and Box functions. In addition, I drew out debug spheres and boxes to see the space in which the spheres and boxes should be checking for the instances. With the same setup in 4.27, it accurately counted the number of instances in the drawn debug shape, in 5.0 it did not count any instances.

Repro Rate: 4/4

Tested this in //UE4/Release-4.27 @ CL#18319896 and was able to accurately get the count of instances overlapping the sphere, it is a regression.

Steps to Reproduce
  1. Create a new Third Person BP project with Starter Content
  2. Change to Foliage Mode
  3. Find SM_Bush in the Content Browser (StarterContent/Props/)
  4. Drag SM_Bush into the "+Drop Foliage Here" location in the Foliage panel
  5. Select the Content folder and save the Foliage Type Asset
  6. Navigate and open the Foliage Type Asset
  7. Click the + button on the Component Class under Mesh to create a new Blueprint
  8. Save and open the new Blueprint
  9. Right-Click in the Event Graph and add a Get Instances Overlapping Sphere node
  10. Promote Center input pin into a variable (Right-Click Center > Promote to Variable)
  11. Set Radius to 10000.0 (To encompass the majority of the world)
  12. Drag out from the return value and get length.
  13. Place a Print String node and print out the length
  14. Compile & Save the Blueprint
  15. Back in the Viewport, ensure Foliage mode is on and the SM_Bush_FoliageType is selected
  16. Paint the foliage onto the ground
  17. Record the number of Foliage painted by looking at the SM_Bush_FoliageType's icon in the Foliage panel (So we can compare)
  18. Play in Editor and observe the printed out value

Results: None of the Foliage Instanced Static Meshes are detected.
Expected: The Get Instances Overlapping Sphere array's length should match the number painted due to the size of the sphere encapsulating the foliage instances.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-149109 in the post.

27
Login to Vote

Fixed
ComponentUE - LD & Art - World Building - Foliage
Affects Versions5.0
Target Fix5.1
Fix Commit20145143
CreatedApr 14, 2022
ResolvedSep 24, 2022
UpdatedOct 19, 2022