[x3d-public] unmatched xxxTextureMapping
Andreas Plesch
andreasplesch at gmail.com
Fri Feb 21 16:14:49 PST 2025
Thanks, very clear and makes sense. I read it multiple times and still
missed that.
Andreas
On Fri, Feb 21, 2025, 5:41 PM Michalis Kamburelis <michalis.kambi at gmail.com>
wrote:
> This case is clarified in the text you link to:
>
> """
> If the xxxTextureMapping field is not empty, it should refer to a
> corresponding X3DSingleTextureCoordinateNode node on a list of texture
> coordinates. [...] If no corresponding X3DSingleTextureCoordinateNode
> is found on this list, the X3D browser should determine texture
> coordinates as if xxxTextureMapping would be empty (see below). [...]
>
> If the xxxTextureMapping field is empty, then the first item on a list
> of texture coordinates is used (regardless of the mapping value). Only
> if no such texture coordinate exists (the list is empty), then then
> default texture coordinates for the specific geometry node are used.
> """
>
> IOW, in simple terms: if xxxTextureMapping does not match any
> TextureCoordinate, then use the first TextureCoordinate. With the
> "first TextureCoordinate" meaning, in the order of preference,
> 1. the first in MultiTextureCoordinate list,
> 2. or just literally the only TextureCoordinate if no
> MultiTextureCoordinate was used,
> 3. or it can mean a fallback to default texture coord.
>
> Regards,
> Michalis
>
> pt., 21 lut 2025 o 19:31 Andreas Plesch via x3d-public
> <x3d-public at web3d.org> napisał(a):
> >
> > As
> https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/components/shape.html#TextureMappingCoordinate
> >
> > and co. explains the xxxTextureMapping field can be used to have
> multiple sets/channels of TextureCoordinates for the same Shape, for
> different types of Textures.
> >
> > There is one case which is not covered, presumably because it typically
> would indicate a mistake or oversight by the author. What should a browser
> implementation do if a material has a (non-default) xxxTextureMapping which
> does not match any of the provided TextureCoordinates for the Shape ?
> >
> > Possibilities are fall-back to default texture coordinates, fall-back to
> the first provided mapping, fall-back to constant uv 0,0 to indicate
> visually a problem, or undefined behaviour.
> >
> > Undefined behaviour might be ok but it is then worth pointing out in the
> spec.
> >
> > Thanks, -Andreas
> >
> > --
> > Andreas Plesch
> > Waltham, MA 02453
> > _______________________________________________
> > x3d-public mailing list
> > x3d-public at web3d.org
> > http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250221/58c8310b/attachment-0001.html>
More information about the x3d-public
mailing list