Jump to content

A couple of bugs


snowballfred
Go to solution Solved by Peter,

Recommended Posts

Hello there. 

I have found an issue with spawners in gaia 2021 pro. 
in screen shot 1 you can see that i have a texture setup to spawn according to my rules and is shown here masked out in orange. 
image.png.909f7b3c91707576a63b76f51a02b5c5.png
after i run the spawner the texture is not applied where the visualizer shows it should be spawned.
image.png.c3e8d772a4c53571d19685c28c26d338.png
There should be a forest floor texture (brown) showing,
as you can see the spawn has failed in the second screenshot.
here are the spawner settings i used. in this case we are specifically looking at the forest texture spawner rule. 
Ground Textures MK I.asset

secondly the spawners only seem to work on terrains suited to 4096 or numbers in that series 2048 1024 etc etc once you go out side of those particualr sizes (in my current situation 4500x4500) the spawners fail to complete the spawn and leave bare strips of unspawned terrain which then manually needs to be locally spawned over to finish it off. 
you can see this in screen shot 3 where ive spawned my textures in over a darker grey base texture to better demonstrate this issue. 
image.thumb.png.9e9b2d5f34d708b9a09608570fe23c15.png
as you can see there are huge bits completely overlooked by the spawner. from what i have observed when the spawn operation is clicked the terrain size is evaluated by the spawner and then broken into 4 smaller spawners and then the operation is completed, it seems that the maximum size the spawners can handle is hard coded in at 2048 and the max single terrain size that each can handle is 4096. Might i suggest rather than hard coding those values could we get the information about the terrain size from the terrain itself and then the spawner takes that number and divides it by 4? 

i have another bug to disclose regarding spawners and image masks not working correctly but i do not have the screen shots on hand ill replicate it and make another post.

Some things to note:
-All my rules have a image mask added but disabled
(this is due to gaia removing the blend mode options for the first mask rule in every spawner rule. Another bug maybe??)image.png.eb247149d0ac2c7edc573795c774500c.png
-My spawners for textures are either set to add or replace. 
-My unity version is 2021.3.23f1 (lts)
-I have no conflicting assets installed. 

Link to comment
Share on other sites

This effect that you're experiencing can be due to numerous reasons so it's hard to say which one. 
When texturing your terrain it's like a painting. Coat by Coat the textures are added. 
The last Spawn Rule is the one that will be predominant at the end. 
It could be that other rules are preventing it from spawning as you want. 
Another thing to keep in mind, the visualizer is based on the probability of spawning. 
Granted where the area of visualization is a pure color (not faded) it should spawn as long as no other rule is messing with it or overwriting it. 

A good test is to turn off the other rules and spawn one at a time to see. 

The Spawn operation shouldn't matter in this case. 

As far as the spawner range this is expected. We did this due to the large world and it crashing or timing out. 
The range is the most optimal. You could add a distance mask and move the spawner around and then spawn. 

 

Link to comment
Share on other sites

Yeah im pretty used to how the system works as ive been using it for some years now infact since prior to you working at PW
and partook in all sorts of beta testing and stressing of gaia through to gaia pro initial release. 

As for the rules, i managed to remove some and add some more and got it working again but to get the desired outcome like how the visualiser shows is key so itd be nice to see it working in accordance with the visualizers representation in all cases or not vizualise at all hence me calling it out as a bug. 
as for the spawner range this is good and all for generic use cases but can i modify the code of the spawners so i can atleast avoid having to re position the spawners constantly as i frequintly use this software for splat maps i only need to increase the size by a maximum of 500 to include my slightly larger terrains i use im happy to make the modification my self if you can point out roughly which lines are responsible for those clamped values. 
ill be doing more heavy testing of the spawners at some point soon.

How about the blend mode option not being present on the first mask-rule of mask settings for each spawn-rule?

Cheers ears thanks for ya time

Link to comment
Share on other sites

