I’m loading Google SketchUp models into a jME3 app by export from GS as .OBJ, then using AssetManager.loadModel(). The place where I run into an issue is that the .OBJs include polygons, and OBJLoader says:
[java]
if (vertList.size() > 4 || vertList.size() <= 2)
logger.warning(“Edge or polygon detected in OBJ. Ignored.”);
[/java]
and
[java]
// face, can be triangle, quad, or polygon (unsupported)
[/java]
It seems like my options are to:
Understand the jME3 code and issues well enough to modify it to support polygons (and give back to the community)
Write a converter that will convert the polygons to a series of triangles and quads
Export as a different format that jME more fully supports
Find a converter that will convert Sketchup files to .OBJ without using polygons
Can someone offer advice as to what my short path is here?
After posting this, I found an answer. Google Sketchup has an option in the export to OBJ, “Triangulate all faces,” which, when enabled, doesn’t use any complex polygons. I also enabled “Export two-sided faces,” and that improved the results when viewing.