Jump to content

A way to run all biome spawners as terrain chunks are loaded for spawn "world"?


sdargiewicz
Go to solution Solved by sdargiewicz,

Recommended Posts

Hi, I was wondering if there is a way to spawn all biomes at once when terrain chunks are loaded during World spawning. I wasn't able to find one in gaia or on the forums.

 

Right now, I have 10 biomes and 1024 tiles. It takes about 5 minutes to world spawn a biome, but then 15 minutes to save. Gaia seems to force a save before running each biome spawner. So it takes 20 minutes per biome * 10 biomes = over 3 hours to spawn my world.

 

If I could have all biome rules run at once as it moves across the world, it would be a huge time save and help me iterate faster.

Link to comment
Share on other sites

You could change each biome settings to spawn when stamped. 
However, this may not be something you actually want to do. 
You could potentially run out of memory trying to preform all 10 biomes at the same time. 
Which could lead to crashing. 

To allow them to spawn after stamping, you need to open the biome preset: 
image.png

Then make sure that the S is enabled. 
Which this means its active when you stamp and will be used. 

As far as to spawn all biomes at the same time dont think its possible to do that. 
With good reason though, to not crash Unity when doing this. 
Also please note that you should not be spawning multiple texture spawners as you do have limits on textures for terrains. 
 

Link to comment
Share on other sites

Thanks for the reply. It sounds like what I want to do is not currently possible.

 

To answer some of the points you brought up - the heightmaps are finished so I’m not stamping anymore. Each biome has a world space image mask. All terrains and texture spawners have the same 28 textures on them, all connected to a microsplat material. Naturally, not every texture is actually being spawned by each biome.

 

As for memory concerns, there were plenty of instances where Gaia loads every terrain in memory long before I reached the point I’m currently at. I have a 300GB RAM page file to avoid memory crashes.

 

But the resource strain in the process of “load terrain 1, run 4 spawn rules, unload terrain, move to terrain 2” vs “load terrain 1, run 40 spawn rules, unload terrain 1, move to terrain 2” is almost the same. Each texture rule takes about 1/4th of a second. So maybe there is a way I can implement what I need on my own.

Link to comment
Share on other sites

  • 4 weeks later...
  • Solution

Kind of a hack, but I added the line

AssetDatabase.SaveAssets();

to Spawner.cs around line 2395 so that each tile is saved to disk as its modified. This cut my spawn times down from 20 minutes to 7 minutes. It also doesn't thrash my hard drive which is nice.

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...