<div dir="auto">Thanks, Michalis, helpful!</div><div dir="auto"><br></div><div dir="auto">John </div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 28, 2023 at 11:07 AM Michalis Kamburelis <<a href="mailto:michalis.kambi@gmail.com">michalis.kambi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Any texture coordinate value is valid, even negative, even -9999, and<br>
you can find 3D models indeed using them. That's true for any 3D<br>
software, format and API (Blender, X3D, glTF, OpenGL..).<br>
<br>
The interpretation of values outside of 0..1 range indeed depends on<br>
the "repeatS" / "repeatT" / "repeatR" (for 3D textures) values. The<br>
specification already explains this, see<br>
<a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD/Part01/components/texturing.html#TextureCoordinates" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD/Part01/components/texturing.html#TextureCoordinates</a><br>
, "18.2.3 Texture coordinates".<br>
<br>
Note that TextureProperties node, if present, overrides the<br>
"repeat..." fields, with a bit more capable "boundaryMode...", see<br>
<a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD/Part01/components/texturing.html#TextureProperties" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD/Part01/components/texturing.html#TextureProperties</a><br>
. See also CGE / view3dscene docs,<br>
<a href="https://castle-engine.io/x3d_implementation_texturing.php" rel="noreferrer" target="_blank">https://castle-engine.io/x3d_implementation_texturing.php</a> , where we<br>
explain what we support (and why we do not plan to support "clamp to<br>
border", but we support all else).<br>
<br>
Regards,<br>
Michalis<br>
<br>
sob., 25 lis 2023 o 06:15 John Carlson via x3d-public<br>
<<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>> napisał(a):<br>
><br>
> Can someone explain what a negative point value in a TextCoordinate means when the texture is an ImageTexture? Does it have something to do with repeatS and repeatT?<br>
><br>
> A section in the spec is ok.<br>
><br>
> Thanks,<br>
><br>
> John<br>
><br>
> On Fri, Nov 24, 2023 at 10:32 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br>
>><br>
>> 18.4.7 TextureCoordinate<br>
>><br>
>> TextureCoordinate : X3DSingleTextureCoordinateNode {<br>
>> SFString [in,out] mapping ""<br>
>> SFNode [in,out] metadata NULL [X3DMetadataObject]<br>
>> MFVec2f [in,out] point [] (-∞,∞)<br>
>> }<br>
>><br>
>><br>
>> I ran into a case where I was expecting texture coordinate point values from [0,1] in a texture mapping file, and I got values like -99999 an other negative values, which cause me to ignore the triangles and totally foul up the texture. At this point, I don’t know what negative values mean in a texture coordinate point value and what I should accept for an IFS. It seems like -99999 is dreadfully wrong, but per the spec above, any float value is acceptable. I will check the IFS spec, but if no one has a use case, I recommend reducing the range of the texture coordinate point values.<br>
><br>
> _______________________________________________<br>
> x3d-public mailing list<br>
> <a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
> <a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
</blockquote></div></div>