Results 1 to 2 of 2

Thread: User defined data in COLLADA

  1. #1
    kjcamann
    Guest

    User defined data in COLLADA

    Hello everyone.

    I have a question about user defined data, because I am not sure if I understand COLLADA correctly. I would like to associate some unique id with each face and vertex in a <mesh>. I don't care what form the unique id is in: it could be integer, a string, anything (as long as I ensure that it is unique, I can map it to anything I want).

    Any program that reads COLLADA files does not have to understand this data, but simply associate it with the face, and ensure it "stays with" the face even if the program renumbers the faces from how they were originally implicitly numbered in the .DAE file. This way I can ensure that my custom face or vertex properties (stored either in another file, or in an <extra> segment) have a meaningful way to refer back to the face or vertex they belong to.

    Is this possible? From my understanding of it, it seems like the barrier where user-defined things are not allowed is that anything which does not have a predefined SEMANTIC associated it with (i.e., not POSITION, INTERPOLATION, COLOR, etc.) is not guaranteed to be preserved by conformant COLLADA tools. On the hand, I have this feeling that you must be able to at the very _least_ associate an integer with a face or vertex, or the idea of DCC does not really make sense. Is there a way to do it?

    Thanks for your help!
    -Ken

  2. #2
    Senior Member
    Join Date
    Jan 2006
    Location
    Foster City, CA
    Posts
    540
    Each DCC tool varies in how they implement support for <extra> when they round-trip a file. Some tools throw out any <extra> data. Some are able to preserve <extra> when it's attached to certain elements. Some tools might preserve all <extra> data. You need to do some testing to see what the tool you want to use supports.

    I don't think there's any tool that'll keep your custom data associated with specific faces as you change the face ordering in the DCC tool. In general <extra> is treated as blind data by a tool. Even the tools that can round-trip <extra> data properly don't attempt to interpret its meaning and modify it as the model is modified in the tool.

    Steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •