Player or AI created Paths within foilage

So it’s a fairly simple concept.
Have a field of tall grass, where the player and or animals walk through, it gets knocked down.
Over time, (and use,) it will become a recognizable path, more time the vegetation stops growing there and it becomes ‘dirt’ or a worn path.

These are actually one of the things hunters look for, by the way the grass is laying you can tell which way the animal is heading.

So Unreal has dynamic grass, it can be placed and wind added, looks great… but how would I go about creating said trails or paths.

Is there a way to track where a player has been, and if they go that way again? Example being, you start at point 1, you go to point 2, (knocking down the plant life as you go,) turn around and it is very evident where you were walking, (foot prints?) So you go back the same way, plants even further knocked down. Next day or need, you do it again, point 1 to point 2… Well you get the idea, eventually that route is going to become a pathway.

Any ideas on how to implement something like that?

Thanks,
CW

Not with ue4 or 5.
Not without a custom c++ data module in pretty much any case.

You can think of trails as a texture.
Multiple players can draw on that texture. The size and detail of that texture is limited by the engine to 8k. And pretty ■■■■ expensive.

You are better off testing how much detail the 8K texture can support when stretched via UV to cover larger areas, than doing the reverse math (8k on an 8km landscape is 1px per meter, so theoretically reducing to 4km is 4px per meter, and 2km would be 16px per meter - chanches are this doesnt hold up in practice).

When creating c++ module you could assign a different texture to each different zone matematically…
But to write into the texture it has to be loaded in memory, so you will hit performance issues unless you really study what to do, and more importantly how to do it.
How will something know what texture to write to? Can it write into it? Is the memory buffer empty enough to not cause loading hitches, etc.

Then you have the render challange. Its absolutely possible, but you need to figure out how to do this in the engine with a material on a single mesh:

At that point, you can re-do the texture write part to use vector fields for grass displacement, and you get somewhat decent results.

All of those results ofc dont mean jack when the engine refuses to run at 60fps or more.
So then you start using a better engine ad re-implementing the whole system :slight_smile:

Obviously, the new engine won’t work the same as unreal, so youll have to re-study how to get vector fields to work in an environment that isn’t crippled by stupid ad-hoc choiches. Best tip on that is to go back to the math.

Best case scenario, doing things proper, will take between 1 and 2 months of development time and learning.

Pro tip, find a different forum for help.

1 Like