[x3d-public] Where have all the flowers gone? John status.

John Carlson yottzumm at gmail.com
Fri Jul 30 14:54:45 PDT 2021


X3D4 and X3DUOM and JSON:

Good news, this patch has been accepted!  We should be able to use it 
after acceptance testing!

Reminder, you should be able to use either/both "back" and 
"backTexture,"  "bottom" and "bottomTexture," etc. in your X3D4 
ComposedCubeMapTexture's. The correct choice of output will depend on 
your version of X3D that you are outputting from X3DJSAIL. I will be 
testing X_ITE and X3DOM current (latest, dev) versions with X3DJSONLD soon.

Don, thank you for accepting the patch, and being patient with my 
exposition of it. Sometimes, things have to be done in person.

This should probably affect all XML and JSON output (and maybe more) 
from X3DJSAIL, with regards to MultiTextures (at least the 6-sided 
ones).   MFNodes still use the "position() = 1" test case (Don, please 
confirm), as I don't know if I have any examples of that.

Heads up to X3DOM folks--hope you fix the code to accept X3D4 synonyms 
and the fields name changes!  I'll have to do some testing to see if 
this has been fixed in X3DJSONLD, which uses the X3DOM dev version.

Looks like a new version of X3DUOM is out, and another possibly soon! So 
far, no changes to JSON Schema.  JSON schema has already implemented 
changes for synonyms, so your X3DJSON validation should work, assuming 
you've updated to the latest 4.0 JSON schema (found in 
X3DJSONLD/src/main/schema/)

=============================================

Python:

If you're trying to validate X3D JSON in your Python programs, remember 
that there's a validate.py available in X3DJSONLD/src/main/python.   
This is pure python code--the JSON schema is converted to python, so 
instead of validation errors, you'll probably get some weird python 
error.  I pretty much prefer Ajv's error reports, but I'm used to them.  
This is brought to you by fastjsonschema, me, and Jeff H.

We'll be considering what approaches we'll take for reading encodings 
into x3d.py programs.   For now, consider some version of 
X3DJSAIL-Python, which uses the X3DJSAIL API (not the x3d.py version).   
X3DJSAIL with python scripting has been deprecated in favor of x3d.py.  
To achieve an XML to python conversion that will use x3d.py, try using 
X3dToPython.xslt found on the sourceforge x3d project site.

**********This may be an opportunity for some in our python community to 
step up and provide appropriate encoding readers.

===================================================

C/C++/C#:

I'll probably be writing the conversions between X3D JSON and C/C++/C# 
using templates of my JavaScript code, so-called "Serializers."  I'm 
currently working on a Dart version, but if I can get a bit of 
assistance on Dart, I may be able to move my efforts to C/C++/C# examples.

NOTE****************

The C bindings delivered to sourceforge currently contain what look like 
C++ classes in their .h files.   I don't think this is correct.  Is 
there an update?

So probably I'll be working with C++ examples first.

Onward!

John

