Jump to content

Spawning village but with buildings not at the same height


Marcin Debicki
 Share

Go to solution Solved by Bryan,

Recommended Posts

Hi, let's consider such scenario:

  1. I create a prefab of the whole village. I model it the way I want in some other scene.
  2. I add terrain decorator to parent game object (as it is in tutorials) however since I dno not want it to be unpacked I am ending it there - I'd like buildings to be spawned in specific locations instead of random spawning.
  3. I use spawner to spawn my village - every building is at the same height.
  4. I adjust each buildings position manually so that village is not so flat after all and some buildings are at different heights than others.

As alternative I could probably not use decorator at all but that I suppose I'd have to anyway work on each building manually (i.e. to flatten terrain around it. I am wondering if there is some other way GeNa could help with it so I can preferably accordingly model all heights in prefab and then just spawn the village.

Link to comment
Share on other sites

Hey @Marcin Debicki,

There are actually numerous ways you could achieve this with GeNa. The simple way is to have an empty root object (non-prefabbed) and have all of your models at the heights you want. Then, re-ingest it into the Spawner and it should place them in the correct sub-positions (including the heights you want). 

The other way is to add a 'Transform Decorator' and explicitly set the height offsets you want the models to be placed.
 

Link to comment
Share on other sites

Ok, one thing I forgot to mention (my bad, sorry). Terrain should be accordingly adjusted so that no building if should be placed above the ground. If parent object is empty then no transformation is applied and I end up with building floating in the air. If I apply terrain decorator then whole area is adjusted to the same height and I still end up with some buildings above the ground. I suppose I could adjust it manually after spawn but was wondering if GeNa could do that (no random structure spawning and yet adjust terrain under each building).

Link to comment
Share on other sites

  • Solution

I believe you would need to add the terrain decorator to each prefab if you wanted each building to adjust to the terrain. 
You could group the prefabs together and then add the terrain decorator as seen in the video tutorial as well if needed. 


06:37 Terrain Decorator

Link to comment
Share on other sites

Right, missed that part. I thought that those nested decorators will be ignored if not used together with unpack decorator but it seems I was wrong. Thanks! That can save me now a lot of time:-)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Tell a friend

    Love Unity 3D World & Game Creation Tools - Canopy - Procedural Worlds? Tell a friend!
  • Interesting Articles

    1. 2

      I'm getting tired of doing islands and craters

    2. 2

      I'm getting tired of doing islands and craters

    3. 1

      Problems with latest Gaia Update

    4. 1

      Adding shoreline or waterline effects, beaches, river banks, etc.

    5. 1

      Just upgraded my Canopy to Pro

×
×
  • Create New...