I’m creating a small city with realistic buildings and landscape where a player would be able to walk around.
At first, I designed a simple ground and models of buildings on sketchup. Then I imported the fbx files of them on my project. The problem is when I import more than 5 models of buildings (each one has a size of 2Mb), the frame view crashes and the message “WebGL hit a snag” appears.
After, I designed the whole environment on sketchup in one file and imported the fbx file (11Mb) on playcanvas and I still have the same problem.
Is it a bug or I can import only a certain size of files in my project?
Hi @aiky_rakoto, you haven’t posted link to project nor models to test them out.
My initial thoughts: you have too many triangles or mesh instances in each model, for real-time 3d development you want to have optimised geometry, minimum number of meshInstances and reduce number of triangles as much as possible.
Sketchup does export quite badly structured FBX files. As far as I recall, each extrusion is an independent graphics object. Each object translates to a single draw call in PlayCanvas. As Max says, this can cause the generation of many thousands of draw calls potentially for large Sketchup scenes. Sometimes, I import a Sketchup scene into Max or Maya to combine all of the separate objects into a single mesh. I then export again to FBX and import into PlayCanvas.
But as Max says, to confirm, it would be useful to check out your project.