<div dir="ltr">Thanks, Don. Adding that referral sentence to X3DComposedGeometryNode should work fine as it should cover most cases.<div> </div><div>Generally speaking, I am not sure if spec. language can be treated like code, with description and definitions being implemented or inherited. It may be a bit unusual to have an abstract class description refer to a field description of a concrete node which is derived itself from that same abstract node. But having to add just one sentence to cover a lot is also very valuable.</div><div><br></div><div>Best,  Andreas</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 18, 2022 at 7:45 PM Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks for good thinking and patience.  Given the volume of well-known prose in IFS, we left that alone.  Dick and I addressed this today as<br>
<br>
_________________________________<br>
* Mantis 1375: default texture coordinates for IndexedTriangleSet and related nodes<br>
* <a href="https://www.web3d.org/member-only/mantis/view.php?id=1375" rel="noreferrer" target="_blank">https://www.web3d.org/member-only/mantis/view.php?id=1375</a><br>
<br>
Editors agreed to pursue option b, adding referral sentence to 11.3.2 X3DComposedGeometryNode (which is where the texCoord field is defined).<br>
* Further information about texCoord field handling is described in IndexedFaceSet.<br>
<br>
Also corrected an existing sentence there:<br>
* If the texCoord field is not NULL, it shall contain a TextureCoordinate node.<br>
to<br>
* If the texCoord field is not NULL, it shall contain an X3DTextureCoordinateNode.<br>
_________________________________<br>
<br>
Results viewable at<br>
<br>
* 11.3.2 X3DComposedGeometryNode<br>
* <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/components/rendering.html#X3DComposedGeometryNode" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/components/rendering.html#X3DComposedGeometryNode</a><br>
<br>
Another refreshing day wrangling the precise meaning of NULL... hope it looks good.<br>
<br>
Have fun with X3D!  8)<br>
<br>
all the best, Don<br>
-- <br>
Don Brutzman  Naval Postgraduate School, Code USW/Br        <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149<br>
X3D graphics, virtual worlds, Navy robotics https:// <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">faculty.nps.edu/brutzman</a><br>
<br>
-----Original Message-----<br>
From: Michalis Kamburelis <<a href="mailto:michalis.kambi@gmail.com" target="_blank">michalis.kambi@gmail.com</a>> <br>
Sent: Monday, November 15, 2021 6:45 AM<br>
To: Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>><br>
Cc: Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>>; X3D Graphics public mailing list <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br>
Subject: Re: [x3d-public] IndexedTriangleSet default texture coordinates<br>
<br>
NPS WARNING: *external sender* verify before acting.<br>
<br>
<br>
I second that, I mean<br>
<br>
- The algorithm for automatic generation of 2D texture coordinates that is now at IndexedFaceSet, actually applies to many other 3D geometries. It applies to IndexedTriangleSet , IndexedQuadSet, TriangleSet , QuadSet, triangle fan, triangle strip.<br>
<br>
    Pretty much everything *except* nodes that have specialized algorithms for texture generation (Box, Cone, Cylinder, Sphere, ElevationGrid, Extrusion).<br>
<br>
- That is how we implement it in Castle Game Engine / view3dscene too.<br>
<br>
<br>
    We even have an option for TextureCoordinateGenerator to request this algorithm explicitly by `TextureCoordinateGenerator { mode "BOUNDS2D" }` (so it can even by used on Box, Cone etc.). See<br>
