Search Unity

[ON $20 SALE!✅]Infinigrass-GPU Optimized Interactive Grass-Trees-Meshes,work on mobile,HDRP-URP

Discussion in 'Assets and Asset Store' started by nasos_333, Sep 1, 2015.

  1. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,348
    This is still possible with two limitations

    1. the code for this will be custom, so the process is to get my demo code where i plant grass in real time or in editor and apply your own rule set. This can be done in the Mass Plant functionality for editor time and i can guide to where this can be done in code

    2. to apply different each time would need to be planted in run time, this in v1.x has the major drawback that grass has to be batched on the fly and while multithreaded can still create spikes depending on the grass gorwn per frame, grass type and desnsity. This is no issue in coming v2.0 as the grass is pre-batched in big batches and can be streamed - pooled with zero overhead from batching and least allocations. If performance is ok due to less density for example, this procedure would require to modify my demo code where i plant the grass to happen with the noise function.

    A 3rd possibility is to spread the same grass and modify my shader to do the noise in grass height. I have already got a grass color scheme using a pattern based method, so this might be extended to be done for grass height for example and would be the fastest option (e.g. module the height by a texture noise or otherwise). This is though not trivial to implement. In v2.0 i have a permanent modification texture that could be formed with noise to alter the grass in a noisy manner which would be a lot more streamlined (and is a feature i will add in v.2.x cycle along with many texture based grass combing textures etc)
     
    Crossway likes this.
  2. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,348


    WIP in joint Sky Master ULTIMATE v3.4 and InfiniGRASS v2.0 demo
     
  3. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    677
    So I've gotta ask, what is that in the background?
     
  4. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,348
    It is something i made while testing my parameteric modeller tools and was nice in the scene (gave nice color contrast and a shadow with a hole in certain sun positions which was cool) and kept it for the demo :)

    The modeling is done through 3 splines (base, path and profile). This is the system i will be using for dynamic branch creation in InfiniTREE 2 as well.

    The system is also made with real time in mind, so shapes can be changes dynamically with in game controllers (e.g. cast a spell that will make tree branches gravitate to a certain point or grow a tree or grow roots dynamically over ground scenarios, or extend a castle wall with more segments or grow in height or create magical doors and dynamic holes with the spline profiles boolean system, or dynamic growing tunnels etc)

    Here is a pic with more shapes from the WIP http://i.imgur.com/RNAPxjc.jpg
     
    Last edited: Feb 20, 2017
    ftejada and Acissathar like this.
  5. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,348


    WIP in joint InfiniGRASS v2.0 and Sky Master ULTIMATE v3.4 demo

    All foliage-grass-rocks-trees items are under extreme optimization using InfiniGRASS v2.0 and batched billboards for LOD stages. The new volumetric clouds system in Sky Master xSTREAM is also super optimized and performant and an ideal combination for very fast cutting edge effects with the foliage.

    Please remember if you enjoy the assets to leave a review and help with the continuous development of new features and updates to the systems. Every review helps bring new features faster and can make a big difference.
     
    ftejada and Crossway like this.
  6. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Hi nasos

    Is that demo available to test it?
     
  7. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,348
    I have not uploaded it yet, but i can upload and send the current version today (standalone for windows)
     
  8. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    But the current version is the one that comes out in the video and is optimized?
     
    nasos_333 likes this.
  9. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,348
    Yes, it is the latest version with most optimizations in. I am uploading now so will send a link very soon.

    I am now doing full force the GUI and user - editor side and is getting closer to the Beta release, i can now grow a layer of managers in the editor, edit it in various ways (all way faster than v1.x due to pooling and the new ground adapt method) with shader based grass shaping and erase and per batch based erase and then ungrow it and let it grow in play time (with zero extra batching always and instant growth-streaming as everything is grabbed from a pre-made pool in v2.0)
     
    ftejada likes this.
  10. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    677
    I'd love a copy of the demo too if possible. Finally upgraded ram and gpu so I'm curious to see.
     
    nasos_333 likes this.
  11. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,348
    Here is the latest demo version, using also the new full volume clouds of Sky Master next version and volumetric lighting (after heavy optimization to the volume clouds effect so can look great without strange temporal effects and be very fast due to resolution control).

    InfinigRASS v2.0 latest optimizations - Sky Master v4.0 Full volume clouds demo (windows standalone):
    https://drive.google.com/file/d/0B-QCdE1dswQBZG82SEFNeHdfaHM/view?usp=sharing

    Video:

    There is still much more room for optimization over this e.g. more carefull brush density regulation as now some brushes are too thick (or batches could be even bigger up to the 64K tris limit of models), shadow control on LODs (i have left shadows on all LODs in the demo to showcase the shadows from the new batched billboards in the distance), more shader optimizations (pure deffered mode can cut a few more draw calls, GPU instancing that cut another draw call percent in DX11 hardware etc, these are both working also but require more refinement and will come in v2.x cycle, as user interface is now the top priority for v2.0 first release)

    The base (and hardest to do) optimizations are all in the demo (pooling for least allocations and instant game start, streaming, batched billboards, big auto batched models with unique ground adapt method so can be pooled anywhere on the map with zero extra batching or rebatching to grab ground formation, grid based update with unique non patterned grass mixture to avoid repeatition that is the no1 thing that gives away artifical patterned grass)

    The system is applied to all items (optimizes trees, grass, rocks, flowers etc).
     
    Last edited: Feb 24, 2017
    ftejada and Acissathar like this.
  12. auhfel

    auhfel

    Joined:
    Jul 5, 2015
    Posts:
    92
    This looks really nice!

    Echoing my comment on the reddit post you made, just so I hope you see it =D

    "
    Daaang. If you can show me that this runs at least 30 FPS on mobile (with low screen resolution, ~300x500) I will buy both skymaster ultimate and infinigrass right now =D

    APK demo best, but if you take a video of it on a phone that would work too =D"
     
    nasos_333 likes this.
  13. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,348
    Hi,

    Making a mobile demo is definitly one of my plans, though it will take a bit to produce one as the work currently is desktop oriented. The recently added batched billboard system though which is crucial in mobile is now working great and thus a mobile demo is should come soon after the desktop work and asset GUI are done, since the Beta is top priority currently (or earlier if i can find some etxra time to produce it between projects)

    The mobile is tricky as it needs a lot of testing to see what works and what not and also the Unity terrain is a performance killer so i will have to do terrain work with my terrain tools in mesh to get most out of it and create a proper mobile demo, which is also time consuming.

    I will try to come up with such a demo as soon as possible.

    Are you interested in a SM3.0 based demo or is SM2.0 desired to cover for older devices as well ? I can support both, but each has its own optimization possibilities and shading model (SM3.0 will look a lot better visually and can use the auto ground adapt feature for example that is more optimized and uses pool items to the max for least allocations and in game calculations)
     
  14. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    I can confirm that it does work with 2.0 and 3.0... But using a lot of grass, does take a preformance hit. But still better than any tool on the store and Unity grass right now..

    I would love to see it more optimized right now, hoping to see this with InfiniGrass 2.. abour 43% of users are still using Open GL 2.0.. Sadly many of the tools on the store aren't supporting them... But I can confirm, it does work with InfiniGrass..

    I get much more than 30 FPS... You just cant go nuts and have a ton of grass like we can with Desktop.. I also Stream my terrains, and I use Unity Terrains..I personally dislike Meshes for terrains as you lose the visual aspect of it. in my opinion, I have developed many mobile games for Android games with terrains.

    Just about to release our first game though its using InfiniGrass for Android hopefully soon. Unature works for 3.0, but NOT 2.0. it has a little better preformance. than Infinigrass, but InfiniGrass has many more features...

    So again I hope to see InfiniGrass 2, working well for 2.0 and 3.0 and way better preformance.
     
    auhfel and ftejada like this.
  15. auhfel

    auhfel

    Joined:
    Jul 5, 2015
    Posts:
    92
    lmk when your game release or if you have any trailers, I'd like to see what infinigrass looks like in action
     
  16. Regalis11

    Regalis11

    Joined:
    Oct 27, 2016
    Posts:
    1
    Spent a while trying to figure out why the erase function wasn't working, and apparently the reason was that it relies on raycasts and requires the "queries hit triggers" to be enabled in the physics settings. Might be a good idea to make the raycasts use the QueryTriggerInteraction.Collide argument.
     
    nasos_333 likes this.
  17. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,348
    Hi,

    Thanks a lot for this, i did not know such option existed and just used the defaults. I will make sure to offer an extra option in the coming v2.0 to better handle this case as well and will also add it to the FAQs i am working on for quick issue solutions.
     
    Crossway likes this.
  18. hermit_purple

    hermit_purple

    Joined:
    Jun 27, 2014
    Posts:
    11
    Hi,

    Would it be possible to simulate the animation of grass growing out of the ground?

    I'm thinking scaling could do it if the anchor point is at the root of the grass. But if a whole swap of grass are combine into a single mesh, then scaling them would look like they are moving around.

    Perhaps there are shader tricks that can accomplish this similar to wind bending?

    Thanks
     
  19. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,348
    Hi,

    The system does support scaling when the plants come in during play mode (planted on the fly)

    I am also working on a seasonal module for v2.x cycle that will emulate growth on shader level for en mass control and faster response. The combination in a single mesh should not be an issue when done in shader mode, as the scaling can be local to each position and tap on higher vertices only by looking at UVs for example (so only the upper part is scaled and lower part remains in original position).

    There is also a new module that can plant grass that grows on the fly and is scaled on collision for the current version, i can send this at PM request if needed.
     
    recon0303 and Crossway like this.
  20. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,348
    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)


    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:
    https://drive.google.com/file/d/0B-QCdE1dswQBZG82SEFNeHdfaHM/view?usp=sharing

    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 - http://u3d.as/agN) 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.
     
    Last edited: Mar 14, 2017
    docsavage, Crossway and ftejada like this.
  21. LGGDevs

    LGGDevs

    Joined:
    Dec 1, 2016
    Posts:
    4
    I think it would make more sense for the brush settings to be a separate asset so that many grass manager can share the brush.

    Unity doesn't have a way to copy/paste list from editor so it's hard to move brush setting to another manager right now.

    I've also tried making grass manager into a prefab but there seems to be a bug where if grass are ungrow in editor and going into the play mode will reset the grass list to zero. I think it's taking the value from the grass manager in prefab which has no grass.
     
  22. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,348
    One idea is to create a scene with a clean editor that will be in grown state and have the brushes and copy it to new scenes from there, mkaing sure it has no grass planted.

    This would be the safest method. I will check the prefab though too, as i have tested prefab of Managers and it worked ok (though mostly tested in play mode instantiation and not in manager, as i used the scene method for that)

    You can also copy your current scene, erase all grass in the manager with the Mass Erase and save it as a clean manager scene to copy from, avoiding making a brand new manager scene as well.
     
  23. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Hi nasos!!

    Does InfiniGrass "save by batching" when using the same grass ???

    regards
     
  24. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Another thing nasos ...

    Is there a way to add a counter to know the number of objects "InfiniGrass" is on the scene? I do not mean Managers, I mean grass, trees, stones, etc.
     
  25. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,348
    The Grass Manager keeps all strokes in the Grass structure, so the count will provide the unique grower scripts (which may correspond to the various types, you can get this by the Type pulic int variable in the growers as well)

    InfiniGRASS batches per batch group, so will batch grass around an area, in theory you could have a single batch of all type X of grass, but this is not practical, as it would increase other sides of performance hit as overdraw. So the batching is done in local groups for each type and LODs then are enabled in distance to save on draw calls.

    The grass batched is rather fast though, so with the batching you can push the LOD distances rather far and use bigger batches (e.g. with increased density and spread and more members per static batch group), this is all available as parameters to balance. In v2.0 the grass (and batched grass) can also be pooled, so there is never a need to batch anything in play mode, not even on game start (so start is near instant in v2.0 as well, since no batching is required to happen)
     
  26. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695

    Sorry but I do not quite understand what you're saying to me.

    I've created a simple scene: Two InfiniGrass managers each with an amount of grass (the two the same grass).

    The Unity stats window shows that you are not doing the "save by batching" and I do not know why. I do not know if it should, I think so.
    I guess not static batching, but dynamic batching ....
    I have tested with a total sum of vertices of 269, 179, and less and it does not do dynamic batching either.
    Could you tell me what's going on?
    BatchingInfiniGrass.jpg


    My version of InfiniGrass is the latest in the asset store.

    I have also tested the latest demo of InfiniGrass_2 and the results in performance are not very good and also strange compared to the tests I did with previous versions of the demo.

    I would appreciate it if you could see the video I gave you. I do not understand how I have such a bad performance on my PC that is quite powerful (Nvidia 690 "two gpus, i7 intel, 32 gb ram ....) and I do not even approach 60fps.
    I know that it is by skyMaster since when deactivating it the fps go up quite a bit. But the theme is that I do not see too much grass in the scene since they disappear at a relatively short distance, so I do not know how it will work with much more grass, lods for distance and so on ....
    Another thing I told you on another occasion is that the FPS that you have in the demo, do not match those in my data monitoring program ...

    Version final5d:

    Version final6:



    For when will be the beta of infiniGrass 2.0 to be able to test it more thoroughly ???

    If you have any doubt about the videos tell me

    regards




    regards
     
  27. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,348
    Hi,

    The saved by batching is correct in the pics, and should be zero ideally, that number shows how much grass is not batched by my system and is done automatically by Unity, which is a lot slower and that would mean my batching does not work. If yoi see zero there is working ok, you will know when not working if both batches and saved by batching are very very high (e.g. in the thousands or 10 thousands)

    I have a latest demo as well, which has many more optimizations (and the new full volume clouds in Sky Master 4.0)
    InfinigRASS v2.0 - Sky Master v4.0 Full volume clouds demo:
    https://drive.google.com/file/d/0B-QCdE1dswQBZG82SEFNeHdfaHM/view?usp=sharing

    The pre-Beta is getting closer, i only have a few more things and guide to do to finilize, so i hope if all goes well to have it available next week.
     
  28. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Hi

    Are static batch groups done automatically by infiniGras or do we have to do something?

    Another thing, is there any information on how to balance these parameters correctly in the manual or video tutorial for very large scenes?

    I've tried the new demo you said and I have something to tell you ...

    In the last demo you have sent, my performance with everything (InfiniGrass and SkyMaster) is something better, but not much. About 35/37 FPS, before it was 25 FPS average in th demo "Final6c and similar the demo "FINAL5"
    But only with InfiniGras performance is worse than in the old demos.
    Last average demo of 60/65 FPS and old average demos of 110 FPS "Final6c" and 127 FPS in demo "Final5". Something that seems very strange to me.


    On the other hand I will wait for beta next week to do all the necessary tests and see the performance.

    A greeting nasos
     
  29. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Another thing nasos ...

    I'm having the following problem. I do not know if it's because of some problem with Unity (version 5.5.0f3) or something that infiniGrass fails ...

    1) This one if I think it's for infiniGrass. I put in the brush the "Object scale" parameter of the grass in min 0.1 and max 0.1 so that you always paint the grass of the same size. But he paints some of bigger size and others of smaller size.
    What am I doing wrong?

    2) and more importantly. I follow his tutorial on how to create the LODs of a grass model, but when I apply the changes with the LODs made in the prefab, the prefab always has the "cast shadows" and "receive shadows" activated on all created LODs.

    Do you have any idea of what might be happening?

    I leave this video to see the two problems:



    Greetings nasos!
     
  30. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,348
    The latest demo has more items on screen and more view distance, probably that is why you see the difference, so it is probably more a rendering issue (e.g. overdraw) that make the difference.
     
  31. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,348
    About #1, the grass brush has 3 quads that vary in scale and size, so probably this might be the cause of the variance in size, if you need the exact size edit the prefab as a first step and see if making all same there fixes the issue.

    The LODs do have shadow cast and receive, the shadow cast/receive off requirement is for the pre-batched models, so they are separated from the batched models. In v2.0 i have shadow control for the batched models as well per LOD levels (e.g can have shadow cast cutoff after a LOD or for all grass if needed e.g. for older mobile)
     
  32. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Sorry but I think you have not answered any of the questions
    regards
     
  33. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    What exactly are the pre-batches models? I do not understand ... What am I supposed to do to be able to create my LOD's. I'm confused
     
  34. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,348
    The LODs are automatically created, as long as you add in the prefabs objects with materials with LOD0 (or LOD1-2) in their name and disable shadow cast and receive in their meshfilter and the meshfilter component as well.

    For example for grass type0 you can copy one of the quads in the prefab, add material to it named as "grass LOD0" (copied from the main material, only change needed is in the name), disable the meshfilter component and shadow cast-receive on it and Apply the prefab. Then the system will use this quad as LOD0 (first LOD) at the distance defined in the brush settings and the system upon creation of batches will batch those under the LOD material and create - handle the LODs automatically.
     
  35. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Two questions:
    1) Should every scene has one grass manager? I mean if I load more than one scene additive, should still every scene have one manager or only one manager for all the scenes are enough?

    2) I can't mark the grasses as static, I am using an object streamer that requires non of the objects be static. So would this cause problem?

    Thanks in advance.
     
  36. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,348
    Hi,

    Each Grass Manager is self contained and thus more than one can be used in a single scene. This is also used in the upcming v2.0 grid system (it is split automatically in multiple grass managers per region)

    The grass is batched and a new batched model is used in its place, so marking the original items or prefabs as static would not help and the models are already one single batched model after the optimization. So you dont need to mark the grass as static in the system.

    Let me know for any more details and questions
     
    ftejada likes this.
  37. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Hi nasos!

    Could you give me some advice for the next question?

    I have a scene that does not have a lot of infiniGrass grass. I have it in several managers. But every time I hit the "Play" on the inspector it takes a long time to start the scene, about 2-3 mins.

    The version I am using from InfiniGrass is the last one in the asset store

    regards
     
  38. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,348
    The time to batch depends on CPU cores (is multithreaded) and grass type, simpler grass will batch faster for example (so even little but complex model grass can be heavy). Since v1.x uses a batch for each grass patch this delay is hard to avoid, in some cases starting the managers one by one may help, as i have come across the case where putting all at once can bottleneck the memory, so you might try enabling each manager in order when the game starts as well (e.g. leave a small delay before enable the next from the previous one). Also make sure to enable the various performance options (disable grower after grow, eliminate original mesh etc)

    In the coming v2.0 i handle this by using pooling, so all grass is pre-batched and there is no need to do anything at game start.
     
    docsavage and ftejada like this.
  39. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Thanks!
     
  40. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,348

    From the WIP of InfiniGRASS ULTIMATE, the brushes are now adapted for near 1:1 scales and the system is near finilized with only a few things remain to release and some clean up.

    This scene features a big open landscape with thick tree clusters, grass and bushes, all super draw call optimized and using batched billboards as well for LOD stages.

    This result is directly plantable from the rule base of the demo scene, so it is super easy to change grasses and re-plant the terrain with various combinations.

    Any number of terrains can be planted instantly around the central one and the higher level LOD system takes care of disabling the checks for the distant terrains, so the world can be vast, plus pooling is reusing the grass so no new creation is required. The plantings can happen using different rules as well and can go in separate layers, so when editing the grass can grow and edit per terrain/layer, for much faster responses (plus items are grabbed from the pool, so is very fast and no extra batching is happening)
     
    ftejada and docsavage like this.
  41. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,348
    New InfiniGRASS v2.0 feature, it is now posssible to paint grass types directly in the alpha channel of the interaction control texture, making possible to use only a single material to plant multiple grass types, with a sprite sheet like texture.

    This also applies to the batched billboards, so the painting affects both LOD and near stages.

    The painting is possible both in editor and during play time (which could be used to emulate seasonal changes by changing regions with other types from the sprite sheet during play time).

    Sky Master 4.0 xSTREAM is used for the lighting and clouds.

     
    ftejada, docsavage and Acissathar like this.
  42. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    Sorry, do not read true the whole thread so maybe it was answered but what is the differenz between infinigrass 2 and infingrass ultimate ?
    I am waiting some month now for version 2 so i can update to it and now read about ultimate.
    Normaly you updated this asset every month or two but now version 2 takes realy long. I stopped using 1.x since you anounced the v2 but do not know it takes this long because your faster updates before.

    What will it cost to get the best infingrass version as an update?
    You mentiones something like $15 , is this still valid?

    Great feature videos by the way.
     
  43. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,348
    Grass variety using a single material and texture sheet (applied to both main and billboard LOD stages)
    v2.0 and Ultimate is the same thing, i decided to put v2.0 in a new asset (InfiniGRASS ULTIMATE), since it got so many more features and is rather different than v1.x in many ways (plus contains all that v1.x offers), which is why it took so long to fully realize.

    The upgrade price from the current system will be $10.

    The pre-Beta is almost done, so soon i will be able to send this version to start with. I have also added most GUI i wanted so will be easy to use even in the pre-Beta release.

    A new video of the v2.0. It takes only a few clicks to get to that result.

     
    Last edited: Apr 17, 2017
  44. pro-bchevalier

    pro-bchevalier

    Joined:
    May 30, 2013
    Posts:
    46
    Hello @nasos_333 ,

    InfiniGrass looks awesome! I am working on a mobile project and have a few questions:
    • Does the grass sample the lightmaps from terrain and meshes on mobile to do the shading?
    • I don't think I have seen a demo of this, but can the tool be used for details, like pebbles, so something else than grass?
    Thanks!
    ben
     
  45. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,348
    Hi Ben,

    The grass is created (or drawn from the pool in v2.0) in run time (or at game start), so the lightmapping is not active.

    The tool optimizes everything, including pebbles, rocks, flowers, trees and anything else as well as needed (it could even be used to optimize houses in a village for example or decal houses in background etc)

    It can also be used with SpeedTree (need some extra tweaks to add my shader and select the right mesh detail, i plan to automate this in v2.x cycle as the steps are trivial in general and should be easy to do)

    Note that v2.0 system is SM3.0 for the new ground adapt system, so SM3.0 mobiles will benefit the most. I am also working on an extra method to do the ground adapt for SM2.0 cases, this will come in v2.x cycle (it will probably be less efficient than the current SM3.0 scheme, but a lot faster than doing batching to create the grass in the proper ground placement).

    Let me know for any more questions
     
    pro-bchevalier likes this.
  46. pro-bchevalier

    pro-bchevalier

    Joined:
    May 30, 2013
    Posts:
    46
    nasos_333 likes this.
  47. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Hi @nasos_333

    I am currently working with the MegaSplat asset that serves to paint the grounds.

    It has a characteristic, like the RTP asset, which is called tessellation. I guess you know what it is.

    I imagine that InfiniGrass 2.x takes the data from the collider to position and adapt the grass on the ground when it is placed.

    Would there be a way to adapt and place the grass based on the vertex data of the tessellation instead of using the collider of the terrain or object?

    If not, every time someone uses tessellation for the terrain the grass will be floating in the air or covered by the terrain. And more and more people are using this tessellation technique for their projects. And we can not use infinigrass correctly. I imagine that would be an impediment to buy infinigrass for many people.

    I know that megaSplat has a script that retrieves the data from the tessellation. Apart from the creator of MegaSplat is very attentive and helpful as you are. Maybe if you talk to him you agree to a possible integration or something and be able to put that characteristic in your asset.

    I leave video of what I mean but not with grass if not with the feet of a character to understand what I mean:




    regards
     
    nasos_333 likes this.
  48. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,348
    Collider-less grass positioning with zero extra overhead on any mesh (additionally to the base terrain)

    I understand the issue with tesselation, though to have terrain traversable you need a collider in general, tesselation is mostly to do small detail, but i can see it beeing an issue if the use is out of player bounds or extensively used in some form.

    In v2.0 i use a system that does the Y axis of grass without the use of colliders, or terrain data, so my first guess is that this system would cover the tesselation issue, but i cannot be 100% sure until i try it. Since tesselation is exposed to the camera, this is another sign that the system would work with it, if it is correctly affecting the depth buffer.

    If it works though this would be automatically good in all cases and not need any further integration (my system for example already covers any mesh for grass application, in a top down fashion, independent of collider, colliders are only needed for the planting phase, that is Y agnostic (all grass is done in a flat mode first) and colliders are mostly needed to tell if an area should be planted or not (useful for masking out areas). I will do some tests soon after the pre-Beta is released later this week (or early the next)
     
    Last edited: Apr 19, 2017
  49. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Okay. As soon as the preBeta is sent to me and I try it to see if it works or not
     
  50. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Depth buffer based positioning? Interesting- I would expect artifacts with occlusion, but I suppose if the grass is short enough it would could work. MegaSplat writes to the depth buffer, so if that's all that's required it should just work.

    That said, I think it would be interesting to integrate MegaSplat's texturing with something like a grass system, such that the resulting texture could specify where grass is allowed to grow (between rocks, etc). Having to recompute the texturing in the shader that's creating the grass seems expensive, but if you're doing things in screen space, perhaps there's an extra channel in the GBuffer which MegaSplat could write some kind of mask into for this use?
     
    recon0303 and ftejada like this.