Results 1 to 7 of 7

Thread: Polygons - Winding Order

  1. #1
    Junior Member
    Join Date
    Aug 2004
    Location
    England
    Posts
    14

    Polygons - Winding Order

    Does the Collada spec indicate which order the vertices on a single-sided polygon should be listed (eg. clockwise when viewed from visible side)?

    Or is this a configurable in same way as Y_UP, Z_UP etc?

  2. #2

    Re: Polygons - Winding Order

    Quote Originally Posted by AndyM
    Does the Collada spec indicate which order the vertices on a single-sided polygon should be listed (eg. clockwise when viewed from visible side)?

    Or is this a configurable in same way as Y_UP, Z_UP etc?
    It is counter-clockwise and yes, it should be in the spec. Thank you for pointing this out.

  3. #3
    Junior Member
    Join Date
    Sep 2004
    Location
    Bellevue, WA
    Posts
    11
    Similarly... I'd like to ask a clarification. I didn't see an overarching statement for the right/left handedness of matrices, vertices, etc. It specifies right-handed in the <asset> reference... does that imply that all coordinates are right handed for everything (even if not governed by an <asset> elem.)? (I hope so...)

    Adruab

  4. #4
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771
    COLLADA standardizes on a right-handed coordinate system. The <asset> element allows for up axis orientations within a right-handed frame. This design choice gives enough flexibility to the video gaming markets, and can be implemented with swizzling logic and not multiplication (that could loose precision).

    Thanks for pointing out that ommision in the specification.

  5. #5
    christiancoder
    Guest
    Is it safe to swizzle the y and z matrix columns as well as the y and z translation to transform from one up axis to another?

  6. #6
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771
    Yes, that is the design intention of the <up_axis> element.

  7. #7
    Senior Member
    Join Date
    Jan 2006
    Location
    Foster City, CA
    Posts
    540
    While we're on the topic of up axes, I have a question. I'm adding in support for <up_axis> now, and I notice everyone talks about implementing it via swizzling. Why couldn't I just add a rotation to the root node that rotates the given orientation into the orientation I use? It seems that'd be both easier to code and more efficient. Does it have something to do with the comment marcus made above about losing precision?

Posting Permissions

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