[x3d-public] What should this file display (for the experts)?

Michalis Kamburelis michalis.kambi at gmail.com
Wed Jun 1 15:29:36 PDT 2016


As for view3dscene: the latest version was displaying cylinders (like
Vincent says; Don, possibly you made a mistake when checking?). So
view3dscene was actually incorrect.

And it's fixed now, of course:) The latest view3dscene on GitHub
displays green boxes now. You can get the latest view3dscene version
from the "nightly snapshots" on
http://michalis.ii.uni.wroc.pl/castle-engine-snapshots/ and see that
*now* the result is correct - green boxes:)

It was a simple, 1-line fix:) Details for the curious (maybe it's a
similar bug in other browsers?):

- When looking at scene in wireframe mode --- one could see that green
boxes *were* present, but were hidden inside cylinders.

- The problem came from the fact that in this case, the MFNode had a
non-empty default value. So the green box was added to the sphere
inside, instead of replacing it. Such MFNode situation never happens
without prototypes (in X3D specification, the default value for MFNode
is always an empty list). That's how it slipped through testing.

- In case of view3dscene, the problem was specific to XML encoding.
The classic encoding parser was already correctly accounting for that.
I attach the classic encoding version (made by view3dscene command
"File -> Save To VRML/X3D (classic encoding)"), so you can use it for
testing too.

- Fix is on https://github.com/castle-engine/castle-engine/commit/cb174893858948b77e7eb64810ec649f3da92f8f
if you're really curious:) It's actually 1 line of code +3 lines of
commens:)

Regards,
Michalis

2016-05-31 21:12 GMT+02:00 Don Brutzman <brutzman at nps.edu>:
> John, the scene passes all X3D Validator tests and shows 3 boxes.  As
> expected, the ProtoInstance fieldValue for myShape overrides the default (a
> cylinder).
>
> Style note:  it is possible to stick in Shape/Text string="hey you forgot to
> reinitialize me" or somesuch using your proto design.
>
> Test report:
>
> - InstantReality and View3dscene correctly show boxes (screenshot attached)
> - BS Contact, FreeWrl and Octaga mistakenly show Cylinders (failing to
> replace with ProtoInstance fieldValue Box)
> - H3D Viewer mysteriously shows spheres (apparently from the un-instanced
> anyShape ProtoDeclare)
> - Xj3D fails to load properly
>
> Excellent test scene.  Let's add metadata and any updates (perhaps unique
> texture for each shape, describing each error case) and we can figure out
> where to archive it.
>
>
> On 5/30/2016 2:16 PM, John Carlson wrote:
>>
>> Quick question.  This isn’t supposed to display both cylinders and cubes
>> is it (addChildren does that?).
>>
>> Thanks,
>>
>> John
>>>
>>> On May 28, 2016, at 5:00 PM, John Carlson <yottzumm at gmail.com> wrote:
>>>
>>> X3D experts:  What should this file display?  Various browsers give
>>> different results. What is the official response?  This would be a good
>>> example for an X3D test for students!  I am writing a prototype expander,
>>> and I’m trying to nail down expected behavior.
>>>
>>> Don, this file may be contributed to the example archives.
>>>
>>> Thanks,
>>>
>>> John<questionforexperts.x3d>
>
>
>
> 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
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: questionforexperts_1.png
Type: image/png
Size: 14077 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20160602/0d651e3f/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: questionforexperts.x3dv
Type: model/x3d+vrml
Size: 1232 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20160602/0d651e3f/attachment.bin>


More information about the x3d-public mailing list