Custom SimpleObject mesh wireframe turns red on occassion


I have a relatively complicated mesh object that sometimes the wireframe turns red, it’s not always fatal (though can be) and the mesh can be “recovered” with changing of parameters. It’s obviously an error on my part but tricky to trace… Anybody else had this and found the reason for it ?


seems to be having a material id higher than 2048 :confused: that’s causing it


it’s seems to be related to elements with high matid and standard material or no material (an fx shader doesn’t have an issue)

	delete objects
	mobj = converttomesh(plane widthsegs:16	lengthsegs:16);	
	meshop.explodeFaces mobj #all 0
	for f = 1 to mobj.numfaces do setfacematid mobj f f;

runs ok but if you change segs to 32 32 it will crash max (well the one i’m developing in)