Bil Simser Posted December 28, 2021 Posted December 28, 2021 Hi guys, I have a question (and probably misunderstanding) about a biome mask. I've got an image split up with multiple colours for the biomes (attached). I created 5 biomes to match my image mask and added the image mask to each biome. I then used the PRO Color Selection filter to select the colour of each section of the mask. In the attached image purple for example represents a dead forest so I want to use a dead forest base texture while white represents a snow biome so I want the base texture to be snow. So far so good. When I visualize each biome it looks fine on the terrain. When I add a different texture spawner to each biome it just applies it to teh entire terrain. I've also copied the image mask from the biome and applied it to the texture spawner but it doesn't seem to be respecting it and applies the texture to the entire terrain. I must be missing something or doing something wrong? Thanks
Peter Posted December 29, 2021 Posted December 29, 2021 Hi Bil, just from reading the post your approach sounds valid, this is exactly how the masks / biomes are supposed to be used when you want to have different biomes in different areas in your world. All masks in the biome controller should be passed down into the texture spawners and they should be limited to that area then. I will grab your mask image and play this through from my side to see if there is any pitfalls with this that I currently can't think of. One potential issue I could imagine: When you start testing with the very first biome, I would expect that texture to go everywhere on the terrain regardless of the mask - since this is the very first terrain layer that is being added to the terrain, that becomes the default texture on the terrain and is then displayed everywhere. This is no bug or issue, but standard behavior of unity, as soon as the first terrain layer is being added that becomes the default "look" of the terrain, and you need a second layer that you then paint on top of that first "default" layer. Could it be that you started testing, and this behavior made it look like the masks are not working?
Bil Simser Posted December 29, 2021 Author Posted December 29, 2021 It's possible as I selected the first one and yes, it aplied it everywhere. I'm trying to make it so I don't have a default texture applied but rather biome specific textures. Not sure how to get around this. The other thing that came up is the size. My terrain is 4096 right now and on the biomes I've selected Fit to World (so they expand to 4096) but then when I apply the biome say for the middle mask (the purple one) I get that texture applied to 16 sections of the terrain individually rather than the whole thing. I did change the biome setting from local to world and set the texture spawner (the only spawner in the biomes) to fit to world so they expand to 4096. When I run the spawn biome a) it applies it to 16 sections of the whole terrain not the terrain itself (there's only one terrain) and b) the spawner setting changes the range back to 1024 after spawning (but the biome setting stays at 4096).
Bil Simser Posted December 29, 2021 Author Posted December 29, 2021 A couple of notes: 1. I can create a new biome that covers the entire terrain with no mask and a single base texture (e.g. sand, dirt) and run that first. That might fix the problem of applying the texture to the terrain regardless of masks. 2. I'm using Gaia 2021 3.13 and Unity 2021
Solution Peter Posted December 29, 2021 Solution Posted December 29, 2021 2 minutes ago, Bil Simser said: I'm trying to make it so I don't have a default texture applied but rather biome specific textures. Not sure how to get around this. This should rather be a formality, but as soon as you continue spawning your other biomes one after another, you should get the results that you want - the default texture would only apply to the first spawned biome, but the following ones would paint on top of that, and the end result should be as you want it (if I understood you correctly, that is). I took the mask for a spin and added the first 3 texture biomes with one texture spawner each (see in my hierarchy). The green texture is the first one I spawned, which went across the entire terrain, and then the two other textures went on top. If I would continue like that, I would get one texture each for each area of your input mask image: Quote When I run the spawn biome a) it applies it to 16 sections of the whole terrain not the terrain itself (there's only one terrain) Could you please try to switch the "Mask Space" on the mask to "World" and make sure the visualization looks good before you try to spawn again? This should fix this behavior. The issue is that the spawners start iterating over larger terrains instead of processing them all at once. If the mask is set to local space, that mask will "follow" the spawner around as it iterates over the terrain, instead of being applied to the world as a whole. You can find a more detailed explanation here:https://canopy.procedural-worlds.com/library/tools/gaia-pro-2021/masking/introduction-to-masks-r50/ (See under "7. Local vs. World Mask Space") The reduction of the spawner range is a side effect of that as well as this is the size that the spawner uses to iterate over the terrain while processing.
Bil Simser Posted December 29, 2021 Author Posted December 29, 2021 Okay I didn't realize the mask space itself has a setting for local vs. world. That created different results though. Here's the green biome mask set to local space. Note that it does appear correctly with the visualizer turned on but then will spawn the textures in 16 segments. So then I changed the biome mask space to world and got this result: Which is odd. The terrain is 4096, the mask (and texture) are both set to 4096 and world space. So I spawned the biome and got what I expected (but wrong). The green biome spawned in the lower section (this was spawned with the biome mask set to world) and changing the visualization back to local in the biome mask and turning it on shows where it should have placed it. So I'm very confused. Will try clearing out the textures and settings and respawn things. I think what you describe works just not sure why my setup isn't behaving correctly.
Bil Simser Posted December 29, 2021 Author Posted December 29, 2021 (edited) I think I have it working. I noticed the biome x/z was set to 3072 (soemthing to do with the mask and it's position I guess?) so I set the x/z offset/position in the mask to the same value and it put it in the right place. Will have to read up on local vs. world space and I guess there's an extra thing with a situation like this where the mask is offsetting the biome and causing it shift. Not sure why 3072 is a magic number but has to do something with my biome mask. In any case, it worked so now I'll move onto adding trees and such to each biome now. One more question is there a single "spawn all biomes" way in Gaia? Right now I have to click each biome one by one (and in the correct order). EDIT: The terrain is 4096x4096 and Gaia positioned it at -1024 and -1024 (x and z respectively) so that's where 3072 comes from. Edited December 29, 2021 by Bil Simser Added image
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now