[x3d-public] IndexedTriangleSet default texture coordinates

Andreas Plesch andreasplesch at gmail.com
Sat Nov 13 09:30:53 PST 2021


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



More information about the x3d-public mailing list