Jump to content

Texture Spawner not working on all terrain tiles


MikeHibbert
Go to solution Solved by Peter,

Recommended Posts

Hi All

 

After triggering a texture spawn some of my terrain segments are not retexturing properly.

 

1427856229_gaiaterraintexture.thumb.png.a5648e41ebea3420a93025ca3edafb50.png

 

Any idea what to do to fix these? I've looked in the docs and youtubed and googled but I'm not sure what this is even called?

Link to comment
Share on other sites

Hi @MikeHibbert, this looks quite unusual - those squares that you have there, are those separate terrains or is this one larger terrain where only parts of the terrain are wrongly textured?
If those are separate terrains, can you please check if those terrains do have the correct terrain layers on them? (E.g. there is this reddish / orange texture that seems to be missing on that yellow square - is that reddish / orange texture part of the terrain layer setup on that terrain?)
What does the visualization in the texture spawner show when you try to visualize those areas? Do you see the same weird pattern as well, or does the visualization look correct?
Are you running any kind of additional terrain shader, or is this the default unity one? (Gaia uses the unity terrain shader as well if no additional shader is installed)

Link to comment
Share on other sites

Hi @Peter

 

I have a grid of 8 x 8  sections of 256 x 256 terrain chunks. I've checked the adjacent sections and they are all in the 'Default' layer currently.

 

1504155989_gaiaterraintexture-props.thumb.png.d2f83f6ba955c502634698f5ec8f4c93.png527581373_gaiaterraintexture-adjacent.thumb.png.ea928b9ce8a06eef8f28ed95030e5ee1.png

 

And with the visualizers on:

 

746303974_visualizerson.thumb.png.ea8aab5ca8582f2a05ee4c6e791af01e.png

 

I installed the shader from Gaia when I first did the setup process in the Gaia Manager so I assume that I'm using those.

 

1807090847_Gaiadefaultshaders.thumb.png.30c79540535c1f54e50e0ccb9afb478a.png

 

Thanks for the quick response!

 

Mike

 

 

Link to comment
Share on other sites

  • Solution

Hi @MikeHibbert, sorry I was not precise enough, I meant the Unity Terrain Layers, those are the "Texture Prototypes" that are available for painting on the terrain. I have the suspicion that some of those layers might be missing on the terrains that show the issue. You can find the Terrain Layers in the Terrain Inspector here:

image.png

If the terrain layers are missing, it is possible to copy the terrain layer setup from one "correct" terrain to the broken ones. If no terrain layer is missing, could you please try to draw on the terrain with the orange / reddish texture manually? (When you are looking at the terrain layers in the inspector you can select one of those and then draw on the terrain with one of the brushes.)
image.png

You could also try to select the texture spawner, and select "Fit to Terrain" to position it over the broken terrain and then click "spawn" local. This should result in the textures being recreated for the affected terrain only:

image.png

 

  • Like 1
Link to comment
Share on other sites

Hi @Peter

 

Thanks! this worked and I found that I can transfer the texture layers back to the broken ones by just selecting the 'good' layer and painting the adjacent ones with the textures and doing an re-spawn!

 

Thanks again!

 

 

 

 

Link to comment
Share on other sites

Great to hear it is working now with the workaround! You can copy the entire terrain layer setup from one terrain to the other with a resource helper tool in Gaia, you can find it in the advanced tab of the Gaia Manager:

image.png

It is not normal though that that terrain was missing those terrain layers in the first place, normally Gaia should create those initially on terrain creation and even should add them later on if they are missing, not sure why it was skipping those terrains for you. If you can recognize any pattern when this happens again, please let us know as it might be a bug in Gaia itself.

Link to comment
Share on other sites

@Peter

 

The only thing I can see is this error in my console:

 

DivideByZeroException: Attempted to divide by zero.
UnityEditor.TerrainInspector.GetAspectRect (System.Int32 elementCount, System.Int32 approxSize, System.Int32 extraLineHeight, System.Int32& itemsPerRow) (at <d63e58d1bc4b489593159fa6218bc0e6>:0)
UnityEditor.TerrainInspector.AspectSelectionGridImageAndText (System.Int32 selected, System.Int32 itemCount, UnityEngine.GUI+CustomSelectionGridItemGUI itemGUI, System.Int32 approxSize, UnityEngine.GUIContent emptyString, System.Boolean& doubleClick) (at <d63e58d1bc4b489593159fa6218bc0e6>:0)
UnityEditor.TerrainInspector.AspectSelectionGridImageAndText (System.Int32 selected, UnityEngine.GUIContent[] textures, System.Int32 approxSize, UnityEngine.GUIContent emptyString, System.Boolean& doubleClick) (at <d63e58d1bc4b489593159fa6218bc0e6>:0)
UnityEditor.TerrainLayerUtility.ShowTerrainLayersSelectionHelper (UnityEngine.Terrain terrain, System.Int32 activeTerrainLayer) (at <d63e58d1bc4b489593159fa6218bc0e6>:0)
UnityEditor.TerrainTools.PaintTextureTool.OnInspectorGUI (UnityEngine.Terrain terrain, UnityEditor.TerrainTools.IOnInspectorGUI editContext) (at <d63e58d1bc4b489593159fa6218bc0e6>:0)
UnityEditor.TerrainInspector.ShowPaint () (at <d63e58d1bc4b489593159fa6218bc0e6>:0)
UnityEditor.TerrainInspector.OnInspectorGUI () (at <d63e58d1bc4b489593159fa6218bc0e6>:0)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass62_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <85ce2546aea04ced8c7d950642af19e8>:0)
UnityEditor.InspectorWindow:RedrawFromNative()

 

Means nothing to me but perhaps your devs can get some ideas?

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