Search Unity

[NEW PATCH] uNature - GPU, Interactable Grass. Interactable Trees, MultiThreading and more!

Discussion in 'Assets and Asset Store' started by ElroyUnity, Apr 29, 2016.

?

Pre-release Integrations

Poll closed Nov 29, 2016.
  1. TerrainComposer2

    43.1%
  2. GAIA

    54.9%
  3. GENA

    49.0%
  4. World Creator

    13.7%
  5. World Streamer

    37.3%
  6. Map Magic

    27.5%
  7. Landscape Builder

    0 vote(s)
    0.0%
  8. SkyMaster ( Weather )

    7.8%
  9. InfiniGrass, AFS, DX11 (Integration will provide built-in shader support)

    33.3%
Multiple votes are allowed.
  1. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Sorry for that :/ thats why I made it visible in the asset store version, you probably had a beta one :/.
    Let me know how it goes!
     
  2. gamedeveloper512

    gamedeveloper512

    Joined:
    Jun 14, 2013
    Posts:
    16
    Hi, bought your product last week and cannot make grass visible. It looks like UNSeeker doesn't work, because of grass is culled by default scene camera and it works fine in scene view. Moreover i can see grass in game camera what is not culled by scene camera. Very weird. I waste a lot of time to understand what i do wrong with your package. Maybe issue is in Unity version? I use 2017.1.0b10
     
    ElroyUnity likes this.
  3. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Sorry didn't understand properly the problem :/
    Could you send me your invoice on the support email: eeproductionssupp@gmail.com
    And include a new project with uNature and with a scene with the issue, will check if maybe you just didnt set it up properly.

    I am using the beta of 2017 and it does seem to work fine on my end :)
     
  4. grujicbr

    grujicbr

    Joined:
    Aug 19, 2014
    Posts:
    18
    Hi,

    I spent over a week trying to use your asset and I have come to a conclusion that is unusable in any shape or form.

    1. The fact your package allocates a lot of game objects and increases size of the scene is ridiculous. This creates huge stutters when you press play that completely ruin the player experience.

    2. Hiding of game objects in the scene hiearchy view is also a wow moment. I had to delete your asset from my repository because even though i deleted the terrain, it was using hidden gameobjects and loading random data into my build causing long build times. I actually had to manually edit the .scene file to remove the references... Please do not make hidden game objects...

    3. Long build times. Have you even tested this package in a real working environment? When i build my package, it takes about 20-30 seconds, however after adding this it exploded to near 4-5 minutes because it is packing all these un-used data into the scene, every single time! This is simply un-acceptable

    4. Have you ever profiled start / stop / running through the world? I had to edit the code to remove 1000ms stalls because you simply dont understand how managed C# code works. Please dont load data from the terrain at the start and never use it. If you do that, at least do it across 100 frames or something, not in one frame.

    ** Disclaimer, I haven't tried the new version because I simply don't believe it can really be any better if this is how this package got submitted to the asset store to begin with **

    At this point, I'm not requesting a refund purely just to support you to hopefully make this work properly in the future for other people who don't know what they are doing.
     
    ElroyUnity likes this.
  5. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey!
    Thanks for your feedback!

    1) That's true, that came into my attention long ago and there's a solution to that on the repository for anyone that wants it by providing me with his email and invoice (GitLab repository)

    2) That was fixed with the latest asset store version that was submitted a few months ago, the hidden game object (foliage manager) was a mistake on my end and when I noticed it I submitted a fix (like I said, on the last version :))

    3) Was caused by the first ticket where the manager would save the maps on the scene instead of compressed files and create the issues you mentioned.

    4) Correct, actually I noticed it a long time ago and it was because it was accessing the custom terrain data that required looking through resources and thus loaded the whole resources accidently. i thought I submitted the fix for that already, were you on the latest version? if so, please let me know and I will submit the fix right away!


    And thanks for believing in me, I am really trying to make the asset amazing with the new version and as I said I wont promise anything about it but I am trying to push a closed beta as soon as possible. You can follow the trello here - https://trello.com/b/I4kqOpDC/unature

    I am going to update the trello soon with a more organized list of what's left for the beta and once ready I will create a new repository for beta testers :)
     
  6. grujicbr

    grujicbr

    Joined:
    Aug 19, 2014
    Posts:
    18
    I'm using the latest version from the asset store. I will look into this again once a new version is available publically and stable on the asset store.

    I highly suggest that you stress test your changes in a real life work environment, such as making builds, iterating, constantly profiling to remove any sort of 1 frame stutters, not accessing managed c# wrong and only creating data for things that exist in the world. Visually wise your asset is great, and I would love to actually use it, it is just in need of a much bigger clean up.

    Good luck in the development!
     
    ZoneOfTanks and ElroyUnity like this.
  7. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Agreed, been refactoring it for a few weeks now and will keep on going :) thanks a lot for your feedback! appreciated!
     
    ZoneOfTanks and Mark_01 like this.
  8. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Does uNature support terrain mesh details like small rocks, stones etc like Unity terrain does?
     
    ElroyUnity likes this.
  9. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey,
    Not at the moment, as of now you can only use an object with 1 mesh (or more if its inside an LODGroup) and 1 material.

    (note that small rocks might work, i suppose small rock pebbles, but big stones most likely won't and would look really weird)

    Maybe in the future I will add support, but as of now, its not supported :)
     
  10. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Thanks for the quick reply. Though I can't just buy the asset to test it, It's still nice if the small details like pebbles works. You wouldn't want big mesh details anyway as they can't have colliders.
     
    ElroyUnity likes this.
  11. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    I would say give it a shot, if doesn't work I will gladly refund you :)
     
  12. Hexaedre

    Hexaedre

    Joined:
    Jan 23, 2015
    Posts:
    110
    Hi,

    Actually there are some issues with the MapMagic integration :

    Assets/uNature/Scripts/Core/Extensions/Integrations/MapMagic/Integration/UNMapMagic_Manager.cs(10,7): error CS0246: The type or namespace name `Plugins' could not be found. Are you missing an assembly reference?

    Do you plan to fix it soon ?

    Except for that, great asset !
     
    ElroyUnity likes this.
  13. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey!

    Yes, that's an outdated integration and there's a new one you can get, simply message me with your invoice :)
    To fix those issues tho (without getting the new integration) simply remove the "using Plugins;" on the top of the script and replace Tuple with TupleSet :)
     
  14. Hexaedre

    Hexaedre

    Joined:
    Jan 23, 2015
    Posts:
    110
    Thank you for the very quick reply. :)
     
    ElroyUnity likes this.
  15. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Anytime :)
     
  16. MarkusGod

    MarkusGod

    Joined:
    Jan 10, 2017
    Posts:
    168
    Sorry for interrupting, but I'm very curios, will new uNature still be compatible/integrated with world streamer?
     
    ElroyUnity likes this.
  17. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Yes, by default as it will be attached to an object instead of global grids. And so when streamed it will work out of the box :)
     
    ZoneOfTanks and MarkusGod like this.
  18. Lohrion

    Lohrion

    Joined:
    Aug 16, 2013
    Posts:
    107
    That means it would also work with tiled worlds, where the position of the tiles is known only at runtime (e.g. tile A is at position (1,1) in one game, and at (5,3) in another)?
     
    ElroyUnity likes this.
  19. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Yes, can't see why not :)
    As long as the position of the surface is modified to the tile position it should work perfectly :)
     
    ZoneOfTanks likes this.
  20. joni-giuro

    joni-giuro

    Joined:
    Nov 21, 2013
    Posts:
    435
    On the asset store page it says it is compatible with magic map, but when I have an empty project with just those two assets (magicmap and unature) I get a big fat
    "Assets/uNature/Scripts/Core/Extensions/Integrations/MapMagic/Integration/UNMapMagic_Manager.cs(10,7): error CS0246: The type or namespace name `Plugins' could not be found. Are you missing a using directive or an assembly reference?" error and can't enter playmode.

    Honestly I'm kinda pissed, I can't remember the last time I managed to download and use more than 2 assets from the asset store together without having my project all messed up by them.
     
    ElroyUnity likes this.
  21. Salja

    Salja

    Joined:
    Mar 23, 2017
    Posts:
    353
    Map magic Support is sice some time broken you can write a pm to the creator He send you a test Version with working MM

    But yeah this is a Big Problem on unity asset store all time ppl write have Support for other assets and After you buy dont work
     
    joni-giuro and ElroyUnity like this.
  22. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey!
    Like Salja said, send me your invoice and I will send you a fix :)
     
    joni-giuro likes this.
  23. joni-giuro

    joni-giuro

    Joined:
    Nov 21, 2013
    Posts:
    435
    Thank you, I have sent you my invoice to the mail address I found on the asset store.
     
    ElroyUnity likes this.
  24. joni-giuro

    joni-giuro

    Joined:
    Nov 21, 2013
    Posts:
    435
    Thanks a lot for the mail, the error is gone and it seems to work, I guess? I mean, I follow the steps and have no errors but I see no change in the scene, how can I be sure that it's actually using unature's grass and not the unity default grass? I tried deactivating the UN Seeker (I think that's what's called) and I still see the grass in the Game window so I'm not sure it's working properly.
     
    ElroyUnity likes this.
  25. Salja

    Salja

    Joined:
    Mar 23, 2017
    Posts:
    353
    have you brush the grass with unature then ? i bursh my grass with unature and works fine
     
    ElroyUnity likes this.
  26. joni-giuro

    joni-giuro

    Joined:
    Nov 21, 2013
    Posts:
    435
    No I haven't because I think unature is supposed to convert the existing grass into unature grass, right?
     
    ElroyUnity likes this.
  27. Salja

    Salja

    Joined:
    Mar 23, 2017
    Posts:
    353
    good question i not Need thats why i have not check =(
     
    ElroyUnity likes this.
  28. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Regarding MapMagic integration - it works if you pin the terrain, but if you want to convert already placed terrains, attach UNTerrain and go to the foliage tab and click on Copy Foliage.

    That should copy the grass :)
     
    ZoneOfTanks likes this.
  29. joni-giuro

    joni-giuro

    Joined:
    Nov 21, 2013
    Posts:
    435
    Thanks, Im slowly getting somewhere, Im still not sure how to get the same look, heres a before/after comparison following your steps

    EDIT
    I managed to get it working, I get double the amount of fps which is great but I think it doesnt look quite like the original, am I missing something or do I have to live with that?
     

    Attached Files:

    Last edited: Oct 9, 2017
  30. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Ah I see - whats your terrain size and detail resolution set to?
     
  31. joni-giuro

    joni-giuro

    Joined:
    Nov 21, 2013
    Posts:
    435
    Sorry I don't have the project here at work but I'm pretty sure size is the default MapMagic size (I believe it's 1km x 1km) and the resolution is set to 512
     
    ElroyUnity likes this.
  32. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Oh I see, the issue is that if resolution is lower than the size it creates some artifacts as you have seen, but if you unpin your terrains and pin them again while the map magic integration is enabled it should fix it :)
     
  33. joni-giuro

    joni-giuro

    Joined:
    Nov 21, 2013
    Posts:
    435
    That's what I did and I ended up with the grass2.jpg image in my post above, the grass renders correctly but it's much less dense and beautiful than the original one. I don't want to annoy you, I just want to make sure that I'm using the asset to its full potential
     
    ElroyUnity likes this.
  34. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Oh absolutely not, in no way you annoy me :) I am here to give support ;)

    Regarding density - go to your prototypes on the foliage manager window, and on each one increase "Max Generatable Density" up to 20.

    Then once all of them are 20 re-pin the map magic tiles (let it regenerate) and it should have double the density :)
     
  35. joni-giuro

    joni-giuro

    Joined:
    Nov 21, 2013
    Posts:
    435
    Ok I'll try that as soon as I get home, in the meantime maybe you can answer this question: should it work on a macbook pro? It doesn't seem to render on the macbook pro I use at work (GPU AMD Radeon R9 M370X 2048 MB, Unity 5.4), not even in the demo scene included in the package. It renders fine when I press "P" to switch to unity grass but when I press it again, nothing.
     
    ElroyUnity likes this.
  36. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Weird haven't heard any issues about it. Can you send me your skype details on PM and I will see if there are maybe shader compile issues or something like that?
     
  37. guidoponzini

    guidoponzini

    Joined:
    Oct 4, 2015
    Posts:
    55
    Hi! I'm working on a big terrain and everything is working correct... But sometimes the update of sector goes a little bit wrong, loading chunk in a strange way. Moreover, I have two different cameras with keypoint. If I switch on one "car camera" to different keypoint sometimes grass disappear totally. There is a script that I can call in order to refresh grass rendering? quite urgent here, I'm in tight schedule
     
    ElroyUnity and ZoneOfTanks like this.
  38. guidoponzini

    guidoponzini

    Joined:
    Oct 4, 2015
    Posts:
    55
    I also believe that this could be connected: in editor if I zoom out grass disappear and throw out this error:

    NullReferenceException: Object reference not set to an instance of an object
    uNature.Core.FoliageClasses.RenderingQueue.Render (UnityEngine.Camera camera, UnityEngine.Plane[] cameraPlanes) (at Assets/uNature/Scripts/Core/Utility/RenderingPipelineUtility.cs:367)
    uNature.Core.FoliageClasses.RenderingPipielineUtility.RenderQueue (uNature.Core.FoliageClasses.RenderingQueueReceiver receiver, UnityEngine.Camera camera) (at Assets/uNature/Scripts/Core/Utility/RenderingPipelineUtility.cs:156)
    uNature.Core.FoliageClasses.FoliageMeshManager.DrawEditorCameras () (at Assets/uNature/Scripts/Core/Foilage/GPU_Utilities/FoliageMeshManager.cs:509)
    uNature.Core.FoliageClasses.FoliageMeshManager.Update () (at Assets/uNature/Scripts/Core/Foilage/GPU_Utilities/FoliageMeshManager.cs:497)
    uNature.Core.FoliageClasses.FoliageCore_MainManager.Update () (at Assets/uNature/Scripts/Core/Foilage/GPU_Utilities/FoliageCore_MainManager.cs:317)

    NullReferenceException: Object reference not set to an instance of an object
    uNature.Core.FoliageClasses.RenderingPipielineUtility.CleanupQueueInstances (uNature.Core.FoliageClasses.RenderingQueue[] renderingQueueStash) (at Assets/uNature/Scripts/Core/Utility/RenderingPipelineUtility.cs:262)
    uNature.Core.FoliageClasses.RenderingQueueReceiver.set_renderingQueue (uNature.Core.FoliageClasses.RenderingQueue[] value) (at Assets/uNature/Scripts/Core/Utility/RenderingPipelineUtility.cs:774)
    uNature.Core.FoliageClasses.RenderingQueueReceiver.get_renderingQueue () (at Assets/uNature/Scripts/Core/Utility/RenderingPipelineUtility.cs:761)
    uNature.Core.FoliageClasses.RenderingPipielineUtility.RenderQueue (uNature.Core.FoliageClasses.RenderingQueueReceiver receiver, UnityEngine.Camera camera) (at Assets/uNature/Scripts/Core/Utility/RenderingPipelineUtility.cs:145)
    uNature.Core.FoliageClasses.FoliageMeshManager.DrawEditorCameras () (at Assets/uNature/Scripts/Core/Foilage/GPU_Utilities/FoliageMeshManager.cs:509)
    uNature.Core.FoliageClasses.FoliageMeshManager.Update () (at Assets/uNature/Scripts/Core/Foilage/GPU_Utilities/FoliageMeshManager.cs:497)
    uNature.Core.FoliageClasses.FoliageCore_MainManager.Update () (at Assets/uNature/Scripts/Core/Foilage/GPU_Utilities/FoliageCore_MainManager.cs:317)


    NullReferenceException: Object reference not set to an instance of an object
    uNature.Core.FoliageClasses.RenderingQueue.UpdateDensities () (at Assets/uNature/Scripts/Core/Utility/RenderingPipelineUtility.cs:332)
    uNature.Core.FoliageClasses.RenderingQueueReceiver.ResetDensity () (at Assets/uNature/Scripts/Core/Utility/RenderingPipelineUtility.cs:874)
    uNature.Core.FoliageClasses.FoliageMeshManager.MarkDensitiesDirty () (at Assets/uNature/Scripts/Core/Foilage/GPU_Utilities/FoliageMeshManager.cs:447)
    uNature.Core.Utility.UNBrushUtility.PaintBrush (Boolean isErase, Int32 brushSize, Byte paintDensity, Byte eraseDensity, Boolean createNewManagers, Boolean useTerrainBasedPainting, System.Collections.Generic.List`1 splats, Boolean interpolateSplatValues, System.Collections.Generic.List`1 selectedPrototypes, Vector2 position, uNature.Core.FoliageClasses.PaintBrush brush) (at Assets/uNature/Scripts/Core/Utility/UNBrushUtility.cs:354)
    uNature.Core.FoliageClasses.UNFoliageEditor.PaintBrush (Boolean isErase, Vector2 position, uNature.Core.FoliageClasses.PaintBrush brush) (at Assets/uNature/Scripts/Editor/UNFoliageEditor.cs:1066)
    uNature.Core.FoliageClasses.UNFoliageEditor.OnSceneGUI (UnityEditor.SceneView sView) (at Assets/uNature/Scripts/Editor/UNFoliageEditor.cs:932)
    UnityEditor.SceneView.CallOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2419)
    UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:1737)
    UnityEditor.SceneView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:1569)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:272)
    UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:265)
    UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:232)
     
  39. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Both of them have UNSeeker attached?
    You can call update manually by accessing the seeker component and then doing seeker.queueInstance.CreateInstances(false);

    Which will update the grass on the same frame instead of a different thread :)
     
  40. guidoponzini

    guidoponzini

    Joined:
    Oct 4, 2015
    Posts:
    55
    If I change grass type in foliage manager painter then everything restart... While playing usually I don't have problems but sometimes some sector just goes crazy and start to load far but not close grass
     
  41. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Yea, those are mainly because of my fault and I always forget to push a fix for those to the asset store. I will do that today so it never happens again.

    Basically replace your RenderingPipelineUtility.cs with: https://hastebin.com/puvevujoki.cs

    Let me know if what I sent above (seeker.... method) helps (Run it on the seeker of the camera you are changing to)
     
  42. guidoponzini

    guidoponzini

    Joined:
    Oct 4, 2015
    Posts:
    55

    Hi Elroy, thank you, no, I have some sectors that just don't update some kind of grass (like squared sector)... There is one way to refresh in editor all the calculations of sectors and fix problems?
     
    ElroyUnity likes this.
  43. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    As written above, you will need to use the method above - seeker.queueInstance.CreateInstances(false);
    On the seeker you want to update :).
     
  44. guidoponzini

    guidoponzini

    Joined:
    Oct 4, 2015
    Posts:
    55
  45. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Absolutely beautiful! Speechless :)

    I am going to start the beta of the new uNature soon, I will make sure to put you in it. Will contact you in the next few weeks :)
     
  46. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    385
    Well done. It's well composed. Rather realistic. And consistent in style.
     
  47. Hexaedre

    Hexaedre

    Joined:
    Jan 23, 2015
    Posts:
    110
    Hi,

    Is there a way to have the feature "use color map" working on the grass when using Unature with MapMagic ?

    Edit : Problem solved. I had to reimport some assets and now it works just fine.

    However, it would be nice to have a control on how much the texture underneath tint the grass.
     
    Last edited: Oct 11, 2017
    ElroyUnity likes this.
  48. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey -
    This feature is currently disabled on map magic because in order to generate that map you need to take a snapshot of the surface which is very slow and so not enabled at the moment. I am researching a new approach for color maps though that will make it faster :)
     
  49. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Also some more news - going to submit a fix today for some issues that people have been getting, mostly the errors in console and some more small tweaks. I am mainly getting the asset ready towards a stable version and then start the beta of the remastered version :)
     
    ZoneOfTanks likes this.
  50. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    Will we be able to have the uNaure grass take its color from a MegaSplat terrain, because that would be great?
     
    ftejada and ElroyUnity like this.