High Poly 32 bit index mesh weirdness

I have a script that procedurally creates a sphere. I have set that sphere to use 32 bit index format with:

sphere.indexFormat = UnityEngine.Rendering.IndexFormat.UInt32;

“sphere” is my mesh. It works fine in editor where I’ve taken it up to about 1.5 million vertices:

Imgur

When I enter play mode the sphere turns into this:

Imgur

However if I generate the sphere at runtime it has no problem.

Anyone know what the cause may be? Running 2018.3.0b8, GTX 680

can you post your full script?

I discovered the problem! There was a code path leading to generating the sphere mesh that defaulted to 16 bit index buffers and going back and forth between the two made the sphere unhappy. Thanks for your willingness to help!

1 Like