Results 1 to 2 of 2

Thread: The <vertices> tag

  1. #1
    Junior Member
    Join Date
    Feb 2005
    Location
    Dallas, TX
    Posts
    3

    The <vertices> tag

    I'm updating our 1.0 parser to the new 1.2.0 spec and I have run across the <vertices> tag in a <mesh>. ( I'm not yet up to adding support for animations, so I'm restricting my questions to the usage within <mesh> )Can someone please give me a little bit more background on how and why this tag is used in preference of the "old" style that was like:
    Code :
    <input semantic="POSITION" source="#box-Position"/>
    <input semantic="COLOR" source="#box-Color"/>
    <input semantic="NORMAL" source="#box-Normal"/>
    ..more per vert attribs...
    The spec mentiones that <vertices> should contain "...vertex attributes that are invariant to tesselation". And the <mesh> spec states that it "...describes the mesh-vertex attributes and establishes their topological identity".

    My first question is - what elements are not invariant to tesselation? I can think of maybe tangent space vectors? But most other common profile things I can think of (normals, colors, UV) seem to me to be invariant to tesselation. But some are not really topological information? Can someone help me understand the options there?

    My second question is about indexing. If you have something like the multimtl.xml sample that has:
    Code :
    <polygons count="5" material="#Blue">
      <input semantic="VERTEX" source="#box-Vtx" idx="0" /> 
      <input semantic="NORMAL" source="#box-0-Normal" idx="1" />
    if the <vertices> info has more than one child (maybe pos and color) then it seems the index of NORMAL as shown above kind of should be '2' ? This appears to make "VERTEX" semantic unlike all the others in that the idx can point to a tuple in the index array . I also can't look back at my parsed data in memory and find the NORMAL index with the input idx. The index offset '1' in the polygon needs to be re-indexed? This seems awkward to me - or am I missing something here?

    Thanks for reading this far :)
    Cheers,
    Stephen

  2. #2
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771
    By "invariant to tesselation" I meant that the data in the <vertices> element was independent of the primitives that reference it to construct a face or faces.

    Mainly I was thinking about normals that might depend on what edge of a face they are on. The mesh vertex might be shared by several faces that converge on that point, but their normals are different for each face because it's part of a "hard edge". This leads to for example:

    Code :
    <vertices>
      <input semantic="POSITION" />
      <input semantic="TANGENT" />
    </vertices>
    <polygons>
      <input semantic="VERTEX" />
      <input semantic="NORMAL" />
    </polygons>

Posting Permissions

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