Search Unity

GeNa - Sophisticated procedural content spawner

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

  1. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    So let's see if I understand the compatibilities of this process.

    I can take a speed tree into unity, remove the excess colliders, bring the tree out of the scene as a prefab, and use that prefab in a GeNa spawner as either a terrain object or a game object?

    Could I then, before bringing the tree into the spawner, run it through uNature, then bring the uNature tree into the GeNa spawner, to get a tree that runs on the graphics card? Would it have to be a terrain object or a regular game object or could it be either?
     
  2. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    GeNa will spawn it either way. As long as it has a prefab it can be spawned. I have not tried with uNature but have been meaning to :)
     
    wood333 likes this.
  3. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    I have had no issues with trees spawning as you can see from the videos. Not too sure why you would be having issues. When i have had a problem its usually been self inflicted - e.g. low throw distance or excessively harsh spawn criteria.
     
    kurotatsu likes this.
  4. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    I'm reading through the manual, and most of the questions I have will be answered when I start experimenting, except for one: I use day night cycle assets, so how does this impact your lengthy discussion of GI, light probes, static objects, etc.?
     
  5. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Yep, I don't love documentation, but its a necessary evil :)

    The short answer is - because of the approach I have taken, your spawns will have been spawned in such a way as to take the best advantage of the Unity GI system.

    You can learn more about it here: https://unity3d.com/learn/tutorials/topics/graphics/introduction-precomputed-realtime-gi
     
    kurotatsu likes this.
  6. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    Perhaps I was too subtle with my question. Restated, how will Gena perform when I turn off Precomputed Realtime GI, Baked GI, and the Auto Baked GI check box, because that is required by my Day/Night cycle asset.? I had anticipated you would advise that Gena's instructions for lighting do not apply when Day/Night cycle assets are employed. Will Gena perform generally as expected with those lighting settings switched off?
     
  7. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    The question is not so much about GeNa as about Unity.

    I don't actually know. I would never consider not doing pre-computed GI and hence have not done it. Why don't you try it and share your knowledge back with the group.

    FYI, you don't need to use the optimisation techniques that GeNa does for you. You can easily disable them as a global setting if using it doesn't suit you.
     
  8. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    I was just asked if GeNa comes with presets for different types of operations, and the answer is no, but its a cracking idea, and I will be adding a bunch of them in the next release.

    Rock Walls 3.jpg

    In the mean time, if you want to know how I did different things, then please ask and I will create a settings / setup page on the web site.

    To start things off, one of the cool things that Gena does it add rock walls to your scene. In fact this was why Gena was born - because its hard to do :)

    Here is the link to how I set the Fat Wall spawner up:

    http://www.procedural-worlds.com/gena/tutorials/creating-rock-walls-with-gena/

    And here is a video of it in action:

     
  9. evilangel89

    evilangel89

    Joined:
    Feb 8, 2017
    Posts:
    269
    Hey @AdamGoodrich , I am sure this must have been asked many times, so apologies in advance. It's regarding the fence spawning. I wish there was an easier way like spawning the next fence part right at the edge of the previous fence part. Right now when I try to place fences in gena no matter how hard I try the distance between two fences is way too much and it's not seamless.

    Any pointers that I can get it right ?
     
  10. Alienmadness

    Alienmadness

    Joined:
    Sep 6, 2012
    Posts:
    109
    quick question or feature request. is it possible to select vertex color range, similar to how you setup placement based on texture? have a low poly type of mesh, with no real textures (all vertex colored).
    thanks
     
  11. Alienmadness

    Alienmadness

    Joined:
    Sep 6, 2012
    Posts:
    109
    related to the above question, since i have a number of Terrain meshes, is it possible to group the meshes as one prefab and have Gena spawn to the whole thing? currently it seems it will only spawn to 1 mesh at a time... my terrain consists of about 9 terrain tiles (flat cell shaded, using a poly terrain conversion).
    thanks
     
  12. pixelmonk

    pixelmonk

    Joined:
    May 25, 2011
    Posts:
    11
    Feature request: undo and redo.

    Thanks.
     
  13. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    I know Gaia 2 is priority know, but i have some questions about Gena :
    - Will it be some video tutorial showing light probes grid placement ?
    - Most important will Gena be able to place rock cliffs in terrain vertical slopes instead of horizontal surfaces only ?
     
    BackwoodsGaming and pixelsteam like this.
  14. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Sorry for slow response. Did not get notified of the messages here, and then when i did write on it seems to have been deleted :/

    Its purely a manual thing at the moment - good in that you get total control - bad in that you get total control. I may refine this in the next release as its a very cool capability and it could certainly be improved.

    Unfortunately no. I do not know how to do this for meshes. If you could advice on how to get the colour under a vertex however then I already have some nice colour selection code and would be happy to add it.

    I actually implemented that... and then removed it at my beta groups request. The problem is that Unity becomes unstable when you create big undo's, and then randomly crashes :/

    You have it to a degree now - you can remove instances of the spawned objects by hitting Ctrl + Backspace.
     
  15. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Not really sure what a video will do for you regarding light probe placement.

    2017-03-28_8-40-26 - Probes.jpg

    Here you can see how the probes are added to the spawned objects.

    2017-03-28_8-44-13 - Probe 2a.jpg

    Here you can see light probe usage on a very big scene - 2k x 2k. Notice how the probe groups are labelled by their physical location in the scene. You can delete these if you don't want them.

    2017-03-28_8-42-15 - Probe 3.jpg

    And here are the physical settings which you can change. Each probe groups will be no closer than 100 meters from the nearest one, and each probe will be no closer than 15 meters from the nearest one.

    Gena needs a ground of some type to spawn on... to get cliffs to spawn you select steep ground. I think it will probably be very difficult for you to click on pure vertical however, so perhaps smooth your slope a little to give Gena something to select for.
     
    zenGarden likes this.
  16. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Awesome, it should be featured in Gena description or videos.

    That's great.
     
    AdamGoodrich likes this.
  17. Alienmadness

    Alienmadness

    Joined:
    Sep 6, 2012
    Posts:
    109
  18. henmachuca

    henmachuca

    Joined:
    Oct 14, 2016
    Posts:
    105
    Hello there,

    I'm having some issues with gena and gaia as a matter of fact.
    I'm trying to place some grass in my terrain but the visualizer simply won't show up in the center"ish" of the terrain, only at the borders.
    Earlier today I was having the same problem where the textures would not spawn in the center"ish" as well. So I deleted and started all over and that error was gone. But now I'm having the same problem again with details.

    Any ideas??
    Here is a picture of the visualizer not showing properly:
     
  19. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    This looks spawn criteria related. Try relaxing the settings. You should see the visualiser update as you change them.

    The other thing that may be at play is perhaps a hidden or missing collider?
     
  20. henmachuca

    henmachuca

    Joined:
    Oct 14, 2016
    Posts:
    105
    If I try placing them without gena, using the regular unity tool it works just fine... the detail is placed but not with gena. I removed all spawn criteria from it (height, mask, texture, etc...) and still nothing! I can spawn on slopes, at the bottom of the ocean... but when it comes to the center of the "island" I cant.
    What do you mean by missing collider... in my terrain?
     
  21. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Gena relies on colliders to detect "ground", and for prefabs will spawn on top of them.

    However with terrain trees and terrain grass, it has to collide with the terrain or it will fail, so I am wondering if you have a hidden object with a collider in the centre of your terrain, that is somehow blocking the hits with the terrain.

    Feel free to PM me and we can do a Skype session to figure it out. This has been well tested over a long period of time, so I am thinking there is some simple environmental thing at play, and don't imagine it will take long to figure out.
     
    turboscalpeur likes this.
  22. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Hi


    1) About rocks models placement, does they delete underlaying trees and grass if we place them above on terrain ?

    2) Watching this video, when spawning food on top of table

    I was wonder if it was some option to choose to spawn a random number of food objects within a single click , and have them spawned on the table only and choosing a pattern like random position , spaced or aligned ?[/QUOTE]

    3) Can spawner for light probes take account of vertical big objects like big cliffs or building and spawn light probes vertically also ? It looks like it works on some horizontal plane only.

     
    Last edited: Apr 10, 2017
  23. newbie2014

    newbie2014

    Joined:
    Dec 1, 2015
    Posts:
    7
    Is it compatible for android / ios phones ? Do the generated terrains work well on mobile handheld devices ?
     
  24. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    It works with Unity terrain system, it does not generated a new terrain system. Does Unity terrain works well on mboile ? It depends entirely on your game project complexity.
     
  25. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    1,021
    Hi,

    In theory it should work on anything unity can run and it's also good to know that doesn't need to be used only with unity terrains. in fact it doesn't even need a terrain. Just needs an object that it can spawn on i.e a mesh with a collider (and the collider can be switched off when all finished if not needed) In testing I created an asteroid field using Gena. The only time you'll have problems is if you are spawning gameobjects that are themselves not compatible with a specific platform eg spawning some models that have shaders on that need SM3 and the device only runs SM2. But this is not a problem of Gena. Just something you'll have to work around even if you use unity only.

    Gena is an extremely versatile tool and can be used in pretty much any game project. Really looking forward to seeing Adam update it after he finishes Gaia2 as I prefer Gena.
     
    AdamGoodrich likes this.
  26. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    No.

    Yes.

    It bases the placement on the size of the object... so even with cliffs you will get them placed both at base and above.

    As @zenGarden comments, it depends entirely on the complexity and density of the environment you create. If you have performance issues, spawn less.

    Here is a blog post on scene optimisation, with some mobile specific settings : http://www.procedural-worlds.com/gaia/tutorials/mobile-unity-scene-optimisation-with-gaia/

    Yeah - I do too, although there is some mighty powerful stuff coming to Gaia 2 :)
     
    zenGarden likes this.
  27. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    I use GENA for Android..Made many games ... first one with Gena . We actually used it for placement of objects, cliffs and much more, then we used World Streamer to Stream objects as the player gets close enough, for performance reasons, doing this way, you nearly can use as many objects as you want . Just be smart about it.. You also can use some runtime features with Gena.
     
    AdamGoodrich likes this.
  28. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    That's great.
     
  29. Hormic

    Hormic

    Joined:
    Aug 12, 2014
    Posts:
    251
    Hi Adam, i have a hard time with the fences rotation. I use the fences from 3d Forges Cave kit.
    I tried it accordingly to the tut video and also with other settings and even when i try to place the pieces with Draggable Rotation on, and the pointer goes in the same direction every piece is randomly rotated.

    Also the shift and arrow keys for adjusting is not working, only ctrl and arrow works for altering the placement.
    So i'm a bit helpless right now.

    Unity_2017-04-10_23-56-33.jpg
     
    evilangel89 likes this.
  30. inertiadesigns

    inertiadesigns

    Joined:
    Oct 24, 2014
    Posts:
    14
    Hi Adam, We've been using Gaia and it's really a fine piece of work. Looking at Gena for spawning...

    We have a specific scenario and that is for placement of buildings on defined (by color or by image maps) urban areas. What we're really after is having the buildings laid out in an organic way so that they look "real" from the air. Not the buildings themselves, the patterns of buildings. We have a lot of variation that we can specify using OSM data, color mapping of streets, etc. We don't need high accuracy, we are going for realistic patterns. So these would mostly be repetitive geometric patterns that will have some variation and curvature to simulate street and road networks. I know that this is a general question but i'm only looking for a general answer... in general, do you think Gena could handle this kind of scenario? Any input or opinion you have is greatly appreciated. Thanks! Michael
     
  31. tapawafo

    tapawafo

    Joined:
    Jul 25, 2016
    Posts:
    170
    Hello Adam,

    Do you plan on updating Gena with some of the features going into Gaia 2? Is GPU compute, or at least multithreading, possible?

    I ask because using Gena to place all of the flora on a 4x4km terrain takes a good amount of time with my setup (VR minimum/recommended specs), and thus wouldn't work well with the 'session playback' feature of Gaia 2.

    Apologies if this has been asked before.

    Thanks,
    Matt
     
    docsavage likes this.
  32. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    1,021

    This sounds great to me. Another vote here:)
     
  33. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    You need to make sure that random rotation is disabled for the fences to make this work properly. I should make video tutorial specifically on this I think as it confused me the other day as well.

    Hmmm... GeNa has the ability to use masks, and select for specific colors, but these masks are still local in scope. Perhaps if you were to make the spawner world sized it would work - but it wasn't really designed for this. It's actually something I have been thinking about for myself as well as it would be very useful with satellite data.

    It's interesting - GeNa is actually way faster than Gaia at spawning trees and prefabs but a bit slower with grass.

    Its not actually a simple problem to solve because you need to have a good understanding of the environment to be able to place objects realistically - and you get this by doing things like raycasting, and that can only be done on the main thread - not in a background thread and not in a GPU Compute based offload.

    So - the short answer is no. In a bunch of the use cases for GeNa this functionality wouldn't actually make sense.

    I will however revisit after Gaia 2 is out - maybe some epiphanies will present themselves.
     
    tapawafo likes this.
  34. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    Finally I also will purchase GENA now that I should have a little bit more time. And finally it's on sale too ;)
    I have a litte question. I thought that GENA will automatically detect height / colliders of objects and spawn other objects on it.

    After seeing your Dungeon Tutorial I am little bit confused. When you spawn the Food like cheeses etc on the table it's happening perfectly and the stuff is placed fine on the table. But why do you need to tweak the height if you spawn the tables on the floor? Why are they spawn below the floor? I thought GENA is exactly there to avoid this.

    Just asking because I want to use GENA also for Object spawning of course.

    Cheers
    Ronny
     
  35. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Can't remember of the top of my head.

    GeNa happily spawns on any terrain or thing that has a collider.

    You can also control where GeNa spawns relative to the collision it detects, and often colliders are set up to sit slightly outside of the object they are connected to... so by making the height offset a little negative in GeNa this ensures that your spawned object will not float above the thing you spawned it on.

    So that is probably what I was doing.
     
  36. masa045

    masa045

    Joined:
    Nov 22, 2016
    Posts:
    35
    Hi adam :)
    I'm using gaia and gena recently.
    it's been really well and I really satisfied now.
    btw I'm try global spawn at 2km * 2km terrain.
    some error appear now
    I'm not sure what it means.
    thanks in advance
    gena problem1.jpg
     
  37. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Hmm.. not sure either. Drop me a private message and I will share contact details.
     
  38. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    For those who are interested... GeNa is being used by some mighty fine games !! :)



     
    runningbird and masa045 like this.
  39. Flyer_sea

    Flyer_sea

    Joined:
    Feb 20, 2017
    Posts:
    4
    Hi, I am not geting visualiser(green dots) on Unity5.6.0f3 , but if I press play, they will show up, but if I shift click, they disappear again. I am also getting a blue layer on the top of my terrian when I shift-left clicking in design mode. Any idea?
     
  40. masa045

    masa045

    Joined:
    Nov 22, 2016
    Posts:
    35
    thank you for quick response :)
    I'll send private message.
     
  41. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    I use GeNa in 5.6 with no problems. If you are trying to spawn on very low lying areas, make sure you change the minimum height as this will cause GeNa to exclude that terrain from consideration for spawning.

    The idea behind this is to allow you to spawn nicely around things like the ocean and lakes, so that the grass or trees or whatever don't go below water level.

    2017-04-30_8-34-08.jpg
     
  42. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    303
    I'm getting scaling issues with this, or more or less I don't think it's GeNa that's the problem.

    GeNa does not scale my trees, I'm using the POLYGON Knight assets and the trees do not scale, they are always 1,1,1.

    Do you know the problem? Thanks.

    I was using them as objects but it also doesn't work if they are set as trees either.

    Edit: Here is an example of the size. Also the bounds don't seem to work for this either.

    https://gyazo.com/f5e59b08d60212e74bdf7eb754a95647



    Edit 2: Okay found a "ScaleToNearestInt" value and it seems to have fixed the scaling issue. Yay. Still working on the bounds though. It doesn't add that square around individual trees like the tutorial seems to show.
     
    Last edited: May 1, 2017
  43. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Drop me a PM with your Skype address and I can have a look via screen share.
     
  44. lorddanger

    lorddanger

    Joined:
    Aug 8, 2015
    Posts:
    103
    Is it possible for making a medieval village with gena ??
     
  45. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    yes.
     
    lorddanger and AdamGoodrich like this.
  46. lorddanger

    lorddanger

    Joined:
    Aug 8, 2015
    Posts:
    103
    Thanks and
    I have couple of more questions
    Is it necessary to use Gena with Gaia's generated Terrian?
    and Gaia Assest store page says that Gaia 2 is Almost here so if We buy Gaia now, do we need to Buy Gaia to completely Separately again when its out ?
     
  47. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    No.

    No. Its a free upgrade.
     
  48. lorddanger

    lorddanger

    Joined:
    Aug 8, 2015
    Posts:
    103
    OK thanks
     
  49. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Quique-Martinez and S4G4N like this.
  50. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783