# Is there a new version of procedurally spawning foliage

**URL:** <https://community.cesium.com/t/is-there-a-new-version-of-procedurally-spawning-foliage/43694>\
**Category:** Cesium for Unreal\
**Created:** [October 15, 2025, 7:10pm UTC](https://community.cesium.com/t/is-there-a-new-version-of-procedurally-spawning-foliage/43694 "2025-10-15T19:10:31Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![aewss](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/aewss/32/31649_2.png) [@aewss](https://community.cesium.com/u/aewss)\
**Post date:** [October 15, 2025, 7:10pm UTC](https://community.cesium.com/t/is-there-a-new-version-of-procedurally-spawning-foliage/43694/1 "2025-10-15T19:10:31Z")

</div>

> **[Procedurally Spawning Foliage](https://cesium.com/learn/unreal/unreal-procedural-foliage/)**
>
> This tutorial explains how to generate foliage procedurally on real-world terrain in Unreal Engine by using Cesium for Unreal, the Niagara particle system, and custom C++ code to analyze Cesium World Terrain.

this one is outdated and even if i try to opening with 4.27 (Compatible version according to github)  
it has errors, is there a new version of this TECHNOLOGY

---

<div class="post-metadata">

**Author:** ![Kevin\_Ring](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/kevin_ring/32/2003_2.png) [@Kevin\_Ring](https://community.cesium.com/u/Kevin_Ring)\
**Post date:** [October 16, 2025, 7:09am UTC](https://community.cesium.com/t/is-there-a-new-version-of-procedurally-spawning-foliage/43694/2 "2025-10-16T07:09:09Z")

</div>

There’s no newer version of that tutorial. But if you share the errors you’re running into, we might have ideas for getting past them.

I definitely suggest using UE 5.4+, even though the tutorial was originally written against an older version.

---

<div class="post-metadata">

**Author:** ![DragonRider](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/dragonrider/32/30333_2.png) [@DragonRider](https://community.cesium.com/u/DragonRider)\
**Post date:** [October 16, 2025, 1:50pm UTC](https://community.cesium.com/t/is-there-a-new-version-of-procedurally-spawning-foliage/43694/3 "2025-10-16T13:50:52Z")

</div>

I am about to go through this, i’m using 5.5 so i’ll report back what i find. (i’ve been placing foliage previously, not the most efficient lol)

---

<div class="post-metadata">

**Author:** ![aewss](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/aewss/32/31649_2.png) [@aewss](https://community.cesium.com/u/aewss)\
**Post date:** [October 16, 2025, 8:21pm UTC](https://community.cesium.com/t/is-there-a-new-version-of-procedurally-spawning-foliage/43694/4 "2025-10-16T20:21:12Z")

</div>

![image](https://global.discourse-cdn.com/cesium/original/3X/e/3/e3e381cb97c7258d506862d6297678505d828c75.png)

this is the visual stido screen when i follow the instructions to open project

 ![image](https://global.discourse-cdn.com/cesium/original/3X/2/4/24eb710ffedfc69b6e69f0f6c849802a03934671.png)

 ![image](https://global.discourse-cdn.com/cesium/original/3X/b/c/bcf74a8ef6317af357705e225d036952720180dd.png)

---

<div class="post-metadata">

**Author:** ![DragonRider](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/dragonrider/32/30333_2.png) [@DragonRider](https://community.cesium.com/u/DragonRider)\
**Post date:** [October 17, 2025, 11:03am UTC](https://community.cesium.com/t/is-there-a-new-version-of-procedurally-spawning-foliage/43694/5 "2025-10-17T11:03:39Z")

</div>

Might be a long shot, but have you regenerated the source files via the uproject? i get this quite alot when the plugin i’ve made has underlying issues/corrupted build state.

Edit: Testing the Repo on my 5.5 now. Same Errors, there’s a few things skipped; slowly going through them.

Update: I have the project building now, just fixing the outdated lines within various constructors

Update 2: Got the Project running in 5.5!

Big culprit is i needed to add:  
#include “CesiumWgs84Ellipsoid.h”

and then change the various lines to implement the new functions:

| static FVector | [LongitudeLatitudeHeightToEarthCenteredEarthFixed](https://cesium.com/learn/cesium-unreal/ref-doc/classUCesiumWgs84Ellipsoid.html#a9ea8cca0c159949f12b4136099222b06) (const FVector &LongitudeLatitudeHeight) |
| --- | --- |
| | Convert longitude in degrees (X), latitude in degrees (Y), and height above the WGS84 ellipsoid in meters (Z) to Earth-Centered, Earth-Fixed (ECEF) coordinates. |
| | |
| static FVector | [EarthCenteredEarthFixedToLongitudeLatitudeHeight](https://cesium.com/learn/cesium-unreal/ref-doc/classUCesiumWgs84Ellipsoid.html#aee9cc130ff59870e3fd4b0d0e1521a0e) (const FVector &EarthCenteredEarthFixedPosition) |
| | Convert Earth-Centered, Earth-Fixed (ECEF) coordinates to longitude in degrees (X), latitude in degrees (Y), and height above the WGS84 ellipsoid in meters (Z). |
| | |
| static FMatrix | [EastNorthUpToEarthCenteredEarthFixed](https://cesium.com/learn/cesium-unreal/ref-doc/classUCesiumWgs84Ellipsoid.html#a7ba95d785a21ebb739e1ea105e2fb65a) (const FVector &EarthCenteredEarthFixedPosition) |
| | Computes the transformation matrix from the local East-North-Up (ENU) frame to Earth-Centered, Earth-Fixed (ECEF) at the specified ECEF location. |

Update 4: Need to fix a few more things, project runs etc, but the foliage is blocks (set in details panel) and it’s just kind of floating.

- ![foliageissue](https://global.discourse-cdn.com/cesium/original/3X/6/5/652d9d1c2fe94b043e97e402c686b4165944e329.jpeg)

---

<div class="post-metadata">

**Author:** ![aewss](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/aewss/32/31649_2.png) [@aewss](https://community.cesium.com/u/aewss)\
**Post date:** [October 17, 2025, 2:49pm UTC](https://community.cesium.com/t/is-there-a-new-version-of-procedurally-spawning-foliage/43694/6 "2025-10-17T14:49:52Z")

</div>

umm what do you mean

---

<div class="post-metadata">

**Author:** ![DragonRider](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/dragonrider/32/30333_2.png) [@DragonRider](https://community.cesium.com/u/DragonRider)\
**Post date:** [October 17, 2025, 4:17pm UTC](https://community.cesium.com/t/is-there-a-new-version-of-procedurally-spawning-foliage/43694/7 "2025-10-17T16:17:51Z")

</div>

Some of the mthods in the previous version didn’t exist, or at least for me, so i had to add the other header file in `CesiumWgs84Ellipsoid`; as a subsequent result, you have to also change the corresponding calls within ProceduralFoliageEllipsoid & FoliageCaptureActor.

Once i have it working i’ll put it on github for you. Currently trying to get the collision for the actual foliage to work correctly, that and a few other bugs related to the HISM things are still intermittently crashing.

---

<div class="post-metadata">

**Author:** ![aewss](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/aewss/32/31649_2.png) [@aewss](https://community.cesium.com/u/aewss)\
**Post date:** [October 17, 2025, 5:52pm UTC](https://community.cesium.com/t/is-there-a-new-version-of-procedurally-spawning-foliage/43694/8 "2025-10-17T17:52:19Z")

</div>

i’ll be very very glad thank you so much!  
i hope process won’t be hard

---

<div class="post-metadata">

**Author:** ![DragonRider](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/dragonrider/32/30333_2.png) [@DragonRider](https://community.cesium.com/u/DragonRider)\
**Post date:** [October 17, 2025, 6:21pm UTC](https://community.cesium.com/t/is-there-a-new-version-of-procedurally-spawning-foliage/43694/9 "2025-10-17T18:21:33Z")

</div>

No worries at all!  
Hopefully it should be as easy as opening the project and you should be good to go haha. Still dealing with the collision issues atm, but getting through the bugs and crashes now. I’ll keep you updated as i get through it all.

---

<div class="post-metadata">

**Author:** ![aewss](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/aewss/32/31649_2.png) [@aewss](https://community.cesium.com/u/aewss)\
**Post date:** [October 17, 2025, 6:30pm UTC](https://community.cesium.com/t/is-there-a-new-version-of-procedurally-spawning-foliage/43694/10 "2025-10-17T18:30:38Z")

</div>

i am following updates! have a nice day

---

<div class="post-metadata">

**Author:** ![DragonRider](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/dragonrider/32/30333_2.png) [@DragonRider](https://community.cesium.com/u/DragonRider)\
**Post date:** [October 18, 2025, 11:33am UTC](https://community.cesium.com/t/is-there-a-new-version-of-procedurally-spawning-foliage/43694/11 "2025-10-18T11:33:59Z")

</div>

Okay, fixed quite a lot of performance issues, the system kept locking up for 10-15min at a time when using ray-casting (non ray-casting just wouldn’t work). You can now fly around and it’ll spawn blocks etc, with minimal hitches. Still some weird quirks, as in, if i use 1024 for a capture elevation, it seems to work okay, and you get some hitting the ground, some in the air, but any other number set for the capture elevation seems to result in no trees/blocks.

Managed to get some trees on the ground, there’s still random floating `trees` (cubes atm).

We’re getting closer, ill keep working away at it, hopefully can get some consistent results as the z-offset on the foliage seems to play a huge part in the puzzle (even when the distance to ground has been calculated via ray-casting).

 ![cesium_foliage_almost_working](https://global.discourse-cdn.com/cesium/original/3X/d/c/dc2803b241e644eb6cd4c296a555fd47314436fa.jpeg)

---

<div class="post-metadata">

**Author:** ![aewss](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/aewss/32/31649_2.png) [@aewss](https://community.cesium.com/u/aewss)\
**Post date:** [October 18, 2025, 12:15pm UTC](https://community.cesium.com/t/is-there-a-new-version-of-procedurally-spawning-foliage/43694/12 "2025-10-18T12:15:28Z")

</div>

it’s almost finished! is there any communication way to talk to you?

---

<div class="post-metadata">

**Author:** ![DragonRider](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/dragonrider/32/30333_2.png) [@DragonRider](https://community.cesium.com/u/DragonRider)\
**Post date:** [October 18, 2025, 1:47pm UTC](https://community.cesium.com/t/is-there-a-new-version-of-procedurally-spawning-foliage/43694/13 "2025-10-18T13:47:07Z")

</div>

pm’d

Okay, slowly getting somewhere, currently debugging a bunch of ray-cast logs, seems there’s more collision issues lurking somewhere in FoliageCaptureActor.cpp. At this point most of the functions are completely different now to the actual project on github, however, i think i’m getting a little closer to it actually working.

The bit im iffy about is the performance implications of the system, as i have a 3080, 64gb ram and a 7950x on this workstation and due to the subtle issues it really struggles at times with basic blocks. I’ve reduced collision types to simple collision, hoping that once i clear the rest of the bugs out it’ll pickup a bit.

---

<div class="post-metadata">

**Author:** ![DragonRider](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/dragonrider/32/30333_2.png) [@DragonRider](https://community.cesium.com/u/DragonRider)\
**Post date:** [October 18, 2025, 7:13pm UTC](https://community.cesium.com/t/is-there-a-new-version-of-procedurally-spawning-foliage/43694/14 "2025-10-18T19:13:21Z")

</div>

![working](https://global.discourse-cdn.com/cesium/original/3X/f/b/fbbb45d39fc5b81b7acdb07a3b0adffc5f876282.jpeg)

After a long time fixing and patching and making a ton of mistakes, the old approach i was using did not work. Finally got it running correctly and quite smooth with some key changes.

For anyone following/seeing this in the future; the old functions for Georeference have changed to

TransformLongitudeLatitudeHeightPositionToUnreal etc (usually Position now in the name). ComputeEastsouthUpToUnreal has changed to ComputeEastSouthUpToUnrealTransformation.
