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

Joseph D Williams joedwil at earthlink.net
Wed Jul 19 21:22:46 PDT 2023


> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230719/68654636/attachment.html>


More information about the x3d-public mailing list