Jump to content

Spawning village but with buildings not at the same height


Marcin Debicki
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
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...