[Big offer Save $600✅]Infinigrass-GPU Optimized Interactive Grass-Trees-Meshes, mobile,HDRP-URP

ARTnGame presents the next major asset, InfiniGRASS.

The system can paint ultra detailed static or dynamic grass everywhere, without any limit in shape, form, shader or placement surface. It is possible to apply any amount of grass anywhere, on objects or terrain. Based on a custom multithreaded LOD and AI system for ultimate performance and adaptability, from higher end systems to mobile (mutlicore is recommended).

The grass may also be grown dynamically in real time and the player can interact with it, by chopping or stepping on it.

The core system works on all platforms, but the grass shaders that will initially come with the pack are SM3.0 and the mobile varieties will come as a bonus later.

Initially the system will come with 6 grass types and shader varieties (vertex and transparent based), an editor to place grass, real time placement option and a complete fence creation and rocks placement system.

Tutorial videos playlist

FAQs

InfiniGRASS FAQs (WIP)

Q: Are there video tutorials for the system usage ?
A: Yes, i have multiple tutorials that can be found in the follwong playlist (use the link and the rest of tutorials are on the right side panel of youtube playlist)

https://www.youtube.com/watch?v=l-apm8ZcZuc

Q: I use lower scale in grass than the default 20 and get strange waving motion. Is this adjustable ?
A: Use the “Stop motion distance” variable in brush settings, after pressing on one of the icons (the slider will change the value only for this brush) and set it lower or to zero to see if fixes the motion issue. Then you can use much lower values in this too.

Q: On low grass, any setting in Stop Motion distance will still give a big Y displacement on lower world scale.
A: There is a new version of the low grass shader, that can adjust a max height in the Y disaplcement to fix the issue. Available on PM request immediately.

Q: The grass wind is too high and cannot be regulated, sliders do not work
A: The system will work after adding wind zone, this is essential as it grabs the windzone direction to regulate the wind

Q: The wind effect is still on after setting wind to zero
A: Set also Turbulnce to zero to get a complete stop of the windy motion

Q: Can i fine tune the wind and turbuelnce stranghts per material, to regulate for the various grass types ?
A: This is possible using the various on material parameters (not available through the Grass Manager). The “Wave control x axis” & “Wave control y axis” will enchance the wind effect on the relevant direction over the global wind strength. The “Waves” and “Time” vectors will regulate the frequency of grass turbulence and the “Buldge Scale_copy” variable is an offset to the global Turbulence strength. The Grass Manager regulated variables are “Buldge Scale” and “Ocean center”, which pass the global paramaters to the shader.

Q: I want to paint with left mouse button, because i use a pen or the right mouse rotates the view
A: There is a patch available immediatly on PM request to allow painting with left mouse button. To avoid rotation of the camera during right mouse painting, while holding the right mouse down, also press the left once, this will lock the camera rotation until the right mouse is de-pressed.

Q: What is the right way to use a lower scale in the world ?
A: First set the World Scale and then choose a brush icon to setup for that world scale as first step before planting. The “World scale” does not do any actual scaling, it only scales the preset paramaters when a brush icon is pressed to be better suited for the selected world scale. Also the World Scale will affect the maximum possible density value in the Mass Plant system (this is done to avoid using big densities in very big areas, as in v1.x this can make Unity unstable). In v2.0 this is solved by not growing the actual grass all at once, so any number of maps can be planting in one Mass Plant application directly.

Q: Is there a latest demo for the v2.0 of the system ?
A: The latest demo can be found in the follwoing link
InfinigRASS v2.0 - Sky Master v4.0 Full volume clouds demo:
STREAMING E1d PC DEMO FINAL6f_test7a1_PC.rar - Google Drive

Q: Mass Plant does not seem to work.
A: First make sure the density mentioned in the Grass Manager is above zero. If it is zero increase mass plant density slider and also change the World Scale to allow more density in the slider. The two corners must be above the ground where the planting will happen and also corner B must have higher X and Z axis coordinates than corner A (otherwise corner B will return to corner A)

