[x3d-public] start timer at fraction 0 after scene loading

John Carlson yottzumm at gmail.com
Sat Sep 9 15:11:47 PDT 2023


This is long winded, with no actual point.  TL;DR.

Keep trying, Joe,  It would be good to try to reduce my monstrosity, I
agree.  There is likely stuff that can be trimmed, I’m just reluctant to
change what works at this point.   Once you get 3 animations chained, try
4, 5 or more.  I trust Andreas, Holger and Michalis, I just took out the
ScalarInterpolator plus doubling of values in key and keyValue because I
didn’t think we had a need for them (oops?).  For different, non-linear
timing, a ScInterp would be a requirement, as Andreas pointed out.

If something else easier worked for individual characters, I would probably
would have stumbled upon it.  I hate to see you stumbling in similarly ways.

The thing is, you actually want chained animations to cycle naturally,
loop, etc. Independent of start/stop.  That is, you don’t want to stop them
when they hit cycleTime.  No, I don’t know how to tie movements together
cohesively.  I think Holger said it requires scripting.  That’s an issue I
will face with sign language.

Best practices for event chaining for a multiple character, multiple file
solution should be documented and shared, not hidden away and not
revealed.  Is the Monterey Fish Tank Animation a good example from the X3D
archives?  That would be cool to see in the new HTML route debugger.

Sharing my code is up to you and Don, Joe.  I’ve mostly done what I can in
a single file, but I’m available if you have questions.  I can also post my
working code for people to comment on and improve upon.  That would be
great if I had permission to do that.  I’m also pursuing other avenues for
publishing what I’ve done separately (not WS stuff).  We can even probably
substitute a different skin if we want to show what we’ve all accomplished,
Re: event utilities, separate from WS.  But yeah, a monstrosity that works
(in view3dscene).  I’d like to ship a file to Holger.

So far, I haven’t found something that X3D/view3dscene cannot handle!  And
I’m not even including Script nodes, although I almost resorted to them.

John

On Sat, Sep 9, 2023 at 2:37 PM Joe D Williams <joedwil at earthlink.net> wrote:

