I have 6 static mesh shapes, I need to create and place a lot of them with various differences. So I am making a blueprint actor, where I can basically use exposed enums to select what variation I want and code whether the specific elements are visible or not.
That part works fine, but one element I need to turn off and on, is foliage - e.g. grass.
Firstly, I tried to place one of my shapes in the world and use the foliage tool to paint grass all over then I intended to merge it into a static mesh and place it in the BP to control it’s visibility. However, it crashed trying to merge thousands of static meshes.
I was hoping to somehow spawn the grass foliage onto the static mesh but the procedural foliage volumes don’t seem to be in blueprints.
Is there a method of spawning foliage/static meshes onto a static mesh inside a blueprint actor that I am overlooking?
Ok, I see the confusion, I want to make 1 blueprint actor. I want to be able to place instances of it in different places around my map and control their transformations in a sequence to have them move around. But want to have different ‘conditions’ for each based on an enum.
Think of it like a car blueprint and I want to be able to turn things on and off or switch to different seats etc… only it isn’t a car, it’s more like a block of land that needs different foliage conditions that I can toggle through in the construction script.
If you could show me an example of how I would create my own foliage placement that would be amazing. Bear in mind that the shapes are all rectangles but the corners have been filleted (curved). I am going to have maybe 1000 instances of the bp, each I need to spawn thousands of foliage on so instancing is a must really.
Is this possible? Or am I going about the task all wrong?
I do see an instanced static mesh component I can add in the blueprint actor, but I have to add each instance separately. Is it possible maybe to make a volume or shape, set its size, trace down and on the first hit place an instance of my grass? Or better yet, place different instances with a plausibility of spawning to get some variation?
ISM yes, or HISM. If it was a grass clump, you only have as many actual meshes as your blueprint. Not too bad.
I think the problem, is that even if you could paint foliage all over them, when you move them, them foliage will not move with them.
Whereas if you use your own system, it will.
Also, if you REALLY care about only having only 1 grass mesh, you could instance it in the level BP or game instance, and pass a reference to that into your BPs.
There hedges are BPs with filleted edges and ISM ivy leaves
However it spawns from the corner, do you know how I might adjust it to let it spawn from the center and let me input the x and y dimensions separately?
I started off with ‘random point in bounding box’. If you make a thin collision box and put it on one side, this works pretty well.
In the end, because of the ivy mesh, and random Z rotations, having them in a grid shape actually looked better Although I’d recommend start of with random bounding box, especially if Z rotation doesn’t move the mesh much.
However, really oddly, a clump of them spawn at the world origin point. Don’t imagine this will really cause any issues but can’t really see why it’s doing it either…