Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

InfiniGRASS v2.0 - Next gen interactive & true non uniform volume grass, procedural worlds, pooling

Discussion in 'Works In Progress' started by nasos_333, Aug 24, 2015.

  1. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051
    I am very close to the first release now, i have added many more grass types to sample as well and optimized a bit more.
    This is a stress demo and also takes a lot more optimizations, but the core is working great even on my PC and i think i can share this first edition to sample the infinite world and possibilities (and get some performance feedback from better PCs than my 2010 one :) ).
     
    Acissathar likes this.
  2. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    966
    When I paint grass everything become slow and lagy, makes the editor really slow.
     
    Last edited: Dec 10, 2016
  3. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051
    This is mainly due to the batchng happening, because without it the Unity editor has a very big overhead and is very slow after the batching (if not performed while painting)

    A solution is to split to multiple managers and ungrow per regions the ones not painting on. Also make sure to lower the "Editor view distance" that cuts back the further away grass, this will speed up the painting as well.

    There is a Mass Plant function too, where you can create the grass once for a region (it is advised to do a few applications for density or types than a very big single one in this case too) and then refine by erasing, this is another approach.

    This will also be adressed in v2.0 with pooling the grass brushes as option and en mass planting on all terrains and various other methods.
     
  4. stanislavdol

    stanislavdol

    Joined:
    Aug 3, 2013
    Posts:
    249
    hey, any ETA on v2.0(I mean rough estimation, of course, weeks, months)?
     
  5. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051
    The core is now ready and i will have the first demo showing the possibilities soon. The user interface and tweaking of the system, plus refinement of tools that fill the pool with items and do various helper functions will take a while to finilize though (most tool code is already done, the organization of parameter passing and automatic vs manual is what remains mostly and GUI exposure of various new systems). I am now targeting early January for the Beta, as a rough estimation.
     
  6. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051





    I have decided to upload the first WIP demo of v2.0 to showcase the system and get feedback earlier as most things are now done, i have created a small image based guide for the demo and also a write up of what is WIP and to be enchanced, which i will post alone the demo today (uploading the demo now)
     
    Last edited: Dec 13, 2016
    jason-fisher likes this.
  7. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051
    InfiniGRASS v2.0 WIP Demo guide:
    A few notes on the demo, the current limitations and the WIP:
    - The batches are not yet all optimal, the system can essentially do huge batched models and pool them independtly of the ground formation, currently the batch creation is still WIP and in the regulation process and is also regulated in combination with the automatic batching happening in play time (though the goal is to pre-pool everything, for instant get in game time and zero overhead from in game batching)

    - Some batching is happening in play time currently, the final demo will have all grass-trees pre loaded in the pool and batch only when absolutly needed (if the pool is chosen carefully may never need to batch in play time)

    - There is no LOD stages for all grass - trees implemented yet

    - There is no shadow control (per distance or LOD level) implemented in the demo (will be in the final demo)

    - Everything is created on the fly, land generation, planting and growing the grass. The land and planting positions can be pre-determined if full procedural mode is not required (land is finite for example)

    - Memory consumption in editor is reported steady (around 450MB for the demo), though the windows reported memory while playing the standalone is higher and is probably because of the terrains that are not recycled (the terrains and planted positions remain in the game as the player moves, so they could be taking up the extra ram, why this is not reported in the profiler is still under investigation)

    - The shader is forward rendering based in the demo, the final system will also have support for the full deferred Unity 5+ mode, which further reduces draw calls

    - There shader is not yet using GPU instancing, a version with GPU instancing is already created and polished and will be available in v2.0 or v2.x cycle, to further reduce draw calls.

    - The grass patches density and placement thickness is WIP, so in the demo there is probably areas or biomes that use more thickness in grass than nessessary, so there may be lots of overlaping that will be avoided after the placement system gets the final tweaks.

    - The demo uses multiple image effects that can be heavy and do not yet use the new unified image effects of Unity 5.4+. Use the "Only grass" button to gauge the performance of the grass system (this is also including the land generation and planting though, that can also be avoided if not needed)

    - Use the biome icons to enable different grass-trees-decals (rocks etc) as the new lands are created. When going back to these lands the previous biome will remain, independently of the currently selected one.

    - The grass shaping is enabled only in the region up and right of the cave (in relation to the initial player view when getting in on the demo) and as far as the single control texture used in the demo allows (so near the cave is a good place to test the shaping). Also not all grass can be shaped yet in the demo (WIP), the main grass is shaped with right mouse button. The final system will assign more textures are needed to cover all areas in the big procedural world case.

    - Some biomes are heavier than others due to the still WIP regulation of grass density and batches, the heaviest are the low grass (3rd button in upper row) and Tall red tree (3rd button in lower row). The two left icons in bottom row do not enable different biomes, but rather change the texture of grass in various ways, the first toggles main grass and distant forest style and the 2ond toggles between various grass textures for main grass.

    - Place rock button will place a rock that is enabled for grass adaptation, grass recalculation is happening when the player is moving, so place the rock and move a bit to see grass adapt to it.

    - There is cases where the automatic ground adapt will remain active even if player is not moving, this is WIP to address (as should only remain open when player moves and only remain always open on demand if there is an actual need to full real time adapt of grass for cases like exposions changing the landscape). This behavior can be used in the demo to sample how a full real time adapt is (e.g. at some points only rotating the camera will adapt the grass to the rock in full real time)

    - Place vertex grass will spread a vertex grass patch on the ground around the player, this grass is using a rendertexture system for grass rotation and wind (which is more realistic but a bit heavier than the pure GPU approach in the default shader) and has specular highlights in the grass (but not yet translucency emulation like the default shader)

    - The cloud prests are not done (so use only the default clouds at demo start) and land types and styling is also WIP

    - Some barks do not yet use the ground adapt system (the shader for barks that will support snow is WIP) so will remain on a ground level even if tree is planted in a hill-mountain.

    - The birds system is rather heavy as it enables three separate particle systems, so is to be used only for showcasing the effect than the performance and is adviced to be turned off for performance evaluation.

    - Rivers are ground adaptable as well (e.g. place rock under them to see the adaptation)

    - The grass is re-adapted to ground based on the "Shape grass every" distance, when place rock is active this distance is reduced to recalculate placement at smaller intervals to showcase the adapt effect. For best performance set this highest possible.

    - The demo is built using DX11 and the grass with the new vertex shader placed using "Place vertex grass" is DX11 (will be adapted to DX9 for final version as it is using more textures than needed currently). Also vertex grass has no control for specularity yet (will be in next demo version)

    - Move to night time using Sky Master Time of Day control to enable the flash light for local light interaction with grass showcase.

    - Blur effect is default on when entering the demo, use the "Cinematics on" and off button to toggle it off for extra performance (toggle cinematic effects on and then off to disable it)

    - The lands and planting is happening in a brute force approach, the final system will create grass near the player as priority first and then move to further away and out of view lands.

    - Out of view grass batchers are not yet occluded (WIP)

    - When batching happens there are artifacts due to the new ground placement shader, handling this is WIP (this is no issue if pre-pooling grass, the demo has pre-pool only for a few grasses for now, also WIP to have all pre-pooled)

    InfiniGRASS v2.0 WIP demo (for Windows)
    Procedural foliage planting on real time generated lands, on objects (e.g. rocks) and foliage generation - pooling:

    https://drive.google.com/file/d/0B-QCdE1dswQBajFPbHhJRXVCd1U/view?usp=sharing

    .
     
    Last edited: Dec 13, 2016
    jason-fisher likes this.
  8. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051








    A few shots from InfiniGRASS v2.0 WIP (Sky Master ULTIMATE on volumetric lighting - clouds & weather)

    InfiniGRASS 2.0 allows full pooling of grass - trees - foliage (for no extra play time allocations for any size world) and adaptation to ground of any batch size and original shape (maximum possible performance and optimal use of pooling) with a unique method.

    InfiniGRASS v2.0 WIP demo (for Windows):
    https://drive.google.com/file/d/0B-QCdE1dswQBajFPbHhJRXVCd1U/view?usp=sharing
     
    ksam2, jason-fisher and Debhon like this.
  9. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051



    Forest impostor rendering WIP
     
    ksam2 and jason-fisher like this.
  10. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051






    UPDATE:


    A few videos from InfiniGRASS v2.0, with distant forest brush auto adjusted on ground and Sky Master ULTIMATE lighting.

    The new technique InfiniGRASS v2.0 uses, allows the pooling of batched items of any size over any ground, for 100% pool utilization and maximum draw call optimization with zero in game batching (pool can be pre-filled in editor time), for true ultimate performance and streaming.

    Essentially the system can fill a whole map with a few draw calls for vast grass fields per grass type
    (up to the 64K limit for batched models, which will create another draw call for example at this point). Then can pool all that grass in other lands for procedural maps with extremely little allocations.

    The new demo version that has many more enchancements and new features will be released early next week.
     
    jason-fisher, ksam2 and Lex4art like this.
  11. jason-fisher

    jason-fisher

    Joined:
    Mar 19, 2014
    Posts:
    133
    How does it look to zoom into an RTS view from afar?
     
  12. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051





    Hi,

    The system is not using billboards, so the grass can look very good even with quads (base type) and since any mesh can be used the look can be extremely user customizable as well.

    I attach some sample videos i took for top - down, this is just one of the many possibilities in styling top down.

    And a video of a semi-top down view i took from the latest InfiniGRASS v2.0 demo.


    You can sample the grass in the InfiniGRASS v2.0 demo as well, the camera is free roaming so can assume a top down view.

    Latest InfiniGRASS v2.0 WIP demo link (Windows): https://drive.google.com/file/d/0B-QCdE1dswQBTktIdDZXS3lLMDA/view?usp=sharing
     
    Last edited: Dec 25, 2016
  13. jason-fisher

    jason-fisher

    Joined:
    Mar 19, 2014
    Posts:
    133
    That's great--thank you. The temporal effect is only with 2.0?
     
  14. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051
    You mean the dynamic snow effect in v2.0 video linked in the previous post ?
     
  15. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051
    I now got the question, looking at my video titles above :)

    The temporal shader based interaction is available in the current version (since v1.5 of InfiniGRASS).

    The top videos are all from current version, the one in the bottom is from v2.0 showcasing how v2.0 does vast open worlds with the grass (the latest demo is linked here: https://forum.unity3d.com/threads/s...-weather-fx-ocean.277618/page-19#post-2888694).

    v2.0 also has permanent interaction with the grass in shader mode (shaping based on direction-speed and erasing of grass etc), which is very fast and is also available in the demo.
     
    jason-fisher likes this.
  16. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051






    InfiniGRASS v2.0 WIP UPDATE:


    A few major performance boost changes are now done on the system, making it even more robust and lightning fast !!!

    A summary is below, these changes will all be integrated in the next version of InfiniGRASS v2.0 procedural stress demo.

    - fixed issue where grass placement calculation would sometimes stay on in calculation borders (while not needed)
    - fixed delay in Global Grass Manager due to checking all sub Grass Managers, now only the close by to player are checked and handled as needed
    - fixed delay in Global Manager lateUpdate due to pool pre-fill code (did many iterations that were not needed when pool was not yet filled)
    - Added performance optimization in batcher for player position grab (cached transform etc)
    - Fixed issue where sometimes LODs and tree re-appearence would not work properly (delayed or no LODs enabled)
    - Removed batchers from fence and rock holders of Source Grass Manager, so wont be copied in the procedural mode for the cloned Grass Managersm which would increase overhead

    There is still a lot of extra optimizations to be done to finilize the system, but is already lighting fast and a new demo will be released soon with the new performance boosts, multiple interactors system showcase and dynamic snow growth over ground system first version (snow patches on top of land, blending and going above ground gradually as snow grows)
     
    jason-fisher likes this.
  17. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051
    Grass with terrains

    Without terrains


    Happy New Year and best wishes to everyone :) !!!!

    The next WIP version of the full procdural stress demo for "InfiniGRASS ULTIMATE: GPU grass, tree & mesh optimizer - streamer" is almost ready and will be released early the coming week. I have now super optimized the scripts and will be doing a few more optimizations to the batched models. This demo will be the closer to the final performance (the previous one had nearly none of the major script optimizations)

    I attach a few images of the profiler with and without terrains, to gauge the performance of only grass. This is a full scene so has grass, trees and rocks, all using the system and optimized, for a global foliage and general meshes optimization approach. Also all shadows are active with shadow cast and receieve on the grass, rocks and trees.

    The performance is from my old 2010 core 2 duo CPU PC, with xbox one level GPU and recorded in Unity editor (thus has some extra overhead from the editor which would not be in the actual game build).
     
  18. jason-fisher

    jason-fisher

    Joined:
    Mar 19, 2014
    Posts:
    133
    Purchased 1.7 in support of your efforts for 2.0. :)
     
  19. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051
    Thanks :)

    I am now finilizing the GUI for first Beta, so i hope to have it soon for public release.

    v1.x is also the base of the system so is good to know the usuage (does the initial batching for getting a nice and non patterned batch to pool around the map and keep the base brush settings acting as source to the managers created for the grass spreading etc)
     
  20. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051
    Performance metrics on new batched GPU billboards system.




    New batched GPU billboards system WIP in InfiniGRASS v2.0 for the fastest grass option (ideal for mobile) or vast distant forests LOD stage (or tree leaves at mid LOD levels).

    Full shadows (cast and receieve) is also supported in the billboards.
     
    Crossway likes this.
  21. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051
    Hi everyone

    Two new WIP demos are available for everyone that wants to test the full procedual and non procedural modes and latest updates to v2.0 system

    One is with pre-planted and pre-created land and is not using streaming land creation-planting (these are used for infinite worlds in the full procedural demo) and the other is the full procedural world demo (heavier for stronger PCs) that has the ability to change the various brushes while creating the new lands around the player and create various biomes on the fly.

    The system can also do planting on the fly on pre-created terrains, so the biomes can be changed on the fly in the case also where the world land is not procedurally created.

    I can send the two demos in PM on request.

    The demos do not yet use LODs or shadow LODing or the new batched billboards system, these will all be in the final demos and system and are the current WIP to integrate to the system and demos
     
    XaloX and Crossway like this.
  22. XaloX

    XaloX

    Joined:
    Mar 4, 2016
    Posts:
    174
    The batch billboard is amazing!!!!!!! Keep it up @nasos_333!!!! :D infiniGRASS looks amazing!!! Can't wait to get it!!
     
    nasos_333 likes this.
  23. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051






    UPDATE:

    The new batched billboards subsystem is now integrated to the system, which makes it take advantage of the least geometry possible in LOD distances (or can be used as main grass in the close distance for mobile, which would also give it an extra performance boost)

    So now the system supports grass with least geometry and draw calls possible, for ultimate performance.

    The system works great for trees as well and will be extended in v2.x life to do smooth and angle based transitions.

    Please when possible remember to leave a review for the sytem to help with the development effort, every review counts and helps a lot in the development.

    The demo that has the new shader and billboards, plus very thick batched tree forests and billboard in trees will be released the coming week.
     
    XaloX and Acissathar like this.
  24. AntonyQS

    AntonyQS

    Joined:
    Nov 14, 2016
    Posts:
    24
    Hey!

    2.0 is looking like an amazing iteration, and we have just started using the plugin. It's looking to be very powerful for us to use as a viable foliage solution to our project, so thank you for putting the time into it! There's a couple of teething problems in using the plugin that I have though, and I'm not sure if I'm just being an idiot...

    I've followed both the PDF guide and the video tutorials, but cannot for the life of me seem to get a custom prefab to work within a brush. Unity will freeze completely and I receive the following message when attempting to paint onto the terrain:

    MissingReferenceException: The Object of type 'INfiniDyGrassField' has been destroyed but you are still trying to access it

    Am I confusing the steps somewhere? These are the steps I'm taking in creating this custom brush:

    1. Creating an empty game object within the hierarchy, and renaming it (For example, GRASS_TEST)
    2. Applying the INfiniDyGrassField script to the GRASS_TEST game object
    3. Referencing a prefab for both the Bark Prefab Obj and the Branch Prefabs Obj fields
    4. Clicking on the GRASS_MANAGER game object within the hierarchy
    5. Adding the material used on the referenced prefabs to the material array
    6. Adding the new GRASS_TEST prefab to the Grass Prefabs array
    7. Adding logo in the array
    8. Click on 'Painting' and choosing the new GRASS_TEST prefab
    9. RIght-Click to paint

    Have I missed anything out there? In the video tutorials, prefabs are just copied from existing ones so it's difficult to tell what you've actually done to set it up initially. In the PDF documentation you also suggest adding colliders and collider scripts but it's not overly clear where they are needed.

    It's looking to be a super product, so if anyone that could help me on this it would be greatly appreciated!

    Cheers.
     
  25. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051
    Hi,

    I think the problem is adding the grower script manually, that is why i suggest to copy an existing prefab in the tutorials so the script is already setup properly.

    Same goes for the collider script etc, so try to start from copying a grower script with collider and all setup from a sample brush and the bark and branch prefabs can be anything (as they dont hold any scripts that require configuration) which must then go to the script references (instead of the ones i have in the sample)

    So in the brushes you have created, you would only need to change the grower script (and not actual grass items) and references them in the copied brush grower.

    Let me know if this helped fix the issues.

    Note also that there is little difference in the setup between the scripts, the major one is for trees that have a setup such that they always look at up vector (vs the grass that is placed looking at surface normal direction for example)

    So if you need a tree like behavior, copy one of the tree prefabs (e.gpine trees) that have setup in the script the option to look at a custom (up in this case) vector, using "Custom rot" - "Rot towards" checkboxes and "Rot Vector" vector (0,1,0 for trees looking up and 0,-1,0 for vines looking down for example)

    The colliders are also used to erase the grass and avoid putting grass on top of previous one as well in editot paiting, so they must also be present (they can be disabled when in game)
     
    Last edited: Feb 22, 2017
  26. AntonyQS

    AntonyQS

    Joined:
    Nov 14, 2016
    Posts:
    24
    Thanks for the quick response! Will take a look at this and see if it helps :)
     
  27. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051
    Let me know for any further help. I also have a SpeedTree brush created and i can send it to use as reference for SpeedTree case as well.
     
  28. AntonyQS

    AntonyQS

    Joined:
    Nov 14, 2016
    Posts:
    24
    Hey, thanks again for the response. I followed your advice on just duplicating the original prefab, and replaced the objs for the branch and leaf section. When painting, I am now getting the box colliders appearing but not the actual mesh itself. I've got some screenshots below to illustrate...


    Here you can see that the colliders are being painted, but not the meshes themselves (excuse the lack of light in the image)


    Here I have the settings for the prefab (The things I have changed are highlighted in green, and the default settings from the duplicated prefab are highlighted in red):


    And this is a shot of the hierarchy. It seems to be creating unique objects both inside the grass manager and outside of it.


    Thanks for your support and patience with this. I'm not sure if it's just me doing something drastically wrong.

    Cheers.
     
  29. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051
    Hi,

    Normally what you see in the TreeHolder items, should (automatically upon painting) go inside the GrassbatchHolder, in "INfiniDy Forest" items where they are batched to "Combined mesh" item and orignal meshes are disabled, so perhaps would be best if you could send me your brush to check it out for a possible bug on my local and get back asap on it. I will need the grower script and referenced prefabs and also the item that holds the mesh you use in the prefabs.
     
  30. AntonyQS

    AntonyQS

    Joined:
    Nov 14, 2016
    Posts:
    24
    Hey again.

    Thanks dude, I have got it to *kind* of work, with somewhat hilarious results. The brush is actually making a kind of bush out of the grass meshes but I'll have a play around with it over the weekend before I take any more of your time. If I still don't have it working by Monday, I'll let you know.

    Thanks for all of your help, looking forward to 2.0!
     
  31. AntonyQS

    AntonyQS

    Joined:
    Nov 14, 2016
    Posts:
    24
    To update you on this....I finally got it working and it seems to be working really well! Great product and once we have this finalised as our solution I'll be sure to leave a review.

    Thanks again.

    Antony
     
  32. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051
    Great, let me know for any further assistance.

    The system works great for optimizing models and can be used for anything (including trees, 3D decals etc) and paint on any orientation as well.

    The limitation in v1.x is that each batched model is a separate model, this creates more RAM consumption and depending on brush type, this is solved in the coming v2.0 by pooling a single batched model and spreading it with a special method over any terrain.

    Another issue with v1.x is that does the batching at game start (or in game in gradual mode) which is slow an can create a longer get in game time or spikes in the gradual case (depends on grass desnity etc). These are all solved in v2.0 with pooling and thus instant get in game time and streaming with zero batching happening at any point (besides the editor time batching to create the pool objects)

    The v1.x system will still be used for grass that is not top down oriented (e.g. need to paint on walls or under items or multiple levels) and v2.0 system will optimize and stream instantly (as no batching is required at all in play time) the grass on vast grass fields for example.

    The two methods will make for a more versatile system overall, that scales from covering extremly detailed cases where each grass blade needs to be placed in some specific way to vast intinite procedural worlds with streaming of pooled items.

    I am getting closer to the Beta release as well, though there is a very big number of cases and new features to cover so it will take a bit more time to get there (the new demo for example is now created very fast in the editor with the new user tools to plant in editor and edit the grass)

    Here is a link to the latest v2.0 demo (also includes the new shading models)

    InfiniGRASS v2.0 - Sky Master v4.0 Full volume clouds demo:
    https://drive.google.com/file/d/0B-QCdE1dswQBZG82SEFNeHdfaHM/view?usp=sharing
     
  33. nbac

    nbac

    Joined:
    Jul 7, 2015
    Posts:
    231
    did i miss the 2.0 release? whats up?
     
  34. AntonyQS

    AntonyQS

    Joined:
    Nov 14, 2016
    Posts:
    24
    Nah, think 2.0 is still in development but the link above is a bit of an update on where it's at.

    Also, question for anyone that's used this in a project really....how do you guys batch? Below, I've got a really, REALLY crude diagram of 2 different types of batching I'm currently exploring in a scene. The image on the left is using multiple "GRASS_MANAGER" type objects whilst the other image is showing all of the painted grass meshes in a single GRASS_MANAGER game object. Question is, which would be most cost effective?

     
  35. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051
    Single batch would be faster, the issue is that single bateched model with full detail might be an issue for overdraw for example or you may not need that much detail in distance. This is where smaller batches and LODs in distance come in, so the final performance is about balancing the two approaches.

    In v2.0 there is billboards that can be batched as well, so it makes even more sense to have them in distance instead of the full models (applies vboth to grass and trees)

    Another thing that can do is use multipel grass managers over the above spread, to enable/disable in play mode when far away, so LOD calcs are not active. This is automated in v2.0 and uses a grad based update system for much faster approach and updates only when needed.
     
  36. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051
    I have release a latest demo that has most final systems in and i am working on the GUi and user interface for v2.0 currently for the first Beta release.

    Some of the hardest editor side features are now in place (e.g. painting-erasing-shaping grass, grabbibg grass from the pool for very fast editor response, ungrow-grow en mass in the new Grass Managers grid etc), though the details are still very many and i need to cover a very big number of cases and features, so will take a bit more to get there.
     
  37. AntonyQS

    AntonyQS

    Joined:
    Nov 14, 2016
    Posts:
    24
    Sweet! Thanks for the information.

    So splitting large quantities of grass into separate grass managers is the best option for heavy loads and controlling the enabling at runtime. Awesome, this is the approach I've taken yesterday and seeing some performance gains already.

    Haven't been able to check out the newest demo yet, but as soon as I get some free time I'll get it downloaded. :D
     
  38. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051
    v2.0 will be a lot faster and using less allocations than v1.x, i have multiple extra systems in place to enchance speed and streaming

    - automatic model batching and grouping to reduce draw calls (also in v1.x)
    - full pooling for instant get in game time and least memory allocations
    - special ground adapt method to utilize 100% the pooling
    - batched billboards system for least geometry use in LODs or mobile
    - grid based update system and only when needed updates to systems and LOD managing
    - Global manager to higher level LOD managers usage automatically
    - performant particles system for burn fire spread effect
    - faster editor response using pooling for quicker editing of grass and less RAM consumption
    - shadow cast control per LOD stage, for finer shadow control

    These are the perfomance enchancing features, v2.0 also has a far superior shading and permanent grass interaction option in shader mode (which is vastly faster than the scripted mode in v1.x) and much more.

    Also after the initial v2.0 release, the shader will receive 2 extra enchancements, GPU instancing for DX11 hardware and pure Deferred mode for saving a few extra draw calls in deferred rendering path (both are already done and under tweaking, but i am focused on releasing the Beta first and will finilize refinement after that)

    In the demo the system is ultra fast even on my old PC and i use a real world super stress case scenario, where grass has very big density & variance, there is thick forest areas (trees are also optimized as well as any other item needed, rocks etc) and there is the full set of world beautify features from Sky Master ULTIMATE (full volumetric clouds, true volumetric lighting, multiple image effects, dynamic sky, volume shadowing from clouds etc) so the usage in an actual real world game with cutting edge effects can be evaluated.
     
    Crossway, XaloX and AntonyQS like this.
  39. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    366
    could you please make a video comparision?
     
    nasos_333 likes this.
  40. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051
    There is a lot of change to be directly comparable, but i will try to come up with a test of this kind, after the pre-Beta release
     
  41. AntonyQS

    AntonyQS

    Joined:
    Nov 14, 2016
    Posts:
    24
    That would be rad! Will there be a solution to the changing of material attributes during runtime? As we're using SVN system for the team, the scene is altered every time someone enters playmode with InfiniGrass active, causing some conflicts within individual's scenes in the SVN.
     
  42. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051
    What is the SVN system ? I suppose the changes would be different materials in different projects blending in, replacing the settings of the base materials. The material attributes though can be changed in real time, but i would need the exact problem specification to address it, e.g. with some extar automation and to offer the best optimization, so let me know for more details and will see how it can be done.
     
  43. AntonyQS

    AntonyQS

    Joined:
    Nov 14, 2016
    Posts:
    24
    So SVN allows people to work on the same project, make local changes, then commit their changes to the project.

    Sometimes you'll get conflicts, where 2 files that are merging from different users have different versions of the same data, so basically someone has to lose their work.

    As it turns out, every time the scene in which we are using InfiniGrass is played, it alters an attribute within the scene. So if 5 people play the scene and then someone tries to commit it, they'll get a conflict. I'm probably the worst person to describe how SVN works, but it's just a versioning provision that allows multiple people to collaborate on a single project and commit, update and revert changes. Kind of like a more complex Dropbox.
     
  44. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051
    I see, it is something like git, so my guess is that the materials used in the system would create the conflict as they get changes on the fly in play mode (or editor choices) and are reset in game start. This is not a real change though, as the various changed properties are mostly defined by the system at game time and editor choices, so even if one is replaced would still work the same across the various projects, as long as the settings govered by the Grass Manager are the same (which are saved with the scene). In the case a parameter is changed in the material that is an offset (e.g. some of the variables are user defined outside the Grass Manager as offsets to fine tune each material individually over the global values for e.g. the wind) then this should be passed from the changed to other project, but this would be only once for example.

    I will see in v2.x cycle whether i can have an option to save materials in the scene in a material manager (e.g. create instances of the asset folder materials in the scene scipt and use those instead, so any changes would be local to the scene). This might have other drawbacks though, so will take a bit to evaluate and perform.
     
  45. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051

    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)
     
  46. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051
    Some brushes from the final tweakings of pre-Beta, which should be released soon (only a few things remain and i have done most usability and GUI so will be close to the Beta release in ease of use)


     
  47. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051




    Sample videos of the new configurator system WIP and settings tweaking, plus possibilites on streaming and planting on the fly. More info and step by step explaination in the 1st video description (on youtube page).
     
  48. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051






    From WIP in InfiniGRASS v2.0 base tutorials.

    Clouds are done with InfiniCLOUD (WIP module for next Sky Master version)

    The grass in the pics is using billboards for far LOD stages (all grass haa cast and receive shadows, including billboards)

    The top pic shows grass after painted with the real time brush type (and shape) painter, this is using only a single material with a sprite sheet that holds the various textures. The billboards in the LOD stages also get the same painting regions and type assignments.
     
  49. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051



    WIP on last performance optimizations, to take as little as possible on the scripting side. A few extra optimizations are also in the works after these pics, i will take some grabs when done and post soon as well.
     
  50. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,051


    WIP on the new v2.0 brushes, this is one of the last steps before pre-Beta release, each type is adjusted for the new system and new brushes are finilized and refined.