Jump to content

My grass is spawning in white color


Go to solution Solved by Peter,

Recommended Posts

My grass prefab is fine but when I spwan it through gaia, it's spawns like a white object

 

image.thumb.png.b31ba6e322d9d925b8a0e2bade118e3b.png

Link to comment
Share on other sites

I would guess that you are using Unity 2022 and HDRP. 
The reason they are white is because Unity doesn't handle HDRP Grass as terrain details. 
You would need a detail shader to solve this issue. 

If you are using Gaia Pro 2021 then we have Flora. 
If you upgrade to Unity 2023 they did support HDRP. 
Otherwise, you would need to find a grass shader that supports HDRP. 

Link to comment
Share on other sites

I have two kinds of grass prefabs one with LOD and one without. The one with LOD doesn't even show up , the inspector shows it has spawned but I can't see it on my terrain. The one without the LOD is showing up as white models. I am using 2022 URP, Gai Pro2021

 

 

Link to comment
Share on other sites

From my understanding Unity terrain does not support LOD grass details. 
So it would make sense that this is the reason that is not working. 
You could look on the details panel to verify this after adding it and it should say its not supported. 

As far as URP and non lod versions this is very strange. 
This typically only happens when HDRP is involved. 
 
Can you please go into Edit - Project settings - Graphics - Player - Scriptable define symbols and send me a screenshot of what is there? 

 

Link to comment
Share on other sites

I am looking into this and still haven't found a solution as to why this happened just yet. 

Can you please tell me what would happen when you spawn grass from our biome presets? 

Link to comment
Share on other sites

I don't think you have prefab grass, texture grass works fine

Link to comment
Share on other sites

  • 3 weeks later...

started a new project still facing the same issue

Unity 2022.3.22 URP

image.thumb.png.1e8eed329a80936c3615d6de8c2aa413.png

Link to comment
Share on other sites

Hi @MoonBeam,

please note that Gaia uses the Unity terrain system as output - vegetation items spawned through Gaia should appear / render the same way as if you put the prefab / texture on the terrain manually (like Gaia was not involved when building your scene).
When you put the the grass prefab on the terrain without Gaia by going into the terrain inspector and paint it on manually, does it appear in white as well? (Please see the documentation here: https://docs.unity3d.com/Manual/terrain-Grass.html)
If yes, this is an issue with the prefab and / or the Unity terrain system - if it is rendering in white without Gaia, it would render white with it as well. If this is the case, you would need to focus more on the prefab, the shaders used and the available settings in the Unity Terrain Detail System. One possible cause for the white textures could be the "Use GPU instancing" option. If the grass uses a custom shader, you could also try if it renders correctly when using the URP/Lit standard shader.

If it does appear correctly when you set it up manually in the terrain detail system, but only turns white when Gaia spawns it, we would need to take a look at the prefab and / or the project.

Link to comment
Share on other sites

Welcome back Peter! I've missed your comments in this forum, they are always so helpful and i learn a great deal!

Cheers!

Link to comment
Share on other sites

On 6/3/2024 at 6:51 AM, Peter said:

Hi @MoonBeam,

please note that Gaia uses the Unity terrain system as output - vegetation items spawned through Gaia should appear / render the same way as if you put the prefab / texture on the terrain manually (like Gaia was not involved when building your scene).
When you put the the grass prefab on the terrain without Gaia by going into the terrain inspector and paint it on manually, does it appear in white as well? (Please see the documentation here: https://docs.unity3d.com/Manual/terrain-Grass.html)
If yes, this is an issue with the prefab and / or the Unity terrain system - if it is rendering in white without Gaia, it would render white with it as well. If this is the case, you would need to focus more on the prefab, the shaders used and the available settings in the Unity Terrain Detail System. One possible cause for the white textures could be the "Use GPU instancing" option. If the grass uses a custom shader, you could also try if it renders correctly when using the URP/Lit standard shader.

If it does appear correctly when you set it up manually in the terrain detail system, but only turns white when Gaia spawns it, we would need to take a look at the prefab and / or the project.

Hello Peter, as explained before my prefabs work fine when I use unity terrain tools. I restarted my project from scratch but I am still seeing the same issue. In picture below I spawned the non-white grass using unity tools, and Gaia is spawning in white. I am using Nature manufacture assets, I reached out to him but he has no idea about it

image.thumb.png.04501fcda969bd2adad5df7ed40bbe50.png

Link to comment
Share on other sites

Hi @MoonBeam

 

Quote

Hello Peter, as explained before my prefabs work fine when I use unity terrain tools.

thanks for the clarification, this was not 100% clear from this thread, I did see that it worked when you dragged and dropped it in as a prefab, but was not sure if it works as well when you put it on the terrain as a terrain detail. This is quite unusual, as from a technical perspective the result should be identical whether you put the prefab on there yourself or Gaia adds it in.
I believe you sent us the exact asset in an additional email, we should have access to that asset and will review this with that exact prefab in the hopes we get the same result, then we can investigate more.

Link to comment
Share on other sites

  • Solution

Hi @MoonBeam, I set up a test project with Gaia 2021 and the asset in question and found the following:

If the asset is set up without GPU instancing it renders in white.


image.png

If the asset is set up with GPU Instancing enabled, it renders correctly.

image.png

This behavior is identical regardless of the asset is set up through Gaia or set up manually in the Unity inspector. (Gaia also has the "GPU Instancing" option that is then passed through 1:1 to the terrain as well)

image.png

Note that if you already spawned the grass on the terrain and then change that setting afterwards, you would need to press the "Refresh Terrain Prototype" button then to transfer the updated settings to the existing prototypes on the terrain.

It is not 100% clear why those older non-GPU instanced modes do not work anymore with that asset, but I would not recommend to use those anyways as you should get better performance & looks out of the GPU instanced grass (these older modes used quite ugly proprietary shaders and not the original shader from the asset)

Link to comment
Share on other sites

Thank you for your response ! my models work with GPU instancing. I am not really familiar with GPU instancing, I hope they don't cause any performance issues long term !

image.thumb.png.ff057b9cbfb353e2c19e7332877f5f6c.png

Link to comment
Share on other sites

Thanks for the update. 
If you need any further support please reach out! 
If you are enjoying the product and support please don't forget to leave a review on the Unity Asset Store. 
Helps us out a lot! 

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