Puddle System - 4 Examples, Footprints, Body textures, Customizable, Efficient, the only one you will need

So I’ve created a puddle system from scratch, I tend to make simulations and algorithms that power simulations. Some of my Community Resources Concerning this are here.

This is not just a blood system this is a puddle system. By rounding the droplets position using grid logic this algorithm grows puddles on the ground. By Raycasting It covers the limbs of characters the particle touches. If you step on a puddle you have footprints.
There are 4 Example settings in this, Blood, Mud, Honey, and Green Slime.
You can easily create your own by just copying and customizing these textures and particles in a directory.

Additionally, there is a waterfall feature in there for creating waterfalls. But I don’t know if it will be so useful.

Here is the module!

Instructions :
To use this module locally you would run it like this to do the blood effect.

require(game.ReplicatedStorage.PuddleSystem).Initialize().OnDamaged(game.Players.LocalPlayer.Character)

To make a dripper you could just easily clone this object or run the code inside the actor.

This code is very performant. Let me know what you think!
This is a unplanned release so in time I will try to post some screenshots illustrating the features.

Something you would want to consider is this function;

local function updateparams()
	if paramsupdate then
		paramsupdate=false
		params = RaycastParams.new()
		params.FilterDescendantsInstances = {workspace.Terrain,game.CollectionService:GetTagged("floorunion")}
		params.FilterType = Enum.RaycastFilterType.Include
		params.IgnoreWater = false
		task.delay(10,function()
			paramsupdate=true
			end)
	end	
	return params
end

In my project I use terrain and blocks tagged floorunion to determine when someone is inside of a building. So I was able to use it for my raycast parameters which includes the terrain and objects with that tag. So you can consider changing that to something more suitable.


Each dripper object has a configurable puddle size, as demonstrated by the configured objects.

local PuddleSys=game.ReplicatedStorage.PuddleSystem
local Puddle=require(PuddleSys).Initialize()
-- Example usage:
local basePart = script.Parent.Parent

local dripInterval = 2 -- Drip every 2 seconds
local puddleSize = Vector3.new(1,.02,1)
local puddleTemplate =nil-- script:WaitForChild("PuddleTemplate")
local PBR =nil --script:WaitForChild("PBR")
local Library=PuddleSys.Slime
Puddle.Set.PBR(Library.Textures)
Puddle.Set.CharacterTextures(Library.Textures)
Puddle.Set.Particles(Library.Puddle)
Puddle.Settings.Part(Library.PuddlePart)
Puddle.Settings.Tolerance(8)
Puddle.Settings.PuddleSize(12)
Puddle.Settings.DestroyDelay(18)

Puddle.Drip(basePart, dripInterval, puddleSize)

If you find the setup confusing try using a copy of this place file!

8 Likes

Showcase video perhaps? I’d be helpful

7 Likes

This sounds awesome, could you add a showcase video please

2 Likes

Blud jst make the showcase video atp :joy: :folded_hands:

1 Like

Okay! I have made a short demo video, and a open sourced the place file that I set it up on!
Featured are the preconfigured drip objects and the local implementation of a ondamaged function that does the thing.

1 Like

i love it when the puddles go through the floor and only show on the baseplate

for efficiency puddles are only forming on things tagged floorunion or terrain. This makes the system have a lot less overhead.

1 Like

Thank you very much! (word count)

1 Like

when there is a big puddle there can be flickering of the layers., is that because all of them have the same Z index, and are fighting? could each new layer have a higher z index # ?

when they are this size ( need to see the flickering when playing…)

also why are there so many foot prints? when there are only two on the screen?

like if I stand still in a puddle that starts to form, it keep makes more foot steps, even tho I am not moving..

1 Like

Thanks for the feedback! I’ll check on those and see about a solution to those two issues…
I’ve fixed those issues concerning the zindexing (which did not work so using a .002 variance in the y size this equates to .001 on both sides with a limit of .2 which it resets), footprint spacing, footprints while standing still. Also, I added something to make the footprints transition from one type of puddle to another without too many overlapping footprints. I also tried to improved the spacing of the footsteps. (different then this picture)

1 Like