Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Save $600 offer !✅]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,288
    v1.4 has many new grass types, they can be found at the new demo scene pre-setup or you may add them to new scenes in the prefab and material lists, like in the sample scene. I did not add them automatically, just in case i would override grass types defined by users before v1.4 was added.

    Grass can have a tint color and there is also a parameter in the new shader to alter global color, but is not yet implemented through the Inspector, so must be changed in the material directly. I plan to add it for Inspector in v1.5

    The grab grass will get the scripts from play mode that grow grass and regrow it properly in the editor. The system uses LOD and batching which cant be grabbed correctly if the actual grass is copied, that is why it has to be regrown from the grower scripts (the ones parented to the object grass is painted on)

    I would recommend not to copy the grass itself, as the grass copied outside the LOD and batching system is very heavy and may not use the system properly, thus create a slow down. From play mode you copy the object with the grower scripts after disabling it (not the bathcing scripts or the actual grass) and then paste to the editor and insert the object in the proper slot in Inspector, then enter the equivalent scene object (the one that was copied in play mode, but before entering the play mode, in the scene) that will get the grass and press the grab grass button.

    This will make sure to grow the grass like it was painted in the editor, which will make sure to use the LOD and batching properly afterwards.

    Note that (the batched) grass can be grabbed and exported from play mode as batched patches, this is a different functionality and the patches will have wind using the grass material, but they wont be part of the LOD or batching system, it would be like modeling a grass patch for the specific terrain and bring it as one object in Unity and use a wind shader on it. This is also useful in some cases, so i have both options available.
     
  2. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    No, neither of the two demos worked. Also, the grass itself did not look as good on the D700s as it did on the iMac as far as I could tell with the artifacts covering stuff. Shadows were missing and the grass shader itself looked as if it was in fallback mode.
    We have been running heaps of image effects during various trials and I have not seen this happen before. I am assuming you built the demos using 5.2.x and not a 5.3.b?
     
  3. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    I use v5.1.1f1 to build for webplayer. As a first step i would try to open from another internet explorer, i think i had a similar issue before with another pack and was an issue with incompatibility with the webplayer on the specific internet explorer and was fixed when another internet explorer was used.

    I will also check the suggestion in this thread:
    http://answers.unity3d.com/questions/55109/self-shadowing-problems-on-macbook-pro.html

    It seems that some shaders may cause an issue, so maybe this is the problem, this will take some time to discover though as i dont have the means to test the system on a Mac and will be going blind. I will also file a bug report to Unity, as this should not normally happen.

    The missing shadows could be the artifacts themselves, in a broken way is my guess.

    Thanks for bringing this issue to my attention.
     
  4. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    It did in fact work with Firefox on the Mac Pro. Safari does not work though. Regardless of why, it is a bit concerning since other content does work in the Unity Player running in Safari.

    The issue I saw is not a self-shadowning error/issue. It was most definitely artifacts caused by a shader, most likely an image effect.

    We might still consider evaluation the solution, but I do have my reservations and concerns:

    - You have not tested it under OSX. Which platforms have you performed tests on? PC only?
    - The cause of the web player demo is unknown
    - Is there documentation available? I would like to see it before comitting.
    - You mention source code as available. Is the full source included, and is it well structured and commented?
    - How is grass assets be customized/created, as some of the included ones look quite poor.
    - Would you please describe:
    - Your usage of threads. We use threading as well, and I would like to make sure I like your solution.
    - If/how your API supports dynamic placement and managment over large surfaces.


    Long list of questions, yes, but we have decided on this approach after having purchased a few plugins to enhance functionality for our project only to find that almost all of them were very poorly implemented and/or documented.

    So what I am trying to say is that I need to see a better, in depth explanation of what the system does before I am willing to invest time in testing it. I am sure that would be beneficial to your sales in general as well.
     
  5. nasos_333

    nasos_333

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

    I am always trying to address all user concerns, so even if there is some thing needed later, i will try my best to implement it.

    InfiniGRASS is the only solution i know that has non patterned grass, so there is nothing to compare to, so it has a specificway it works, which has its perks (best looking, fastest and most realistic grass possible) and a few downsides like a needed planning to plant lots of grass, as it is heavy in the editor due to the overhead (play mode is super fast and v1.4 has a way to grab this grass to enter in edit mode)

    There is documentation, i will send it in a PM.

    I have only tested on PC as i dont own a Mac, but i dont have any issues mentioned by 100+ users, so i suspect this an isolate issue related to the webplayer than the pack itself, especially since it works in all other cases.

    If you do have an issue with the pack and for some reason it is not possible to use it, i always offer a refund for such cases, so dont worry about the money issue in this case, but i doubt there will be any issues.

    The cause of the webplayer issue seem like a bug in the webplayer for the specific configuration, unfrotunately i probably cant do something about this, maybe i rewrite the shaders at some point and see if this works, but i cannot make this a priority as the issue is extremely isolated and is something Unity should solve (though webplayer is slowly extinct, so i doubt that will happen)

    Full source is included and is well written and semi commented. In general the system is not meant to be changed much in code as it is very complex, but i can help for sure if something small needs to be implemented.

    Grass is just a prefab, you can copy and change it to anything, any texture, model etc as long as it plays well with the wind shaders. The system is a general purpose one, so you can also spread rocks etc with it and have LOD, fade etc

    I cannot commnent on my threading in detail, as it is a very complex matter to cover. The code is open, so you can evaluate the use directly, plus it is removable (the system can be used single threaded with a single paramter change) so you can gauge the performance enchancement and evaluate its ability without going in code. In general there is a very big difference between the two modes, in the dynamic phase.

    I dont have an API for real time placement, besides the demo code that places on patch at a time. There is though a system to mass place grass on surfaces by defining a rectangle by two corners, and the grass can have a specific type (and subtype) and scaling per unity terrain splat map type (when -1 is used a grass type, the splat wont receieve grass)

    Also you can mask this placement by any object, just place the mask object and grass wont grow on it or the terrain below it. You can also plant to any object on any orientation (e.g. around a sphere)

    v1.5 or v1.6 will also allow placement changes per texture color (and vertex color blending, gravity and local temporal interaction with grass etc)

    I hope these help, please let me know for further questions.
     
  6. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    re. multithreading:
    - How many threads?
    - What do the threading work on?
    - Is there any circumstance where the main thread will be waiting for the worker thread(s)?
     
  7. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    Oh, and btw: The manual mentions dynamic growth based on a hero. What exactly do you mean by this? It could be interpreted as the possibility to have grass grow dynamically on a terrain as a player moves. If so:
    - Is the growth based on pre-existing painting, or is it fully dynamic?
    - Can the growth be influenced at runtime? (Possibly no, as you said you do not support dynamic placement).
     
  8. Olafson

    Olafson

    Joined:
    Aug 7, 2012
    Posts:
    255
    Hi,
    I do not really understand how to apply grass by splatmap? Do you have a simple explanation or video showing you do it?

    What I would like to do is to apply grass only where the grass is painted on my terrain.

    I just tried the new version hand painting grass and It does not seem to work anymore? I don't know. I have a terrain in my scene a object with the manager applied. I click on paint, choose one of the grasstypes I want and when I hold right mouse button in the scene view, nothing happens. I can see the brush circle, but i can not see any grass being placed.
     
    Last edited: Nov 12, 2015
  9. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    The grass in hero gradual growth mode is based on pre-existing one painted in the editor (or real time and ported to the editor). But i plan to create a full procedural mode for v1.6, this is one of the major plans for the system future, as everything is already there to do it, and needs careful planning and the specifics of the planting algorithm to be finilized.

    I do support dynamic placement (the demo allows to plant grass in real time) and you may erase the grass as well, only the mass placement is not supported, since it is not meant for real time use.

    The threads are created when a batch needs to be created and the object is replaced only when all threads have finished, so there is no concept of waiting in the main thread, and the batched item is available asynchronously. The only issue is when planting lots of grass at the same time, this may saturate the threading and cause spikes as more grass is unbatched at any one time, depending on the system. That is why mass placement is not real time supported and gradual growth is best suited for lower density grass.

    Multiple grass managers may also be used for different purposes, e.g. one may load all grass at game strart, one for less density at full gradual and another of lower detail grass may use the gradual grow without regrowth etc

    The painting on splat is done by defining the corners of the rectangle of the terrain area needed and then choose the grass type for the specific splat (and put -1 on all others, so they are not planted). The system is weighted (and grass may be also scaled by splat type), so it is also possible to place boundary (sub type) grass where two splats meet in a weigted manner. Then grass can be further edited, deleted or grown with the mouse tool.

    I may create a video to showcase this and post it here, but there is not much to it really, it is a very straightforward assignement of the needed grass type to the required splat and when Mass place button is pressed will apply the grass type to the specific splat only.
     
  10. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    What we would be interested in is to leverage a system which:

    1. allows for relatively performant dynamic placement based on our rules (I basically want to place it based on our runtime generated data. This happens at load or other set instances where we can afford to wait for a little bit, so it does not have to be 100fps+ but it cannot stall the machine for too many seconds, at least not without splitting the task in frames to allow for graphical feedback.

    2. fades in grass that is near the hero, allow for removal and placement of small patches realtime.

    3. is scalable to allow for lower-end platforms being able to run it, albeit at a low graphical level.

    4. has well-written and compatible shaders. I have personally seen numerous shader-heavy products that work well on a subset of new PC cards, or on PCs in general, but will fail on Macs, Linux, consoles. Preferably there should be fallback shaders usable for mobile, etc.
    Not always realistic, but my point is that the shader solution should ideally work on platforms that Unity support and not employ shady tricks that might break in certain circumstances.

    If I understand correctly, your product does not currently fulfill the above wishes, but you may soon?
     
  11. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    The system is indeed possible to include all the above with more work, as all the base systems are in place.

    For example the dynamic placement can be very fast if spread in frames or does not use very detailed items and smaller brushes, like in the real time demo. The rules are game specific, so the goal from my side is to offer as many options as possible for automation and i will be working to that end.

    The next version will allow placement based on textures as well, so that will be another step towards total proceduralization of the system.

    2. is already implemented in the demo, grass can be grown and deleted and this can be done with a rule with some extra work to replace the mouse oriented demo.

    3. also the system is scalable, since it has 3 LOD levels and any prefab can be used, for any detail. Scaling the performance is as easy as lowering the grass prefab detail and regrowing the grass for example (which may not be needed when i have created the 100% procedural placemenet module)

    4. is much harder to get right, as i dont own all systems to test on or can readilly identify the causes that may make one shader that peforms fine on PC, fail on another platform. I will definitly try my best to offer max compatibility in coming updates of course, so this will also get to the desired level eventually.

    Note that my shaders were based on Shader Forge bases, so they should work, but probably i did some changes that create the issue or were SM3.0 oriented, so i will start with adapting to android and move from there.
     
  12. Jesse_Pixelsmith

    Jesse_Pixelsmith

    Joined:
    Nov 22, 2009
    Posts:
    296
    Does this package have a billboard option for grass? We're basically trying to do this:



    With meshes instead of unity terrain. That video shows the issue of non bill boarding grass (@3:00). We're a top down game.Instant buy if it can achieve this kind of look at top down on a mesh! :)
     
  13. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    Are you always looking top down or like this game shift the camera ?

    There is no billboarind in place (at least not yet), but the system can arrange the grass so that it looks good at the chosen camera angle. It can be made to look fine even if the camera shifts, you will have to put a few extra planes in the grass.

    I will create a small video and post it for top down reference, to showcase the possibilities.

    The grass can be painted anywhere, so could be on a mesh indeed.
     
  14. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    From a quick test i did, i think this should work fine out of the box with the default grass type, no need to add more quads either, i am uploading the video (i got carried away playing with the system and took 4GB worth of videos :), i will upload the 400MB one that is the smallest)
     
  15. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    Here is a video with a top down camera, is this close to the required effect ?

    Note that grass in the upcoming version version 1.5 also has a local temporal interaction mode that will interact with the hero without any computational cost.

     
  16. Jesse_Pixelsmith

    Jesse_Pixelsmith

    Joined:
    Nov 22, 2009
    Posts:
    296
    Thanks for the reply. The video does look nice, but I am curious about a couple of things.

    First off, our camera setup is such that the player has complete yaw (y angle) adjust freedom, to orbit 360 smoothly around the character.

    Our pitch varies between 30 and 60 (with 90 being "pure" top down like you have). We use a perspective camera but with a low FOV (and zoomed out to compensate) to reduce perspective warp and make it more "iso-like".

    Quick screen grab from my editor to illustrate my point. (rough work in progress)



    As you can see we have a flatshaded/toon style. So the video I posted earlier with the untextured grass would be really fitting. An additional reference would be something like this (http://www.facepunchstudios.com/wp-content/uploads/2014/09/screenshot01.jpg) - though we wouldn't sweep the camera down that low.

    So the video does look nice, but it looks different from the density I saw in the demo scene.

    I'd be interested in figuring out how to get it setup like that after purchasing. Is this a demo scene ready to go? If not are there instructions on how to do that? From there I will have to try it with flat shaded grass and hook my camera rig to it to see what happens when the player rotates the camera.

    You mention that it's not billboard, but that i would also not have to add more quads myself. Is this something the system does then (takes a grass card and copies/rotates it around a few times?) You must be bending them as well in order to avoid that "star" pattern you normally would get from top down grass assets that aren't billboarded.

    Also my game camera is quite a bit more zoomed out than yours. I have no idea on the performance of this system but I'm wondering if it would be viable (performance wise) to render grass at that density when covering that much ground? Also is this dx11 only or will it work on all platforms?

    Also - I see you're painting in runtime so I'm hopeful that there would be no issue to mass clear an area of grass during the game. Such as when a player builds a structure (generally a 5x5 meter footprint)

    If all of these lights are green, I'd be happy to purchase and take it for a spin, provided you can point me to how to get the top-down setup demo working to test.

    Thanks,
    Jesse
     
    barcode802 likes this.
  17. Jesse_Pixelsmith

    Jesse_Pixelsmith

    Joined:
    Nov 22, 2009
    Posts:
    296
    Also the temporal interaction sounds cool, esp with no cost (wondering how you're doing that :) I tried the displacement of another grass system and it was fun but quite a performance hog.

    Your video looks promising, but it could still be that billboarding is desired for what we want ( I imagine it has to take less quads to provide the perception of "coverage" as they are always rotating towards the camera). So if performance is an issue Would having a billboard option(like Unity grass) be something you'd consider?
     
  18. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    The performance will be fine is my guess, i have filled maps whole with grass and got zero performance issues, you can fill in for example the demo map whole and still get great frame rates. And the default grass does not have LODs setup either. The grass i have in the video shows well in all angles, if you need another type though i cant tell, i post another video below with a mesh basd grass and shows the base of temporal interaction (in the right side of the map, thin long grass)

    You could also use the mesh style, so you would essentially have full 3D grass that will tbe closer to the real grass and not need much in billboarding. Also in v1.5 i will vertex blend the grass to ground, which means you may have a blanding where now seems to not stick well from top down with the planes.

    Generally there is many solutions, InfiniGRASS can do both mesh grass and quads with vertex blend in both too (coming in v1.5).

    The system is DX9 and does not use render textures either, so it is super fast even at exteme grass on screen.

    Mass clearing the grass can be done, but requires special treatment (all grass and batchers must be unregistered and must be done in a batcher level and not grass level). It is a bit complex and i could offer it as option in v1.5 or later, but can be done. Erasing multiple random grasses could create spikes, since the system would open the batching for each group and if many are opened at once will stall the system, but in batcher level the whole thing can be deleted and wont be an issue, just needs to notify the manager so the grass lists areproperly updated.

    The procedure is like: Find batchers with grasses inside the delete region, erase their referenced grass grower scripts, remove them from the Grass Manager lists, erase the batchers (along with the grass and batched grass) and remove it from the Grass Manager batcher list. I do this procedure already, as i delete grass when the hero is far away in the Gradual Growth with regrow option, so the same system is already implemented, but the rule is based on hero distance.

    Same limitations apply in real time painting, you can paint infinite grass, as long as it it not painted or destroyed much at every frame.

    You can gauge the performance in the demo, paint the map for example and see how much grass you can paint before it has any issue on your system. There is a vertex grass sample too (2ond icon i think)

    The vertex grass shown in the pic is even lighter than the transparent grass in the video, so should be fine as well.

    The whole system is multithreaded, so erasing or adding grass will be faster as CPUs scale. I use it in a dual core (2010 model) and is still super fast with vast amounts of grass, even with vast amounts of very heavy mushrooms (4 million tris locally for example). GPU power is surprising high :)

    Also note that you could use the system to batch the cartoon like trees as well and easilly paint them around with proper ground fiting

    Another video, shows mesh grass, vertex color blend (all right side thin long grass is the same type and colors change based on ground) and temporal interaction (grass motion as hero passes by). The left side grass has scripted interaction (so it stays down when stepped over)

     
  19. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    Here is the first round of mini guide videos, showing the first steps and custom prefab creation and customization procedures. The prefab creation principles are same for InfiniTREE as well.


    InfiniGRASS - Mass Plant in Multiple terrains tutorial.
    The system will grab the Terrain Data of the first active terrain. To mass place on another, the previous must be disabled and the system will auto grab the new one and its terrain data for the splat based planting.

    You may also register a brush settings (choose brush, alter settings and use the save settings button) and check the "use brush setting" checkbox to use the saved settings when mass placing.

    There is also a scaling factor per splat map that can be used (not covered in the video). A video tutorial focusing on the settings save and use and scaling per splat map will follow soon.



    Mass Placement tweaks for scales different than in the demo:
    Tutorial summary image: http://i.imgur.com/OgHEkLp.jpg




    InfiniGRASS setup Guide & custom prefab creation





    Other tutorials:

    Tag based Player Option:
    http://forum.unity3d.com/threads/in...orm-grass-solution.349921/page-6#post-2357389

    Fence creation & customization: http://forum.unity3d.com/threads/in...orm-grass-solution.349921/page-6#post-2358117
     
    Last edited: Jan 15, 2016
    Pequisto likes this.
  20. Pequisto

    Pequisto

    Joined:
    Apr 21, 2015
    Posts:
    66
    Excellent tutorials. :)
     
    nasos_333 likes this.
  21. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    Thanks, i will follow up with a lot more to cover all the various features and modes for the system as well
     
    Pequisto likes this.
  22. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    Full procedural mode, the below grass & flowers were not painted in the editor and are planted based on rules and customizable distribution.

    The grass is Auto painted based on splat map (and soon slope and height), is scaled per splat map (with customized on the fly factors) and can also grab ground color for the lower vertices to blend with ground (not implemented yet in the pics below, but the system is ready and will be in v1.5).




    UPDATE:

    Some great news, the full procedural mode works nicely with a simple enumeration and the framerate can remain smooth even with my very old CPU (and i did not optimize in the slightest yet).

    So in v1.5 (or v1.6) it will be possible to have one Grass manager to fill in the map with grass fully procedurally, without doing any painting in the editor !!!! in addition to the specifically painted grass in the editor of the current version.

    I have already implemented the scaling per splat map and i am now working on the grass type per splat map (now i mix two types in random in the above pics), plus slope and height based planting (grass type and elimination) and then i will start working on the radial spread algorithm at distance (now i just spread from the hero outwards, the actual implementation will be to create grass as the hero moves around in a circular way in a distance, so it covers the ground the hero will see in the next frame (in the LOD cutoff distance).
     
    Last edited: Dec 3, 2015
  23. TomLikeABOMB

    TomLikeABOMB

    Joined:
    Dec 3, 2015
    Posts:
    9
    Thanks so much for posting video tutorials! Procedural grass spawning sounds awesome. Speaking of which, do you know if this asset will work with Gaia?
     
  24. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    The plan is to offer GAIA support and nearly all my work now is directed to grass placement and variety based on ground, so it will be able to be used as standalone for any terrain and work with GAIA terrains and features too.

    Some features are not supported by Unity grass (the most important ones too that make InfiniGRASS special), so i start with my own distribution system as base to step on and then will work to offer specific GAIA features on top of that base.
     
  25. auroxi

    auroxi

    Joined:
    Dec 31, 2012
    Posts:
    85
    Will the GAIA support mean it will lookup the texture on the terrain at any given point and apply the grass to it? For example, if I paint Grass1.png on the terrain, it will put grass anywhere where I paint it? That would be superb.
     
  26. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    GAIA uses some statistical methods to plant its grass, which would be great to use. The way this will happen is still not 100% clear and i am in contact with GAIA developer so when i start on that will be more clear.

    The system already does what you describe, so it can plant specific grass type in certain splat map, with a subtype also and scaling factor on top, per mass planting application. The GAIA support will limit that grass based on GAIA system to grab the statistic factor and will use my upcoming height/slope based system too, both as options for best control of the two systems blending.
     
  27. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    @nasos_333 @auroxi This rules set says "Do not place on Texture 0, on a virgin raycast to the terrain, with height between 23 - 900ish, with a simple Grass texture as a Grass Billboard "

    upload_2015-12-3_19-36-33.png

    That is terrain texture 0 at anything more than 0%
    the ! is the logical NOT.

    That about covers the options - Fitness curves withstanding.
    Hope it helps

    EDIT: Happy to test it for you. Just add beta...
     
    Last edited: Dec 3, 2015
    nasos_333 likes this.
  28. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    Thanks for the details, i will work with all the above in mind so the intefacing to GAIA can be more seamless
     
    twobob likes this.
  29. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Hi nasos,

    I appreciate the work you put in to make this great asset, and I'm stoked about using it. I just have some cosmetic issues with it.

    (NOTE: the comments below take the assumption that the issues I'm experiencing aren't bugs. I may be wrong about that assumption.)


    Why did you decide not to take the Unity scale into account when building your demonstration scenes?



    The selected cube has a diameter of one meter. I'm sure most of your customers aren't building a Jack and the Beanstalk MMO.

    Why are the showcase scenes named after the version of the asset? I don't care what version a certain feature is from. Please name your scenes after features that you demonstrate.
    I also notice that your showcases are quite cluttered with unnecessary psychedelic GameObjects.
    Why not help people out by making simple showcase scenes.

    I would really appreciate a simple scene with different varieties of already placed grass, a scene that shows how to place new grass, and a showcase demonstration of infiniGRASS features.

    I don't mean to poop on your parade, and as I said, I'm grateful for this asset. I just hope you can take the "less is more" design philosophy more to heart.
     
    Last edited: Dec 4, 2015
  30. nasos_333

    nasos_333

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

    Thanks for all the suggestions, i will try to address them all in the upcoming v1.5, about the demos.

    The world scale can be changed through the world scale parameter, so my samples are at world scale 20 and you may set it at any number (e.g. 1 or 2 for smaller worlds). Also the prefabs are easy to scale (e.g. copy the bark and grass blade prefabs to the scene and scale the items inside the parent item), so this can also allow for any scale to be used.

    For much smaller world scales than 20 it is advised to scale the prefabs first and set the world scale then. I can also provide a library with pre-scaled ones for the unscaled world size.

    About the scene setup, the Inspector can be used directly and there is no special scene setup other than placing the script in the scene (and adding the PPaint tag for painting on meshes).

    Here is a few video tutorials to get started with and i plan to make more covering the most advanced features soon

    http://forum.unity3d.com/threads/in...c-grass-everywhere.351694/page-4#post-2405601

    Please let me know for further suggestions and any other questions on the use of the system.
     
    Pequisto likes this.
  31. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    UPDATE:

    After working with bigger brushes i have found an issue with the grass scaling when the scale is larger than one.

    While painting there is an additive scaling of the scaled grass, which means it will appear larger than it should. When ungrown the scaling is restored when entering play mode, but not if it is not ungrown. This issue also affects the grabbed from play mode grass in editor.

    I have now fixed the issue and submitted v1.4.5 with the fix to the store.

    Also i can send a hotfix with the two changed scripts immediately, on PM request.
    Since this patch may affect some of the grass, it is best to backup the project or grass scenes and the InfiniGRASS scripts before applying the patch.
     
  32. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
  33. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    UPDATE:

    The new InfiniGRASS version (v1.4.5) is now up at the unity asset store.

    This version addresses an issue with scaling of brushes while (mass) painting or grabbing from play mode, where they appeared bigger than they should when scale was above one.

    This also addresses the issue where grass seemed to become smaller when ungrown and entering play mode (this was due to the same issue, as brushes were painted larger and then the ungrow mode restored the proper scaling when play mode is entered that corresponds to the actual scale).
     
  34. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    277
    i have a small problem:
    when i try to use mass place it says ->

    UnassignedReferenceException: The variable Tdata of InfiniGRASSManager has not been assigned.
    You probably need to assign the Tdata variable of the InfiniGRASSManager script in the inspector.

    where is the Tdata variable?
     
  35. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    The Tdata is grabbed from the Unity terrain, in order to read the splat maps. The Mass Place can also work without a Unity terrain (you can plant only one grass type per application in meshes, so for more types need to Mass Place for each grass type).

    In one of the previous versions changing the splat maps created an issue with the TData, so please let me know if you are using v1.4 or above or an older one, perhaps this is the issue.

    To further debug this, you can enter Debug mode in the script (press on the three lines with the down pointing arrow in the upper right corner near the locket, in the Inspector) and see the TData variable. The system will grab the terrain and TData when empty, so you can try to 1.)disable the script, 2.) remove the Current Terrain and TData and the system will re-grab them when the script is enabled again.

    Please let me know if the above solve the problem. The automated re-grab of the terrain and TData is enabled in v1.4 and above of the asset.
     
  36. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    277
    hey, thx for the fast reply
    using the newst version 1.4.5

    in debug mode i could assign my current terrain as variable
    now the error is:

    ArgumentException: Invalid argument for GetAlphaMaps
    Artngame.INfiniDy.InfiniGRASSManagerEditor.OnInspectorGUI () (at Assets/InfiniGRASS/Scripts/Editor/InfiniGRASSManagerEditor.cs:1632)
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean forceDirty, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect, Boolean eyeDropperDirty) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1211)
    UnityEditor.DockArea:OnGUI()
     
  37. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    277
    current terrain was emtpy as well by the way

    unity version is 5.2.3
     
    Last edited: Dec 12, 2015
  38. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288

    Is the Mass Placement working on the demo terrain ? Also do you have more than one terrain in the scene ?

    I tested with two terrains also and seems to work ok, i disable the terrain(s) i dont paint on and it mass plants on the other, it automatically grabs the enabled terrain and relevant Terrain Data. Also i cannot recreate the error messages. I will post a few pics of the results with dual terrains for reference.

    The terrain should be automatically assigned (i did not use the debug mode when enabling/disabling the new terrain and the system grabbed the correct enabled terain and its Terrain Data properly each time).

    EDIT: I posted a pic showing what i see in debug mode when using the two terrains. The two variables are automatically set for the enabled each time terrain and i do not get any errors on my side, so it may be something i cant figure out with the current setup.

    Also how many textures are used on the terrain ?
     
    Last edited: Dec 12, 2015
  39. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    277
    in demoscene for v1.4 (interactive grass demo)
    i get
    UnityException: GameObject has undefined tag!
    Artngame.INfiniDy.InfiniGRASSManagerEditor.OnInspectorGUI () (at Assets/InfiniGRASS/Scripts/Editor/InfiniGRASSManagerEditor.cs:1692)
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean forceDirty, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect, Boolean eyeDropperDirty) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1211)
    UnityEditor.DockArea:OnGUI()

    when i try to use mass placement


    in v1.4 brush demo
    IT WORKS! :D

    hmm i take a deeper look at that demo scene
     
  40. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    Try to add the "PPaint" tag and apply to the meshes (if it is not automatically applied when it is defined), this is probably the tag issue. The system uses this tag to limit the painting for mesh objects / terrains.

    When the "Paint on PPaint tagged" is enabled (it is on the demo since there is no Unity terrain) the "PPaint" tag should be defined.

    This tag is also used when more than one terrains exist and you need to paint to all of them at once with the paint tool, this applies to the in game mode as well. Tag the terrains that are not the current/main one to paint on.
     
  41. Morfeuskiev

    Morfeuskiev

    Joined:
    Oct 10, 2013
    Posts:
    122
    @nasos_333

    1) How performance compare to Unity Terrain grass?
    2) In unity 5.3 and 5.2 Terrain grass have a stuttering when camera rotating. How many Draw Calls?
    3) Can works with Terrain?
    4) Only DX11 or it compatible with DX9?
     
  42. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    The system is fully compatible with DX9, there is zero DX11 requirement and will work with any item, grass can be painted on mesh terrain, Unity terrain and any mesh.

    The performance depends on the look, for the Unity like grass is faster and is generally as fast as it gets, since it is not using render textures (so it is faster than DX11 grass that uses rendertextures).

    It is super fast even with huge draw distances (much larger than unity grass) and full shadows, plus full non patterned grass (all shader based grasses look patterned and non realistic, InifiniGRASS is a true non patterned solution for absolute realism)

    The Mass Placement feature works with Unty terrain splat maps to apply different gras sper splat and you can also use Mass Placement with meshes, but one grass type per application (as they dont have splats). I plan to have a system to plant many types with one Mass application for meshes too depending on texture traits in next versions.

    The draw calls are adjustable, i cant say about Unity Terrain grass shuttering, but InfiniGRASS is super smooth in v5.3 as well (just tested it this weekend and seems to be as smooth as in v5.1.1f1).

    You can have very few draw calls, theoretically you can have massive grass amount with as little as 2 draw calls, and that could be practical in smaller scenes if LOD is not required. In larger maps you combine grass in groups, the more grass patches in each group, the less the draw calls and you can decided that number. This will affect the dynamic modes (real time painting, real time growth, gradual growth), since more grass in eahc patch means more time to ungroup the batch and add new grass or grow it. If grass is all grown at game start this is not an issue and you can have large patches that take much fewer draw calls (this mode only needs patches to be lower than the LOD distance, so the LOD does not kick in too soon)

    Generally the system is super fast and fully adjustable to tailor it per specific case.

    Also it can be used on mesh terrain, that is much faster than Unity terrain, for ultimate performance.
     
    Last edited: Dec 12, 2015
  43. yezzer

    yezzer

    Joined:
    Oct 30, 2009
    Posts:
    143
    Any word if this works in VR? I'm after a good, fast grass solution.
     
  44. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    It should work as it does not use anything special, it is batched unity items so should be visible to every camera and given cameras are close together, the LOD etc system should also work fine.
     
    yezzer likes this.
  45. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288



    The system is super fast because it is all done in shader (the temporal displacement) and it does not use rendertextures, which are very heavy if used for multiple grass patches for example. The implementation is the fastest it can be, faster than DX11 grass for example which uses rendertextures.

    I post also some more top down videos, i will be working on the wind as well to add a noise factor as from top down looks a bit uniform.
     
  46. auroxi

    auroxi

    Joined:
    Dec 31, 2012
    Posts:
    85
    Nasos, would you be able to do some toon-like grass demo? I am making a game with toon like graphics and would like lots of dense toon grass if possible?
     
  47. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    Transparent grass performance


    Vertex grass











    Vertex grass performance



    I have multiple vertex grass types that could be used for toon look, ranging from simple 3 point ones to heavier more detailed meshes. Custom meshes are also very easy to use, as long as they have vertical UVs for the wind shader (of course any shader may also be used if compatible with the batched meshes, the system is fully customizable).

    It is very fast in general, so can have lots of density. The density also depends on the mode used (grown all at game start is the fastest and can have biggest density, gradual growth during gameplay requires more density control etc)

    The transparent grass can also be used for toon look with the proper texture, changing the texture is directly done in the material fo the prefabs (or a new prefab can be used)

    I post some pics with performance / density of vertex and gtransparent grasses for reference.

    Also if you need some specific look i can always try to recreate it and add it to the pack as a new brush.
     
    Last edited: Dec 15, 2015
  48. auroxi

    auroxi

    Joined:
    Dec 31, 2012
    Posts:
    85
    Thanks for the reply. I guess something like Jesse linked earlier:



    Would something like this be possible? I've tried the grass in that video but it performs really bad :( If we can get this grass performing perfect I will buy this asset instantly.
     
    barcode802 likes this.
  49. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    Is this grass using rendertextures ?

    I will do some tests to see performance in the specific arrangement, you may also try the demo to gauge performance, plant for example the vertex grass and see how it behaves on your target platform. I will try to make a demo with such grass too.

    The demo is less optimized than the latest version too, so there will an extra boost over this in the latest version (pics are also before i put in the latest optimizations).
     
  50. auroxi

    auroxi

    Joined:
    Dec 31, 2012
    Posts:
    85
    Your demo's work fine. The youtube example uses a texture and is painted using normal terrain tools if that helps? A demo with such grass using infinigrass would be great.

    Thanks nasos, look forward to it :)