Search Unity

Assets Critias Vegetation System [Asset Store]

Discussion in 'Works In Progress - Archive' started by Assembler-Maze, Sep 14, 2017.

  1. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    I've looked over the problem and yes, it was a bug, it did not properly allow the changing of a grass type to a tree type and the changed data was duplicated. The bug is fixed and I'll update it as soon as possible with V 1.2.1 (submitted for review).
     
    Last edited: Nov 6, 2017
  2. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    96
    Thanks!

    I think it is possible to generate the billboard Lod Level through script, like what Unity Terrain do.
     
  3. Sparky11

    Sparky11

    Joined:
    Aug 27, 2017
    Posts:
    2
    This is a really good asset performance-wise! The performance in my game has more than doubled thanks to this asset.

    I just have one suggestion and one question at this point. When adding terrains to the list in the extractor menu, it seems that you can only add them one by one. Even if you select a number of terrains and try to drag them to the list, it only accepts one. This means that you have to enter them one by one, which is really inconvenient when you have >100 terrains to do. It would be fantastic if you could add this functionality.

    Also, I get an error when I try to build the project:

    "
    Shader error in 'Critias/WindTree_Grass': Did not find shader kernel 'frag_surf' to compile (on d3d9)

    Compiling Fragment program
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA
    "
    I am using Unity 2017.2.0f3.

    Thanks!
     
  4. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    Hey,

    The terrain stuff is added to the list of minor improvements, it will come in V1.2.2 since it is really easy to do. Plus I'm thinking at a very rough form of a Unreal type 'Procedural Spawning Volume' that will come in the next version too.


    For that bug, re-import the shader and add it to the 'always included' shaders list. It is also mentioned in the docs.
     
  5. Kelos

    Kelos

    Joined:
    May 27, 2014
    Posts:
    12
    May i ask some more information on runtime API, as we have procedurally generated world.

    What we need at run time:
    1) Place grass / trees / other objects at certain positions (several kilometers around player).
    2) Remove / add single grass patches (1х1m), trees, other objects. (Player planted/chopped a tree)
    3) Free resources for distant areas. Our terrain are too big and we dont wont Foliage System to hold tens of kilometers of filiage in the memory. We have our own sustem to manage that, and ability to discard certain cell in your grid would be enough.
     
  6. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    There's no support for 'performant' runtime population of trees and there is no support for ANY runtime grass adding/removing. The system was designed with that in mind but the implementation details are not there yet.

    I was thinking to implement them when people would require them, so the runtime generation with it's examples will only come in V 1.3/1.4 and that is not in the near future.
     
  7. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    96
    I update to v 1.2.1, It is happy to see change type to ' Other_Tree' is working.

    But there are still some bug to fix.

    1.The Tree Creator Leaves render transparent error ,you can see the picture 1. the terrain's shadow was projected on the tree leaves. It 's no real.

    2.The Tree Creator billbroad Lod No working. Press generate billboard is nothing happened.

    (It is still ok when I set the render distance to 1000,but it is happy to see the billboard lod works..)

    3.The most important, Draw tree shadow option is useless when playing,but editor can.

    All the bugs come out when using Tree Creator's Tree.

    It is happy to see Critias to be better! It maybe the greatest tree asset in as!

    QQ截图20171110112431.png QQ截图20171110112456.png
     
  8. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    96
    the picture about no shadow of the trees when playing
    QQ截图20171110113742.png

    the terrain and treecreator in normal
    QQ截图20171110112605.png
     
  9. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    Many of those 'bugs' come from the fact that you did not read the docs.

    1. I do not take responsibility for the shaders that I did not provide, I don't know what shaders come with tree creator and what bugs they have
    2. Tree creator does not have any billboards that I can extract, they require a 'BillboardAsset'
    3. The 'Draw Tree Shadow' is only for the editor, for shadows at runtime use the 'Draw Shadows' in the 'Types inspector'
    4. (To prevent this problem) Wind does not work with TreeCreators

    For the best performance and flow I really suggest stepping out of the old deprecated and ugly tree creator and move to your own custom shaders/trees or move to SpeedTree.

    If you are not happy with the provided TreeCreator support, there's no problem, I can provide a full REFUND in case my system does not offer you what you require for your specific project.
     
  10. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    96
    Keep Calm and Carry On.

    I never want to make you annoyed.

    Maybe I need to read the docs more carefully.

    Thanks for your help!

    It is happy to see Critias to be better! :);)
     
    Assembler-Maze likes this.
  11. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    Yea, no problems! I'll see in the future for better tree creator support, however there are some things that I can't manage like the wind or the billboards that I don't have access too.

    And I was not annoyed, I just pointed out very firmly that I offer refunds if the system is not what you have expected or maybe if it does not fit your project's needs. There is no point in keeping it around you HD if it does not help you with your specific project, and, I don't know, but for you TreeCreator might be something vital. There might be no point for you to use my system I don't have time to properly support TreeC since I'm already working on a set of improvements and maybe some rough spawning volumes.
     
    treshold likes this.
  12. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Would it be possible to get a Mac demo soon?

    thanks
    Dave
     
  13. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    And I hear that CTI support is coming....how soon?
     
  14. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    Nothing soon for the first, nothing soon for the second. I am already working on a new list of improvements that will take some more time.
     
  15. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Okay...well, I purchased it anyways to start playing around with it. I set up a test scene with 20k speedtrees (one mobile, one desktop model, from their free pack), tested it, then extracted to Critias and tested again. Performance is 10-20% better with Critias, but the billboards are noticeably less attractive. Is there anything I can do about that? And how do I enable billboard tree shadows?

    speedtree1.jpg critias1.jpg speedtree2.jpg critias2.jpg
     
  16. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    HELLO!

    How good is this? If i fill my entire terrain wich is 8 by 8 kilometers, lag? fps drop?.... please tell me I can get this to look good on unity 5.6.2f1 .. please =)
    And can I NOT use billboards? and any mesh or texture?
    I see it has Advanced Foliage Shader 5 support, touch bending too?
     
    Last edited: Nov 13, 2017
  17. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    Hello,

    1. Billboards less nice - See that in your first image the standard trees have a significantly larger draw distance than when you extracted them to my system. Modify the settings so that the draw distance is about the same. Except that the billboards seems about the same to me...
    2. For the billboards shadows there are 2 shadow rendering mechanisms. The standard 'addshadow' one or the custom method that looks like the 'SpeedTree' one however with that shadow artifact on it. Look through the code of the billboard shader and de-comment the section that suits you best.

    Docs:
    "The 'WindTree_Billboards' will be used for SpeedTree batched billboards. It has 2 possible drawing methods for the shadows. The first uses the 'addshadow' directive and will draw shadows that rotate with the billboard. If you do not use the 'addshadow' directive it will draw shadows that behave exactly like the SpeedTree billboards, however it will have that specific shadow artifact on the billboard."

    For the artifact, sorry I can't fix it myself, it is present in the default SpeedTree's as well, there should be an engine fix for that where a stencil should be filled with the pixels that we don't want self-shadows on. But that is engine-side, there's nothing much I can do about it.

    For any other problems or bugs feel free to contact me again.
     
  18. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    1. It should work considerably better for a 8x8km terrain that has 20k+ trees
    2. You are not forced to use billboards
    3. You can use any mesh
    4. There is no support for simple textures like Unity's detail system, you will have to provide a mesh
    5. With my shader there is touch support
    6. For AFS ask his creator if touch bending is supported
    7. Unity 5.6 is not supported

    For more info on the performance gains check the advanced video tutorial (minute 30) at the end, I have a large 8x8 terrain there and with my system and 200k trees the fps jumped from 4-5FPS on a GTX970 to 140FPS.
     
  19. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Ah okay. I have 5.6 so... I have to stay on that. Its stable for once now..not many assets work on 2017 that I have.
     
  20. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    I know that it works for 5.6 but I don't support it. Maybe in the future.
     
  21. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Thanks for the tips. I think I had a couple misunderstandings about Critias. The billboard shadows are only up to Unity's shadow distance, right? (I had somehow been assuming it extended beyond that.)

    Now I realize that the flatness of the Critias billboards is because I'm looking directly away from the sunlight. When looking perpendicular, the billboards look quite nice....but when looking towards the sun, they are very very dark. Is that self-shadowing? I like it but it's too extreme (too minimal or too extreme) except when looking perpendicular. Is that tunable? (I thought that's what the self-shadowing options in the shader code might control, but I switched to the other one and it doesn't look any different.)

    Also: Looks like I have to change the Max Draw Distance on each tree, save, and then run to have those changes take effect. Is there any way to do that on the fly during runtime, so we could wire it up to the quality levels?

    thx
    Dave
     
  22. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    Hello,

    For the billboards, again I'm not 100% sure, they should not work different than the SpeedTree ones. Use the NON 'addshadow' for the exact same effect.

    For runtime changes, check the example code that is included in the package. Just add it to any object in your scene and it should work with runtime changed.
     
  23. JRRReynolds

    JRRReynolds

    Joined:
    Oct 29, 2014
    Posts:
    192
    +1 for official 5.6 support
     
    Assembler-Maze likes this.
  24. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    .....so support or not?
     
  25. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    I still have some more important features to finish up at the moment, so I guess that it will not come in the next version. However I'll update you after V 1.3 (that will come with proc spawning) on this point.
     
    mattis89 likes this.
  26. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    +1 for 5.6 support as well.
     
  27. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    But what's with the 5.6 version? Is it about the old licensing system or something?
     
    Alverik and MarkusGod like this.
  28. JRRReynolds

    JRRReynolds

    Joined:
    Oct 29, 2014
    Posts:
    192
    @Assembler-Maze Yes its licensing. A lot of devs purchased Unity Pro prior to the subscription system. It doesn't make sense to switch to Unity 2017 and pay $35-125$/month when we have Unity 5 Pro for life.

    Edit to add: We also finally got a very stable release in Unity 5.6.3 which practically did not happen in the all of Unity 5's cycle.
     
    ScoobyNooby likes this.
  29. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    Ok, then I'll postpone the procedural spawning volumes, and I'll see for proper 5.6.3 support. Can't promise it if some API is missing from unity. Will inform you next week on the porting progress and with a conclusion for this issue.
     
    mtornio and JRRReynolds like this.
  30. JRRReynolds

    JRRReynolds

    Joined:
    Oct 29, 2014
    Posts:
    192
    @Assembler-Maze Thanks that would be great. I'm just happy you have a fix for it even if it wasn't unsupported. A 5.6 package would be even better! I purchased it a week ago but still haven't imported it in yet because I'm working on other game mechanics. Fyi, your probably aware but if you need you can upload a 5.6 compatible version and 2017 compatible version, downloaders will automatically have it selected depending on what version of unity they have open when they access the store. I'm keeping my fingers crossed for no api changes for the dream.

    Thank you from all 5.6 devs who don't have money to spend on a subscription system, and Happy Thanksgiving!
     
  31. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    96
    Critias is great!

    After two week's work, I finally make a better grassland

    I find out how to get shadow of 'instanced_ indirect' grass!

    But now I have an question, how about to use instance indirect for trees?

    If I want to add a checkbox for setup speedtree between "instanced_indirect" and "instanced", which script is needed to modify?
    QQ截图20171126190713.png
     
    Assembler-Maze and Alverik like this.
  32. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    I've modified the version to be compatible with 5.6.3 by default, however it needs a little bit or more testing. There is no missing API from 5.6.3 so it should be quite fine.

    However I will require a little bit of more testing before throwing it into the market, since I can't just hope that I've modified the code a little and that it will work. I'll submit it for review by the end of this week.

    Congratulations on the shadows on indirect grass, it looks very nice! For the tree indirect mode I've thought at it however I really think that it is not necessary, it will provide you little performance benefit. The indirect mode is designed for more than 1k instances per cell or at least a lot of instances that require a GPU cache so that we don't copy the data each frame. For trees the count per cell is a lot however (probably as much as 50x times lower) and you will get little benefit from using the indirect mode (and I have to modify the shaders too).
     
    JRRReynolds likes this.
  33. Vanidash-Studios

    Vanidash-Studios

    Joined:
    Mar 9, 2016
    Posts:
    71
    is there any conflict with terrain composer 2 autoplacement? or will i have to place them manually by painting them on the terrain in order for critias to work?
     
  34. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    Unfortunately you can not directly spawn the foliage inside my system, since that requires work from the TC team to spit it's data in my system.

    You will have to generate the data with TC and after that extract it and add it to my system. There will be no conflict whatsoever.
     
  35. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    96
    :):);)
    It's ok

    And I notice that some grass is no support winds When I use the grass in moblie cover pack of speedtree.

    I read the document but no mention about it ?

    However, the effect is still good!

    ;):)
    QQ截图20171128145831.png
     
    Alverik likes this.
  36. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    Hello,

    The vegetation looks nice. For the wind problem try and see if the wind works with the default model too. If it doesn't it is a weird issue of SpeedTree and try to set the quality to 'Fast' 'Best' etc... until you find a mode that works. But first check that a standard grass prefab works with wind. If it does not it try changing the wind quality as i've told you.
     
    Alverik likes this.
  37. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    I've submitted the beta version of the foliage system that is compatible with 5.6, it should be live one the market quite soon!
     
    JRRReynolds and zmaxz like this.
  38. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    Does is work on Metal with iOS? Apple TV4k, Mac?
     
  39. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    And do you have plan to support unity tree creator trees?
     
  40. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    what grass are you using? any package? it looks pretty neat
     
  41. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    Hello,

    1. I have not tested this system for mobile devices, it is not recommended for them. It is designer for PC/Consoles and require a quite powerful GPU. For mobile games I would employ other more mobile-friendly tricks
    2. It somewhat supports unity tree creator but people told me there are bugs in the TC shaders and it doesn't support billboards or wind. So, if you want to use it for TC I really would not recommend it
     
  42. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    96
    Hello, apologize for my recklessness!It‘s me again!

    I must say sorry that I finally get the tree creator shadow after replacing shader.
    QQ截图20171204143343.png


    But I found some thing strange..
    When I get too close to the tree creator's tree.
    The tree become double tree....
    I just extract it one time..
    QQ截图20171204142701.png
     
    Last edited: Dec 4, 2017
  43. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    96
    No only the tree creator extracted, the trees drawed by critas painter also become double trees..
     
  44. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    96
    ;););)Hello! I get it!

    Collider script does not remove the render part!
    So It render two trees!
     

    Attached Files:

  45. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    96
    I edit the foilagecollider script so the bug fix.
    Add the script after destroy lod group.
    Code (CSharp):
    1.  Renderer ObjectRenderer = colliderPrototype.GetComponent<Renderer>();
    2.                     if (ObjectRenderer)
    3.                     {
    4.                         DestroyImmediate(ObjectRenderer);
    5.                     }
    6.  
    7.                     Tree ObjectTree = colliderPrototype.GetComponent<Tree>();
    8.                     if (ObjectTree)
    9.                     {
    10.                         DestroyImmediate(ObjectTree);
    11.                     }
     
  46. JRRReynolds

    JRRReynolds

    Joined:
    Oct 29, 2014
    Posts:
    192
    Sweeeet!!!!!
     
  47. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    Wow, that is a really really bad issue. Thank you very much for pointing it out, that is really heavy for both the engine and the renderer. Using SpeedTree, deleting the LOD group fixes the stuff, but for things that do not use a LOD group, yea, it duplicates the renderer.

    I'll make a bugfix patch.
     
  48. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    has it been any improvements over the old grass package? it's not listed on your asset store any more. I used your independent grass system and it didn't provide any performance benefit over default unity grass (i use billboard grass, not prefabs/meshes), in fact it ran at half the speed. I'm curious if this was improved and if touch bending was added too.
     
  49. Assembler-Maze

    Assembler-Maze

    Joined:
    Jan 6, 2016
    Posts:
    630
    Sorry, I don't have time to maintain the old systems, especially that the other two that were free had a lot more requests and problems that needed maintained.

    For your performance issue, it is expected, you have to follow the guidelines described in the docs if you wish for any improvements on the performance. If you will use billboards instead of meshes there will be absolutely no benefit, and not only that, it will probably work slower.

    The docs can be found here:
    https://www.dropbox.com/s/gdqme68txrn6sz2/Documentation_CritiasFoliage.pdf?dl=0

    Read the section of common pitfalls.
    Docs quote: "Using quad meshes:
    NEVER use simple quad meshes for grass. It will lead to the requirement of a huge amount of meshes to fill a rather small area of terrain and to an unnecessary high density requirement. It will, for sure, blow up to the system. And the problem is not in my system only, it is an universal problem, it appears in Unreal, CryEngine and all other engines
    out there. NEVER use simple quads."
     
  50. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    well, i use simple quads and i run at 500 fps, i use meshes and i run at 220 fps... for the same density. So that's why I'm sticking to quads still. All the systems I see, improve performance if you use meshes... awesome, but i don't, because my performance is more than double without them. So the way I see it is that all systems try to speed up something that is slow like a snail by default and try to make it run as fast as quads.