Introduce an interactive grass system!

Woah, This is awesome!
I Would love a plugin!

4 Likes

Great Idea! This would be a great and needed plugin!

5 Likes

Did you create the plugin? Because i would use it A TON in my games. Because my games have a ton of grass which i would love to be interactive.

4 Likes

He did, just not released yet.

3 Likes

Yes, i have talked with him. He said that the plugin is probably releasing in Febuary.

3 Likes

Looks amazing! The grass does seem a bit bent over to much. I suggest adding grass of all sizes and making it less bent to add more of a realistic look.

3 Likes

I think that we should be able to add custom textures or add PBR textures to the grass, either way, change the mesh if thatā€™s possible. Also, settings for the grass, how it will bend, etc.

2 Likes

Would this be or is it already open source?

2 Likes

I think they were going to make a plug-in, but it would be totally up to them.

2 Likes

looks beautiful, as @AirWward said, it remembers me of some games, that grass remembered me of The Last Of Us: Part 2. Nice job

2 Likes

Any update on whether you will release this? Rlly need smth like this for a game :wink:

3 Likes

Well done! I would jump on this plugin in a heartbeat

3 Likes

Dang, touching grass to a whole new level. Has this been released yet?

3 Likes

Now I want make something like this myselfā€¦ (I will try make it!)

3 Likes

Question as a fellow dev! How did you manage the touch connection? I know .touched is a poor solution to detection, so Iā€™m curious as to how you went about determining when the player is touching the individual blades of grass?

2 Likes

I think it will depend on how you want to handle this and how many blades of grass you had.

For fewer blades

I would use math and calculate the magnitude distance from each grass blade. This would also allow you to create more or less bend the closer you get.

I had a stab at doing this with just blocks, and achieved the following:

I did this by:

  1. This loops through the grass in a grassfolder (which took 0.007927700004074723 seconds for 2048 parts) to store the original CFrame as an attribute.
  2. Connecting a runservice which then checks for a desired interval (so it only runs the code in it once every 0.1 seconds - this is better than using a while loop with task.wait()).
  3. Looping through all the parts in the grass folder.
  4. In each loop, it then checks the magnitude between the player and the part, calculates a new CFrame depending whether you are within the set distance or not.

It was a total 41 lines of code.

For unlimited blades

For very high numbers, you might want to use the touched event instead. This wouldnā€™t allow you to control the bend beyond just moving when you touch it (rather than bending as you get close).

However, an alternative would be to group grass togther in models, and do the same as the first option, but first check the distance between player and model, and only run the checks on individual blades if the whole group is within a certain distance, which would optimise it for performance.

Given Iā€™ve spent some time work this all out I may implement this in my own game :stuck_out_tongue:

8 Likes

And hereā€™s a version which uses a plane meshpart with a surface appearance on (grouped in models so that only close groups of grass is calculated).

Iā€™ve mixed it in with roblox terrain and grass so you can see how it might look if you used in conjunction.

14 Likes

TSYM bro gonna have to put the work in for this.

2 Likes

Just wanted to say that I am still amazed by this

I tried to do it myself for weeks but I failed (I build but 0 scripting knowledge, had to try :pensive:)

2 Likes

Absolutely revolutionary. I need this.

3 Likes