Export Collada layers

export
collada

#1

Hi, I’m exporting my model as collada but I’m unable to find any layer information in the resulting file. Do layers get preserved when exporting to collada?


#2

SketchUp currently exports to Collada v1.4, I think.

(1) SketchUp misnamed it’s “layers”, as they are not really like geometric CAD layers. They are instead visibility behavior property “sheets” that can be shared by multiple objects.

Layers in SketchUp do not “own” entities (ie, no entities collection.) Instead, geometric collection objects (groups or components) have a property that points at which layer to use for visibility behavior.

(2) Looking at the spec, there is not much said about the Collada element called “<layer>”, except that it has no attributes, and holds only a string name. These <layer> elements are child elements of <render> elements, which are referenced by “layer” attributes (containing name lists) of <node> elements.

So you would need to look at: http://ruby.sketchup.com/Sketchup/Layer.html
and think what properties should be exported, and into what Collada element ?

I really do not see anywhere in the Collada schema where objects are described, but their visibility is switched off. So exporting SketchUp layers may not translate well at all.
In addition, I do not see a “library_layers” collection-type element for the main “<COLLADA>” element.
So, what would Collada layers be used for anyway ?

I’ll guess (from reading some things in the specs,) that Collada’s layer concept is of layered compositing passes during rendering. This is not what the normal modeler thinks of when using layers in SketchUp.


Once again I point you toward the link to the Collada v1.4 Specification I give in this post:


#3

Thanks for your reply! Yes it appears the layers in collada are not what I thought they were. We are writing a collada importer and are trying to get as much functionality as we can. Cheers!


#4

This topic was automatically closed after 91 days. New replies are no longer allowed.