On 7/2/21 7:29 AM, John Carlson wrote:
>
> x3d/stylesheets$ svn diff CreateX3dSceneAccessInterfaceJava.xslt
> Index: CreateX3dSceneAccessInterfaceJava.xslt
> ===================================================================
> --- CreateX3dSceneAccessInterfaceJava.xslt      (revision 32276)
> +++ CreateX3dSceneAccessInterfaceJava.xslt      (working copy)
> @@ -12960,13 +12960,13 @@
>              <xsl:text>
>          String correctedContainerField;</xsl:text>
>              <xsl:for-each 
> select="InterfaceDefinition/field[string-length(@synonym) > 0][@type = 
> 'SFNode']">
> -                <xsl:if test="(position() = 1)">
> +                <!--xsl:if test="(position() = 1)"-->
>                      <xsl:text disable-output-escaping="yes"><![CDATA[
>          if (hasAncestorX3D() && 
> findAncestorX3D().getVersion().startsWith("3"))
>               correctedContainerField = "]]></xsl:text><xsl:value-of 
> select="@synonym"/><xsl:text>";
>          else correctedContainerField = "</xsl:text> <xsl:value-of 
> select="@name"/><xsl:text>";
>  </xsl:text>
> -                </xsl:if>
> +                <!--/xsl:if-->
>                  <xsl:variable name="CamelCaseName"><!-- upper camel 
> case -->
>                      <xsl:value-of 
> select="translate(substring(@name,1,1),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
>                      <xsl:value-of select="substring(@name,2)"/>
>
>
>
> On 7/2/21 7:25 AM, Holger Seelig wrote:
>> Updated X_ITE to have X3D V4 field names for ComposedCubeMapTexture.
>>
>>
>>> Am 02.07.2021 um 13:51 schrieb John Carlson <yottzumm at gmail.com 
>>> <mailto:yottzumm at gmail.com>>:
>>>
>>> X3D4 added Texture to back, front, … container fields in XML.   See 
>>> X3DUOM 4.0, “backTexture” entries under ComposedCubeMapTexture. 
>>>  back, front,  … are now synonyms for backTexture, frontTexture, 
>>> etc.   just search for synonym may be easier.
>>>
>>> I can’t change to back, front, … because my Java, NodeJs and Python 
>>> serializers do not convert back to setBackTexture, instead they use 
>>> setBack.   Guess what?  X3DJSAIL does not have a setBack with a 
>>> signature I want.   Yes, I do have ways to override the method I 
>>> haven’t deployed in mapToMethod2.js
>>>
>>> Not only that, X3DOM expects back, front, etc.
>>>
>>> So is someone trying to piss me off?  Idk.   I think I might be the 
>>> only person who actually uses ComposedCubeMapTexture!
>>>
>>> Thanks for the updates.  I will go to sleep less upset.
>>>
>>> John
>>>
>>> On Fri, Jul 2, 2021 at 6:02 AM Holger Seelig <holger.seelig at yahoo.de 
>>> <mailto:holger.seelig at yahoo.de>> wrote:
>>>
>>>
>>>
>>>     Attached flower.zip with shaders updated to WebGL2 also have a
>>>     look at
>>>     https://webgl2fundamentals.org/webgl/lessons/webgl1-to-webgl2.html
>>>     <https://webgl2fundamentals.org/webgl/lessons/webgl1-to-webgl2.html> how
>>>     to WebGL to WebGL2.
>>>     Also updated flowerproto.json. ComposedCubeMap fields are
>>>     actually back, front, … not backTexture, frontTexture, …
>>>
>>>     Best regards,
>>>     Holger
>>>
>>>
>>>
>>>>     Am 02.07.2021 um 11:23 schrieb John Carlson <yottzumm at gmail.com
>>>>     <mailto:yottzumm at gmail.com>>:
>>>>
>>>>     I just looked at the the flowers.xhtml page, and neither the
>>>>     fragment nor the vertex shader are working in X_ITE (should be
>>>>     similar to X3DOM.)
>>>>
>>>>     On Fri, Jul 2, 2021 at 12:17 AM John Carlson
>>>>     <yottzumm at gmail.com <mailto:yottzumm at gmail.com>> wrote:
>>>>
>>>>         1.  Pages like:
>>>>         https://coderextreme.net/X3DJSONLD/src/main/html/flowers.xhtml
>>>>         <https://coderextreme.net/X3DJSONLD/src/main/html/flowers.xhtml>
>>>>         are half-broken with X_ITE objects showing up in white
>>>>
>>>>         2.  Apparently, X_ITE has upgraded it shading language to
>>>>         WebGL2/OpenGL ES 3.0
>>>>
>>>>         3.  I don't want to go backwards and try to support an
>>>>         older version of X_ITE
>>>>
>>>>         4.  X3DOM has some problems with X3D4 containerField
>>>>         non-synonyms (not in shown in above example).
>>>>
>>>>         This works in X3DOM (note 6 misspelled
>>>>         containerFields--they use synonyms in X3D4):
>>>>
>>>>         <ComposedCubeMapTexture DEF="texture"><ImageTexture
>>>>         url='"../resources/images/all_probes/stpeters_cross/stpeters_back.png"
>>>>         "https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_back.png"'
>>>>         containerField="back"/><ImageTexture
>>>>         url='"../resources/images/all_probes/stpeters_cross/stpeters_bottom.png"
>>>>         "https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_bottom.png"'
>>>>         containerField="bottom"/><ImageTexture
>>>>         url='"../resources/images/all_probes/stpeters_cross/stpeters_front.png"
>>>>         "https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_front.png"'
>>>>         containerField="front"/><ImageTexture
>>>>         url='"../resources/images/all_probes/stpeters_cross/stpeters_left.png"
>>>>         "https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_left.png"'
>>>>         containerField="left"/><ImageTexture
>>>>         url='"../resources/images/all_probes/stpeters_cross/stpeters_right.png"
>>>>         "https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_right.png"'
>>>>         containerField="right"/><ImageTexture
>>>>         url='"../resources/images/all_probes/stpeters_cross/stpeters_top.png"
>>>>         "https://coderextreme.net/X3DJSONLD/images/all_probes/stpeters_cross/stpeters_top.png"'
>>>>         containerField="top"/></ComposedCubeMapTexture> However,
>>>>         containerFields with Texture trailing the side do not. _*We
>>>>         need more work on backTexture, frontTexture, ...
>>>>         containerFields in X3DOM for X3D4. I use this quite a bit
>>>>         in my code.*__**_ 5. _*How do I implement chromatic
>>>>         aberration in X3D?*_ (See PlayCanvas in flowers.xhtml
>>>>         above). Preferably, not dropping into a shading language,
>>>>         so I can use an enduring standard.
>>>>
>>>>     _______________________________________________
>>>>     x3d-public mailing list
>>>>     x3d-public at web3d.org <mailto:x3d-public at web3d.org>
>>>>     http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>>>     <http://web3d.org/mailman/listinfo/x3d-public_web3d.org>
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20210730/49ef84b3/attachment-0001.html>


More information about the x3d-public mailing list