<a href="https://castle-engine.io/x3d_implementation_texturing_extensions.php#section_ext_tex_coord_bounds" rel="noreferrer" target="_blank">https://castle-engine.io/x3d_implementation_texturing_extensions.php#section_ext_tex_coord_bounds</a> .<br>
<br>
- Don's solution to edit the spec seems nicest. I.e., move the description to some general section, like "Automatic generation of 2D texture coordinates" and just refer to that section from respective nodes like IndexedFaceSet, IndexedTriangleSet etc.<br>
<br>
I think the current spec state is a result of the fact that in VRML 97, this algorithm was only for IndexedFaceSet. Then X3D added IndexedTriangleSet, IndexedQuadSet etc. but their descriptions were not filled with "what to do when texCoord is NULL and user tries to apply a texture".<br>
<br>
Regards,<br>
Michalis<br>
<br>
pon., 15 lis 2021 o 04:06 Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>> napisał(a):<br>
><br>
> On Sat, Nov 13, 2021 at 6:48 PM Brutzman, Donald (Don) (CIV) <br>
> <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> wrote:<br>
> ><br>
> > Thanks for taking the time to report this issue Andreas.  Recorded <br>
> > in the Mantis issue tracker at<br>
> ><br>
> > * Mantis 1375: default texture coordinates for IndexedTriangleSet <br>
> > and related nodes<br>
> > * <a href="https://www.web3d.org/member-only/mantis/view.php?id=1375" rel="noreferrer" target="_blank">https://www.web3d.org/member-only/mantis/view.php?id=1375</a><br>
> ><br>
> > 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.<br>
><br>
> That could work well. I think the default texCoords would apply to all <br>
> of the implementing nodes.<br>
><br>
> Thank you for considering that option,<br>
><br>
> Andreas<br>
><br>
> ><br>
> > * 4.4.2.3 Interface hierarchy<br>
> >   <br>
> > <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1</a><br>
> > /Part01/concepts.html#InterfaceHierarchy<br>
> ><br>
> >         |                   +- X3DComposedGeometryNode -+- IndexedFaceSet<br>
> >         |                   |                           +- IndexedTriangleFanSet<br>
> >         |                   |                           +- IndexedTriangleSet<br>
> >         |                   |                           +- IndexedTriangleStripSet<br>
> >         |                   |                           +- IndexedQuadSet<br>
> >         |                   |                           +- QuadSet<br>
> >         |                   |                           +- TriangleFanSet<br>
> >         |                   |                           +- TriangleSet<br>
> >         |                   |                           +- TriangleStripSet<br>
> ><br>
> > * 11.3.2 X3DComposedGeometryNode<br>
> >    <br>
> > <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1</a><br>
> > /Part01/components/rendering.html#X3DComposedGeometryNode<br>
> ><br>
> > * 13.3.6 IndexedFaceSet<br>
> >   <br>
> > <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1</a><br>
> > /Part01/components/geometry3D.html#IndexedFaceSet<br>
> ><br>
> > All feedback always welcome.  Dick and I will consider this editorial correction in an upcoming specification-editors meeting.<br>
> ><br>
> > all the best, Don<br>
> > --<br>
> > Don Brutzman  Naval Postgraduate School, Code USW/Br        <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
> > Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149<br>
> > X3D graphics, virtual worlds, navy robotics https:// <br>
> > <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">faculty.nps.edu/brutzman</a><br>
> ><br>
> > -----Original Message-----<br>
> > From: x3d-public <<a href="mailto:x3d-public-bounces@web3d.org" target="_blank">x3d-public-bounces@web3d.org</a>> On Behalf Of Andreas <br>
> > Plesch<br>
> > Sent: Saturday, November 13, 2021 9:31 AM<br>
> > To: X3D Graphics public mailing list <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br>
> > Subject: [x3d-public] IndexedTriangleSet default texture coordinates<br>
> ><br>
> > <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1</a><br>
> > /Part01/components/rendering.html#IndexedTriangleSet<br>
> ><br>
> > does not specify behaviour if the texCoord field is NULL (default).<br>
> ><br>
> > <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1</a><br>
> > /Part01/components/geometry3D.html#IndexedFaceSet<br>
> ><br>
> > in contrast specifies for IndexedFaceSet:<br>
> ><br>
> > "If the texCoord field is NULL, a default texture coordinate mapping <br>
> > is calculated using the local coordinate system bounding box of the <br>
> > shape. The longest dimension of the bounding box defines the S <br>
> > coordinates, and the next longest defines the T coordinates. If two <br>
> > or all three dimensions of the bounding box are equal, ties shall be <br>
> > broken by choosing the X, Y, or Z dimension in that order of <br>
> > preference. The value of the S coordinate ranges from 0 to 1, from <br>
> > one end of the bounding box to the other. The T coordinate ranges <br>
> > between<br>
> > 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."<br>
> ><br>
> > This could apply to IndexedTriangleSet as well as other Rendering component nodes.<br>
> ><br>
> > So the options are:<br>
> ><br>
> > a) leave undefined, up to the browser<br>
> > b) refer to IndexedFaceSet<br>
> > c) repeat language<br>
> ><br>
> > My preference is b) with a single sentence like:<br>
> > "If the texCoord field is NULL, a default texture coordinate mapping is calculated in exactly the same way as it is for IndexedFaceSet."<br>
> ><br>
> > a) is also an option since b) was implied and there was probably not a lot of confusion anyways.<br>
> ><br>
> > --<br>
> > Andreas Plesch<br>
> > Waltham, MA 02453<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Andreas Plesch<br>Waltham, MA 02453</div></div></div>