Jump to content

Gaia refuses to spawn part of my terrain


vdeijk
Go to solution Solved by vdeijk,

Recommended Posts

This has been a persistent issue throughout my usage of Gaia, so it's been bugging me for a while. I'm using Gaia's spawner on terrains that I've created via other means. Whenever I do this, Gaia refuses to spawn on parts of them. 

What doesn't help:

1) Creating a fresh scene with a fresh instance of the Gaia Manager

2) Fit To World.

3) Disabling 3 of my 4 terrains to spawn on only 1 of them. 

Here's a screenshot of the issue: https://ibb.co/album/VW8vhT

What can I do? 

 

Link to comment
Share on other sites

Few suggestions and comments: 

1. How were these terrains created? It doesn't seem like they were created with Gaia or were they? 
Normally they would spawn under Gaia Terrains but they are not under that. 

2. I wouldn't create one massive spawner. 
I would instead create spawners for each time like our preset biomes. 
Spawner for textures, spawner for rocks, etc. 

3. Check to make sure that the terrain is at 0. 

4. Check to see if the terrains that don't have anything spawned, have draw instanced enabled. 

5. Set the spawner Spawn Mode to add not replace. 

6. Enable the visualization of one of the resources, and check to see if its allowing that object to be spawned on those terrains. 

Start here and let me know how that goes! 
 

Link to comment
Share on other sites

Thanks for the quick reply.

1) What do you mean by this? Can I only texture terrains that were created with Gaia? No, I did not create these via Gaia, but they are regular Unity terrains. (My terrain files have been converted from obj's, which in turn came from Mars satellite data from Nasa.)

2) Done

3) Done

4) Done

5) Done

6) Not sure I understand. What am I supposed to do exactly? The issue I'd like to solve is texture spawning. Object spawning would be a minor bonus.

Steps 2 to 5 did not solve the issue, unfortunately. What can I do?

 

 

 

 

Link to comment
Share on other sites

Can you add a texture to the terrain (the non textured ones) and paint normally on those terrains? 

 

Link to comment
Share on other sites

Yes, that is not a problem at all. The problem is that the terrains are huge (over 6 km x 4 km combined), so I'd much prefer to let Gaia handle this. What can I do?

Link to comment
Share on other sites

I was asking if you can paint normally to rule out the terrain being the issue. 
Number 6 is good to know from the spawner perspective because it would let me know if something is wrong with the terrain or biome. 

image.png

It should look something like this: 
image.png

If you click on the eye ball next to the color you can then visualize if the biome is covering the terrain. 
If no color is on the terrain then we can rule that its the biome that is the issue. 

 

Link to comment
Share on other sites

Yeah, that's what I figured you meant, but I wanted to make that point anyway. Thanks for your help so far. 

You are right--the terrain seems to be fine.

6 could well be the problem. The eyeball shows that "Fit To World" does not lead to complete coverage of the terrain, so I need to manually increase the range in the Spawner script. However, this setting has always reset when I check it after spawning.

Is there any way to change this behavior?

Link to comment
Share on other sites

Hi Vdeijk,