Q: The grass is not planted if there is a collider in the scene over the terrain.
A: The grass uses a raycast distance parameter while planting to determine where the raycast to plant will start from. Regulate this parameter to the grass raycast starts lower or inside the object with collider (the collsions happens on top or bottom surface of the box collider for the example, so having the low part below ground and top part high, will still allow to plat grass with a raycast that starts low above ground to be below the top and above the bottom which is below the impact plant point.

Q: The results in the pics look better than the grass system when used in my game.
A: The pics use the same system, so it is possible to get the exact same look, the difference is because i also use my other packs (mainly Sky Master ULTIMATE - Sky Master ULTIMATE: Volumetric Skies, Clouds & Weather | Particles/Effects | Unity Asset Store) to regulate the lighting, volumetric lighting and fog and shadowing, plus image effects to get the perfect look. For every user that has both assets, i can also send scenes prepared with both as a more complete demo to work with as base, on PM request.

Q: Can the system be used on mobile ?
A: Many users have used it on mobile with various results, the system has a SM2.0 compatible shader for the older devices and a lot more enchancements will come in v2.0 that will further help mobile (batched billboards, pooling, zero in game batching, much less allocations etc)

Q: The grass vanishes very close to the player-camera
A: The shader has a fade option that makes the grass fade out in a defined distance from the camera. This is defined using the “Grass Fade Distance” slider in the brush settings, for the currently selected grass brush icon.

Q: The grass is very slow and performance is taking a big hit
A: The system is based on batching the grass. Possible reasons for batching beeing broken include copying a Grass Manager from another scene when grass has been planted, missing meshes on the brush objects in custom brushes and missing materials in the customized brushes. If the batches count in the info window is very high, means that the system is not working proper and is best practice to create a Grass manager from scratch and always plant and erase grass through the manager, to be on the safe side.

Q: In interactive grass demo the performance takes a hit
A: The interctive grass demo uses the older versions scripted interaction, which opens up the batches, does the scripted changes in CPU and closes the batch in run time. This can be taxing on CPU and create spikes, based also on grass type and grass density. The newer versions (v1.5 and above) have a shader based temporal interaction mode (governed in radius by the Stop motion distance variable) and this shader is used by default, so it is advised to avoid the Interactive grass options in the brush settings, as this mode is for special cases and use the new GPU mode only. The coming v2.0 will have GPU based permanent grass interaction, which will be exponentially faster than the scipted mode as well.

Q: How do i define LODs for a brush ?
A: The LODs are defined by adding objects in the brush that have a material with LOD0 (or LOD1, LOD2) in the brush name and also have shadow cast & receive disabled (use Debug unity mode to disable shadow receive when in Deferred camera mode, or set to Forward to disable and back to Deferred). The objects can be anything, easiest is to copy the existing objects and change the material with the LOD named one. The MeshFilter component must also be disabled (otherwise the LOD meshes will ficker out when the game starts).

Q: I have a vast world and want to plant it all. Is this possible ?
A: Yes, but is advised to do so using multiple Grass Managers, each covering a specific smaller region. This has the advantage that the manager and its grass can be disabled when the player is away to save on performance and LOD change checks. The GrassManager holder references to the batched grass (“InfiniDYForest” items in the hierarchy) in the “StaticCombiners” public list, which can be grabbed from script directly from the manager in order to disable in a possible higher level LOD manager. The sectioning of terrains with a Grass Manager grid and disable of batchers is automated in the upcoming v2.0 of the system and happens when mass planting the terrains.

Q: A brush has more than one materials that require wind parameters, how is this handled ?
A: There is a “Extra grass materials” list in the Grass Manager, that can hold an extra list of materials for each grass type, assign any extra materials in this list, for the relevant brush type (extend the “Extra materials” list with setting its size above zero first, then drag and drop the needed extra materials)

Q: I cannot plant grass on a mesh terrain
A: To plant on meshes, the mesh must have the “PPaint” tag applied on it and also the “Paint on ‘PPaint’ tagged” checkbox in the Grass Manager must be checked. The mesh must also have a valid collider for the painting to take place.

Q: Can i set the brush so it always looks at a certain direction ? E.g. for trees to always look up, vines look down
A: Yes, the grass grower script has such an option, in “InfiniDyGrassField” script in the grass grower prefab of the brush, set the “CustomRot” checkbox and the “RotTowards” checkbox to true and use the “RotVector” vector to define the direction to be used instead of the surface normal. For example (0,1,0) can be used for trees looking up and (0,-1,0) for vines looking always downwards.

Q: The editor gets slow after planting lots of grass
A: The editor can have extra overhead when lots of items are in the scene. There is a “Editor view distance” slider that can lower the visible grass in the editor, thus increasing performance and allowing faster planting. Also it is advised to use more than one Grass managers, and “Ungrow” each and have only one active for planting each time. This increases editor performance a lot and is also usefull in play mode as an extra LOD system can be possible with disabling the far away managers.

Q: Can the system plant on any orientation and surface ?
A: Yes, the system can plant on multiple overlapping layers and below surfaces or on angled surfaces etc

Q: I cannot Mass Plant on a terrain when i have many terrains in the scene.
A: First disable the other terrains and leave only one that will plant on, then do the mass plant, repeat for the rest terrains

Q: I cannot paint grass on the Unity terrain
A: If more than one terrains is on the scene, tag all terrains with “PPaint” tag and enable the “paint on PPaint tagged” option to paint on all at once.

Q: The erase function is not working or not always working
A: Use the Mass erase checkbox option to erase grass en mass, in the single mode each grass center collider must be hit in order to erase the grass patch. The system relies on raycasts and thus also may require the “queries hit triggers” to be enabled in the physics settings (usually this is on by default, but perhaps has been disable for other functioanilities or gameplay situations).

I attach a first WIP version for the new FAQs guide, i have created it from various issues that come up frequently, so these should help clarify some major points for starting with the system and tweaking it. Some of the issues that come up above are also addressed in the upcoming v2.0 in automated or more streamlined ways.

TUTORIAL VIDEOS: http://forum.unity3d.com/threads/infinigrass-holiday-sale-fast-next-gen-interactive-volumetric-grass-everywhere.351694/page-4#post-2405601

DEMOS (These are WIP demos and a lot of further optimizations have gone in the system, final demos will be released soon):

InfiniGRASS (v1.1) paint grass (and fences-rocks) demo
https://dl.dropboxusercontent.com/u/79230236/INFINIDY/INFINIGRASS/INFINIGRASS_PAINT_DEMO.html

InfiniGRASS (v1.0) demo with Sky Master v3.0 Snow-Water-Sky-Rain
https://dl.dropboxusercontent.com/u/79230236/INFINIDY/INFINIGRASS/INFINIGRASS_SKYMASTER3_DEMO.html

Instructions:
-Paint grass with right mouse button and erase with left.
-Paint fence with right click and stop painting with fence paint toggle button.
-Paint rocks with right button, erase with left. 3rd rock type can be painted on itself !!!
-Press “Interactive on” to plant interactive grass, use for tall grass and use “cast ball” toggle to cast balls on the grass. Use small brushes for best dynamic result.
-The hero can also step on the grass (if balls are not activated)

  • Toggle snow and water (and rain in special FX) in Sky Master demo to see how these extra FX integrate with InfiniGRASS



Round planets - InfiniGRASS fully supports any surface


Grass Interaction - Before stepping on grass


After stepping on grass

Uber detailed grass

Fully compatible with Sky Master ULTIMATE 3.0 (volume fog, image effects)

Endless Fields, placed in editor or real time

(Note: The pics are from WIP and the system has grown a lot since they were taken and is constantly polished for perfection. SpeedTree trees will not be included in the pack and can be downloaded from Unity store for free)

Videos and images from the latest version will follow soon.

All the grass, rocks and fencing in the images is placed/created with InfiniGRASS.

Sky Master ULTIMATE customers will benefit from specially made shaders that support the new global snow coverage feature that will be included in the upcoming v3.0.

4 Likes

Video with Sky Master ULTIMATE v3.0

DEV LOG

1.9.9.8k

  • Added fix for Linear color space in lawn mowing demo, to make the cut grass appear correctly in lower height than the grass that is not cut.
  • Added new version of the lawn mowing demo with further LOD distance for grass, bigger grass size and thickness and readjusted shader fade distance to smoothly fade in and out the grass before is cut off in the LOD distance.
    1.9.9.8j
  • Added information on access of the URP and HDRP Beta versions on the asset readme, for direct reference.
  • Regrouped demo scenes in a MAIN DEMOS folder for more clarity on the latest demo scenes location.
    1.9.9.8i
  • Added new lawn mower demo, with thicker grass, wider mowing range and effect on wheat as well as grass.
  • Added demo scene to compare InfiniGRASS to Unity terrain grass.
    1.9.9.8h
  • Added lawn mowing demo and controller of the system (Video 1 -
    https://www.youtube.com/watch?v=TN3Z3qKgP7o)(Video
    2 -
    https://www.youtube.com/watch?v=NX7H-VVDNik
    )
    1.9.9.8g
  • Added new dither control for lowering the grass and shadows density uniformly in shader, in the grass material. The next version of this system will also dither based on distance, so foliage can be full thick close by and less dense further away.
    1.9.9.8f
  • Added demo scene that uses the plant around player script in combination with the new grass shaping module, adding interactors to the player camera which can affect the grass in various ways, default is erase it. Also made video to showcase the effect (
    https://www.youtube.com/watch?v=_bS0d9_Ydz4
    ).
    1.9.9.8e
  • Added extra checks in the new grass shaper module to avoid errors when try to set the above 64K mode to mesh before its creation.
  • Added Single Pass Instanced VR support for the main grass shader, tested in MockHMD
    1.9.9.8d
  • Added an option to disable the automatic update of the editor far view distance for the grass when pressing on a brush icon, which would reset the editor far view distance based on the current world scale.
    1.9.9.8c
  • Refined demo scenes and removed the legacy GUI warnings when opening some of the demos.
    1.9.9.8b
  • Added extra checks in the new grass shaper module to avoid errors on insertion of the script to a gameobject from scratch.
    1.9.9.8a
  • Removed missing prefabs from mobile demo scenes, which created an issue in Unity 2021.
    1.9.9.8
  • Added new mode with texture control of grass, enabling permanent grass shaping and interaction in both editor and play time. The system allows for Interactors to displace the grass, use of a single sprite sheet with many grass types and direct painting of grass type using a single optimized material, directional combing of grass and grass erase in shader by size and displacement.
    This is a major update to the system and a first version of this new module, thus will be in work for refinement and tutorials in upcoming updates.
    1.9.9.7e
  • Added new blend method using a top down rendering camera to grab terrain color and texture.
    1.9.9.7d
  • Added new demo showcasing the vertex coloration mode by ground texture and more options for the coloration tinting over the base color grabbed by the raycast to ground texture
    1.9.9.7c
  • Added new no Grass Manager mode demo and instructions
    1.9.9.7b
  • Reorganized the asset folders and placed all scripts and shader under a single folder, also the root folder now contains only the 3 main demos and the newer demos showcasing various gameplay possibilities and run time planting will be going in the EXTRA DEMOS folder.
    1.9.9.7a
  • Added option in the planetary planting to force all brushes be planted in radial way if are directed to a specific direction in their main setup
    v1.9.9.7
  • Added mobile demos with mobile friendly interface for planting and move around map
  • Added option to use beyond 64K vertices batched models for Unity 2018.4 and above
  • Added note in the Grass Manager that the meshes inserted in the brushes must be
    read-write enabled in the mesh import settings for the system to be able to batch them
    v1.9.9.6j
  • Added global snow coverage controller to the SpeedTree demo
    v1.9.9.6i
  • Added new Speed Tree sample brushes and related demo, with focus on optimization
    v1.9.9.6h
  • Added run time planting on a spherical planet and a demo scene showcasing the new system.
    v1.9.9.6g
  • Updated documentation - video tutorials
    v1.9.9.6f
  • Added more optimized multithreaded version of the tile based planting system and new demo showcasing the new possibilities
    v1.9.9.6e
  • Added control over the grass types that will be randomly selected to be planted in the new run time tile based planting module. This list can be modified also at run time to create new tiles with specific sets of grass types.
    v1.9.9.6d
  • Added tile based map planting demo and controller script
    v1.9.9.6c
  • Added deferred shader option (“InfiniGRASS Directional Wind ROOF Deferred”) for the case where pure deferred shading may be required, e.g. if using certain ambient occlusion assets. The shader is the first Beta version and will be WIP for some more time until the final release.
    v1.9.9.6b
  • Added new demo for showcasing the delayed per brush stroke re-planting system, used with the new run time grass saving and loading feature
    v1.9.9.6a
  • Added a delayed per brush stroke planting system for the new save-load grass run time module, this can enable the recreation of the grass planting process in time, than just load the grass whole. Sample video
    v1.9.9.6
  • Added a new system to save and load the grass planted during run time, for transfer of run time planted grass to the next scene or load it with a previously planted scene as needed. Sample video
    v1.9.9.5
  • Added new demo for planting at run time using the left mouse button and clear code for planting outside the main Grass Manager, to be used as base for any other planting during gameplay.
    v1.9.9.4
  • Added demo showcasing grass planting in run time of a rotating - moving - scaling mesh.
  • Added snow control script for adjusting the global snow coverage for all grass.
    v1.9.9.3
  • Added new demo with run time instantiation of a prefabbed item with pre-grown grass on a mesh.
    v1.9.9.2
  • Added option to evenly scale grass for the case no grass height variance is needed
  • Added option to make grass shadow brighter with adjustable brightness
    v1.9.9.1
  • Added golf course procedural creation at run time script sample and demo scene. The script will be further augmented in next version to do multiple passes for planting more grass types on the different golf course land types.
  • Added link to latest manual in the ReadMe file in the asset root folder.
    v1.9.9
  • Added erase option to the real time planting of grass around the player module
    v1.9.8
  • Added option to not restore the grass prefabs in the editor after removing the initially added preset brushes
    v1.9.7
  • Added first Beta version of LWRP-URP shader
    v1.9.6
  • Fixed issue with point and spot lights, where the edge would finish suddenly with a square look. Lighting is now smoothly blended in grass based on light attenuation.
    v1.9.5
  • Moved documentation to Google Drive, for easier access to updates.
    v1.9.4
  • Fixed issue when building the game, removed editor only code from build mode
    v1.9.3
  • Fixed issue in Unity 2018.3 with new brush creation, because of the new way Unity handles prefab editing.
    v1.9.2b
  • Adapted for Unity 2018.3
  • Fixed issue with vertex (Zelda style) grass, where it would not interact with player using the shader based interaction mode
  • Added demo scene & script for real time growth of foliage around the player (Use the “Grass_selector” variable in the “InfiniGRASSPlanterHERO” script to choose grass type to plant.)
    Video:
    https://www.youtube.com/watch?v=qTcOYwK9c5A
    https://youtu.be/som5m3CftnY

Performance showcase







More performance tests and all WIP updates will go in the WIP thread.

1 Like

Real time grass painting demo - coming soon

The next demo will be real time painting oriented and optimized for this functionality.

The current demos are a showcase of the overall system and while they can be setup for real time use with the demo GUI parameters (smaller density and spread to cover the same grass with more strokes), it is best to have a demo that has the proper parameters pre-defined for clarity.

InfiniGRASS has been submitted to the Unity Asset Store !!!

The pack will be at an introductory lower price for a few days.

http://giant.gfycat.com/DependableOccasionalFlatcoatretriever.webm

Small video of grass on hills (recorded with Bandicam, so there are a few skips, normally it is 60fps throughout)






InfiniGRASS v1.0 has been released on the store !!!
Link:
http://u3d.as/jiM
Everyone that would like to have v1.1 that has multiple new features, please send the invoice number in a PM and i can send a dropbox link to the pack update.

1 Like

This look awesome, well done! How is the performance compared to Unity’s standard terrain grass? For example dense grass on a large terrain of 8000 x 8000? Is the grass customizable (color, shape, length etc…)?

Sorry if these questions have already been answered!

I have not done tests against Unity grass. The problem with this is that InfiniGRASS places grass in a very different way than the texture based on terrain, plus allows any asset to be used, with shadows etc. The grass can be painted everywhere at any density (though it is recommended to control density for less overdraw in the transparent grass types).

I will be doing some tests while working on the new texture based distribution system (and adaptation with other assets like Gaia). For the first release the grass has to be painted and is not mass grown on terrain.

The grass is fully customizable, any prefab can be defined in the grass creator script, so the system is completly controllable. The prefab items that have the LOD0, LOD1, LOD2 words (or LOD in v1.0) included in their material will automatically generate LODs, that will be used at the user defined distances. I have setup LODs for the mushrooms and rocks, as these are the most heavy, but any of the brushes can have similar LOD treatment.

Theoretically with the LOD system, there is no upper limit to how much grass can be on the map, though there may be physical limits in the ram department, if the grass is extremely detailed.

1 Like

InfiniGRASS (v1.1) paint grass (and fences-rocks) demo
https://dl.dropboxusercontent.com/u/79230236/INFINIDY/INFINIGRASS/INFINIGRASS_PAINT_DEMO.html

Note that the demo GUI is very heavy and it is advised to select brush and disable the GUI while moving around and painting grass, for maximum performance.

I put together some hints on the grass painting procedure in Unity Editor, from my experience trying to populate a massive map.

The system can be taxing in the Unity editor, so a specific strategy is required if massive amount of grass is to be painted.

As a first step, always create a backup of the scene, as massive ammounts of anything may create a crash.

Here is the steps to eliminate editor performance and stability issues:

  1. Create a grass manager and start painting on a smaller area of the map.

  2. Save the scene gradually and when the area is done, ungrow it so it takes up nothing in the save file and does not slow down the Unity editor anymore. This grass will appear in play mode normally. IMPORTANT: Ungrow of massive amount of grass may crash Unity editor, so keep each manager with a reasonable amount of grass.

  3. Re-grow to edit further. Avoid growing back more than one grass managers at once.

  4. For the dynamic grass or real time growth, use a separate Grass Manager and make sure it is the only one active during gameplay.

I have tested this method and works like a charm, as painting gradually the grass eliminates any Unity Editor issue. This way the scene can have any amount of grass, which will grow when the game is entered.

Note that grass should not be erased manually, it must be deleted using the Grass Manager erase (or mass erase option) tools.

Later versions will also get map distribution automation, this will be WIP for some time as it is rather hard to get right with a system like InfiniGRASS that allows any amount of detail to be present. I must make sure it will be stable to perform the auto grass planting, so lots of testing and tweaking will also be required.

Note also that massive amount of such detailed grass/prefabs may create stability issues, so for vast maps it is advised to use InfiniGRASS for local super detail in key spots and use Unity grass or sparse InfiniGRASS as filler.

v1.1 of the pack has been uploaded in dropbox, please send me a PM with the invoice number and i can PM the link so the latest version may be used immediately.

For InfiniTREE users, there is one same script “ObjExporter.cs” in “Scripts->Editor” folder which collides with InfiniGRASS, this is just a helper script and can be deleted from either pack to avoid the collision, without any problem.

I will have a namespace in the next version for the script as well.

PM sent. :slight_smile:

IMPORTANT:

I just realized one parameter that was meant for real time use is set by default in editor

Please remove the “move with object” option when painting in editor (it is fine to use in real time).

This option is meant for real time use only and in the next update will appear only when in game mode.

If there is any slow down it is probably due to this option beeing turned on.

Can this be setup to display the grass only around the character?

So as the character moves around the world it only renders at a user defined distance?

There is a Fade distance (can be set below LOD cutoff for smoothness) and a LOD cutoff distance when painting which will disable grass when away from the camera.

If you mean the grass be destroyed and recreated around the hero, without predefining it, i think this is also possible with some restrictions, for example you cant grow all the grass in one go, it has to be regulated so it grows gradually. But generally something like that is possible, it is not unlike the current demo where grass can be grown and deleted, just needs some extra scripting to get the exact needed behavior and optimized (regulate limitations in distance vs growth rate etc).

I can add such functionality for the next version as well, it is added in the to do list

I have done a new hotfix (v1.1a) for the release, which solves a batch breaking bug when “follow object” mode was on and other fixes. I can PM the hotfix asap.

Yeah that’s what I meant… thanks!

Also I am very happy you plan on making infinigrass work with Gaia, as I plan on picking that up as well.

Made a sale!

Great :). I can send a link to v1.1 and the v1.1a hotfix asap, these are the latest releases and will be in the store next week

In v1.1 there is support for 3 LOD stages and LOD cutoff.

Hi everyone,

I have done a hotfix (v1.1a) for the two major issues that came up in the first InfiniGRASS release. I have sent it over to all PMs and please let me know if i missed one.

One of the issues was the batching breaking when “Follow object” was selected while painting grass in editor (in game was fine). This is now fixed and grass can be painted/linked for follow object in editor.

The other was wrong scaling when grass was un-grown in editor and left ungrown when entering the game. The scaling is now done properly.

I hope these help, also i have added boxes to specify spread with numbers, for easier definition options.

Please let me know if any other issue comes up and for any help.



A few pics grabbed with real time painting.