Closed KyleBanks closed 1 month ago
Also seeing the following related exception thrown quite frequently:
Patch indices out of bounds, patchX:1 patchY:18 patches size:256
UnityEngine.StackTraceUtility:ExtractStackTrace ()
VisualDesignCafe.Rendering.Nature.TerrainGrassSpawner:Spawn (int,int,int,single,double,VisualDesignCafe.Rendering.Instancing.InstanceMatrix[]&,single&,single&) (at C:/Visual Design Cafe/Projects/Nature Renderer/Unity/Nature Renderer 2022/Assets/Visual Design Cafe/Nature Renderer/Plugins/Runtime/VisualDesignCafe.Rendering.Nature/TerrainGrassSpawner.cs:103)
VisualDesignCafe.Rendering.Nature.TerrainGrassStreamer:LoadCell (int,VisualDesignCafe.Rendering.Instancing.InstanceStreamer/Cell&) (at C:/Visual Design Cafe/Projects/Nature Renderer/Unity/Nature Renderer 2022/Assets/Visual Design Cafe/Nature Renderer/Plugins/Runtime/VisualDesignCafe.Rendering.Nature/TerrainGrassStreamer.cs:350)
VisualDesignCafe.Rendering.Nature.TerrainGrassStreamer:UpdateLoadCellsAsync (int&) (at C:/Visual Design Cafe/Projects/Nature Renderer/Unity/Nature Renderer 2022/Assets/Visual Design Cafe/Nature Renderer/Plugins/Runtime/VisualDesignCafe.Rendering.Nature/TerrainGrassStreamer.cs:296)
VisualDesignCafe.Rendering.Nature.TerrainGrassStreamer:GetBuffersForCellsInRange (UnityEngine.Camera,int,double,VisualDesignCafe.Rendering.Instancing.CullingSettings,System.Collections.Generic.List`1<VisualDesignCafe.Rendering.Instancing.InstanceBuffer>) (at C:/Visual Design Cafe/Projects/Nature Renderer/Unity/Nature Renderer 2022/Assets/Visual Design Cafe/Nature Renderer/Plugins/Runtime/VisualDesignCafe.Rendering.Nature/TerrainGrassStreamer.cs:218)
VisualDesignCafe.Rendering.Instancing.CameraRenderer:RenderObject (VisualDesignCafe.Rendering.Instancing.CameraRenderer/ObjectRenderData,VisualDesignCafe.Rendering.Instancing.SceneRenderSettings&) (at C:/Visual Design Cafe/Projects/Nature Renderer/Unity/Nature Renderer 2022/Assets/Visual Design Cafe/Nature Renderer/Plugins/Runtime/VisualDesignCafe.Rendering.Instancing/CameraRenderer.cs:346)
VisualDesignCafe.Rendering.Instancing.CameraRenderer:Render () (at C:/Visual Design Cafe/Projects/Nature Renderer/Unity/Nature Renderer 2022/Assets/Visual Design Cafe/Nature Renderer/Plugins/Runtime/V
Thank you for reporting this. I looked into it and it should now be fixed in the latest version (2022.0.4) which I just published. You can go to Help > Nature Renderer > Check for Updates to download the latest version. Please give it a try and let me know if you have any further issues.
Describe the bug
It's common to modify the patchBoundsMultiplier on a terrain like so when using tessellation/displacement shaders to avoid unwanted patch culling:
However, with Nature Renderer this is causes occasional crashes which look like so:
To Reproduce Steps to reproduce the behavior:
Expected behavior
Patch bounds should be incorporated into the grass streaming calculations and not crash.
Screenshots If applicable, add screenshots to help explain your problem.
Project(please complete the following information):
System (please complete the following information):
Additional context
Up to Unity 2022.3.22 Nature Renderer would actually crash in both editor/standalone builds much more frequently (almost every time), but Unity seems to have addressed this somewhat in 2022.3.22. Unfortunately though it's still crashing from time to time.
https://issuetracker.unity3d.com/issues/crash-on-terraindatascriptinginterface-computedetailinstancetransforms-when-calling-computedetailinstancetransforms-with-incorrect-parameter-values