<div dir="auto">Resending after shortening<br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">---------- Forwarded message ---------<br>From: <strong class="gmail_sendername" dir="auto">Andreas Plesch</strong> <span dir="auto"><<a href="mailto:andreasplesch@gmail.com">andreasplesch@gmail.com</a>></span><br>Date: Sat, Jun 24, 2023, 11:05 PM<br>Subject: Re: HAnim sample failing in X3DOM, error in view3dscene, additional tests<br>To: Joseph D Williams <<a href="mailto:joedwil@earthlink.net">joedwil@earthlink.net</a>><br>Cc: Michalis Kamburelis <<a href="mailto:michalis.kambi@gmail.com">michalis.kambi@gmail.com</a>>, John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>>, Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>>, X3D Graphics public mailing list <<a href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a>><br></div><br><br><div dir="ltr"><div dir="ltr">On Fri, Jun 23, 2023 at 5:39 PM Joseph D Williams <<a href="mailto:joedwil@earthlink.net" target="_blank" rel="noreferrer">joedwil@earthlink.net</a>> wrote<br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><br>>>>. So, if the tool does not do that, the user may be disappointed. In the long past most every player had many ’tolerant’ behaviors.</div><div dir="ltr" class="gmail_attr"><br></div><div class="gmail_attr">It is nice to have more tolerant viewers but a user should not be disappointed if an non-valid scene generates errors or does not display.</div><div class="gmail_attr"><br></div><div class="gmail_attr">If there was a defacto standard behavior in the long past, that means there may be a good reason to formalize that behaviour. Alternatively, dedicated validation tools could help with detecting and then correcting incomplete and therefore invalid content.</div><div class="gmail_attr"><br></div><div class="gmail_attr">Thanks,</div><div class="gmail_attr"><br></div><div class="gmail_attr">-Andreas</div><div class="gmail_attr"> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><p class="MsoNormal">Thanks, </p><p class="MsoNormal">Joe</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in"><p class="MsoNormal" style="border:none;padding:0in"><b>From: </b><a href="mailto:andreasplesch@gmail.com" target="_blank" rel="noreferrer">Andreas Plesch</a><br><b>Sent: </b>Thursday, June 22, 2023 2:52 PM<br><b>To: </b><a href="mailto:michalis.kambi@gmail.com" target="_blank" rel="noreferrer">Michalis Kamburelis</a><br><b>Cc: </b><a href="mailto:yottzumm@gmail.com" target="_blank" rel="noreferrer">John Carlson</a>; <a href="mailto:brutzman@nps.edu" target="_blank" rel="noreferrer">Brutzman, Donald (Don) (CIV)</a>; <a href="mailto:joedwil@earthlink.net" target="_blank" rel="noreferrer">Joe D Williams</a>; <a href="mailto:x3d-public@web3d.org" target="_blank" rel="noreferrer">X3D Graphics public mailing list</a><br><b>Subject: </b>Re: HAnim sample failing in X3DOM, error in view3dscene, additional tests</p></div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">Also agreed on performance impacts. There are set_index in fields for the index fields, meaning that dynamic changes to the indices are allowed. This is impacting performance in itself and if checking and potentially filling in values would be required as well it would further affect performance on a per frame basis.</p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">For example, Three.js is very strict, for performance reasons, in expecting all input to its interfaces to be valid. It does not perform error checking itself.</p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I only mentioned spec changes because in practice users - after a warning - would still expect some non-fatal behaviour anyways which requires checking and potentially filling in or altering values. So why not standardize this behaviour ?</p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I think I may add checking and recycling with a warning only to the initial setup of the IFS node but not for dynamic changes via routes or SAI. Animating textures through texcoord indices seems a valid use case.</p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Cheers,</p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">-Andreas</p></div></div></div><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">On Thu, Jun 22, 2023 at 12:36 PM Michalis Kamburelis <<a href="mailto:michalis.kambi@gmail.com" target="_blank" rel="noreferrer">michalis.kambi@gmail.com</a>> wrote:</p></div><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt"><div><div><p class="MsoNormal" style="margin-left:9.6pt">I would be against introducing spec wording to guarantee any behavior when there's not enough per-vertex data. </p></div><div><p class="MsoNormal" style="margin-left:9.6pt"><u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-left:9.6pt">1. There's no obvious resolution (replicating last texture coordinate may not be "what the author wanted" -- the texture will be likely weirdly stretched),</p></div><div><p class="MsoNormal" style="margin-left:9.6pt"><u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-left:9.6pt">2. Other model formats also don't specify anything in this case. It's just invalid model causing undefined behavior for glTF, Collada etc.</p></div><div><p class="MsoNormal" style="margin-left:9.6pt"><u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-left:9.6pt">3. It may be a performance issue in some scenarios. Some browsers could be bundled with models essentially guaranteed to be correct (e.g. when you deliver a game runtime + game assets locally). ( This is just a theoretical example, CGE doesn't do this now -- we check models for correctness the same, no matter if it's in view3dscene or in some game using CGE. ) Such browsers can right now upload the data to GPU in a straightforward fashion without checking for correctness. Or just check for correctness and fail if the model is wrong. If the browsers will have to instead potentially process the data, because even correct models may not have enough data... then we've lost performance in some cases.</p></div><div><p class="MsoNormal" style="margin-left:9.6pt"><u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-left:9.6pt"> Basically, if we allow something in the spec as "valid model", then we make a guarantee it is supported. Authors will use it, and developers have to make sure it is supported. In this particular case, I'd say the benefit (supporting models where someone likely just made a mistake) is not big enough to justify the costs (need to process per-vertex data, doing operation that may not be what author wanted anyway).</p></div><p class="MsoNormal" style="margin-left:9.6pt"><u></u> <u></u></p><div><p class="MsoNormal" style="margin-left:9.6pt">The arguments 1 and 2 are really critical for me. There's no sensible default behavior to do IMHO, author should get a clear message "this is invalid model, please fix it".</p></div><div><p class="MsoNormal" style="margin-left:9.6pt"><u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-left:9.6pt">Regards,</p></div><div><p class="MsoNormal" style="margin-left:9.6pt">Michalis</p></div></div><p class="MsoNormal" style="margin-left:9.6pt"><u></u> <u></u></p><div><div><p class="MsoNormal" style="margin-left:9.6pt">czw., 22 cze 2023 o 17:55 Andreas Plesch <<a href="mailto:andreasplesch@netscape.net" target="_blank" rel="noreferrer">andreasplesch@netscape.net</a>> napisał(a):</p></div><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt"><div><div><p class="MsoNormal" style="margin-left:19.2pt">Agreed. I can add a warning to the x3dom console log. But checking for correctness is really the job of a validator, not necessarily of a viewer. This is also true for glTF, and probably Collada, which have their own dedicated validators.</p></div><div><p class="MsoNormal" style="margin-left:19.2pt"><u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-left:19.2pt">Another possibility is to change the spec. to define a behaviour other than undefined, unpleasant as it is. The simplest would be probably "use the last available" to fill in missing 2d3d4dtexcoords/2d3dcoords/rgbrgbacolors . Alternatively, "replace out of range indices with the highest in range index". Very similar but has some consequences for event routing since different fields are altered.</p></div><div><p class="MsoNormal" style="margin-left:19.2pt"><u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-left:19.2pt">-Andreas</p></div></div><p class="MsoNormal" style="margin-left:19.2pt"><u></u> <u></u></p><div><div><p class="MsoNormal" style="margin-left:19.2pt">On Thu, Jun 22, 2023 at 8:10 AM Michalis Kamburelis <<a href="mailto:michalis.kambi@gmail.com" target="_blank" rel="noreferrer">michalis.kambi@gmail.com</a>> wrote:</p></div><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt"><div><div><p class="MsoNormal" style="margin-left:0.4in">Andreas, </p></div><div><p class="MsoNormal" style="margin-left:0.4in"><u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-left:0.4in">I especially agree with statement """I can add recycling of texCoords in x3dom for such a case but it is almost not worth doing since the problem is that there are many reasonable strategies to divine an author's intention""" :)</p></div><div><p class="MsoNormal" style="margin-left:0.4in"><u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-left:0.4in">Exactly -- there are many possible options "what to do, what was the author's intention". There are even more options if we recall that texture coordinates may also be 3D and 4D, for 3D textures. And the same issue can occur with other per-vertex data, e.g. colors per vertex, normals, fog coordinates, shader attributes.</p></div><div><p class="MsoNormal" style="margin-left:0.4in"><u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-left:0.4in">My recommendation would be to first make a clear warning/error to user about it, so that users know to fix this issue in the model. This is also what (from my knowledge) everyone else does -- glTF, Collada, Wavefront OBJ... they all have some indexes and texture coordinates, and they just require that author provides enough texture coordinates. It's undefined what happens if model is invalid, it is even possible that renderer uploads to GPU something invalid and then GPU decides what happens (but letting GPU choose the undefined behavior is not good from security standpoint -- ideally the renderer should catch it and make reliable error/warning).</p></div><div><p class="MsoNormal" style="margin-left:0.4in"><u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-left:0.4in">We don't want to have a talk in +5 years """OK, what do we do with not enough per-vertex data, because FreeWRL now fills it with zeroes, X3DOM cycles from beginning, CGE fills it with 1s""" etc. :) We want our resolution to be "such models are invalid, authors should get message about </p></div></div><div><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt"><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt"><div dir="auto"><p class="MsoNormal" style="margin-left:84pt"><u></u><span style="font-size:10pt;font-family:Symbol"><span>·<span style="font:7pt "Times New Roman""> </span></span></span><u></u><a href="https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Characters/JinLOA4X_ITE.html" target="_blank" rel="noreferrer">https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Characters/JinLOA4X_ITE.html</a></p><p class="MsoNormal" style="margin-left:48pt"> </p><p class="MsoNormal" style="margin-left:84pt"><u></u><span>6.<span style="font:7pt "Times New Roman""> </span></span><u></u>Xj3D has a verbose console without any errors apparent, However only renders a black screen.</p><p class="MsoNormal" style="margin-left:84pt"><u></u><span>7</span></p></div></blockquote></blockquote></div></blockquote></div></blockquote></div></blockquote></div></div></blockquote></div></div>
</div></div>