[x3d-public] IFS example to fix.

John Carlson yottzumm at gmail.com
Thu Jan 26 09:50:01 PST 2023


It’s in my plans to add tovrmlx3d to my testing, Michalis and i were
discussing on Discord.

We decided against something like serializing to Pascal at this time.

We’ll have to leave catching unimplemented nodes to the browser, in this
case, tovrmlx3d.

John

On Thu, Jan 26, 2023 at 10:03 AM Brutzman, Donald (Don) (CIV) <
brutzman at nps.edu> wrote:

> Michalis, this sounds like an excellent right resolution.
>
>
>
> John, I hope that your testing and model improvements indeed confirm that
> – thanks for posing that focused example demonstrating the problem.
>
>
>
> I will be looking at whether X3D-Edit can offer a suggestion to recheck
> default colorPerVertex=’true’ when the counts are mismatched, as this
> example illustrated.  That might alert author to that perhaps-unsuspected
> contributing factor – probably a good warning for addition in X3D Tooltips
> as well.
>
>
>
> 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 https://
> faculty.nps.edu/brutzman
>
>
>
> *From:* Michalis Kamburelis <michalis.kambi at gmail.com>
> *Sent:* Thursday, January 26, 2023 4:09 AM
> *To:* John Carlson <yottzumm at gmail.com>
> *Cc:* Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>; X3D Graphics
> public mailing list <x3d-public at web3d.org>
> *Subject:* Re: [x3d-public] IFS example to fix.
>
>
>
> Thanks, I see the view3scene warning was indeed very misleading:
>
>
>
> - It said "normal or texture coordinate" (which was supposed to be just an
> example, incorrect in this case),
>
> - It never said which list was really too short.
>
>
>
> I improved it now, to say:
>
>
>
>   X3D: Invalid number of items in an attribute array for shape
> ":HAnimSiteShape:IndexedFaceSet(DiamondIFS)": Invalid index: 2, but we have
> 2 items in RGB colors
>
> Please give Jenkins a few hours and then download latest view3dcene
> "snapshot" (4.3.0) version from https://castle-engine.io/view3dscene.php
> <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcastle-engine.io%2Fview3dscene.php&data=05%7C01%7Cbrutzman%40nps.edu%7C6e072c1713bb493cb7f408daff963b94%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638103318008381641%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2Bsiy4FvPoUIMthqDrnXTWhF9WesQh9bl0DNC6Ye1UHw%3D&reserved=0>
> to have the fix.
>
>
>
> Regards,
>
> Michalis
>
>
>
> W dniu wt., 24.01.2023 o 00:34 John Carlson <yottzumm at gmail.com>
> napisał(a):
>
> Thanks for colorPerVertex=‘false’ info!  Perhaps more models need to be
> tested?  I probably copied this from elsewhere.
>
>
>
> On Mon, Jan 23, 2023 at 2:23 PM Brutzman, Donald (Don) (CIV) <
> brutzman at nps.edu> wrote:
>
> Please note that IndexFaceSet colorPerVertex  field has default value
> TRUE.
>
>
>
>    -
>    https://www.web3d.org/x3d/tooltips/X3dTooltips.html#IndexedFaceSet.colorPerVertex
>    -
>    https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-DIS/Part01/components/geometry3D.html#IndexedFaceSet
>
>
>
> So the warning was misdirecting… but there is indeed a problem.  You have
> six vertices but two colors, and so will need to set colorPerVertex
> =’false’ to get what you intended (presumably a color on each polygonal
> face).
>
>
>
> Scaling up by a hundred then reveals your mystery triangle.
>
>
>
>
>
> 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 https://
> faculty.nps.edu/brutzman
>
>
>
> *From:* Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>
> *Sent:* Monday, January 23, 2023 12:08 PM
> *To:* John Carlson <yottzumm at gmail.com>
> *Cc:* X3D Graphics public mailing list <x3d-public at web3d.org>; Michalis
> Kamburelis <michalis.kambi at gmail.com>; Brutzman, Donald (Don) (CIV) <
> brutzman at nps.edu>
> *Subject:* RE: [x3d-public] IFS example to fix.
>
>
>
> When launched in view3dscene am getting the following errors
> (copied/pasted)
>
>
>
> 2 warnings:
>
> X3D: Invalid number of items in a normal or texture coordinate array for
> shape "HAnimSiteShape:IndexedFaceSet(DiamondIFS)": Invalid index: 2, but we
> have 2 items
>
> X3D: Invalid number of items in a normal or texture coordinate array for
> shape "HAnimSiteShape:IndexedFaceSet(DiamondIFS)": Invalid index: 2, but we
> have 2 items
>
> Scene URL: "C:\Users\brutzman.IT160907-UWALPP\Desktop\IFS.x3d".
>
> Use "File->View Warnings" menu to view these warnings again.
>
>
>
> Of note is that there is no HAnimSite node, rather just Shape
> DEF=’HAnimSiteShape’
>
>
>
> Likely cause: view3dscene is referring to a normal or texture coordinate
> array, but there are none provided, which is legal.  Thus these warnings
> seem to be “false positives” by view3dscene.  Suggest posting an issue
> there with this test scene; I’ve copied Michalis.
>
>
>
> John: I used X3D-Edit to launch and render your model in multiple X3D
> browsers, but nothing visible (scene looks like a 10mm cube from 10m
> away).  To improve this test, you might add a viewpoint or scale up the
> geometry  to make successful results obvious.
>
>    - <Transform scale='100 100 100'>
>
>
>
> Presumably you got a gazillion errors in the humanoid version because
> there were a corresponding gazillion USE=’HAnimSiteShape’ nodes in the
> original humanoid model.
>
>
>
> The actual X3D content you sent is
>
>
>
> <Shape DEF='HAnimSiteShape
> <https://savage.nps.edu/X3dValidator/validate#HAnimSiteShape>'>
>
> <IndexedFaceSet DEF='DiamondIFS
> <https://savage.nps.edu/X3dValidator/validate#DiamondIFS>' creaseAngle='
> 0.5' solid='false' coordIndex='0 1 2 -1 0 2 3 -1 0 3 4 -1 0 4 1 -1 5 2 1
> -1 5 3 2 -1 5 4 3 -1 5 1 4 -1'>
>
> <ColorRGBA DEF='HAnimSiteColorRGBA
> <https://savage.nps.edu/X3dValidator/validate#HAnimSiteColorRGBA>' color='1
> 1 0 1 1 1 0 0.1'/>
> <Coordinate point='0 0.01 0 -0.01 0 0 0 0 0.01 0.01 0 0 0 0 -0.01 0 -0.01
> 0'/>
>
> </IndexedFaceSet>
> <Appearance>
>
> <Material diffuseColor='1 1 0' transparency='0.3'/>
>
> </Appearance>
>
> </Shape>
>
>
>
> X3D Validator in X3D-Edit and online gets same result, no surprises found:
>
>
>
> --------- X3D Validator checks commenced for IFS.x3d ---------
>
>
>
> Performing well-formed XML check...
>
> Checking file:/C:/Users/brutzman.IT160907-UWALPP/Desktop/IFS.x3d...
>
> Well-formed XML check: pass
>
>
>
> Performing DOCTYPE check...
>
> [X3dDoctypeChecker] success: valid XML declaration
> found.[X3dDoctypeChecker] success: final X3D 4.0 DOCTYPE found.
>
>
>
> Performing DTD validation...
>
> Checking file:/C:/Users/brutzman.IT160907-UWALPP/Desktop/IFS.x3d...
>
> XML DTD validation: pass
>
>
>
> Performing X3D schema validation...
>
> Checking file:/C:/Users/brutzman.IT160907-UWALPP/Desktop/IFS.x3d...
>
> XML schema validation: pass
>
>
>
> Performing X3D regular expression (regex) values check...
>
> X3D regex check: complete
>
>
>
> Performing X3dToX3dvClassicVrmlEncoding.xslt conversion check...
>
> [info] <X3D profile='Immersive'> differs from profile='Interchange'
> computed for this model
>
> [warning] File name doesn't match for <meta name='identifier' content='
> http://www.web3d.org/x3d/content/examples/HumanoidAnimation/IFS.x3d'/>
> and <meta name='title' content='JohnIFS.x3d'/>
>
>
>
> Performing X3D Schematron check...
>
> X3D version 4.0 is approved by Web3D Consortium and focused on
> interoperability with HTML, glTF Physically Based Rendering (PBR) and Web
> Audio API, undergoing dinal review by ISO national bodies in 2022. [/X3D,
> diagnostic]
>
> X3D/head/meta title (i.e. filename 'JohnIFS.x3d') is expected at end of
> identifier (url) value [/X3D/head, warning]
>
>
>
> --------- X3D Validator checks complete for IFS.x3d ---------
>
> --------- X3D Validator online at https://savage.nps.edu/X3dValidator
> ---------
>
>
>
> 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 https://
> faculty.nps.edu/brutzman
>
>
>
> *From:* x3d-public <x3d-public-bounces at web3d.org> *On Behalf Of *John
> Carlson
> *Sent:* Wednesday, January 18, 2023 3:54 AM
> *To:* X3D Graphics public mailing list <x3d-public at web3d.org>
> *Subject:* Re: [x3d-public] IFS example to fix.
>
>
>
> Here is a small example that shows the potential issue, attached.
>
>
>
> view3dscene reports errors, Schematron does not.  I will attempt JSON next.
>
>
>
> John
>
>
>
> On Wed, Jan 18, 2023 at 5:41 AM John Carlson <yottzumm at gmail.com> wrote:
>
> This may interest people working with IFS in *some* HAnim examples,
> particularly mine!
>
>
>
> JOhn
>
> ---------- Forwarded message ---------
> From: *John Carlson* <yottzumm at gmail.com>
> Date: Wed, Jan 18, 2023 at 5:22 AM
> Subject: IFS example to fix.
> To: Joe D Williams <joedwil at earthlink.net>
>
>
>
>     <IndexedFaceSet DEF='DiamondIFS' creaseAngle='0.5' solid='false'
> coordIndex='0 1 2 -1 0 2 3 -1 0 3 4 -1 0 4 1 -1 5 2 1 -1 5 3 2 -1 5 4 3 -1
> 5 1 4 -1'>
>
>      <ColorRGBA DEF='HAnimSiteColorRGBA' color='1 1 0 1 1 1 0 0.1'/>
>
>      <Coordinate point='0 0.01 0 -0.01 0 0 0 0 0.01 0.01 0 0 0 0 -0.01 0
> -0.01 0'/>
>
>     </IndexedFaceSet>
>
>
>
> The way I'm reading above, the IFS has 6 coordinates and 2 colors.  There
> should be more colors, correct?  view3dscene detected this.  I'll look up
> the IFS spec.
>
>
>
> Thanks!
>
>
>
> John
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230126/ecfbd5d0/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 47405 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230126/ecfbd5d0/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 429890 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230126/ecfbd5d0/attachment-0003.png>


More information about the x3d-public mailing list