As the title says, my procedural volumes are populating over my road mesh. Unfortunatley this is probably because this is a Landscape Spline and even tho I untick Static Mesh and check for collision etc. Landscape is enabled and im guessing the volume recognises the mesh as landscape not as a static mesh.
So my question is, without resorting to c++ (so entirley blueprints) is there anyway i can detect the texture below the foliage actor (well individual mesh not the whoel generated actor which is a bunch of meshes).
I would be nice if we could override the ray it casts ( or whatever method it uses to detect placement) and check whether it overlaps a spline mesh.
Any thoughts?
Edit: It seems we can filter by actor as it does show LandscapeSplineActor on a raycast hit to the road mesh, this would be good enough if we could filter based on class
Yeah i was thinking that, and i dont want to use volumes.
So. Im writing a editor utility blueprint to iterate through the foliage and test for the splines, or even the texture on the spline if that works. Either way it will detect if theres a contact and remove that mesh from the actor.
Might not be fast once i filled the world, but i can click it sip some coffee, and job done!
But a better solution would be preferred if there is one. so i leave this open for a bit.
that said, does a packaged game recalculate foliage? or do they remain as they did in editor?
In theory, no. The foliage instances take the transforms they are given and can only be modified by accessing the arry and manipulating the instance transform.
In practice, most of us use a render texture in the opacity output to prevent the foliage/grass displaying where we don’t want it to at runtime.
While that doesn’t move the instance it still manipulates where it “is” in theory.
Would not do this on things which have a collision since you wouldnt be able to shut off the collision without removing it.
In terms of easiest way to not paint foliage somewhere:
Using the existing landscape layer system is surely faster.
Creating a geometric volume and assigning it the specific class to block spawning would probably be the second best.
Modifying the engine/creating a plugin to specifically test a spline would be the least likely approach. Parly because splines are a single line, so you would habve to somehow map a distance from the spline or similar.
At that point it is acrually better off to paint the material and use the built in system…
You mention a render texture in the alpha, on the spline mesh or on the landscape.
If so can i use both the spline mesh alongside painting the texture to the ground. problem being with this if it would have to be invisible as the offset on the spline had to be quite wide to make the landscape adjust to the road mesh without giving me weird artifacts and bumps in the middle of the road.
Im not making a plugin per-se in my method just a blueprint utility that detects the spline mesh (normal trace detects that and not landscape but unfortunately the procedural volume doesnt take this as static mesh which would have been nicer!)
just a for each through each instance foliage, then loop through the static meshes inside of each actor and either delete the culprits or move them as they are easily accessible from their parent.
i would like a better method as if i wish to re simulate i would have to recheck them each time. Not a big issue (Yet!)
In regards to the projecting of the road onto the landscape, this would be using RVT which isnt a problem as such for me as i have made RVT landscapes before. But im using Brushify auto material which has its RVT pre set up, but it doesn work as intended for some reason. Once i got the volumes in both height and landscape RVT textures and i switch on RVT the texture goes black. So until i figure what Brushify is doing under the hood that isnt working right I kinda stuck other than rewriting the landscape texture from scratch, which is time less spent elsewhere.
Of the foliage. Not the landscape or the spline mesh.
A landscape spline already allows you to set a specific layer and paint it with a falloff.
So if you are using those already, why not just set your procedural foliage not to spawn on the same material used for the road?
Yeah that that thought has crossed my mind. I will have to put the road texture into the landscape which wouldnt work as its a UV mapped texture. So unless i can figure out why RVT isnt working im not sure how im going to do that yet. But as its a road , roadside normally has a bit of dead ground next to it i could try painting it with mud using the spline and hopefully the large fall off areas dont show too much.
Ok so it seems the foliage can be discrimninated against using both paint layer AND landscape layer. This is where i was getting confused. And coupled with the fact 2 of the foliage actors were not set to ignore the splines layer, whence the overlaps.
So i give this one to you @MostHost_LA as you definatley put me on the right track, i built the tool i needed within an hour so its there just in case
But yeah road ignored by landscape layer, foliage spawned using the grass paint layer, seems problem is solved.