> inline comments
> -----Original Message-----
> From: Andreas Plesch <andreasplesch at gmail.com>
> Sent: Sep 8, 2023 9:27 PM
> To: Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>
> Cc: X3D Graphics public mailing list <x3d-public at web3d.org>
> Subject: Re: [x3d-public] start timer at fraction 0 after scene loading
>
> > A variation would be for the start timer to self-disable by routing
> its cycleTime through event utilities to set its enabled field to
> false.
>
> Right, I have done that and it works, If I send a false to loop before
> fraction 1 best results. Seems like the loop false needs to be sent
> slightly before sequencer fraction 1 to get the timer to stop at last frame.
>
> What I need is to catch the second StartTimer cycleTime to send to
> MainTimer startTime.
>
> For some reason the StartTimer, when halted like that, does not have a
> useable stopTime.
> In fact, I can't find a usable stop-Time. This should work:
>
>     <TimeSensor DEF='TIME1' cycleInterval='1' loop='true'/>
>     <TimeSensor DEF='TIME2' cycleInterval='5' loop='false'/>
>     <TimeSensor DEF='TIME3' cycleInterval='10' loop='false'/>:
>    <ROUTE fromField='cycleTime' fromNode='TIME1' toField='set_stopTime'
> toNode='TIME1'/>
>    <ROUTE fromField='stopTime' fromNode='TIME1' toField='set_startTime'
> toNode='TIME2'/>
>    <ROUTE fromField='stopTime' fromNode='TIME2' toField='set_startTime'
> toNode='TIME3'/>
>
> Timer1 should start and be stopped a tic or two after its cycleTime is
> sent.
> Timer 2 gets started by Timer1 cycleTime (couldn't get Timer1 startTime or
> stopTime to be usable).
> TImer2 completes at fraction 1 and sends its stopTime to Timer3 startTime.
> Timer 3 starts, then stops at fraction 1.
> Wait, the timer2 stopTime doesn't work like expected, so Timer 3 never
> Starts.
>
> So, attached is what I have. I don't see why timer3 never gets started.
> Thanks,
> Joe
>
> >  is more verbose but may help a bit with performance since
> the browser then does not need to check stopTime against the actual
> current time at each tick, for a timer which is never used again.
>
> > It would be useful if BooleanFilter would have a triggerFalse field in
> addition to its triggerTrue, in order to switch off things. It could
> be just added without backward compatibility issues. A BooleanFilter
> can invert but it seems arbitrary and unsymmetrical to only have
> triggerTrue. I have a sense of Dejavu since event utilities had been
> discussed before.
>
> Cheers, Andreas
>
> On Fri, Sep 8, 2023 at 3:18 PM Brutzman, Donald (Don) (CIV)
> wrote:
> >
> > Very interesting, thanks for sharing Andreas. We should all be thinking
> of regularizing some example design patterns like animation.
> >
> >
> >
> > Meanwhile, your example is the kind that makes me think we should have a
> description field for ROUTE.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Potential alternative approaches for ROUTE comments:
> >
> >
> >
> > Comments? Sure, but sometimes get stripped, and not unambiguously
> readable by tools.
> > Prototype extension? Too complex and error prone, fuggedaboutit.
> > Metadata nodes? Hmm, we can't make those part of ROUTE statements
> themselves, not allowed.
> >
> >
> >
> > Maybe some clumsy-but-unambiguous convention like the following
> already-legal X3D fragment:
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Of course simplest future approach would be to give ROUTE a description
> field. Hmmm, maybe someday.
> >
> >
> >
> > Might deserve a Mantis issue for X3D4.1 if others agree some potential
> value exists for future consideation.
> >
> >
> >
> > 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 On Behalf Of Andreas Plesch
> > Sent: Thursday, September 7, 2023 1:43 PM
> > To: X3D Graphics public mailing list
> > Subject: Re: [x3d-public] start timer at fraction 0 after scene loading
> >
> >
> >
> > Here is an initial count down after loading the scene using the same
> autostart method, and a sequencer:
> >
> >
> >
> >
> https://andreasplesch.github.io/Library/Viewer/dev.html?url=https://gist.githubusercontent.com/andreasplesch/3f7ea30b9860b6399c797c51e3235459/raw/d17f9d2a0a258569ac5a474c36a68208674d535e/countdown.x3d
> >
> >
> >
> >
> https://create3000.github.io/x_ite/playground/?url=https://gist.githubusercontent.com/andreasplesch/3f7ea30b9860b6399c797c51e3235459/raw/d17f9d2a0a258569ac5a474c36a68208674d535e/countdown.x3d
> >
> >
> >
> > -Andreas
> >
> >
> >
> > On Thu, Sep 7, 2023 at 1:01 AM Andreas Plesch wrote:
> >
> > >
> >
> > > Another method apart from a ProximitySensor to start a timer without
> >
> > > user interaction after scene loading is to use two TimeSensors. The
> >
> > > first has loop=true and its only purpose is to trigger the second by
> >
> > > routing its cycleTime to the startTime of the second TimeSensor. The
> >
> > > first also stops itself by routing its cycleTime to its own stopTime.
> >
> > >
> >
> > > Here is an example modified from the cycleTime NIST example:
> >
> > >
> >
> > > https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Frent
> >
> > > ry.co%2Fx3d-startTimer&data=05%7C01%7Cbrutzman%40nps.edu
> %7C4b415083034
> >
> > > 641d371e608dbafe335ef%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638
> >
> > > 297162641403741%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2
> >
> > >
> luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=v3ah%2F2OY7
> >
> > > NVzEwTUIhRhBjG%2BNHdMZoJTbsC3lEnHR1I%3D&reserved=0
> >
> > >
> >
> > > https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fandr
> >
> > > easplesch.github.io%2FLibrary%2FViewer%2Fdev.html%3Furl%3Dhttps%3A%2F%
> >
> > > 2Fgist.githubusercontent.com%2Fandreasplesch%2F3f7ea30b9860b6399c797c5
> >
> > > 1e3235459%2Fraw%2F118d65438f9cfdc152c01fc5a24a8eccec705511%2FstartTime
> >
> > > r.x3d&data=05%7C01%7Cbrutzman%40nps.edu
> %7C4b415083034641d371e608dbafe3
> >
> > > 35ef%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638297162641403741%7
> >
> > > CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1
> >
> > >
> haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=m8xOnL%2BHHQy5gXlqLQaec6vBIi
> >
> > > %2BSchjeWtKfYWNDMHw%3D&reserved=0
> >
> > >
> >
> > > --
> >
> > > 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
>
>
>
> --
> Andreas Plesch
> Waltham, MA 02453
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
> _______________________________________________
> 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/20230909/6dddb3a7/attachment-0001.html>


More information about the x3d-public mailing list