Optimized Interactive Grass Plugin

well the radius system is good because it’s distance, occlusion culling is for objects that are not in view of the camera, such as objects behind the player’s field of view. It’s important not to do it every frame though as that could cause performance issues, this would allow the code to skip animating grass that is not seen by the player. It would be best to incorporate it into the radius calculation, so if the object passes the radius calculation it is checked for occlusion or vice versa

1 Like

are you not gonna update the model?

V1.5 Release Notes

More WindShake Optimization :leaves:

This was just a small optimization update, enjoy!

I saw your stream and can’t wait to start using yours lol

1 Like

I just purchased the Interactive Grass Plugin, but one issue is bothering me: it is not strictly typed.

I’ve taken on the challenge of making the Interactive Grass plugin strictly typed. It’s now 99% complete! Additionally, I’ve optimized it a tad bit for better performance. Feel free to reach out on Discord if you’re interested: 6laise

1 Like

Thank you for purchasing it! What changes did you make to optimize it further?

For anyone that is bothered that it resets the orientation of the grass to a default direction which makes it a struggle to add variation (For example, grass that is rotated all over the place to make areas look better will all be set to straight upon joining), I’ve add a new option in the config SetOrientation = true which will on default will set the orientation when it sets up the grass. You can set this to false to keep it the same orientation, which will allow for more variation. Although, it adds a springy bouncy effect and It doesn’t really look as smooth as with it set to true. I have figured out a workaround to this, which I’d suggest you do rather than turning that option false. All you need to do is create a part and call it something like “GrassHitbox” (Make sure its around the same size as the grass) and then unanchor the grass, and weld those two together using weld constraints. Make sure you untagged the actual grass, and tagged the grass hitbox part. After this, you can group the hitbox and grass for organization, and rotate the grass to how you want. This’ll create that smooth look you want, while make the grass rotated to any way you want. (Update by pressing the install button again (If you prefer the new config option simply update again by pressing the install button which will overwrite the code.)
image

If anyones confused about what I mean, if you want a varied grass patch like this
image

Upon joining, the grass’s orientation will be set to this
image

Obviously this looks pretty bad, which is why I added this config.

Heres some videos comparing them:
SetOrientation = true

SetOrientation = false

(edit one day later: ignore this post, ive removed the setorientation config and on default none of the grass’s orientation will be reset. ive found out a good way to make it smooth without resetting the orientation)

Thanks to everyone who bought the plugin I genuinely didn’t expect people to actually buy it, I would make it 100 robux if I could and feel free to request features or report bugs :pray::pray:

I have cached everything that could be cached.
Please contact me on discord if you could! Username: 6laise

I have identified two bugs so far:

  1. The system doesn’t function properly for multiple players. For instance, the grass only moves for a player when a second player enters the grass.
  2. The grass does not reset to its original position when a character dies.
1 Like

V1.6 Release Notes :tada:

Bug Fixes :hammer_and_wrench:

  • Grass now supports multiple hitboxes; this means you can see when other people move around in grass, or when a car drives over a patch of grass.
  • Grass now resets back to its original position if you die while standing in grass.
  • Orientation no longer resets to a default position, so now you can add variation in your foliage.
    • SetOrientation config option removed
  • The plugin will no longer duplicate the “Hitbox” part in replicated storage when overwriting the code/updating the code.
  • When creating the players hitbox, it will use align orientations to keep the hitbox still rather than rotating it if you want to use a box for the hitbox

New Config Option :gear:

  • ExtraLogging – Extra debug logging, may flood your output; must have Enable Logging set to true for this to work

How can I make Interactive Grass support more things? (Cars, NPCs, Animals, etc) :red_car:

To make Interactive Grass in Roblox support more things like cars, NPCs, animals, etc., follow these steps:

  1. Create the Hitbox Part:

    • Insert a new Part into your game. You can choose any shape (e.g., Block, Sphere).
    • Set the Part’s Anchored property to false.
    • Set the Part’s Massless property to true.
    • Set the Part’s CanCollide property to false.
    • Set the Part’s CanQuery property to false.
    • Set the Part’s CanTouch property to true.
  2. Position and Size the Hitbox:

    • Adjust the size and position of the Part to appropriately cover the object you want to interact with the grass.
  3. Weld the Hitbox to the Object:

    • Insert a WeldConstraint into the Hitbox Part.
    • Set the Part0 property of the WeldConstraint to the Hitbox Part.
    • Set the Part1 property of the WeldConstraint to the object (e.g., car, NPC, animal) you want to interact with the grass.
  4. Tag the Hitbox Part:

    • Ensure you have the Tag Editor plugin installed (you can find it in the Roblox library if you don’t have it).
    • Open the Tag Editor plugin.
    • Select the Hitbox Part and apply the Hitbox tag to it.

By following these steps, your interactive grass should now respond to the interaction of cars, NPCs, animals, or any other objects.

Plugin uses widgets now :partying_face:


Enjoy the update! :rocket:

1 Like

Thank you for reporting those bugs, all of them have been fixed. I’d prefer talking here about it, or you could send me a private message.

V1.6 Release Notes :fire:

Small Changes :hammer_and_wrench:

  • Code is now strictly typed, aswell as more organized and clean.
  • The players hitbox is no longer parented to a folder, they are now under the players character model.
  • Testing place now includes an FPS counter so you can see performance.
    • Testing place now has more visual effects, such as a bobbing camera, dynamic FOV, particles, more foliage like trees and bushes, ability to toggle WindShake on and off, signs that let you know the amount of grass meshes in a patch, wind lines, and better lighting.
  • The players hitbox is now set to a block on default rather than a sphere for more accuracy.
  • Fully fixed the reset orientation bug :partying_face:
  • More functions for organization, such as local function playSound(hitbox: BasePart, part: BasePart): () and local function toggleWindShake(boolean: boolean)
    • A sound limit has also been added to limit the amount of grass sounds at once for performance
    • New config option: SoundLimit = 25 – Limits the amount of sounds that can be played at once to not overload the players client.

More Widget Buttons :red_circle:

Tag Hitbox :green_square:

  • Tags the selected objects to make them a hitbox/interactable with grass.
    image

Untag Hitbox :red_square:

  • Untags the selected objects to make them not a hitbox/not interactable with grass.
    image

Update Grass Physics :arrow_up:

  • Updates your scripts with the latest available code.
    image

Close Menu :x:

  • Closes the widget.
    image
1 Like

V1.7 Release Notes :thinking:

New Button :blue_square:

  • Removed the “Close Menu” button and replaced it with a create hitbox button.
    • This new button simplifies the process of creating and modifying hitboxes for selected objects. This button is useful for adjusting the size of an object’s hitbox without needing to unanchor the object, create a new part, manually set its size, position, and other properties, as well as weld everything together. The button automates these steps for you.
      image

how do i get a copy of the plugin, plugin page button is blurred out

for some reason roblox made it off-sale, idk why, it couldve been when i was updating it i accidentally made it off-sale or something. try it now, it should be for sale now

uhm i cant access the plugin link

1 Like

Roblox put it off-sale randomly, and when I try to put it back on-sale it just goes back to offsale :man_facepalming: I’ll try submitting a bug report or something cause I’m not sure why this is happening

1 Like

Try making it free :wink:
characterlimitttt

1 Like

Kinda have to agree here, especially since there’s mention of using code from Tutorials. If this was fully coded by him id fully support the 4.99 price tag. I do understand he’s put effort on top of the tutorial code and obviously he needs to have financial incentive to keep motivation in what he does but maybe this could be in the form of donations or pay what you seem is fair (similar to itch.io). Possibly this is a harsh take but it seems the most fair and logical and would definitely attract more people to this work.

1 Like