[x3d-public] Turning on and off simultaneous animations individually

John Carlson yottzumm at gmail.com
Tue Feb 4 12:55:21 PST 2025


I have added default values in the ProtoDeclare for outputOnly fields,
reverting back to passing out startTime, stopTime and enabled.

Referring to this repository:

https://github.com/coderextreme/ci2had/

I primarily wish to get this working:
https://github.com/coderextreme/ci2had/blob/main/resources/CleanedYouClocks.x3d,
but first, I want to get ManyClocks.x3d working, because it precedes
CleanedYouClocks.x3d, but feel free to get it working first (it's a cleaned
up version).

If all else fails, I'll probably strip out the Proto (ugh!).
--------------------------------------------------------------
I have confirmed that this doesn't animate:

https://andreasplesch.github.io/Library/Viewer/index.html?url=https://raw.githubusercontent.com/coderextreme/ci2had/refs/heads/main/resources/ManyClocks.x3d
--------------------------------------------------------------
This does animate:

https://create3000.github.io/x_ite/playground/?url=https://raw.githubusercontent.com/coderextreme/ci2had/refs/heads/main/resources/ManyClocks.x3d
---------------------------------------------------------------
Castle Model Converter produces errors.  The viewer doesn't animate,
probably because I use HAnimDisplacers. There are no scripts, in an attempt
to appease people who don't like scripts.  We now have a good example that
has HAnimDisplacers, but no scripts.

