Search code examples
androidunity-game-enginerenderblender3d-model

Unity3d why is all my models flickering in mobile?


I have created a maze game. The maze model I created and imported from blender as an .fbx. It works fine on pc but when I build it on mobile the entire maze starts flickering. At first I suspected it was the camera, so I kept changing the distance and set the clipping pane to 0.3 but it still didnt work. And because of these model flickering, all the other ui doesnt work as well. I had a collider that is on trigger, that when the player collides with it, the player will be loaded to the next scene(level) and an exit button that exits to main menu when clicked, but due to the model they start glitching and the game will crash. However when i change the blender model to a maze model that i created in unity, everything works fine without any problems. So the problem is with the blender maze model itself. Alright the maze I made on blender is made from an .svg that i got from maze generator. So I took that svg, converted to mesh, made it 3d, extrude it and added solidifier modifier, subdivision modifier and displace modifier. It looks like somewhat realistic maze made out of bricks. It has many subdividions (950000000 quads and tris) and I exported the armature and mesh only. My unity freezes when I add the mesh collider to the maze because of its many subdivision that makes it heavy. So i made a simple maze model in blender and exported that as the mesh for my main maze. That is all the details on that, that i could think of. Funny thing is, I also created crystals and the plane from blender and exported to unity and they are working fine in the game. So what I would like to ask is why is this happening and how do I solve it please?

enter image description here

this is the game, its the model is flickering but i cannot capture that

enter image description here

and this is when i move my player all the way to the end of the maze, somehow its working then, but still cannot move to next level or quit without crashing but when i use the maze model that i made in unity, all of it is working like normal


Solution

  • I think I know why already, unity seems to have a mesh vertex limit, that is why only my maze model is flickering and stop the functions of all my other objects, its because it cannot support it. My maze wall has more than 800000 vertices and unity only seems to support around 65535 verts from what I searched online(although this was from the unity 5 version, no idea now). Now I need to learn how to create a realistic brick wall maze that has less than 65k verts