Jump to content

Flora Grass not showing in runtime and can't create custom flora grass. Help appreciated!


hurbivore
Go to solution Solved by Peter,

Recommended Posts

Hi,

  I'm having issues with the grass in flora not appearing in play mode. I've also tried creating my own flora scriptable object to use with Stylized Grass shader however, when it asks for a mesh in source data I have tried dragging and dropping several meshes in but always get this error message "UnassignedReferenceException: The variable m_mesh of DetailScriptableObject has not been assigned.
You probably need to assign the m_mesh variable of the DetailScriptableObject script in the inspector.
ProceduralWorlds.Flora.FloraEditorUtility.DetailerEditor (ProceduralWorlds.Flora.CoreDetailScriptableObject data) (at Assets/Procedural Worlds/Flora/Scripts/Editor/FloraEditorUtility.cs:145)
ProceduralWorlds.Flora.DetailScriptableObjectEditor.DetailerEditor (System.Boolean helpEnabled) (at Assets/Procedural Worlds/Flora/Scripts/Editor/DetailScriptableObjectEditor.cs:28)"

Any help would be greatly appreciated

image.thumb.png.419185750188bd97617c793748ebca58.png

Link to comment
Share on other sites

Hi @hurbivore,

I can reproduce the issue and will see if it can be fixed, in the meantime, you can fix this issue by duplicating an already existing detail scriptable object (some can be found in Procedural Worlds -> Flora -> Content Resources -> Presets) and editing it. Hover over an item and press Ctrl+D, then you can move it and rename and start editing it.

Link to comment
Share on other sites

@Isaac Thanks that worked! I was able to create a new Flora item. However, I'm still having issues with any sort of Flora items rendering in play mode or build. I forgot to mention that I'm using URP, Unity 2022.3.6f1

Link to comment
Share on other sites

@Bryan The stylized grass does work outside of Flora, I used it as part of Synty Nature Grass Spawner and it added the grass successfully to the terrain (although not well aligned with the terrain)

image.png.12b0738fd3e2f7292cf400a6c9f97638.png

Link to comment
Share on other sites

Hi @hurbivore,

To understand further the issue, could you please send me screenshots of what the Flora Terrain Tile setup (located on the terrain) looks like with the Detail Scriptable Object attached in the Flora Renderers tab? Here is an example:

image.png.d5fed8752ef87a8444c7c12240b94bb0.png

Also, what does the Detail Scriptable Object Settings look like? There might be a value within it that makes it not show up.

image.thumb.png.b91867799339e51880374a32be28cd84.png

Link to comment
Share on other sites

@IsaacSorry for the delay. I've actually updated to Gaia Pro 2023 to see if that would help but now I've noticed that there's no Flora option. Is there no option for Flora in Gaia Pro 2023? And sorry for making this more confusing 😅

Link to comment
Share on other sites

  • Solution

@hurbivore There is good news and there is bad news regarding the new Gaia version & Flora 😉

The bad news is: Flora does not exist in Gaia Pro 2023 anymore: Since unity added their own native GPU instanced grass rendering system, we discontinued it, especially since the setup and the difference between design time and runtime was a bit confusing.

The good news is that this should potentially fix your issue since you can now instead use that native GPU instanced rendering system to render the vegetation instead. What you need to do is to use the "GPU instanced" checkbox in the Resource settings for the detail spawner, then supply a prefab that you want to render for that grass item.

The prefab needs to be simple, LOD groups are not supported. The shader on the prefab needs to support instancing - if the stylized grass shader is not compatible, you can use the Terrain detail shaders that come with Gaia instead.

Please see step 11 in the migration guide for more info & screenshots:

https://canopy.procedural-worlds.com/library/tools/gaia-pro-2021/written-articles/30_installation__getting_started/migrating-from-gaia-2021-to-gaia-2023-r160/

 

Link to comment
Share on other sites

@Peter Thanks for the explanation Peter. That's a shame! I was hoping to add different LOD groups using Flora (which I understood could be done?)  I've had a look through the guide but I also recall seeing a GPU instanced option in Gaia 2021. Is that the same thing?

Link to comment
Share on other sites

In the spawner its marked GPU Instance which would tie into the new Unity instance indirect system. 
Flora was instance indirect as well but as peter mentioned is no longer in Gaia. 
So in terms of Unity, it's the same, flora it's slightly different. 

Link to comment
Share on other sites

No problem! 

If you are happy with the support we have provided and with the asset, could you please consider leaving a review on the Unity asset store? It would help us out a ton! 

  • Like 1
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...