Results 1 to 9 of 9

Thread: <aspect_ratio> element

  1. #1
    Junior Member
    Join Date
    Aug 2006
    Posts
    3

    <aspect_ratio> element

    Could somebody help me and make the situation with <aspect_ratio> element clear? According to the specs (1.4.1):

    "The aspect ratio is defined as the ratio of a pixel’s height over the pixel’s width; therefore, the aspect ratio can be derived from, or be used to derive, the field of view parameters: aspect_ratio = yfov / xfov."

    That seems to be incorrect; what we actually need is image aspect ratio.

    For example, default camera xfov in 3DS Max is 45 degrees, it corresponds to yfov = 36.6(6) (assuming image aspect ratio being 4:3). Yet default pixel aspect ratio is 1.0. Thus, COLLADAMAX exports camera parameters as follows:

    <perspective>
    <xfov>45.000042</xfov>
    <aspect_ratio>1.000000</aspect_ratio>
    <znear>1.000000</znear>
    <zfar>1000.000000</zfar>
    </perspective>

    which is specs-correct, but useless, cause I cannot restore yfov now.

    The question is: is that an error in specs or my misunderstanding? Thanks![/b]

  2. #2
    Senior Member
    Join Date
    Jul 2004
    Location
    Santa Clara
    Posts
    356
    I think you are right, the pixel aspect ratio, and the image aspect ration are two different notion. The first on tells you if the pixel should be square or rectangular, the second tells you if the image is 4:3 or 16:9.

    Indeed you can have square pixels in a 4:3 image, or rectangular pixels in the same image aspect ratio. Only one of the parameter is defined in COLLADA, and it mixes both notions.

    Would you be so kind to open a bug for the specification in khronos.org/bugzilla ?

  3. #3
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: <aspect_ratio> element

    In that section the spec also says:
    <aspect_ratio sid="..."> | A floating-point number describing the aspect ratio of the field of view.
    Quote Originally Posted by Bersi
    Could somebody help me and make the situation with <aspect_ratio> element clear? According to the specs (1.4.1):

    "The aspect ratio is defined as the ratio of a pixel’s height over the pixel’s width; therefore, the aspect ratio can be derived from, or be used to derive, the field of view parameters: aspect_ratio = yfov / xfov."

    That seems to be incorrect; what we actually need is image aspect ratio.
    So I think this was supposed to say "the ratio of the field-of-view's height in pixels over the width in pixels", but it got condensed too much.

  4. #4
    Senior Member
    Join Date
    Jul 2004
    Location
    Santa Clara
    Posts
    356
    So I think this was supposed to say "the ratio of the field-of-view's height in pixels over the width in pixels", but it got condensed too much.
    If that was the intent, then the <aspect_ratio> exported should be 4:3, and therefore this is a bug in the exporter - to be reported to Feeling Software.

  5. #5
    Junior Member
    Join Date
    Aug 2006
    Posts
    3
    remi, marcus, thanks for your replies and sorry for delay.

    As for bug report, I'm still unsure where to report it, so I'll most probably post both to Khronos and to Feeling Software.

    Again, thanks.

  6. #6
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: <aspect_ratio> element

    Quote Originally Posted by marcus
    Quote Originally Posted by Bersi
    Could somebody help me and make the situation with <aspect_ratio> element clear? According to the specs (1.4.1):

    "The aspect ratio is defined as the ratio of a pixel’s height over the pixel’s width; therefore, the aspect ratio can be derived from, or be used to derive, the field of view parameters: aspect_ratio = yfov / xfov."

    That seems to be incorrect; what we actually need is image aspect ratio.
    So I think this was supposed to say "the ratio of the field-of-view's height in pixels over the width in pixels", but it got condensed too much.
    Furthermore, the ratio should be width to height to obey common usage conventions.

    So is this correction clear to everyone?...

    "the ratio of the field-of-view's width in pixels over the height in pixels. An aspect ratio greater then 1 results in a landscape field-of-view."

  7. #7
    Senior Member
    Join Date
    Jul 2004
    Location
    Santa Clara
    Posts
    356
    So is this correction clear to everyone?...

    "the ratio of the field-of-view's width in pixels over the height in pixels. An aspect ratio greater then 1 results in a landscape field-of-view."
    I think it is still confusing. Pixel have nothing to do with the intended definition.
    Imagine you have a display system with non square pixel. You may very well have a field of view of 4:3 with a 1:1 pixel size ratio.

    I would say:
    "the ration of the field-of-view is the width over the height of the final image"

  8. #8
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771
    Do we really need to use the word "image" in the definition? I'm just concerned that people will confuse it with <image> or something.

    Remember how the phrases "in towards the viewer" and "into the scene" were confusing wrt <up_axis> and <camera> and <light> elements.

  9. #9
    Senior Member
    Join Date
    Jul 2004
    Location
    Santa Clara
    Posts
    356
    what about:

    "the field-of-view's aspect_ratio is the width over the height of the display"

Posting Permissions

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