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

[RELEASED] Crux 2.0 - Procedural AI Spawner for Terrains (Biomes, Population Caps, and more)

Discussion in 'Assets and Asset Store' started by BHS, Dec 13, 2016.

  1. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    1.Can I set an area spawn(Such as in a sphere trigger)?
    2.Can I set an area no spawn?
     
    Last edited: Oct 15, 2018
  2. tredpro

    tredpro

    Joined:
    Nov 18, 2013
    Posts:
    515
    did you bake the terrain yet?
     
  3. MarceloASG

    MarceloASG

    Joined:
    Jun 15, 2017
    Posts:
    23
    I solved the problem by using the Safe Place Prefab replacing the Mesh by a Terrain.Thanks
     
  4. attaway

    attaway

    Joined:
    Nov 12, 2014
    Posts:
    45
    any ETA on Crux v2?
    Or even a beta I could use?
     
  5. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    I dont get it?

    I use Enviro.... so will animal spawning work without unistorm (whatever that is?)?
    I dont want to change my current terrain textures or biomes created using vegetation studio pro..... so will I be able to use the animal spawner? Is it called crux or is crux something different. Sorry its not clear. Thanks
     
    Ascensi likes this.
  6. lazyfly75

    lazyfly75

    Joined:
    Oct 5, 2018
    Posts:
    5
    Hello, since a few days I permanetly getting this error: Assets/Crux - Procedural AI Spawner/Scripts/System/Crux.cs(285,16): error CS1061: Type `Button' does not contain a definition for `onClick' and no extension method `onClick' of type `Button' could be found. Are you missing an assembly reference?

    Tested several unity versions.

    Anny idea?

    Regards
     
  7. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Can anyone tell me:

    1. Is this a stand alone asset? Can I just buy it and use it with my current scene?
    2. Instead of creating biomes can I just create AREAs (not adding textures to the scene)? within my current done scene?
    Thanks
     
  8. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Any chance of that Fast Support?
     
  9. Ramulos

    Ramulos

    Joined:
    Feb 19, 2017
    Posts:
    57
    eta for mesh support?
     
  10. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    No, Crux spawns based on texture conditions. You can limit where you want Crux to not spawn by adjusting the minimum spawn area.


    I'm hoping to have it submitted within the next couple of weeks.


    Weather, time, and seasonal conditions are for UniStorm only. Users do not have to use these conditions and they are only available if UniStorm is detected. I am also the developer of UniStorm so it makes integrating my own systems a lot easier and quicker. I am not opposed to adding support of other systems. I was simply adding support for UniStorm first.


    What version of Unity are you using? I haven't encountered this issue yet. I'll make sure it isn't present in version 2.0.


    1) Yes, Crux is a standalone asset. It simply spawns objects/AI according to the textures on your Unity terrain. No other assets are need to make it function. An AI system is recommended, but is not technically required. Crux includes a very basic wandering AI example using Unity's NavMesh so get users started.
    2) Areas are something that I am considering after the release of Crux 2.0.


    Crux 2.0 adds mesh support. I'm hoping to have the update finished within the next couple of weeks.
     
    attaway and Hawk0077 like this.
  11. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,269
    You should look into Vegetation Studio Pro and how it spawns biomes. This would go great with that! @LennartJohansen
     
    attaway likes this.
  12. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Thanks for the response, I did buy it in the sale so I understand how it works now. Although the wandering script didnt work on my animals at all (maybe I missed something) I did get a script that did what I wanted and will just need to personalize it.

    I already have enviro so integration would be great at a later date. Many thanks
     
  13. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Its very simple. Whatever textures are on your terrain weather created with CTS, Vegetations Studio or anything else, just create a biome in Crux using the grass texture you used in CTS, Veg Studio etc. Thats what I did and it spawns fine. Getting animals top move and behave is another matter?
     
  14. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Anyone know of a good animal behaviour/wandering script that works?. Ive tried several free ones but they don't work well.

    Just the basic idle eat, walk animations with run and attack animations when player gets too near etc. I have the animals and animations but nothing to get them working. Thanks
     
  15. pbrowne

    pbrowne

    Joined:
    Aug 27, 2018
    Posts:
    61
    Trying to get this to work with Low Poly Animated Animals in the Asset Store. This uses a system to integrate different behaviours/traits of various animals to the point where they are predators and prey.

    Is there a possibility of using a texture that is not visible, but can be used to define a Biome??
     
    Last edited: Nov 30, 2018
  16. pbrowne

    pbrowne

    Joined:
    Aug 27, 2018
    Posts:
    61
    OK, I am getting the error:

    Code (CSharp):
    1. "GetRemainingDistance" can only be called on an active agent that has been placed on a NavMesh.
    2. UnityEngine.AI.NavMeshAgent:get_remainingDistance()
    3. LowPolyAnimalPack.WanderScript:OnDrawGizmosSelected() (at Assets/Low Poly Animated Animals/- Scripts/AnimalScripts/WanderScript.cs:167)
    4. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    The prefab has a NavMesAgent and the NavMesh is baked. The prefab (rabbit) when put in the hierarchy sits on the ground nicely.
     
  17. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    I was wondering this too but I settled for spawning on a specific texture (or more)... I think the new version though... gives an option for defining areas which sounds like what you seem to want to do. Not sure when thats available though.
     
  18. pbrowne

    pbrowne

    Joined:
    Aug 27, 2018
    Posts:
    61
    Fixed this by checking the Height Mesh option for baking the NavMesh and also adjusting the NavMeshAgent Base Offset to 0 (at the base of the animals feet...)
     
  19. Ewan-Churchill

    Ewan-Churchill

    Joined:
    Oct 10, 2018
    Posts:
    20
    @BHS When trying to use Crux+Emerald AI+Gaia+CTS i have added all the correct textures to my biome from the CTS profile but nothing is spawning and i keep getting this error, any fix?
    IndexOutOfRangeException: Array index is out of range.
    Crux.Create () (at Assets/Characters/Crux - Procedural AI Spawner/Scripts/System/Crux.cs:460)
    Crux+<SpawnCheck>c__Iterator0.MoveNext () (at Assets/Characters/Crux - Procedural AI Spawner/Scripts/System/Crux.cs:251)
    UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
     
  20. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi @BHS. I'm getting the below error using crux with unity 2018.2.18. Any idea what it is?

    I also plus one the above comment re VS_Pro and its biomes feature. being able to spawn on texture and within a specific biome would be a massive improvement and hopefully not to hard to implement. Also being able to spawn at certain heights (to stop spawning some animals in water and others only in water etc.. Nice asset, looking forward to improvements down the line.

    ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index
    System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <f2e6809acb14476a81f399aeb800f8f2>:0)
    System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <f2e6809acb14476a81f399aeb800f8f2>:0)
    System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <f2e6809acb14476a81f399aeb800f8f2>:0)
    Crux.Create () (at Assets/Crux - Procedural AI Spawner/Scripts/System/Crux.cs:1006)
    Crux+<SpawnCheck>c__Iterator0.MoveNext () (at Assets/Crux - Procedural AI Spawner/Scripts/System/Crux.cs:251)
    UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
     
  21. hassonhamo3

    hassonhamo3

    Joined:
    May 25, 2018
    Posts:
    38
    use Gaia textures in biome texture
     
  22. hassonhamo3

    hassonhamo3

    Joined:
    May 25, 2018
    Posts:
    38
    is Crux capable to spawn objects even after starting the game ? according to the player transform , when it changes Crux despawn objects out of range , but it won't spawn objects inside the new range (in my case).
     
  23. hassonhamo3

    hassonhamo3

    Joined:
    May 25, 2018
    Posts:
    38
    and yes when an object is destroyed Crux don't re spawn it
     
  24. Ewan-Churchill

    Ewan-Churchill

    Joined:
    Oct 10, 2018
    Posts:
    20
    I had a similar problem but after tinkering with the object pooling settings i got it to work but i think it all depends on what objects you are trying to spawn
     
  25. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    There is a setting with CTS (strip textures I believe) that if it's enabled, it won't work with Crux. I'm working on improving support for CTS with the 2.0 version of Crux.


    Are you missing any objects in any of your biomes?

    I will look into support for VS Pro, I think it would be a nice addition.


    Strange, it should be spawning new objects as other objects are despawned during runtime. Do you have the proper player object assigned? What settings are you using?
     
  26. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,269
    Any idea when 2.0 will be out? :)
     
  27. hassonhamo3

    hassonhamo3

    Joined:
    May 25, 2018
    Posts:
    38
    التقاط_2018_12_23_07_37_50_350.jpg التقاط_2018_12_23_07_37_39_359.jpg
     
  28. hassonhamo3

    hassonhamo3

    Joined:
    May 25, 2018
    Posts:
    38
    yes I have assigned my player , the objects i'm spawning are Ai animals using Emerald ai , you've mentioned in "Use objects pooling" Ai system must have resetting , how to make it work by emerald , or it's enabled by default ?

    I also tried different settings , all have the same result with different spawn behavior
     
  29. hassonhamo3

    hassonhamo3

    Joined:
    May 25, 2018
    Posts:
    38
    in biome , i'm using wildlife type with 100 value , odd generation type , i'm also using Cts with Gaia , in texture option i'm assigning Gaia's Textures as I tried to add Cts textures but no objects were spawned , but when I added Gaia's textures it worked
    I'm releasing my game for mobiles , so i'll be grateful if you give me a setting that provides a better performance
     
  30. hassonhamo3

    hassonhamo3

    Joined:
    May 25, 2018
    Posts:
    38
    what did you do exactly :D enable or disable pooling setting ? i'm spawning Npcs objects created by Emerald
     
  31. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    When I buy Crux now, is it the version 1.2 or 2.0? The asset store page says "Crux 2.0 is an upcoming free update" and first talk about Crux 2 was in August. Now we have December. Thank you for the clarification.
     
  32. UDN_449900de-7c34-4a67-83eb-fa8501bf0413

    UDN_449900de-7c34-4a67-83eb-fa8501bf0413

    Joined:
    Jun 16, 2017
    Posts:
    17
    Hello i have 1 little question :D im building a multiplayer survival game and i want to use crux for my mob spawning and the problem is that i spawn my players with unet and they have diffrent names. How do i do so crux can find my players when they spawn?
     
  33. RoyalDust

    RoyalDust

    Joined:
    Mar 4, 2015
    Posts:
    8
    It will be more than a year since you announced version 2, I find it wrong to believe that version 2 is coming. finally I created my own system to take into account the mesh, if it interests someone who can not wait any more, write me in private
     
  34. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,269
    @BHS ETA on Crux 2.0?
     
  35. HansKPersson

    HansKPersson

    Joined:
    Nov 19, 2016
    Posts:
    8
    darn Already February , waiting on Update for Crux, Emerald AI and Unistorm3, want to start using 2018.3 soon.
     
  36. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,269
    Coming 6/19/20
     
  37. MrADN

    MrADN

    Joined:
    Sep 12, 2012
    Posts:
    11
    So the launching will be 6/19/20 ??? I have been waiting a long time for crux 2, still waiting for use it , if that is not the date anyone know when it will be launch?
     
  38. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,269
    @BHS Will Crux 2.0 be able to use Vegetation Studio Pro biomes?
     
    Rowlan likes this.
  39. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    I'm getting the error below. After looking at the code it seems to be the terrain API being out of date. I take it Crux is not ready for 2018.3 currently? DO you have an eta on compatibility with 2018.3 or quick fix for this error stems from this line (460) in create() method of crux.cs I think.

    Texture _Texture = _TI.terrainData.splatPrototypes[_TI.surfaceIndex].texture;



    ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index
    System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    Crux.Create () (at Assets/Crux - Procedural AI Spawner/Scripts/System/Crux.cs:1006)
    Crux+<SpawnCheck>d__60.MoveNext () (at Assets/Crux - Procedural AI Spawner/Scripts/System/Crux.cs:251)
    UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
     
  40. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Emerald AI objects should no longer reset when spawning, if you are using Emerald AI version 2.2.



    Yes, Crux 2.0 will be a free update. It was just submitted today. It ended up taking longer than expected.


    Crux 2.0 has been submitted. :)


    I just submitted Crux 2.0.


    This will come with the next update, but Crux 2.0 has been submitted.


    I just checked Unity 2018.3 with Crux 2.0 and there's no issues. Everything works great. The API for Unity 2018.3 has been updated with Crux 2.0. That error looks like you might be missing an object somewhere. Version 2.0 has made a lot of improvements so I'm sure it will not be present with the newest version.
     
    CommunityUS, Weblox and SickaGames1 like this.
  41. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Hey everyone,

    Crux 2.0 has been submitted and is awaiting approval. My apologies for the delay with this update.

    A couple of notes with version 2.0:
    • Important: Crux 2.0 is a complete rewrite and requires you to completely remove the previous version from your projects before importing the new version. It is recommended that you backup your projects before doing this.
    • Crux 2.0 now uses Scriptable Objects (Crux Objects) instead of prefab objects. This is to allow each spawnable object to have its own settings, conditions, and editor.
    • Crux 2.0 support CTS, but only with Strip Textures disabled. I know this is a more performant method and I will add support to use CTS's texture lookup with the next update. This should allow it to work with Strip Textures enabled.
    • Crux 2.0 supports Mesh Terrains, however, the texture lookup feature does not work as Unity has no way to get the texture at a certain position of a mesh efficiently. This means only 1 biome can be used when using the Mesh Terrain setting. A global layer detection has also been added to allow Crux to only spawn on certain layers. With the next update, this will be refined to add tags and layers according to certain biomes. This will allow uses to define areas such as camps, caves, and other areas within biomes which will allow them to be used with Mesh Terrains.
    • To get a better understanding of how Crux has improved, as well as the workflow and changes, you can see the new documentation here (Note: The documentation is currently being worked on, but covers most of the basics and important information): Crux Documentation
     
  42. CommunityUS

    CommunityUS

    Joined:
    Sep 2, 2011
    Posts:
    240
    I know you just submitted it. How long does it usually take to finish up the integration part of the docs. I am eager to use with ootii MC + CTS + Emerald AI + UniStorm esp. mesh single biome with HDRP, should be amazing.
     
  43. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    427
    @BHS Congratulations on the big update. Looking forward to trying out 2.0 :D Support for spawning on meshes (even if without biomes) is just what I was hoping for
     
    Vaupell likes this.
  44. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    I use Unistorm 3.0 in my Unity 5.6.6f2 project. I was surprised to see Crux 2.0 supporting Unity 2017 or higher. Therefore I must change my plans to use Crux with Unistorm in my project. On to plan B
     
  45. CommunityUS

    CommunityUS

    Joined:
    Sep 2, 2011
    Posts:
    240
    @BHS one thing you might consider doing to still provider old 1.x support is of course still include the 1.x version in the 2.0 package under legacy. But also in future you can just leave those old versions with unity version stamp on unity's asset server store. then just tell people download using Unity 2017 to get the 2.0 Unity 5.x will download 1.x etc.
     
    wood333 likes this.
  46. MrADN

    MrADN

    Joined:
    Sep 12, 2012
    Posts:
    11
    Thanks the Update its amazing!! I was waiting for, I will Love the integration with Vegetation Studio Pro, If its possible thanks!
     
  47. GorkaChampion

    GorkaChampion

    Joined:
    Feb 6, 2018
    Posts:
    103
    Yes please, integration with Vegetation Studio Pro is a must!! :)
     
    Weblox and SickaGames1 like this.
  48. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Crux doesn't support multiple Crux systems anymore? old version I was able to use with 2 players, new one I can't.... second one wont spawn anything.
     
  49. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    What integration are you referring to, CTS? I'm going to try and get full CTS integration finished asap.
     
  50. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Thanks! Please be sure to let me know if you have any feedback.