[x3d-public] STEP interpolation, was Blender > Exporting rigtransforms to HAnim?

Joseph D Williams joedwil at earthlink.net
Fri Jul 21 16:09:53 PDT 2023


Hi Michalis,
OK, we understand that the x3d author should explicitly tell what is to be done, and not expect to get helper stuff that is not and really cannot be specified for runtime. 

My last message was back to talking about sequencers and other event utilities. 
That means I get one and only one new event at key 0 and one and only one at every key, 
either at the key or as soon as possible after. 
So, that means always one new event start of interval and only one event per interval. 

Since I am using BooleanSequencer, I am hoping everyone agrees on how it and all Event Utilities should work. 

Thanks  and Best,
Joe



From: Michalis Kamburelis
Sent: Friday, July 21, 2023 3:17 AM
To: Joseph D Williams
Cc: Andreas Plesch; X3D Graphics public mailing list
Subject: Re: [x3d-public] STEP interpolation, was Blender > Exporting rigtransforms to HAnim?

> >     Hence the logic "what to do with joints that are not touched by
> > this animation" is left to the animation player. Which can do anything
> > it wants -- and Blender, glTF viewers, Spine do "use the initial joint
> > transformation" by default.
>
> Yeah, by default. If you add this feature, please give a choice.

This "reset" feature doesn't happen automatically, X3D processing is
not affected, we 100% follow the X3D TimeSensor spec. No reset
happens if you just start some TimeSensor e.g. by ROUTEing
TouchSensor.touchTime to TimeSensor.startTime.

I believe I explained this in my original post. It only happens if one
calls TCasteScene.PlayAnimation from Pascal, which is explicitly
documented "this is good if you want to run only a single animation on
the model, and not see things lingering from previous animation".
Pascal developers have a choice, they can use e.g.
TTimeSensorNode.Start to play simultaneous animations -- I said this
all in my original mail. I gave example there myself why sometimes it
makes total sense to have multiple animations run at the same time :)
Please, if you want to know about the details, reread my original post
about it and follow links from it.

Regards,
Michalis



