Hersir

Scene optimisation and allow32BitsIndices

Recommended Posts

Hi, I applied scene optimisation like this,

SceneOptimizer.OptimizeAsync(this.scene, SceneOptimizerOptions.ModerateDegradationAllowed(30));

And got error:

Cannot merge meshes because resulting mesh will have more than 65536 vertices. Please use allow32BitsIndices = true to use 32 bits indices

After checking code I found that Mesh merge accepts its as parameter, so can I somehow set it so SceneOptimiser can use it or there is something else what I can do?

Share this post


Link to post
Share on other sites

You could do the merge of those meshes causing the problem, then do the optimizer call.  If there are too many meshes to hard code,  Write a loop which makes the array of meshes to merge by checking the material (maybe that's what optimizer does).

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.