for further clarification: It would be correct that the spawner would only display the visualization (the colored area after pressing the eye button within the spawner range - this has technical reasons, and can also be used to restrict the spawn to a certain area only by setting the position / range and clicking "Spawn Local" in the spawner - then it would only spawn at that position within its range. 
When clicking "Spawn World" however, the range should not matter and the spawner should always iterate across the entire world regardless of the range. If your issue still happens when clicking "Spawn World", the range can be ruled out. 

In addition to the questions Bryan asked, I noticed the following:

You seem to have 4 terrains in the scene, but the total world area seems to be rectangular rather than square - how are the individual terrains set up? Are they like "rectangular strips" that are put next to each other? I would normally say that it should not matter to Gaia since it can still handle distorted terrains, but maybe there is some issue with the constellation of the terrains.

Your first texture on the terrain seems to be a reddish stone texture - what exactly is the gray texture that is seen on your screenshots here:

image.png

Is this an actual gray texture (e.g. a stone texture), or is this unity's placeholder checkerboard texture? The reason I'm asking is because normally as soon as you add the first texture to a terrain, that immediately would become the default texture and cover the entire terrain. Your screenshot looks like there was half of the terrain textured, while the other half remains untextured - that is a state that can normally not be achieved with regular means. Is it possible for you to draw into those gray areas manually with the terrain inspector, or are they "locked" of sorts? 

Are you using a 3rd party terrain shader by any chance?

Do your spawn rules or the biome controller use any image masks? With those it would be possible to restrict the spawn in such fashion that it only happens in a rectangular area in the overall world.

 

Link to comment
Share on other sites

Hi Peter,

Thanks for taking an interest. Your help is much appreciated! 

The terrains have been converted from .obj files. I'm pretty sure I used this tool: https://www.lmhpoly.com/tutorials/convert-mesh-to-unity-terrain

Yes, the gray area is Unity's placeholder. I'm still able to paint over it manually--no problems there. 

I'm not using any custom terrain shaders nor am I using any image masks. 

Does the above information help us pinpoint the issue in any way?

Here's the same issue but on a different map: https://ibb.co/52shMSR

As you can see, there are no gray areas, but Gaia still refuses to paint parts of the terrain properly. You can see a "red stripe" all the way across the map in the top right. All Gaia will paint is the red base texture, nothing else. Gaia does this on the other map as well, in certain parts. 

Any ideas?

 

Link to comment
Share on other sites

Hi @vdeijk, that is all very interesting info - the fact that it is the placeholder texture & the info that the terrain has been converted from .obj with an external tool makes me think there is something unusual about those terrains that subsequently creates this issue in Gaia. Could you please test if the spawner shows the same behavior on a new, empty terrain that you create via the "Create > 3D Object > Terrain" command from the scene hierarchy?
Could you please provide us with one of the original .obj files or an export of a scene with one of the converted terrains in it so we can see if we can reproduce the issue on that terrain & then potentially analyze it? I will send you a link via DM for a folder on one drive for file upload.

Link to comment
Share on other sites

Hi @Peter, yes, you are probably right as I haven't experienced that issue with other terrains. It's really only with those converted obj's. 

I'll send you the files later today. 

 

Link to comment
Share on other sites

  • 4 weeks later...
  • Solution

Hi @Peter, @Bryan, the past few weeks I've been busy converting my project from the built-in RP to URP, since this completely broke my project. Sorry for not responding, but I've been extremely busy.

Yesterday, I finally had the chance to look at the above terrains, but my conclusion is to stop working with them. The way they are set up simply isn't really compatible with Gaia Pro as I'm running into too many issues.

However, I am very happy with the result of the conversion to URP. The game looks quite nice now, as you can see here: https://vdeijk.itch.io/mars-commander

Do you happen to know of any stamps or stamp packs that use data from places other than Earth i.e. the Moon or Mars? Since my game is set on Mars, this is what I really need. 

 

 

 

 

 

Link to comment
Share on other sites

Thanks, @Bryan, that pack looks great. To be honest, I never considered buying stamps because my game is set on Mars, not Earth. However, I have to say, the quality on display is excellent.

Maybe I should buy a couple of these (or the entire 14-pack bundle!) and start experimenting. I'm pretty sure that slapping my Mars rocks & textures on top will give me the look I want.

 

  • Like 1
Link to comment
Share on other sites

8 hours ago, vdeijk said:

Thanks, @Bryan, that pack looks great. To be honest, I never considered buying stamps because my game is set on Mars, not Earth. However, I have to say, the quality on display is excellent.

Maybe I should buy a couple of these (or the entire 14-pack bundle!) and start experimenting. I'm pretty sure that slapping my Mars rocks & textures on top will give me the look I want.

 

No problem! 
 

Link to comment
Share on other sites

  • Bryan locked this topic
Guest
This topic is now closed to further replies.
  • 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...