Hi,
I was messing around with the PCG system and followed along tutorial posted here in Epic forums. I got the system working but then I decided to try and do something a bit different.
I wanted to have a bit more control over where the foliage spawns and made a spline going along the raise in the ground.
The problem I ran into is that it seems that foliage spawns either underground or using the “project onto surface” it almost works as it should but it still spawns weirdly.
Like this. So my question is that is there some setting or something in the code I could do make the foliage spawn on the ground like it should? Or is this done using the landscape spline?
Here’s my blueprint for the PCG, as said it’s mostly like in the tutorial series but I tried to make the spline stuff to work.
Bonus question, I couldn’t for the life of me figure out how to implement depth into water using a custom water body that is provided by the plugin. Nor could I figure out a easy way to make a spline to exclude foliage from spawning under the water surface.
Any help would go a long way!
Dpending on how you are adding the vegetation there could be a ton of different issues.
If foliage, your mesh collision on the foliage could be bad, leading to the system placing it badly.
If grass, the pivot of the mesh could be in an unopportune spot leading to the same issue as for foliage but with a different fix.
If neither, the landscape could need a quick scuplt mode touchup to get it to update its collision on that specific sction.
The only built in way to remove grass Or foliage with a spline is to hijack that same spline to paint a specific landscape layer onto the landscape.
With that in place procedural volumes (and grass) can exclude the area from the zone they populate.
Without the spline and withe the procedural spawner you can add a custom exclusion zone.
Without the procedural spawner you juse have to manually remove instances or not paint them there in the first place.
Meshes I used were from megascans if that might cause issues. As you can see from my code I was spawning the foliage using the PCG system, so I had the entire volume spawing them randomly, my goal was to try and use splines to make “zones” for the vegetation as I’ve seen it done on YouTube, for whatever reason it doesn’t really seem to play nice with higher topography.
And yea I tried a tutorial that showed the exclusion zones but something changed between versions and it doesn’t seem to work anymore.
So is the procedural system still better than the PCG system?
Different beasts.
I would stick to the older one as its more time tested…
Probably true lol, I just love messing around with new stuff and at least the simple volume spawner is easy to setup and it respects topography.
1 Like