Grass script problems from nature pack...

Good morning everyone! I cannot seem to get the grass generator script working. I tried a new scene, added a plane(in unity) and then used the component - Nature Grass On Mesh Generator. I select an approporaite texture within the inspector and nothing happens in the game view.

I receive the following OverflowException error at runtime:

OverflowException: Number overflow.
GrassOnMeshGenerator.PreprocessPatches (UnityEngine.Mesh srcMesh, Bounds srcBounds. Matrix4x4 srcMeshToWorld) (at Assets/Nature Pack/Grasss Generator/GrassOnMeshGenerator.cs.883)

Any thoughts would be greatly appreciated.

Cheers,

Gary Haus

Have you tried not scaling up the plane. Generally the grass generator scripts requires finely tesselated geometry.

Joachim,

I tried that as I saw a post before about finely tesselated geo. Per your suggestion I also created another plane in Maya (with a high tesselation count) I receive the same error in a new file as well. Thanks for any further help.

Gary

i have no idea what the exception you’re getting means. so a blind stab in the dark… do you have a control map?

Hmmm. Thank you for the suggestion. Still no go. Same error. I hope someone has another suggestion…

Gary

Ive scaled planes up massively and had no problems. I suggest doing a new scene, with different assets, make sure shaders appear in inspector etc. It can be tricky because theres different scripts/shaders in different folders. generally Its easiest to mod an existing example project when it gets complex, and the grass example is the most complex one Im aware of…good luck!

AC

i can say i’ve used it a bunch and never had a prob with it. simply drag and drop and it just works™. i haven’t taken the time to look at the joe’s code. so admittedly i don’t really know what’s up. the other thing that comes to mind though, is i believe it uses the mesh combine util. do you have the standard assets imported? if you want, post the project and i’m sure we’ll have it figured in no time.

I do have the standard assets installed. I would like to upload my project for someone to help but it is HUGE! It is well over 500mb!!!

I wish this worked for me the way it should… I have tried a new project with the standard assets installed, to no avail. I guess no grass for me.

Thanks everyone for your help and suggestions. I will try a little more this weekend…

Cheers,

Gary

Then I suggest importing your assets to the grass demo folder and work from there?
AC

What if you do this: create a “simple enough” scene that has grass problems (it might be in your existing project). Select the scene in Project View, do Assets → Export Package, with all dependencies. Then send in the .unityPackage file via Report Bug.app.