<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle20
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1511799279;
        mso-list-type:hybrid;
        mso-list-template-ids:2012880552 67698713 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1
        {mso-list-id:1626305203;
        mso-list-type:hybrid;
        mso-list-template-ids:-276940348 -1337297150 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l1:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
@list l1:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l1:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l1:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l1:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l1:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l1:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l1:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l1:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link="#0563C1" vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>Thanks for close looks at this, it holds a lot of potential value.  Hopefully more-effective bounding boxes will improve authoring, debugging, and user interaction.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>We intentionally did not specify an X3D4 bboxColor field since<o:p></o:p></p><ol style='margin-top:0in' start=1 type=a><li class=MsoListParagraph style='margin-left:0in;mso-list:l0 level1 lfo1'>Browsers might have their own algorithms or user preferences,<o:p></o:p></li><li class=MsoListParagraph style='margin-left:0in;mso-list:l0 level1 lfo1'>There is no “correct” color since farther objects and Background color might be the same or similar,<o:p></o:p></li><li class=MsoListParagraph style='margin-left:0in;mso-list:l0 level1 lfo1'>Browsers might decide to do color “negation” or some other technique for contrast,<o:p></o:p></li><li class=MsoListParagraph style='margin-left:0in;mso-list:l0 level1 lfo1'>Browsers might also use it for indication of picking, selection, collision.<o:p></o:p></li></ol><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Authoritative references:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:0in;mso-list:l1 level1 lfo2'>X3D4 Architecture, Grouping component, 10.3.1 X3DBoundedObject<o:p></o:p></li><li class=MsoListParagraph style='margin-left:0in;mso-list:l1 level1 lfo2'>https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.review/Part01/components/grouping.html#X3DBoundedObject<o:p></o:p></li></ul><p class=MsoNormal><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:0in;mso-list:l1 level1 lfo2'>X3D4 Architecture, Grouping component, 10.2.2 Bounding boxes<o:p></o:p></li><li class=MsoListParagraph style='margin-left:0in;mso-list:l1 level1 lfo2'>https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.review/Part01/components/grouping.html#BoundingBoxes<o:p></o:p></li></ul><p class=MsoListParagraph><o:p> </o:p></p><p class=MsoNormal>v/r Don<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b>From:</b> x3d-public <x3d-public-bounces@web3d.org> <b>On Behalf Of </b>Holger Seelig<br><b>Sent:</b> Friday, March 24, 2023 1:48 PM<br><b>To:</b> Andreas Plesch <andreasplesch@gmail.com><br><b>Cc:</b> X3D <x3d-public@web3d.org><br><b>Subject:</b> Re: [x3d-public] bboxDisplay considerations<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Yes bboxSize and bboxCenter can be directly used as scale and translation for a transformation matrix for a bboxShape with size at 1. <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I also miss the possibility of setting the color of the box.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><div><p class=MsoNormal>Holger Seelig<o:p></o:p></p></div><div><p class=MsoNormal>Leipzig, Germany<o:p></o:p></p></div><div><p class=MsoNormal><a href="mailto:holger.seelig@yahoo.de">holger.seelig@yahoo.de</a><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><br><br><o:p></o:p></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal>Am 24.03.2023 um 19:15 schrieb Andreas Plesch <<a href="mailto:andreasplesch@gmail.com">andreasplesch@gmail.com</a>>:<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>Following up, I looked up the bboxDisplay implementation in x_ite, and<br>it does pretty much follow what I outlined, eg. using an additional<br>internal, on demand Shape. Instead of wrapping in a Transform, for<br>scaling it multiplies in a local transform matrix to the model view<br>matrix. it is not strictly part of the scene graph but gets added<br>during render traversal but not picking traversal. The bbox shape is<br>predefined as a white IndexedLineset but presumably could be<br>generalized/made customizable.<br><br>I hope it is possible to avoid special treatment during traversal and<br>just manage as a regular, inert scene graph participant. Let's see.<br><br>Ok, this was helpful. Andreas<br><br>On Fri, Mar 24, 2023 at 12:10 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com">andreasplesch@gmail.com</a>> wrote:<br><br><o:p></o:p></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><br>Please forgive me if I use this message to plan strategies for a<br>possible implementation of bboxDisplay for x3dom. There will be a few<br>questions at the end.<br><br>To start, it is already quite straightforward to generate visual<br>feedback for selection purposes in x3dom. Here are a few examples:<br><br><a href="https://andreasplesch.github.io/Library/Examples/html5/highlight/turnyellow.html">https://andreasplesch.github.io/Library/Examples/html5/highlight/turnyellow.html</a><br><a href="https://andreasplesch.github.io/Library/Examples/html5/highlight/withBBox.html">https://andreasplesch.github.io/Library/Examples/html5/highlight/withBBox.html</a><br><a href="https://andreasplesch.github.io/Library/Examples/html5/highlight/outline.html">https://andreasplesch.github.io/Library/Examples/html5/highlight/outline.html</a><br><br>Thinking about generalizing to any X3DBoundedObject leads to the<br>following observations.<br><br>In x3dom, only Shapes are collected for rendering during scene<br>traversal. Displaying a bbox for groups etc. breaks this basic<br>pattern.<br><br>Although a custom shader would be most performant, this means it is<br>not really advantageous to expand the shader to include an option for<br>bbox rendering because it is restricted to shapes. Also a bbox needs<br>to be displayed even if the shape is not visible which complicates<br>logic.<br><br>In turn, this means it appears to be necessary to add an internal bbox<br>Shape for each X3DBoundedObject to the scene graph which is managed by<br>the engine. Since the bbox size needs to be updated at each traversal<br>this will add some overhead. I guess if the updates are only performed<br>when the bbox is visible this may be ok but the check is still<br>necessary. Also the bbox shapes need to be created for a lot of<br>objects, perhaps on demand only which could be an optimization. It<br>will be necessary to be careful in cleaning up when a X3DBoundedObject<br>is deleted from the scene graph.<br><br>Finally, I am considering adding an SFNode field to X3DBoundedObject<br>"bboxTemplate" which would be a Shape node or a Grouping node and<br>would let the scene designer customize the kind of bounding box used<br>for the display. By default it would be a green cage or such. It is<br>expected to be of unit size, and scaled internally (by a Transform<br>wrapper) to the actual bbox size. ( Hm, this would probably mean<br>allowing subShapes to Shape nodes as children. It may be possible to<br>deal with bboxes for Shapes as siblings, or in general as siblings,<br>eg. child of parent ).<br><br>By default the size of the displayed bbox would be a tight fit but it<br>would look probably better to make it a little larger. So another<br>custom field could be SFFloat "bboxMargin", zero by default.<br><br>What strategies do FreeWRL, x_ite or castle use to implement<br>bboxDisplay while keeping overhead at a minimum ? Check at each<br>traversal and insert a scaled bbox ? As an option in the shader ?<br><br>Depending on the strategy, would it make sense to support a custom<br>bounding box ?<br><br>A somewhat unrelated question is if a displayed bounding box is<br>eligible to be sensed by Sensors such as a TouchSensor ? Presumably,<br>it should be completely inert and be ignored but I am not sure if this<br>is how the spec. intends to be read. I think in x3dom it should be<br>possible to make sensing eligibility configurable.<br><br>Thanks for any feedback,<br><br>Andreas<br>--<br>Andreas Plesch<br>Waltham, MA 02453<o:p></o:p></p></blockquote><p class=MsoNormal><br><br><br>-- <br>Andreas Plesch<br>Waltham, MA 02453<br><br>_______________________________________________<br>x3d-public mailing list<br><a href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a><br><a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><o:p></o:p></p></div></div></blockquote></div><p class=MsoNormal><o:p> </o:p></p></div></body></html>