Search Unity

GeNa - Sophisticated procedural content spawner

Discussion in 'Assets and Asset Store' started by AdamGoodrich, Oct 22, 2016.

  1. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    When they are ready... hopefully in next few weeks. It's not a trivial update.
     
    SickaGames1 likes this.
  2. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    Hopefully Vegetation Studio Pro will be integrated
     
    Scream2020 and Rowlan like this.
  3. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,267
    I've noticed this before, but I'm curious now: Why are you writing biome always in uppercase?
     
    antoripa likes this.
  4. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    Not yet. I still get exceptions when installing.
     
  5. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Mod note for removed posts:

    Hi, if the people defending Gaia defend it again in a manner that incites further replies without contacting moderators, we will have to lock the thread (just use report button or contact me instead - your replies will be nuked anyway). If anyone posts on this thread with intent to troll/harass/etc, I'll ban them since the forum is for development, not arguments so they don't belong here.

    Final last warning, and you know, there's room for a lot of great tools like Gaia and others, and frankly may the best tool win.

    Don't reply to this message.
     
    Buhlaine, AdamGoodrich, sarum and 4 others like this.
  6. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi there,

    Is Gena still supported for 2018.2 (original Gena) I'm having problems spawning buildings on the terrain. They are appearing high in the air for some reason.
     
  7. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    Yep. We released a compatibility update just before we deprecated it.

    If your objects are being spawned up in the air then there is a fair chance that the prototypes have been set up incorrectly. A lot of asset packs have incorrectly configured positions, and GeNa assumes this is deliberate.

    upload_2018-12-16_11-26-57.png

    Other possibility is that you have an invisible collider in there that GeNa is hitting. We added ability to select collider layers in GeNa 2.
     
    S4G4N and AndyNeoman like this.
  8. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    S4G4N likes this.
  9. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    677
    PWPeter likes this.
  10. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Excellent, thanks Adam. The offsets were causing my problem.

    I'll be updating to Gena 2 once I get to grips with the workflow and we migrate to 2018.3.
     
    PWPeter and S4G4N like this.
  11. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Has anyone got a link to the gena discord server?

    I'm after some tips on placing castle walls over large distances directly next to each other. Also if anyone know how you can set the offsets to 0 for all new prefabs that would be great. I'm having to go to each on individually as the are all set at 100+ H which is making everything spawn in the air.
     
    S4G4N likes this.
  12. S4G4N

    S4G4N

    Joined:
    Mar 13, 2013
    Posts:
    3,215
    This is the PW discord and GeNa on there
    GeNa
    https://discordapp.com/channels/423247963457060866/423250215617691649
    Procedural World
    https://discordapp.com/channels/423247963457060866/423249655426449429
     
    AndyNeoman likes this.
  13. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
  14. S4G4N

    S4G4N

    Joined:
    Mar 13, 2013
    Posts:
    3,215
    There is a basic Demo Scene in the package, but I am going to make some more available, to use as is or to learn from
     
    AndyNeoman likes this.
  15. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    Gena 2 interfere in the brush size of Unity terrain builtin tool for painting trees and details, and is not possible to make it smaller. When deactivating Gena 2, it is possible to set the brush size again. Please fix this bug.
     
  16. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Anyone got an invite for the discord channel? Also any tips on placing walls next to each (touching). Placing fences with gaps is ok but cant seem to get walls right. Is there a snapping option I have missed?
     
  17. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    I will look into this and get back to you.


    Procedural Worlds discord: https://discord.gg/rtKn8rw
    I can't answer this question yet, but I will look into this as well while investigating the issue reported by angel_m. Feel free to stop by in the discord in the meantime, there is a dedicated gena channel there as well.
     
    AndyNeoman likes this.
  18. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160

    The problem is trying to set the brush size to minimum (always when painting trees or details). In this case, it seems Gena prevents to accomplish it.
     
  19. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    Hi, I tried to reproduce this problem in Unity 2018.2 and 2018.3 and it seems to be working for me. I can alternate between spawning with Gena and using the built-in terrain drawing tools, but I have no issue changing the brush size.

    I made 2 videos, one is showing me spawning cube gameobjects with Gena and the textures with the unity tools in 2018.3:
    https://drive.google.com/open?id=12M-440wZVackAJLeSUo8x6HlCsiAt117
    The other is spawning terrain details in 2018.2 using both methods:
    https://drive.google.com/open?id=13wbbZ_2gbDVKmJAaN8lCU0WYD1_Mg4Kl

    Can you please test if you can reproduce the bug in an empty test project where you just add Gena 2, and test if the bug appears?
     
  20. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    I checked wall creation with Gena, and I'm having the same problem as you. As far as I can see the fence spawning option was not intended to be super precise, the GeNa manual notes:
    If it fits your artstyle, you could make a wall that uses small "towers" or columns that hide the gaps in between and allow for not so precise placement. If you check the screenshot, you can see a simple tower-wall prefab that I made and the wall resulting from it.
    I still had to fix up placement and rotation a bit after the gena spawn, but if you spawn the wall, and then go over it with the "w" (placement) and "e" (rotation) hotkeys of the scene view you are still way faster than placing each segment manually.
    wall.JPG
     
    AndyNeoman likes this.
  21. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    I have tested and it seems to work well in an empty simple project. Maybe in my current project is something wrong...:(
    Thanks
     
  22. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    Good because it is not a Gena bug, bad because you need to find out where that comes from in your project then. I would suggest starting with an empty scene in your project and test it again there. If that shows the bug already, it must be some sort of asset that is active beyond the currently opened scene.
    If it does not show yet, I would open the scene where you did get the bug and deactivate everything but Gena and the terrain to see if it is working in this constellation, then activate more and more stuff in the scene until you have found some connection to the bug.
     
  23. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Thanks for taking a look @PWPeter. Not sure if I can put in for a feature request but I think it would be great addition to the spawning system for gena 2. I can see a number of people have asked for the feature I think it would be very popular imho :).
     
    StevenPicard likes this.
  24. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    We have a system to track ideas and requested features, I will add the ability to spawn assets with "stable" connection points for walls etc.
     
    AndyNeoman likes this.
  25. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Amazing, thanks for the quick response
     
  26. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    We plan to do spline based spawning as part of the GeNa 2 roadmap. This would allow for much more precise spawning of things like walls.
     
    EdWaters and AndyNeoman like this.
  27. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    As a heads up we have been busy working on the next version of GeNa since before christmas.

    It's a massive release and our aim is to have the next update out as soon as the new features we are working on have been stabilized. Eta hopefully in the next 2-3 weeks.

    Some of the new features coming are:
    • Terrain texturing support
    • Biome support (create an entire biome from texturing to grass n rocks n trees with a click)
    • Complex nested structure creation and placement support
    • Common setup support -> wizards that help configure typical use cases
    • Full Veg Studio and Veg Studio Pro support
    The nested structure update was previously unannounced, and is quite a massive feature. A sample use case would be for things like multi story houses - GeNa already has a success criteria - with this you can now success criteria to dependent parts on complex multi part structures - for example floor1, floor 2, floor 3 etc. For example floor 2 would only spawn 50% of time, and floor 3 only 20% (20% of 50%). You will also be able to do offsets and all the other stuff that GeNa provides - so this makes it possible to of making buildings out of modular parts that would never ever be the same between the spawns.

    Another previously unannounced new feature is the ability to define complex POI's such as villages, but then apply the overall spawn criteria to each sub structure. So lets say you have a village that is much larger than the available space and you want to put it into a little spot in the mountains.

    The new system will enable you to contextually place only the building that would work within in the flat spaces on your chosen area, while still maintaining the overall layout and structure. Super powerful!

    We have big plans for GeNa and look forward to bringing more to the community over the course of 2019.

    We are also very proud to announce that GeNa was awarded runner up in the category of Best Artistic Tool in the Unity 2018 awards. https://awards.unity.com/
     
    Last edited: Jan 1, 2019
  28. Jbs_GameZone

    Jbs_GameZone

    Joined:
    Dec 14, 2018
    Posts:
    118
    Hello,

    Just added GeNa to my assets and I ran into 2 problems that can be seen here :


    1) Visualizing (Shift+Left click) doesn't work under that horizontal purple layer (don't know what that is, assumed it was water level, but that is way below as seen in Game View).
    2) Fences are not conforming to rotation (although I tried to replicate the setup described by Adam here
    )

    Looking fwd for your feedback. Thanks
     
  29. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    The purple layer is most likely the sea level preview from the stamper in the scene. Normally it should be an indicator where the sea level will be on the final terrain, but it is possible that it is misaligned if the sea level is moved after terrain creation or the entire terrain is moved up / down on the y-axis. You can turn that off in the stamper, or remove the stamper from the scene if you don't need it (you can always get it back from the Gaia Manager window later)
    The visualisation should work regardless of the purple layer, I think it must be some restrictive setting that prevents spawning at those low points in the terrain, can you try to uncheck "Check height" and see if it appears?

    I think you missed switching the "Spawn Mode" from "Single" to "Paint", in Single the fence pieces don't know about the last spawn since it is just a single instance being spawned.
     
  30. Jbs_GameZone

    Jbs_GameZone

    Joined:
    Dec 14, 2018
    Posts:
    118
    Thanks for the feedback

    First issue got resolved by removing the stamper like you said.

    For second I reckon I clicked to fast or to close when spawning them. Once I switched to Paint mode I saw what had happened by playing with the Flow Rate. Setting a small flow rate (e.g. 1.5) resulted in a zig zag fence, while increasing it to 5 yielded a nice smooth one, as per below picture :

    Fence.png

    I reverted to single and by moving slower and setting them a bit more far apart I could get the same nice result.
     
    AdamGoodrich and PWPeter like this.
  31. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    The zig zag effect was an unexpected (and in some cases potentially useful) by product of the paint algorithm. What it does is find the closest vertice, and then align the rotation to it. If the spawns are too close together they 'bunch up' and you get the behavior you are seeing.

    We plan to release a spline based spawner later in this GeNa release cycle that will get even better / smoother fences.
     
  32. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    Add this to path painter as well!
     
  33. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    So many cool ideas...so little time :/
     
  34. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    It may actually make path painter useful with veg pro and biomes
     
  35. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    455
    @AdamGoodrich, you should probably add to documentation that Y coordinates of terrain needs to be 0 in order for Gena to work. Took me a lot of time to figure out why all my spawners stopped working. Also I would love to not have that limit. It would allow me to have playable area closer to 0 0 0, which is good for float precision.
     
  36. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    Our next release will fix this.
     
  37. Muravu

    Muravu

    Joined:
    Nov 30, 2014
    Posts:
    53
    Hey. I ran into a problem while using GeNa. When I set the scale in the Spawn Prototypes section to 0.1 (min and max scale set to that number) the instance of the object that spawns is 1,1,1 in size, and not 0.1, 0.1, 0.1.

    My question is if it's possible to spawn objects that are smaller than 1,1,1 in scale?

    I'm using unity 2018.3.0f2 if it makes any difference
     
  38. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    I tested this with a default unity cube where the prefab is scaled 1,1,1. I was able to spawn smaller 0.1,0.1,0.1 cubelings with the settings shown in this screenshot:
    GeNaScale.JPG

    Note that there is another scale in placement criteria as well which will be multiplied with the individual prototype scales, maybe this caused the issue for you?
     
  39. Muravu

    Muravu

    Joined:
    Nov 30, 2014
    Posts:
    53
    I see you're not using the new unity version. There is a big difference now as 2018.3. has nested prefabs, so that changes things from before. It worked fine in older versions.
     
  40. Muravu

    Muravu

    Joined:
    Nov 30, 2014
    Posts:
    53
    upload_2019-1-17_13-3-9.png

    Did the same thing as you and it's stuck at 1,1,1 scale, doesn't ever go below 1,1,1
     
  41. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    Sorry about that, just had the old version open when I tested and read past your version info. I tested with 2018.3, it works for me there as well:
    Unbenannt.JPG
    I debugged through the code to see if I could find anything that might cause your issue and found something: Can you please check if you have "Scale Nearest Int" checked in the advanced settings? If yes, this might be the culprit.
     
  42. Muravu

    Muravu

    Joined:
    Nov 30, 2014
    Posts:
    53
    Jesus. I'm so sorry. Thanks for that. :-/ didn't think that it would be that simple :-/
     
    PWPeter likes this.
  43. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    You are welcome, I should have thought of that setting right away as well ;)
     
  44. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    504
    Just found out that Gena was deprecated in favor of V2... that will teach me to buy an asset I dont need right away.

    Didnt' even get to use it yet on our project... im all for earning money but... this just makes me sad.

    Definitly the last time I purchase an asset on a whim from you guys.
     
    Ne0mega likes this.
  45. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    Please note that you can still use Gena 1 even though it is marked as deprecated. You can still download it from the asset store and add it to your project as before. Gena 2 was released on September the 3rd 2018, if you bought Gena 1 90 days prior, upgrading to Gena 2 should be free for you if you are logged in with the account that purchased Gena 1 in the asset store. If you are before the 90 days you should see a discounted upgrade price.
     
    Last edited: Jan 28, 2019
    AdamGoodrich likes this.
  46. StevanJay

    StevanJay

    Joined:
    Feb 5, 2014
    Posts:
    80
    Hey Gena guys!

    So I want a spawner that will randomly place a single prototype from the list, but sometimes not place anything at all, and I don't seem to find a nice way to do that...

    What it feels like I want, is to simply set the minimum number of instances spawned at zero, and then use the success percentage to control spawn rates - but minimum number of instances cannot be less than one.

    What I'm doing instead is creating a "null" prefab in the list, adjusting success percentages, and then going through and deleting all the "null" prefabs afterwards - but it's kind of a clunky way to do it.

    As there any more elegant way for me to do this?

    (Specifically, it's a loot spawner. The spawner contains prefabs for all the different loot drops. At run time, a script loops through a list of all loot spawn locations, and the spawner executes a single spawn per location. Works fine, except for these issues with randomly leaving some locations "loot free"...).

    Thx!
     
  47. frankslater

    frankslater

    Joined:
    May 9, 2016
    Posts:
    213
    Hey @StevanJay,

    I can't test this at the moment in that version (the version I have right now is an upcoming update and in that one it works), but did you try to enable Use Large Ranges in Advanced Settings:
    upload_2019-2-21_16-0-53.png

    and set min instances to zero after that?

    upload_2019-2-21_16-1-27.png

    Just throwing it out there as a quick answer in case it works.
     
    Last edited: Feb 22, 2019
    AdamGoodrich and StevanJay like this.
  48. StevanJay

    StevanJay

    Joined:
    Feb 5, 2014
    Posts:
    80
    Yes! Just tried it, and that's exactly what I was looking for... :) Thanks!
     
    AdamGoodrich and frankslater like this.
  49. StevanJay

    StevanJay

    Joined:
    Feb 5, 2014
    Posts:
    80
    Hey again Gena folks! So another problem... :)

    I'm trying to spawn on to a mesh, but all my spawns are coming in with the "y" displacement exactly double what I'm specifying in the spawner… Everything else, "x" and "y" coordinates, rotations, scales, that's all fine - just the "y" that's messing up, and always exactly double...

    Any ideas what might be going on??

    EDIT: Checked on terrain, and it's fine, only an issue when spawning on a mesh. Note that I'm spawning prefabs. I've tried in a fresh new project containing only GeNa, and it's pretty easy to repro. Create a plane, create a cube and make it a prefab, put three cubes at different heights above the plane, create a GeNa spawner, and drag the three cubes from the scene on to it, then left-ctrl click on the plane. You`ll see they come in with the "y" coordinate doubled. Do the same thing on a flat terrain object in the same scene and they spawn correctly.
     
    Last edited: Feb 22, 2019
  50. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    Hi StevanJay, thanks to your detailed description how to reproduce the issue I was able to reproduce it myself immediately and found the culprit: This seems to be a bug where the min-max y-offset is applied twice when spawning on meshes. When the value is the same for min-y & max-y, this results in the duplication of the y-value that you are seeing. This will be corrected in the next GeNa update, you can do two things to fix it for now:

    1. Adjust the min-y and max-y to compensate value when spawning on meshes.
    2. Open the file Assets\GeNa\Scripts\Spawner.cs and add to forward slashes // to the line 1222 in there. The line should now read:
    Code (CSharp):
    1. //newLocation.y += m_randomGenerator.Next(res.m_minOffset.y, res.m_maxOffset.y);
    Then save the file. This should fix the issue until the update arrives.
     
    StevanJay likes this.