I’m using my own static mesh as landscape, and trying to use a Procedural way to populate it. Procedural Foliage Volume does a good job for non-dense objects(trees, rock, bushes etc.), but for grass I can not figure out how to do it.
I tried making a plugin on c++ but I couldn’t… no tutorials, no beginner-friendly API documentation. Maybe there is the way to manipulate foliage instances through actor script, but i can’t find any information how to do it.
For your needs ( totally guessing here ), I’d say a collision box would do the trick. The blueprint can choose random points inside the box and do line traces to the landscape or mesh, and put the foliage there. Easy to add height sensitivity later etc.
Tell me if you can’t get it working, and I’ll drop some basic code in here.
I can’t drop the whole BP in here, because it wouldn’t make any sense to you. It has all sorts of stuff you don’t need to get this working.
Let’s get the first step working, which is spawning meshes on the surface of the sphere. If you get that sorted, we can expand it to do HISMs, which is how the foliage system works.
So the basic setup, is to have a loop, get a random unit vector, multiply is by the radius of there sphere and then plonk the mesh there:
I started implementing your blueprint snapshots but I am having difficulties because Iam not good ad blueprints. I use UE4 with C++
I spawned sphere and edited it Event Graph. After BeginPlay I’ve put for loop but I dont know where to find SET Random Unit V.