Hi @snowballfred  I had a look at the spawn rules you provided, at it seems the issue with the visualization / the spawn failing is connected to the workaround with the empty image mask to get the blend mode showing up. But first things first:

The blend mode not showing on the first mask in a mask stack is intentional - the blending is applied to the output of the previous mask in the stack. If there is no previous mask, there is nothing to blend with.

You mentioned you worked around the blend mode not showing up by adding an empty image mask. Normally there should be no reason you would want a blend mode other than multiply on the first mask in the stack. Imagine the visualization for a spawn rule without any mask on it:
image.png

It is "full red" as there is nothing restricting the spawn. Now imagine we put an image mask on it (Using one of the "Generic Masks" that come with Gaia here):

image.png

The mask texture in the Image mask is multiplied with the original "full strength" and is masking the area down. Now imagine the other blend modes would be active:
 

  • Greater than: Would have no impact, the input is already 100% strength
  • Smaller than: Would have the same result as multiply
  • Add: Would have no impact, the input is already 100% strength
  • Subtract: Would be the inverse of multiply

These blend modes only make sense if there is another mask in the stack earlier where something like "Greater than" can be applied. You could argue that "subtract" does have an impact, but overall we did not want to confuse users with an option that does not do anything on the first mask.
There is one rather rare use case where you might want a blend mode on the first mask in a rule: If there are masks on the biome controller / spawner already, and you want to "break out" of that masked area within your spawn rule. That is possible with the "Global Mask Stack" mask, if you are interested in that please see in the Mask Documentation under 8.3

Returning to the issue at hand: Please try to deactivate the first two masks in the problematic "forest" rule. The visualization should not change (as the first two masks have no impact overall), but the spawn result should match the visualization then. I do need to investigate more to figure out why it is not working with the two first masks being active, my sense is this is an undiscovered bug that has to do with the workaround of adding a deactivated mask to get the blend mode showing up.

The spawner range issue is 100% a bug, I was able to reproduce it. This will be fixed in the next Gaia update which should arrive shortly, we created a new landing page for Gaia documentation and want to roll out an update where users are sent there as part of the Gaia installation process instead of the Canopy homepage.

  • Thanks 1
Link to comment
Share on other sites

Oh thanks for having a deeper look into that for me. it actually was the subtract feature that i was wanting to start off with so you hit the nail on the head with that one, 
the spawner range fix is a huge life saver. may i ask if you changed the logic or just increased the range bounds? 
i only ask as i have plans to use larger terrains at some point in the future.

One thing id like to add is seams that appear when the texture spawner runs. here is an example using a RGB mask export. 
image.thumb.png.0c120c687081d4205f26454406644e68.png

as you can see there is a cross in the texture mask (is very noticeable on the terrain textures) typically the base texture that was first applied to the terrain is what makes up the grid/cross caused by the spawner. 
This was visible when using a spawner on a terrain larger than 4096 even though the spawner still spawned inside its allowed bounds which you wouldnt expect to behave normally when using a terrain size or 4096, but for some reason it seems to miss out the space between. I have yet to test the new fix with this particular bug but i thought id bring it to your attention that this was another bug. 
But also the range of the mask export is/was also limited to the range of the spawner as you can see the mask is also cut off in a similar manner to how the spawners would miss the additional range on the terrain size. 


there is one more bug i have to re check with using masks that were exported and re applying them  was not working correctly
this may also have been a product of the range bug also. the resulting spawns looked as follows 
image.thumb.png.721165887ad1abd3ea059e5d64d0ff07.png
here you can see my image mask being represented by the visualizer and its covering the terrain as you would expect 

but when the spawner was run this was the result (regardless of local or global setting) 
image.thumb.png.a46173fbe70cec476f70ef6bd963dce4.png
The resulting spawn would tile out over the terrain even though the mask would show it spawning over the terrain as shown in with the visualizer. 

I will re test this issue and post how to reproduce it if using the new fix doesnt change the result. 

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