[x3d-public] x3d-public Digest, Vol 173, Issue 32
John Carlson
yottzumm at gmail.com
Tue Aug 15 21:52:19 PDT 2023
Andreas, rereading, it seems like you are doubling up numbers to do the
run/jump thing. I’ve given up on that for now and I’m going with a common
time sensor linked to a scalar interpolator, linked to Boolean sequencers
which turn on and off animations at the times determined by the Boolean
sequencer. I’m guessing the animation transitions will be discrete an not
smooth, so I’m looking for a better solution.
Primarily in the first phase, i wanted to turn on and off animations with
startTime an stopTime. Now I want smooth animations. I think some of that
us done for run animation, jump animation, etc. but not between animations
etc.
The nice thing so far is I haven’t wasted time typing all the animations
into an X3D text file. Now I have the animations “prototyped” in JSON,
then I have JavaScript emit all the code. So far, individual animations
are working well, but now, one animation is like a fallback when you select
another. The selected animation doesn’t repeat, it goes back to the
original with the next cycle, and then cycles on that.
I can probably send you my JavaScript that generates VRML, but I probably
can’t send you the timing data right now .
On Tue, Aug 8, 2023 at 6:42 PM Andreas Plesch <andreasplesch at gmail.com>
wrote:
> Apologies in advance for the lack of formatting, the phone makes it hard.
>
> Let me give it a try but there are many approaches.
>
> If the goal is to have a run animation with a small jump at regular
> intervals, the simple solution is to combine all interpolation data into a
> single large interpolator and loop it. If that is not possible or
> considered wasteful or not elegant enough, the task becomes chaining say 9
> repeats of the run animation with one jump animation.
>
> Given a design with a single TimeSensor, actually a solution without event
> utilities may be preferable. I am thinking of an intermediate
> ScalarInterpolator which chops up the timer fraction_changed into multiple
> repeating fractions:
>
> ScInter DEF 'repeater' key '0 0.1 0.1 0.2 0.2 0.3 .. 0.9 1' keyValue '0
> 0.5 0 0.5 0 0.5 .. 0.5 1'
>
> The run and jump data would still be combined into a single Interpolator
> which receives the value_changed and where the first half contains run data
> for a single sequence and the second half jump data.
>
> If it is not possible to have a single combined Interpolator, it is
> necessary to have dedicated TimeSensors for each animation and perhaps use
> event utilities.
>
> Counted repeats of run could then be done in the same way with a repeater.
> When the run time sensor ends, the stop time gets routed to the start time
> of the jump timer. When jump timer ends, the stop time gets routed to the
> start time of the run timer. I think this is all what is needed, no event
> utilities or scripts but testing will be necessary.
>
> Cheers Andreas
>
>
>
>
>
> ---on the phone---
>
> On Tue, Aug 8, 2023, 3:00 PM <x3d-public-request at web3d.org> wrote:
>
>> Send x3d-public mailing list submissions to
>> x3d-public at web3d.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>> or, via email, send a message with subject or body 'help' to
>> x3d-public-request at web3d.org
>>
>> You can reach the person managing the list at
>> x3d-public-owner at web3d.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of x3d-public digest..."
>>
>>
>> Today's Topics:
>>
>> 1. Please comment on my ideas (John Carlson)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Tue, 8 Aug 2023 11:57:26 -0500
>> From: John Carlson <yottzumm at gmail.com>
>> To: Joe D Williams <joedwil at earthlink.net>, X3D Graphics public
>> mailing list <x3d-public at web3d.org>
>> Subject: [x3d-public] Please comment on my ideas
>> Message-ID:
>> <
>> CAGC3UEmMvo3VnJNSEQLVJDJNDBFv3Tboh7TRD_MSijbP7x23NA at mail.gmail.com>
>> Content-Type: text/plain; charset="utf-8"
>>
>> I am reposting this because i didn?t get any comments. Does this look
>> like
>> a good approach? Am I over blowing the steps required?
>>
>> On Mon, Aug 7, 2023 at 1:59 PM John Carlson <yottzumm at gmail.com> wrote:
>>
>> > Sample code:
>> >
>> > Every 10 seconds, the character kind of jumps, otherwise, Leif is
>> running.
>> >
>> > DEF myRunBooleanSequencer BooleanSequencer {
>> > key [ 0 0.9 1.1 2.23 4.3 5.5 6.3 7.3 8.5 8.6 10 ] #
>> > Leif_humanoid_root_TranslationInterpolator x 10
>> > keyValue [ TRUE FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE
>> FALSE
>> > TRUE ]
>> > }
>> > DEF myJumpBooleanSequencer BooleanSequencer {
>> > key [ 0 0.9 1.1 2.23 4.3 5.5 6.3 7.3 8.5 8.6 10 ] #
>> > Leif_humanoid_root_TranslationInterpolator x 10
>> > keyValue [ FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE FALSE
>> TRUE
>> > FALSE ]
>> > }
>> >
>> > DEF myJumpTimeTrigger TimeTrigger {
>> > }
>> >
>> > DEF myRunTimeTrigger TimeTrigger {
>> > }
>> >
>> > DEF myJumpBooleanFilter BooleanFilter {
>> > }
>> >
>> > DEF myRunBooleanFilter BooleanFilter {
>> > }
>> >
>> > DEF myJumpBooleanTrigger BooleanTrigger {
>> > }
>> >
>> > DEF myRunBooleanTrigger BooleanTrigger {
>> > }
>> >
>> > ROUTE EverythingTimer.fraction_changed TO
>> > myRunBooleanSequencer.set_fraction
>> > ROUTE EverythingTimer.fraction_changed TO
>> > myJumpBooleanSequencer.set_fraction
>> >
>> > ROUTE myRunBooleanSequencer.value_changed TO
>> myJumpTimeTrigger.set_boolean
>> > ROUTE myJumpBooleanSequencer.value_changed TO
>> myRunTimeTrigger.set_boolean
>> >
>> > ROUTE myRunBooleanSequencer.value_changed TO
>> > myJumpBooleanFilter.set_boolean
>> > ROUTE myJumpBooleanSequencer.value_changed TO
>> > myRunBooleanFilter.set_boolean
>> >
>> > ROUTE myRunBooleanFilter.inputNegate TO RunTimer.enabled
>> > ROUTE myJumpBooleanFilter.inputNegate TO JumpTimer.enabled
>> >
>> > ROUTE myRunTimeTrigger.triggerTime TO RunTimer.startTime
>> > ROUTE myJumpTimeTrigger.triggerTime TO JumpTimer.startTime
>> >
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <
>> http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230808/2d63fd3a/attachment-0001.html
>> >
>>
>> ------------------------------
>>
>> Subject: Digest Footer
>>
>> _______________________________________________
>> x3d-public mailing list
>> x3d-public at web3d.org
>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>
>>
>> ------------------------------
>>
>> End of x3d-public Digest, Vol 173, Issue 32
>> *******************************************
>>
> _______________________________________________
> 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/700ee957/attachment-0001.html>
More information about the x3d-public
mailing list