[x3d-public] Super simple animations?

John Carlson yottzumm at gmail.com
Sun Aug 6 18:40:58 PDT 2023


Understood that I don't need script.  Understand that I suffer from carpal
tunnel and I don't want to waste a lot of time editing duplicate code.
Maybe we can do something like IMPORT/EXPORT or prototypes.

Here's what I have:

DEF JumpAndRunAnimation Group {
 children [
   DEF JumpAndRunTimer TimeSensor { cycleInterval 3.73 loop TRUE enabled
TRUE }
   USE JumpAnimation
   USE RunAnimation
 ]
}

I have also done all the startTime/stopTime stuff necessary to turn off
JumpAndRunTimer in other code.  I have also added this:

ROUTE JumpAndRun_Touch.touchTime TO StandTimer.stopTime
ROUTE JumpAndRun_Touch.touchTime TO PitchTimer.stopTime
ROUTE JumpAndRun_Touch.touchTime TO YawTimer.stopTime
ROUTE JumpAndRun_Touch.touchTime TO RollTimer.stopTime
ROUTE JumpAndRun_Touch.touchTime TO WalkTimer.stopTime
ROUTE JumpAndRun_Touch.touchTime TO KickTimer.stopTime
ROUTE JumpAndRun_Touch.touchTime TO StopTimer.stopTime
ROUTE JumpAndRun_Touch.touchTime TO RunTimer.stopTime
ROUTE JumpAndRun_Touch.touchTime TO JumpTimer.stopTime
ROUTE JumpAndRun_Touch.touchTime TO JumpAndRunTimer.startTime

I fully realize that I don't have a working solution yet.  I did try
"Enable Multiple Simultaneous Animations" in view3dscene (see image)--there
are a bunch of stopTimes for each touch sensor.  Now am working on trying
to combine interpolators without copy/paste and substitution (which I did
try, but I goofed on), which didn't work
I don't know how namespaces, etc. work

[image: image.png]

I know I am not doing event utilities, but I'm still learning this stuff,
trying not to duplicate a lot of code.  I want to understand how to combine
animations like the brain does.

Thanks for your help.  I am still ignoring event utilities for now.

John

On Sun, Aug 6, 2023 at 8:12 PM Joe D Williams <joedwil at earthlink.net> wrote:

>
>
> you don't need script. Look at the stuff and quit worrying.Learn this and
> then figure a better way.
>
>
>
>
>
> -----Original Message-----
> From: John Carlson <yottzumm at gmail.com>
> Sent: Aug 6, 2023 6:04 PM
> To: Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>, Joe D Williams <
> joedwil at earthlink.net>, Michalis Kamburelis <michalis.kambi at gmail.com>
> Cc: GPU Group <gpugroup at gmail.com>, X3D Graphics public mailing list <
> x3d-public at web3d.org>
> Subject: Re: [x3d-public] Super simple animations?
>
>
> We can’t use (Java)Script nodes on view3dscene, so that doesn’t work.
>
> I’m getting ready to start with interpolators, but  I’m thinking two lines
> of code will turn into 50 or more.
>
> So yes, expressible, but extremely painful.
>
> Did you hear my screams of agony yet?
>
> Recommended tools for exporting animations that’s open source?
>
> I’m not really a drag and drop guy, I like mathematical formulas.
>
> Is there some way to do this that uses the DRY principle?
>
> Can you suggest a good name for a prototype?
>
> John
>
> On Sun, Aug 6, 2023 at 6:27 PM Brutzman, Donald (Don) (CIV) <
> brutzman at nps.edu> wrote:
>
>>
>>
>>    1.  John, i know of no event animation chain for X3D that cannot be
>>    expressed using X3D4 ROUTE connections using interpolators, sequencers, and
>>    event utility nodes. Chasers, dampers, and Script node provides further
>>    capabilities for variation. X3D4 architecture appears to have full
>>    expressive power for animation.
>>
>> If you want to adapt things in a different way, repeatably, then great -
>> please write a prototype. The X in X3D is Extensible.
>>
>> Of course Script nodes, and programming libraries like X3DJSONLD,
>> X3DJSAIL, x3d.py and others, are both declarative and imperative
>> simultaneously when manipulating the scene graph.
>>
>>
>>    1.  Doug, we have had great success mapping Web Audio API to X3D4.  I
>>    think we have a similar path forward to X3D4.1 for MIDI.
>>
>>
>>    - W3C Web MIDI API, draft
>>    - https://webaudio.github.io/web-midi-api/
>>
>> Once again, X3D prototypes and Script node can provide a useful path
>> forward for design, implementation, and evaluation of new nodes.  Usage
>> of stable prototypes can encourage significant usage and deployment.
>>
>> Given that Web3D Consortium has a formal liaison partnership with W3C,
>> designated Web3D members can further participate in Audio Working Group to
>> share design considerations and suggest refinements in the draft W3C MIDI
>> API. Membership has value!
>>
>> v/r Don
>> ------------------------------
>> *From:* x3d-public <x3d-public-bounces at web3d.org> on behalf of GPU Group
>> <gpugroup at gmail.com>
>> *Sent:* Sunday, August 6, 2023 10:25
>> *To:* X3D Graphics public mailing list <x3d-public at web3d.org>
>>
>> *Subject:* Re: [x3d-public] Super simple animations?
>>
>> MIDI nodes are a bit like that - you can design the event sequence /
>> timing in a MIDI authoring tool, then play the .mid file and route from
>> ToneSplitter. I'm thinking about a fireworks scene combining particle
>> physics and midi event sequencing. Perhaps we need something more general,
>> as a utility node set.
>> -Doug
>>
>> On Sun, Aug 6, 2023 at 11:14 AM John Carlson <yottzumm at gmail.com> wrote:
>>
>>> Conceptually one could do this with a switch, but i don’t know about
>>> events from the switch to enable the child TimeSensor or the startTime.
>>>
>>> If you tell me to do use a Script, why not put imperative code in an
>>> encoding instead?
>>>
>>> John
>>>
>>> On Sun, Aug 6, 2023 at 11:17 AM John Carlson <yottzumm at gmail.com> wrote:
>>>
>>>> I would like something like a TimeSensorSequencerGroup that enables and
>>>> disables children TimeSensors in order of appearance in the code, if such a
>>>> thing exists.  No need to fiddle with TimeSensor fields, the SequencerGroup
>>>> does it for you.
>>>>
>>>> I know this is imperative programming, and not declarative, but
>>>> sometimes, you’ve got to bite the bullet of simplicity.
>>>>
>>>> Thanks!
>>>>
>>>> John
>>>>
>>> _______________________________________________
>>> 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/20230806/76e0e654/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 259607 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230806/76e0e654/attachment-0001.png>


More information about the x3d-public mailing list