Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: accessor questions

  1. #11
    Junior Member
    Join Date
    Jan 2005
    Location
    Emeryville, CA
    Posts
    5

    Accessors, dummies, && offsets...

    What do you think about the type-check?
    I think the type-check is a good option. Maybe it should be able to be specified at the <accessor/> level for homogenous data sets so that it need not be redundant on each param. I also think the optional offset attribute is a good idea. Type-checking on dummies would be even more flexible with optional offsets because you could just check those offsets that matter. For example:

    <param type="float" offset="2"/>

    <param/> elements without a 'name' attribute would be type-checking dummies.

    The offset should just be assumed to start at zero if omitted && increment for each new <param/> element encountered in document order.

    -Pip

  2. #12
    Junior Member
    Join Date
    Mar 2005
    Location
    Lulea, Sweden
    Posts
    29
    I have read through the post here and have gained more understanding of the COLLADA format but I still don't understand how there can be mutiple <accessor> tags within a COMMON profile.

    The input semantic for a POSITION in a <vertices> tag does not specify which accessor to use for the source data. So if I have for example (notice the different param order):

    Code :
    <technique profile="COMMON">
     <accessor source="#box-Pos-array" count="8" stride="3">
                  <param name="X" type="float" flow="OUT"/>
                  <param name="Y" type="float" flow="OUT"/>
                  <param name="Z" type="float" flow="OUT"/>
     </accessor>
     <accessor source="#box-Pos-array" count="8" stride="3">
                  <param name="Z" type="float" flow="OUT"/>
                  <param name="Y" type="float" flow="OUT"/>
                  <param name="X" type="float" flow="OUT"/>
     </accessor>
    </technique>


    ... they are still both within the common profile. So which one should I use when reading a vertices semantic data? The first one? Or does the exporter always define a default order of X Y Z in a position array regardless of which DCC is used?

    I guess I'm looking for something like <accesor type="POSITION" ... > which could tell me that the array is a position array and nothing else.
    Any thoughts?
    / Master Tonberry

  3. #13
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771
    Quote Originally Posted by Master Tonberry
    I have read through the post here and have gained more understanding of the COLLADA format but I still don't understand how there can be multiple <accessor> tags within a COMMON profile.
    It happens when the <source> is a child element of the <combiner> element as one example. I've already added some examples to specification for 1.3.0 (planned release next week).

    Quote Originally Posted by snippet from 1.3 spec
    Within the <technique> element, the common profile’s <accessor> elements describe the output of the <source> element. The output is assembled from the <accessor> elements in the order they are specified.
    ...
    Here is an example showing every third value being skipped because there is no <param> element binding it to the output and the stride attribute is still three.
    Code :
    <source>
      <int_array name=”values” count=”9”>
        1 1 0 2 2 0 3 3 0
      </int_array>
      <technique profile=”COMMON”>
        <accessor source=”#values” count=”3” stride=”3”>
          <param name=”A” type=”int” />
          <param name=”B” type=”int” />
        </accessor>
      </technique>
    </source>
    This next example produces the same output as the previous example but using two <accessor> elements instead of one.
    Code :
    <source>
      <int_array name=”values” count=”9”>
        1 1 0 2 2 0 3 3 0
      </int_array>
      <technique profile=”COMMON”>
        <accessor source=”#values” count=”3” stride=”3” offset=”0”>
          <param name=”A” type=”int” />
        </accessor>
        <accessor source=”#values” count=”3” stride=”3” offset=”1”>
          <param name=”B” type=”int” />
        </accessor>
      </technique>
    </source>
    So there is some flexibility when describing source data streams in COLLADA.

Page 2 of 2 FirstFirst 12

Posting Permissions

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