[x3d-public] change to cycleTime perhaps no longer ignored , example ?

John Carlson yottzumm at gmail.com
Tue Aug 15 09:41:47 PDT 2023


I’m thinking want to tackle the BooleanSequencer to turn on and off our
animations through time, if there’s no better way to do it.   I’m going to
be code generating from a list of animations and their corresponding
boolean sequences as keyValues matching times from the clock keys.   It’s
not just two alternating animations, although I am using that pattern.

Maybe a PROTO will fall out of this work.

On Tue, Aug 15, 2023 at 11:20 AM Andreas Plesch <andreasplesch at gmail.com>
wrote:

> It appears that a question on x3d-public back in 2016 was the trigger
> for the change:
>
>
> https://web3d.org/pipermail/x3d-public_web3d.org/2016-November/thread.html#start
>
> It involves the x3d-svg-html "rosetta stone" page but that is not
> really suitable as a focused test scene.
>
> Since this is a new feature there are probably no existing examples. I
> may try to generate a pure X3D one showing a bouncing sphere:
>
> A sketch:
>
> "SENSOR" TouchSensor
> "POSITION" Transform
>   "BALL" Shape
>     ..
> "CLOCK" TimeSensor
> "MOVER" CoordinateInterpolator
> ROUTE CLOCK.fraction_changed to MOVER.set_fraction
> ROUTE MOVER.value_changed to POSITION.position
> #Begin of cycleInterval switching without a script
> #Use ScalarInterpolator to emit SFFloat (there is no ScalarSequencer)
> "INTERVAL5" ScalarInterpolator keyValue="5.0"
> "INTERVAL1" ScalarInterpolator keyValue="1.0"
> ROUTE INTERVAL5.value_changed to CLOCK.set_cycleInterval
> ROUTE INTERVAL1.value_changed to CLOCK.set_cycleInterval
> "Use Timers to trigger
> "TIMER5" TimeSensor loop=true enabled=false
> "TIMER1" TimeSensor loop=true enabled=false
> ROUTE TIMER5.fraction_changed to INTERVAL5.set_fraction
> ROUTE TIMER1.fraction_changed to INTERVAL1.set_fraction
> #Use BooleanToggle and BooleanFilter to control activity
> "NEGATER" BooleanFilter
> "TOGGLER" BooleanToggle
> ROUTE SENSOR.isActive to TOGGLER.set_boolean
> ROUTE TOGGLER.toggle_changed to NEGATER.set_boolean
> ROUTE TOGGLER.toggle_changed TIMER5.set_enabled #on/off TIMER5
> ROUTE NEGATER.inputeNegate TIMER1.set_enabled #off/on TIMER1
>
> Is there an easier way to send a SFFloat to cycleInterval without a
> script node ?
>
> Thinking about it may be better to avoid all the event utilities in an
> example and just switch continuously between speeds:
> ...
> #Begin of cycleInterval switching without a script
> "INTERVAL1OR5" ScalarInterpolator key='0 0.5 0.5 1' keyValue='1 1 5 5'
> ROUTE INTERVAL1OR5.value_changed to CLOCK.set_cycleInterval
> "SPEEDCLOCK" TimeSensor cycleInterval=5 # =3 for more challenging test
> ROUTE SPEEDCLOCK.fraction_changed to INTERVAL1OR5.set_fraction
>
> This brings up if it will be necessary in the spec. to define
> behaviour for the case when cycleInterval receives a new value which
> is the same as the existing value ? Probably not since the proposed
> language only covers actual changes implying that nothing should
> happen if there is no actual change.
>
> -Andreas
>
> On Tue, Aug 15, 2023 at 10:46 AM Brutzman, Donald (Don) (CIV)
> <brutzman at nps.edu> wrote:
> >
> > Thanks for pointing out the error with CD1 urls in X3D Tooltips, which
> eluded prior search/replace.
> >
> >
> >
> > Now fixed.  Correct current url prefix follows, sourceforge commit and
> web3d.org deploy will happen later today.
> >
> >
> >
> >
> https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof/
> >
> >
> >
> > The older behavior can be considered defunct and rectified by
> specification.  Devising an example that explicitly shows such correct
> behavior is a good idea.  All candidates welcome from any author.
> >
> >
> >
> > Thanks for pursuing this important interoperability consideration…  we
> want duck models to consistently walk, talk, and look like a duck.
> >
> >
> >
> > Not sure what is going on with the following url, will investigate
> further.  Probably an early (and now unintended) redirect.
> >
> >
> >
> > https://www.web3d.org/documents/specifications/19775-1/V4.0
> >
> >
> >
> > 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
> >
> >
> >
> > -----Original Message-----
> > From: x3d-public <x3d-public-bounces at web3d.org> On Behalf Of Andreas
> Plesch
> > Sent: Monday, August 14, 2023 6:56 PM
> > To: X3D Graphics public mailing list <x3d-public at web3d.org>
> > Subject: [x3d-public] change to cycleTime perhaps no longer ignored ,
> example ?
> >
> >
> >
> >
> https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/components/time.html#TimeSensor
> >
> > (as linked from tooltips page)
> >
> >
> >
> > has the change that resetting the value of cycleTime of an active
> TimeSensor in v.4-CD1 does what is probably expected rather than being
> completely ignored which was the old behaviour.
> >
> >
> >
> > Is there an example scene somewhere which demonstrates that change, for
> testing purposes ?
> >
> >
> >
> > A bouncing sphere which changes its frequency over time, perhaps ?
> >
> >
> >
> > This proposal may have been taken out since
> >
> >
> >
> >
> https://www.web3d.org/documents/specifications/19775-1/V4.0/Part01/components/time.html#TimeSensor
> >
> >
> >
> > does not have the change ?  In that case, apologies for the confusion.
> >
> >
> >
> > -Andreas
> >
> > --
> >
> > Andreas Plesch
> >
> > Waltham, MA 02453
> >
> >
> >
> > _______________________________________________
> >
> > x3d-public mailing list
> >
> > x3d-public at web3d.org
> >
> > http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
>
>
> --
> 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/20230815/9b89bdfb/attachment.html>


More information about the x3d-public mailing list