SkinnedGrass - Performant interactive foliage

Is this practical for a real game? Would someone mind doing some benchmarks :3

Can you please provide the test place for this?
Also, can you provide a test place that automatically sets up the terrain with this module?

Thank you!

1 Like

hi, I’m done with this module for now (working on some cool stuff with editable mesh / image) so won’t be updating it, but I only got as far as manually setting up the grass on terrain with raycast commands

best used for small bits of grass not large fields, but it really depends on the settings - a low wind / collision radius will perform much better

Ah okay! Well how would you do that? The command I found doesnt work for some odd reason…

could you publish a demo place? as your " SkinnedGrass module (Roblox Studio)" video.

Back from my first questions :V, is there a way to automatically add these skinned meshes on grasss terrain?

This is an amazing resource, definitely using this in my game

Is it absolutely necessary for the meshes to be parented to a model? Is there a reason why? This just seems like unnecessary overhead.

actually the opposite, parenting a skinned mesh to a model improved performance when I was testing. couldn’t find any information as to why but i assume there’s just some extra optimizations, roblox is weird lol

Interesting. I will look into this.

I was wondering if you could make the grass collision to be visible to other players as well.

the grass is a client side effect so you can do that by passing other players’ positions into the collisions table

game:GetService("RunService").RenderStepped:Connect(function(deltaTime)
	local collisions = {character1Pos, character2Pos, character3Pos, ...}

	grass:Step(deltaTime, collisions) 
end)
2 Likes

This may have something to do with assemblies. Raycasting near a single assembly vs hundreds of assemblies is faster in many cases, since the near phase, and potentially the broad phase is much narrower. In the case of raycasting it can mean more complex intersection but because of the other benefits it can actually end up being faster.

1 Like

interesting thanks for the input

We’ve had this in the Wild West for years with lots of dense grass around the world. (Not this module but the same thing), and we never had any issues. We just have a target budget per frame that it adheres to

I can’t speak for all the performance stuff this does or doesn’t do but the concept of this is very much useable in a game if you know how to optimize it

(I’m saintimmor but on my phone :sob:)
Your correct. I just meant that this specific resource isn’t the most performant and especially for grass filled games like the Wild West, it’s going to be completely tanking fps.

However my suggestion to just add engine grass physics instead of having developers make it themselves is something I still stand by.

OBVIOUSLY most Roblox devs aren’t as good as unity or unreal devs on average. This is why I’d like engine grass physics instead of a module to do it.

Also, would you mind sharing how you budgeted? I’ve already tried doing that with this system but, with my specs (AMD 6800xt, I5-13600k, and 64 gig ram) I had a astonishing 60 fps average with only 10 of these placed in a 50x50 radius.

If you’ve seen boatbombers cullthrottle we do something similar for everything in our game

But the simple idea is that we only update things so many times a frame before hitting a specified ms budget and then we stop. In the case of stuff like grass we just do this and have some fancy stuff to determine which grass patches get priority for updating and determine the update rate depending on that. Bit more complicated than that to make everything smooth and look good but that’s the basic idea

so this is just cpu time stuff, to save on render etc we have a streaming system too

Have not seen that. Do you mind linking it to me?

Yeah I did think about making a streaming system but im not the greatest of scripters and never got to figuring that out.

Okay so I completely take everything that I (Including @AccursedHeaven) said back.

This module is SUPRISINGLY performant. I was using another “wind” module (WindShake) and this is much more performant.

I want to explain why I trash talked this so much.
On my first use I actually set one of the settings to a VERY high number that caused it to be incredibly unperforming… Yes I am aware that my actions were stupid please do forgive me.

I recommend using this resource! Its definitely game ready and viable for that. Maybe not on super low end devices but for essentially anything else this is 100% the way to go.

Again, my apologies for not realizing the quality of this resource.

4 Likes