Collada, osX and Sketchup

Hi everybody,

First of all I’m not a 3D expert so please be patient and eventually, sorry for my English which is not my native language.

I’m investigating a problem I met while trying to visualize a Sketchup model within ARkit from Apple.
Basically everything works like expected when you export from Sketchup without the “export edges” enabled. Unfortunatly I need to keep a Sketchup like rendering so I do need the edges.

Exporting the edges works but all meshes with smoothed edges turn full black as if the normals where inverted.

I’ve done a simple test to be sure it wasn’t due to anything strange during the modeling and to show you:

Below into sketchup, the same volume duplicated, one with a rounded edge.

Now first oddity, once exported, osX preview (within Finder) already show the problem, we can see the mesh with rounded and smoothed edge is displayed in full black:

And unfortunately once into sceneKit, same problem.

Anyone has an idea of what’s going on here?

Could the Sketchup exporter be the flawed?

Any idea on how I could solve this?

I don’t believe Sketchup has ever really committed to COLLADA. I can only say that I’m pretty sure COLLADA 1.4.1 can at best represent this as a triangle mesh with some lines that are essentially separate primitives that outline the lines you want to see. It also has curves, that could be used in place of discrete lines, but the mesh would be discrete. Since COLLADA was pretty much abandoned, the 1.4.1 specification saw all of the early interest in it, and as far as I know now software grapples with the 1.5.0 specification.

I’m trying to make COLLADA useful as a public technology. Moneyed parties have moved on. COLLADA looks way more successful than it is because of the hype and buzz at the beginning, and people writing their dreams rather than realities either as p.r. or genuine hopefulness. Anyway, I think it’s good advice to always avoid COLLADA. This isn’t going to change unless COLLADA is resurrected in a highly visible fashion.

Tx Mick for your comment even if as it that don’t help much right away. So basically you are saying that I cannot do anything to fix this right and I should forget Collada right?

Exporting the edges works but all meshes with smoothed edges turn full black as if the normals where inverted.

What do you mean with “if the normals where inverted”, if you invert normal then you change also ligting so only inside of mesh will get lights (if there is a light source). Probably this is why you get black/unlit mesh.

Recently I also used ARKit + SceneKit + COLLADA to show a model with ARKit, I converted COLLADA to .scn (with Xcode tool, in Editor menu) file in Xcode to edit some attribs.

Apple adopted/implemented COLLADA and it works perfectly with, Xcode, SceneKit…

So basically you are saying that I cannot do anything to fix this right and I should forget Collada right?

Nooooooo :’(

Maybe SketchUp can’t export lines correctly, maybe you just can’t render it correctly… maybe you render it but you cant see it because of line width, color… anything is possible here
I’m not expert of SketchUp (I just downloaded trial version, probably I need a license now) but I’m glad they have COLLADA exporter. I’m working on an importer so SketchUp-exported files helped me a lot.

I think you need to render mesh as fill mode then lines mode/wireframe, or you could render lines primitives if SketchUp exported them. Maybe you need to set line width / polygon offfset to show lines (in OpenGL). Or Unity has ARKit plugin if you know/like it, it may save you from renderer stuff

In SceneKit I found this:
ARKit comes by iOS 11 so maybe this will help

Maybe you can try to export to another format then use it, but I think you may get same results if renderer side is not meet to your requirements (with lines).

I think it’s good advice to always avoid COLLADA
Apple (OS X / iOS) developers can still use COLLADA to import things (scene, mesh…) to Xcode, SceneKit (it is easy, fantastic in small, non-game projects), so technically it is not abandoned by Apple, I hope :D. Recently I downloaded some models from SketchUp 3D warehouse as COLLADA then used them. So it is very good to be able to open very old files as COLLADA, maybe it is complex and buggy but it is stable and ISO standard

From what I’m seing, exporting with COLLADA just work fine IF you don’t need to render the edges. In the exemple above and if you check the “export edges”, the first volume just render as expected in ARkit (edges are rendered just fine). Only meshes with smoothed vertices are rendered plain black. My feeling is there is a bug in the sketchup exporter at least under osX. I’ll try the Sketchup forum to see if some feedback on this is already available.

If you can try out an export with COLLADA and “export edges” checked to confirm (or not) this oddity it would be great!