[x3d-public] v4 > X3DGroupingNode > displayBBox, visible

Don Brutzman brutzman at nps.edu
Sat May 16 18:35:56 PDT 2020


[cc: potential X3D4 implementers and x3dom-developers mailing list]

Doug, your screenshots of displayed bounding boxes are super and very impressive.  Thank you.

I know view3dscene can also accomplish bounding box displays because that feature is on by default.

Not sure yet if X3DOM and X_ITE can handle it yet, but clearly it is feasible.  Details in

[1] Mantis 1277: Provide displayBBox field on X3DBoundedObject nodes to display bounding boxes. possible rename?
     https://www.web3d.org/member-only/mantis/view.php?id=1277

[2] Extensible 3D (X3D) 4.0 Tooltips" Anchor, displayBBox
     https://www.web3d.org/x3d/tooltips/X3dTooltips.html#Anchor.displayBBox

About a month or so ago during X3D Working Group teleconference, there was agreement that I go ahead and implement bboxDisplay in X3DUOM and related tools to see if everything worked.  That has been applied, with one added insight.  I recommend that we rename displayBBox to bboxDisplay so that it is more consistent (familiar, searchable etc.) with bboxCenter and bboxSize.

How about I make that naming change next weekend, or sooner if anyone wants.

Clearly this is a one-time task by players that extends existing capabilities, adding value for a feature that is exceedingly difficult for authors or end users to accomplish.  This feature will help user interactivity, selection tasks, and model debugging.  Thanks for all support.

On 5/7/2020 11:18 AM, GPU Group wrote:
> my experience implementing displayBBox, visible in freewrl:
> 
> Results:
> 
> http://dug9.users.sourceforge.net/web3d/tests/bbox/BasicBrain_displayBBox.x3d
> http://dug9.users.sourceforge.net/web3d/tests/bbox/2.x3d
> http://dug9.users.sourceforge.net/web3d/tests/bbox/BoxMan_displayBBox.x3d
> http://dug9.users.sourceforge.net/web3d/tests/bbox/CadTeapot_displayBBox.x3d
> http://dug9.users.sourceforge.net/web3d/tests/bbox/GeoLocation_displayBBox.x3d
> http://dug9.users.sourceforge.net/web3d/tests/bbox/linepickD_displayBBox.x3d
> http://dug9.users.sourceforge.net/web3d/tests/bbox/ProtoInlineBillboardAnchorShape_displayBBox.x3d
> http://dug9.users.sourceforge.net/web3d/tests/bbox/Viewport_displayBBox.x3d
> http://dug9.users.sourceforge.net/web3d/tests/bbox/screenshot_displayBBox.jpg
> 
> Method:
> It took a week of careful gruelling refactoring of old inefficient code -42 Git commits- but was a good opportunity to clean up some old mess build up over a decade of incremental hacking.
> OLD:
> X loop over all nodes once per frame propagated extents up through transforms
> X regenerating transforms to transform the extents on transform-type nodes
> X we weren't even using group bboxSize and bboxCenter
> NEW:
> *Groups:  on render pass, push an empty bounding box onto a stack before drawing children, and the children UNION with their own extent and pass back on the stack
> *Transforms: like group, except when preparing the transform, keep the additional transforms separate from MODELVIEWMATRIX to apply to just the extent when it comes back
> ** and use it to transform extent by converting to an 8 point rectanguloid, and transform all 8 points, then take the extent of them
> https://sourceforge.net/p/freewrl/git/ci/develop/tree/freex3d/src/lib/scenegraph/Component_Grouping.c
> L.492 prep_BBox, fin_BBox
> 
> 
> 31 changes:
> G - group type, just copy children extent to parent scope
> T - transform type, transform children extent to parent scope
> 
> 1 Anchor *G
> 2 Billboard *T
> 3 Collision *G
> 4 Group *G
> 5 Switch *G
> 6 Transform *T
> 7 Viewport *G
> 8 Inline *G
> 9 LOD *G
> 10 StaticGroup *G
> 11 PickableGroup *G
> 12 Proto *G (just x3d parsed protoInstance)
> 13 Shape *G
> 
> 
> 14 CADAssembly *G
> 15 CADFace *G
> 16 CADLayer *G (MFBool [] visible renamed MFBool visibles [])
> 17 CADPart *T
> 
> 18 GeoLOD *G
> 19 GeoLocation  *T
> 20 GeoTransform *T2 (a 2-step transform of extent)
> +  freewrl GeoPlanet *T
> 
> 21 HAimHumanoid *G (except unsegmented skin)
> 22 HAnimJoint *T
> 23 HAnimSegment *G
> 24 HAnimSite *T
> 
> 25 ReceiverPdu x doesn't need no children
> 26 SignalPdu x doesn't need no children
> 27 TransmitterPdu x doesn't need no children
> 28 EspduTransform *T (not tested, not applied to geo transform just regular)
> 
> 29 VolumeData *G
> 30 SegmentedVolumeData *G
> 31 IsoSurfaceVolumeData *G
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list