How would i approach procedural mud?

Hello, im currently looking to break up the texture on my procedurally generated terrain by adding some mud/dirt trails. Although the problem is i have no idea how i would go about this, especially in a procedurally generated world like my game uses. How methods could i use?

2 Likes

Mud/Dirt trails would generally have a sort of path they follow and be in certain areas. You could just search for sections within your current terrain that meet the criteria.

Rough criteria
Mud/Dirt trails usually arent too far from water sources.
They usually run downhill sticking to low points

Using this you can find elevated water sources and start selecting terrain to be changed.
So from the water sources you would check with the area to find the lowest points, this would be the start location of the trail.
Then from there check within a smaller area for lowest points.
Take the general direction of this lowest point and change terrain along that direction to be mud.
Then repeat this process a number of times

1 Like

Can you provide some more details on what you’re trying to do? A drawing or example from another game would be great.

1 Like

I am trying to produce terrain similarto tyridge77’s procedural generated woodlands shown here:

Procedurally Generated Woodlands

So i have figured out a way, i have used another noisemap and clamped the values. if the value is above 0.4, it generates mud! (simplified). Here is the code:

local Dirt = math.noise(GENERATION_SEED * 2, cx / 100, cz / 100)
if math.clamp(Dirt, 0.4, 0.5) <= 0.5 and math.clamp(Dirt, 0.4, 0.5) >= 0.4175 then
      code()
end
2 Likes