$
~/Downloads/castle-model-viewer-5.3.0-win64-x86_64/castle-model-viewer/castle-model-converter.exe
--validate resources/ManyClocks.x3d 2>&1 |sort -u
castle-model-converter: Warning: X3D: X3D XML: <fieldValue> element
references unknown field name "enabled"
castle-model-converter: Warning: X3D: X3D XML: <fieldValue> element
references unknown field name "startTime"
castle-model-converter: Warning: X3D: X3D XML: <fieldValue> element
references unknown field name "stopTime"
Exception "Exception":
Validation failed (consult the warnings above), exiting with non-zero status
---------------------------------------------------------------
FreeWRL  kills JavaScript for some reason (there's no Script), but still
doesn;'t animate (try pressing Fear).

$ /c/Program\ Files\ \(x86\)/freeWRL/freeWRL.6.7/freeWRL.exe
resources/ManyClocks.x3d

MidiInWinMM::initialize: no MIDI input devices currently available.

libfreewrl version 6.7.0
-h for commandline use
openGL version 4.6.0 NVIDIA 560.94
GLSL shader max version 4.60 NVIDIA 460
maximum texture size system/gpu: 32768 runtime/freewrl: 16384
processor architecture x64
maxiumum image texture units 32
depth bits 24
Skinning Method: GPU
calling kill_javascript()
done kill_javascript
Ending texture load thread gracefully
finalizeRenderSceneUpdateScene
---------------------------------------------------------------------------------------------------
Schematron reports a bunch of problems, all of which I ignore.  See
attached. log and build.xml
---------------------------------------------------------------------------------------------------
There are many info issues when validating with X3DJSAIL, but I'm not sure
about this one:
$ java -cp ~/Downloads/X3DJSAIL.4.0.full.jar
org.web3d.x3d.jsail.CommandLine -validate resources/ManyClocks.x3d|grep -v
info
[snip]
org.web3d.x3d.sai.InvalidFieldException: IndexedFaceSet containing
TextureCoordinate node with 295 values must also include texCoordIndex or
coordIndex field
        at
org.web3d.x3d.jsail.Geometry3D.IndexedFaceSet.validate(IndexedFaceSet.java:3756)
        at org.web3d.x3d.jsail.Shape.Shape.validate(Shape.java:2060)
        at
org.web3d.x3d.jsail.Grouping.Transform.validate(Transform.java:2556)
        at
org.web3d.x3d.jsail.HAnim.HAnimSegment.validate(HAnimSegment.java:6175)
        at
org.web3d.x3d.jsail.HAnim.HAnimJoint.validate(HAnimJoint.java:7476)
        at
org.web3d.x3d.jsail.HAnim.HAnimJoint.validate(HAnimJoint.java:7476)
        at
org.web3d.x3d.jsail.HAnim.HAnimHumanoid.validate(HAnimHumanoid.java:6317)
        at
org.web3d.x3d.jsail.Grouping.Transform.validate(Transform.java:2556)
        at org.web3d.x3d.jsail.Core.Scene.validate(Scene.java:869)
        at org.web3d.x3d.jsail.Core.X3D.validate(X3D.java:4549)
        at org.web3d.x3d.jsail.CommandLine.run(CommandLine.java:1098)
        at org.web3d.x3d.jsail.CommandLine.main(CommandLine.java:242)

I don't have a recent version of X3DJSAIL

On Tue, Feb 4, 2025 at 2:22 PM Andreas Plesch <andreasplesch at gmail.com>
wrote:

> Thanks, exactly what I was looking for.
>
> Best, Andreas
>
>
> On Tue, Feb 4, 2025, 2:01 PM Holger Seelig <holger.seelig at yahoo.de> wrote:
>
>> The default value for a field is either specified for each node type or
>> the default value for Script or ComposedShader node custom fields is
>> defined in
>> https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/fieldTypes.html.
>> Mostly false, 0, „“, identity, ...
>>
>> A proto instance will inherit its default values from the proto
>> declaration its fields. Fields such as outputOnly will normally have a
>> default value from fieldTypes.html.
>>
>> There is an exception with X3DInterpolatorNode.value_changed:
>>
>>
>> https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/components/interpolators.html#X3DInterpolatorNode
>>
>> If an X3DInterpolatorNode value_changed outputOnly field is read before
>> it receives any inputs, keyValue[0] is returned if keyValue is not empty...
>>
>> Best regards,
>> Holger
>>
>> --
>> Holger Seelig
>> Leipzig, Germany
>>
>> holger.seelig at yahoo.de
>> https://create3000.github.io/x_ite/
>>
>> Am 04.02.2025 um 19:26 schrieb Andreas Plesch via x3d-public <
>> x3d-public at web3d.org>:
>>
>> Hi John, all,
>>
>> It turns out that x3dom currently expects a default value for Proto
>> fields even for outputOnly fields. This is due to how Proto fields are
>> initialized. They always need to have a value. While the spec. does not
>> require this, it seems still good practice to always define a default value
>> in the ProtoInterface. There may be a case where an outputOnly field is
>> used in ISing where a valid value would be expected. There may be other
>> corner cases.
>>
>> Here is your example with added default values for outputOnly fields:
>>
>>
>> https://andreasplesch.github.io/Library/Viewer/index.html?url=https://gist.githubusercontent.com/andreasplesch/af5ff3148c1159f71d34fb78c1f63024/raw/b3d4470107ab74e301ed48448ab2a4f4154672e0/ManyClocks_John.x3d
>>
>> This could be fixed in x3dom, by always setting some default value. Is
>> there a list of recommended defaults for each data type if no other source
>> of defaults is available? For SFTime it seems to be -1.
>>
>> -Andreas
>>
>>
>> On Mon, Feb 3, 2025 at 7:39 AM Andreas Plesch <andreasplesch at gmail.com>
>> wrote:
>>
>>> Hi John,
>>>
>>> On Mon, Feb 3, 2025 at 12:48 AM John Carlson <yottzumm at gmail.com> wrote:
>>>
>>>> Andreas, "startTime" is an accessType outputOnly field, so why do I
>>>> need to provide a value attribute in fieldValue?  I'm kind of confused.
>>>> I'm probably missing something in the spec.
>>>>
>>>
>>> You are right, I only outlined scenarios where the accessType allows
>>> input or initialization..
>>> In the outputOnly case it is not necessary to provide a fieldValue node
>>> at all since there is no value which can be provided. Providing the node
>>> would indeed be confusing, to both the user code reader and any X3D browser.
>>> I believe the spec. is silent on this case in any encoding.
>>>
>>> Best, Andreas
>>>
>>> Thanks for any clarification.
>>>>
>>>> I have finally enabled schematron on the project, but I'm finding it
>>>> hard to understand the messages, and modifications that I make, while
>>>> removing the immediate problems, seem to move the problems elsewhere.
>>>>
>>>> Explaining why I need a "startTime" fieldValue value is my main lack of
>>>> understanding, but perhaps I need a whole review of accessType.
>>>>
>>>> Castle Model Converter reports:
>>>>
>>>> castle-model-converter: Warning: X3D: X3D XML: <fieldValue> element
>>>> references unknown field name "enabled"
>>>> castle-model-converter: Warning: X3D: X3D XML: <fieldValue> element
>>>> references unknown field name "startTime"
>>>> castle-model-converter: Warning: X3D: X3D XML: <fieldValue> element
>>>> references unknown field name "stopTime"
>>>>
>>>> I will try providing a field value in the ProtoInterface
>>>>
>>>> If I "cleanup" enabled, startTime and stopTime, I get:
>>>>
>>>> castle-model-converter: Warning: VRML/X3D: Within prototype "MenuItem",
>>>> event "inputTrue" references (by "IS" clause) non-existing event "enabled"
>>>> castle-model-converter: Warning: VRML/X3D: Within prototype "MenuItem",
>>>> event "triggerTime" references (by "IS" clause) non-existing event
>>>> "startTime"
>>>> castle-model-converter: Warning: VRML/X3D: Within prototype "MenuItem",
>>>> event "triggerTime" references (by "IS" clause) non-existing event
>>>> "stopTime"
>>>>
>>>> I guess what I conclude at this point is, startTime and stopTime are
>>>> bad DEF names, but what about enabled as a field?  The dominoes are falling.
>>>>
>>>> About your two scenarios in the other message, perhaps this is
>>>> revealing.
>>>>
>>>> See attached attempt to fix original issue, which resulted in the above.
>>>>
>>>> John
>>>>
>>>> On Sun, Feb 2, 2025 at 3:59 PM Andreas Plesch <andreasplesch at gmail.com>
>>>> wrote:
>>>>
>>>>> I think x3dom, reasonably, expects a value for the fieldValue nodes:
>>>>>
>>>>> For example:
>>>>>
>>>>> <fieldValue name="startTime" />
>>>>>
>>>>> and others.
>>>>>
>>>>> On Sun, Feb 2, 2025 at 5:42 AM John Carlson <yottzumm at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Andreas, Joe,
>>>>>>
>>>>>> Reset Button, Reset_Clock added.
>>>>>>
>>>>>> See attached zip for details, or visit link;
>>>>>>
>>>>>>
>>>>>> https://create3000.github.io/x_ite/playground/?url=https://raw.githubusercontent.com/coderextreme/ci2had/refs/heads/main/resources/CleanedYouClocks.x3d
>>>>>>
>>>>>> For some reason, this link doesn't show the live scene?
>>>>>>
>>>>>>
>>>>>> https://andreasplesch.github.io/Library/Viewer/index.html?url=https://raw.githubusercontent.com/coderextreme/ci2had/refs/heads/main/resources/CleanedYouClocks.x3d
>>>>>>
>>>>>> Puzzled, haven't researched it yet.  Looks good in Sunrize and X_ITE,
>>>>>> will try FreeWRL next.
>>>>>>
>>>>>> John
>>>>>>
>>>>>>>
>>>>>
>>>>> --
>>>>> Andreas Plesch
>>>>> Waltham, MA 02453
>>>>>
>>>>
>>>
>>> --
>>> Andreas Plesch
>>> Waltham, MA 02453
>>>
>>
>>
>> --
>> Andreas Plesch
>> Waltham, MA 02453
>> _______________________________________________
>> x3d-public mailing list
>> x3d-public at 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/20250204/3d154864/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ManyClocksSchematron.zip
Type: application/x-zip-compressed
Size: 52775 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250204/3d154864/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.xml
Type: text/xml
Size: 1198 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250204/3d154864/attachment-0001.xml>


More information about the x3d-public mailing list