[x3d-public] IndexedTriangleSet default texture coordinates

Andreas Plesch andreasplesch at gmail.com
Sun Nov 14 19:04:52 PST 2021


On Sat, Nov 13, 2021 at 6:48 PM Brutzman, Donald (Don) (CIV)
<brutzman at nps.edu> wrote:
>
> Thanks for taking the time to report this issue Andreas.  Recorded in the Mantis issue tracker at
>
> * Mantis 1375: default texture coordinates for IndexedTriangleSet and related nodes
> * https://www.web3d.org/member-only/mantis/view.php?id=1375
>
> Another option is to move the full definition (plus Figures 13.6 and 13.7) up from 13.3.6 IndexedFaceSet to the X3DComposedGeometryNode  abstract node type, where the texCoord field is defined.

That could work well. I think the default texCoords would apply to all
of the implementing nodes.

Thank you for considering that option,

Andreas

>
> * 4.4.2.3 Interface hierarchy
>   https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/concepts.html#InterfaceHierarchy
>
>         |                   +- X3DComposedGeometryNode -+- IndexedFaceSet
>         |                   |                           +- IndexedTriangleFanSet
>         |                   |                           +- IndexedTriangleSet
>         |                   |                           +- IndexedTriangleStripSet
>         |                   |                           +- IndexedQuadSet
>         |                   |                           +- QuadSet
>         |                   |                           +- TriangleFanSet
>         |                   |                           +- TriangleSet
>         |                   |                           +- TriangleStripSet
>
> * 11.3.2 X3DComposedGeometryNode
>    https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/components/rendering.html#X3DComposedGeometryNode
>
> * 13.3.6 IndexedFaceSet
>   https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/components/geometry3D.html#IndexedFaceSet
>
> All feedback always welcome.  Dick and I will consider this editorial correction in an upcoming specification-editors meeting.
>
> all the best, Don
> --
> Don Brutzman  Naval Postgraduate School, Code USW/Br        brutzman at nps.edu
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149
> X3D graphics, virtual worlds, navy robotics https:// faculty.nps.edu/brutzman
>
> -----Original Message-----
> From: x3d-public <x3d-public-bounces at web3d.org> On Behalf Of Andreas Plesch
> Sent: Saturday, November 13, 2021 9:31 AM
> To: X3D Graphics public mailing list <x3d-public at web3d.org>
> Subject: [x3d-public] IndexedTriangleSet default texture coordinates
>
> https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/components/rendering.html#IndexedTriangleSet
>
> does not specify behaviour if the texCoord field is NULL (default).
>
> https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/components/geometry3D.html#IndexedFaceSet
>
> in contrast specifies for IndexedFaceSet:
>
> "If the texCoord field is NULL, a default texture coordinate mapping is calculated using the local coordinate system bounding box of the shape. The longest dimension of the bounding box defines the S coordinates, and the next longest defines the T coordinates. If two or all three dimensions of the bounding box are equal, ties shall be broken by choosing the X, Y, or Z dimension in that order of preference. The value of the S coordinate ranges from 0 to 1, from one end of the bounding box to the other. The T coordinate ranges between
> 0 and the ratio of the second greatest dimension of the bounding box to the greatest dimension. Figure 13.6 illustrates the default texture coordinates for a simple box shaped IndexedFaceSet with an X dimension twice as large as the Z dimension and four times as large as the Y dimension. Figure 13.7 illustrates the original texture image used on the IndexedFaceSet used in Figure 13.6."
>
> This could apply to IndexedTriangleSet as well as other Rendering component nodes.
>
> So the options are:
>
> a) leave undefined, up to the browser
> b) refer to IndexedFaceSet
> c) repeat language
>
> My preference is b) with a single sentence like:
> "If the texCoord field is NULL, a default texture coordinate mapping is calculated in exactly the same way as it is for IndexedFaceSet."
>
> a) is also an option since b) was implied and there was probably not a lot of confusion anyways.
>
> --
> Andreas Plesch
> Waltham, MA 02453
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org



-- 
Andreas Plesch
Waltham, MA 02453



More information about the x3d-public mailing list