pt., 21 lip 2023 o 03:00 Joseph D Williams <joedwil at earthlink.net> napisał(a):
>
> Sorry, no offenses about this, but for Event Utilities, an application that emits more that one event per actual key or trigger does not fully understand our glorious set of Event Utilities and their full feature set. Multiple events per interval, for example will wreck functionality and ability to conect these things together for useful work.
>
> Event Utilities basic design directly infers when a new event should be sent.
>
> For example, the BooleenSequencer is not intended to be device that sends events at frame rate. It is designed for Once and only once per key, That means I get an new event at 0 and at every key, either at the key or as soon as possible after.
>
> Thanks,
>
> Joe
>
>
>
> From: Joseph D Williams
> Sent: Wednesday, July 19, 2023 9:23 PM
> To: Andreas Plesch
> Cc: X3D Graphics public mailing list
> Subject: Re: [x3d-public] STEP interpolation,was Blender > Exporting rig transforms to HAnim?
>
>
>
> > SFBool|SFFloat => SFBool
>
> >I have to admit that was a bit too concise for me to follow.
>
>
>
> Thlaks, just me saying that event utilities give at least two ways to make systematic bool.
>
> From key time event, or from bool.
>
> The fraction_changed is in key value range 0 to 1; so far have not used the bools. From your clear description I probably don’t need to, but will try some anyway.
>
>
>
> >An example of a PositionInterpolator where value_changed events are
>
> needed for two subsequent keys even if the value does not actually
>
> change would be good.
>
>
>
> Right, where I actually need that next value at that next key sent even if there is actually no change. OK, in this case it might not matter, since anything I want to sense translation either it moved or didn’t move. I don’t see sending duplicate data in this case as not good, as long as the user of the event is not having to ask why is data not ready. Thus, it is the node that makes this choice to send only changed or to send each result even if not changed.
>
> So, to me if it turns out be a significant time waster, which I really doubt because nothing special needs to be done either way. But whatever, we want to run a full speed. somehow something downstream must be able to complete without new data from every input to the animation for that frame. I bet the golden rule is if it didn’t change, meaning no event from that input, then use what is there because that data is not part of this cascade.
>
> So, then how about user option on the node.  Always be in the cascade, or just sometimes if I don’t get moved much. So, if significant for real interpolating interpolators then hey it should be user option on the node. Overall, for this, is it better for the node that produces the event to control sending same value for data of this type. It can remove itself from the cascade, it doesn’t matter, and so stuff goes on.
>
>
>
> Totally different for step events with new event only at keys. In this case, the example is setting a translation in some step tool ok?
>
> In this case, again it is still the node choice whether to send known-to-be-old data into the event stream, or wait rejoin when the data actually changes. I don’t think it any sort of denial to just say I’m not gonna keep sending old data, when I know it is old.
>
>
>
> Now for the event utilities. Same as other step tools. An example that actually needs the event utility output as a new event even though it hasn’t changed.Another would be failute because the node sent ‘old’ data, meaning no change since changed for the interval and sent anyway. Maybe the classic example is an indexer that operates when it gets Boolean from a sequencer. I tell it when to move by sending true. If I send 10 trues in a sequence I never need to set anything false before I can send another true, the next key is a new unique event with a new time stamp, with no regard for what happened before. I don’t need to be false for some time before I can be true again, each true has a different time stamp. In fact, until the data changes any sending of old data shouldn’t have a new time stamp.
>
>
>
> So, I look forward to playing with these Funny thing, I used that BooleanSequencer to switch those backgrounds and it probably did not make a difference either way. But, we can easily see how an author expects this stuff to run when there is more than a few things to do and how the tool can support the user.
>
>
>
> Thanks,
>
> Joe
>
>
>
> Andreas Plesch
> Sent: Wednesday, July 19, 2023 6:57 PM
> To: Joseph D Williams
> Cc: Michalis Kamburelis; X3D Graphics public mailing list
> Subject: Re: STEP interpolation, was Blender > Exporting rig transforms to HAnim?
>
>
>
> Hi Joe,
>
>
>
> On Wed, Jul 19, 2023 at 3:34 PM Joseph D Williams <joedwil at earthlink.net> wrote:
>
> > From: Andreas Plesch
>
> > Sent: Wednesday, July 19, 2023 8:40 AM
>
> > To: Joseph D Williams
>
> > Cc: Michalis Kamburelis; X3D Graphics public mailing list
>
> > Subject: Re: STEP interpolation, was Blender > Exporting rig transforms to HAnim?
>
> > On Wed, Jul 19, 2023 at 12:26 AM Joseph D Williams
>
> >
>
> > <joedwil at earthlink.net> wrote:
>
> >
>
> > > OK, I have master TimeSensor and a master BooleanSequencer that connect to various other sequencers and timer/trigger/conversion utilities to control and monitor stuffs. I need a reliable stream of time signals for ‘analog’ operations and a reliable stream of Boolean signals for my ‘digital’ controls . Just seems like if I need a true event at 0  0.2 0.4 and 0.6 and 1 then I shouldn’t  have to do any coding tricks like setting a quick false.
>
> >
>
> > >>I guess the question still would be in which situation a true event would be really needed if there was no change.
>
> >
>
> > Ok, thanks Andreas but I am relying an SFTime => SFBool event happening at some key, not that the event has happened in the past. For example the previous event may have set a state that needs the next event.
>
> >
>
> > And an added item, what happens with next and previous if no change. I do think I want a certain next or previous event, even if same as current.
>
> >
>
> > >>I can see that an IntegerSequencer could be linked to step to the next integer for a Switch node which is useful.
>
> >
>
> > Great, that is the point. Expected ‘new’ logic signals at certain keys that author defines. For this, I would say that the sequencer is not working right if it sends multiple events for the same key, which is essentially what is happening if the event is set at every fraction_changed.
>
> >
>
> > >>In x3dom, sequencers in contrast to interpolators will send a value_changed event even if the value did not actually change, as long as the fraction is in the next interval. This will accommodate the described scenario.
>
> >
>
> > I’m not clear about how many events get sent. I think I want only one event to get sent per key, even if the time is a bit late for the key that starts the current interval.
>
>
>
> We agree on how a Sequencer should function. What you describe is
>
> exactly how x3dom is sending events: one per key (really per interval
>
> between keys because the fraction may not be exactly at a key), even
>
> if unchanged relative to the previously emitted value. Next and
>
> Previous inputs always trigger output.
>
>
>
> > Is a new event sent, even same as previous at every set_fraction and next and previous? To me that seems like I am generating more events that l need. I only need a new event at certain keys and at next and previous.
>
>
>
> Agreed, only one event per key.
>
>
>
> > >>So it is possible that STEP mode for interpolators should also behave like this, eg. always generate an output event if the fraction is in a new key interval.
>
>   >
>
> > Right, I want to know that when I am at a certain key, I get an event. I am currently in the interval between the previous and next, and say I don’t need to know about that anymore, I have dealt with the logic event at the time it happened. I am waiting for the next event.
>
> >
>
> > However, I might see that if the current set_fraction is slow relative to the previous key and the previous key has not actually been sent, then maybe I want it to send a new event, so to get the state caught up with a ‘past’ key. Or else I want to know about that and fix timing somehow.
>
>
>
> Missing intervals is always possible due to lack of performance. I do
>
> not think X3D currently has a way to detect skipped intervals. The
>
> browser reports overall fps.
>
>
>
> > For some reason I am still wanting to reduce events that are not needed and only get new events when requested.
>
> >
>
>
>
> Yes, this seems more deterministic than sending events as fast as possible.
>
>
>
> > Then, for other parameter types that actually get interpolated I will probably want to always send new event at every set_fraction. For the Step type interpolators, since they may be involved in rendering or animations, then maybe optional for event every set_fraction or only at keys.
>
> >
>
> > >On the other hand this behaviour seems only useful for Boolean and Integer values for which there is no Interpolator (because they cannot be interpolated).
>
> >
>
> > Thanks for this.
>
> >
>
> > SFBool|SFFloat => SFBool
>
>
>
> I have to admit that was a bit too concise for me to follow.
>
>
>
> > I think I can depend on SFTime, and in this case SFFloat, signals and I want to link that as closely as possible to timing of logic signals. That means I want a certain logic signal at a specified time if and only if I actually ask for it. The objective is to be able to keep all the correct parameters in the correct frame.
>
>
>
> >
>
> > > But maybe there is a more dependable way to get that. Other types of parameter interpolators?
>
> >
>
> > Yes,  looks like a lot of ways to hook up those Event Utilities.
>
> >
>
> > Objective for this: 3) emit value_changed Only once at each key even if there is no change. And, sent once if set_fraction is past key in new interval and the event for this interval has not been set (a potential problem, but just to be safe?).
>
>
>
> Yes, this applies to sequencers. I suppose the question is if it also
>
> should apply STEP interpolators, and therefore also to all
>
> interpolators for consistency. It seems as if it perhaps should but
>
> that would be a slight departure from current practice.
>
>
>
> An example of a PositionInterpolator where value_changed events are
>
> needed for two subsequent keys even if the value does not actually
>
> change would be good. This is different from Michalis' example which
>
> actually needs output events for each input event.
>
>
>
> Thanks, Andreas
>
>
>
> > Joe
>
>
>
>
>
> _______________________________________________
> 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/20230721/f0ec272e/attachment.html>


More information about the x3d-public mailing list