[x3d-public] Limit to # of chained sensors?
Brutzman, Donald (Don) (CIV)
brutzman at nps.edu
Wed Aug 23 20:32:27 PDT 2023
John, I’ve found that diagrams are a good way to understand what an animation is trying to accomplish.
Here are a proven technique and symbology that might be helpful.
* X3D Example Archives: X3D4WA, X3D for Web Authors, Chapter 07 Event Animation Interpolation
* https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter07EventAnimationInterpolation/index.html
* 10-step process for constructing animation chains, applied to animated HelloWorld example
* I strongly recommend you print this out (or keep it handy) and check off each step as you proceed. After a few times you will find that you are doing this without needing the checklist. Keeping a consistent pattern let's you avoid thinking that the various animation nodes are “really different” when they are not. It also helps you avoid skipping steps and making mistakes that are hard to debug afterwards.
* https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter07EventAnimationInterpolation/Chapter07-EventAnimationInterpolation.10StepAnimationDesignProcess.pdf
* Example diagram
* https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter07EventAnimationInterpolation/TimeSensorScalarInterpolatorFilterDiagram.png
* X3D Event Utility Nodes: Field Event Diagrams is a quick-reference sheet that illustrates the functionality of the event utility nodes.
* https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter09EventUtilitiesScripting/X3dEventUtilityNodeEventDiagrams.pdf
The answer to an open-ended question like
* “how many chained animations can you have in a model?”
is similar to
* “how many words can you have in a sentence? a paragraph? a page?”
The answer is “as many as you like” but they do need to make sense or it is not very useful. For X3D animations, ROUTE connections are like sentences, and each needs to match DEF names and field types to work sensibly.
There are plenty of additional slides and examples, illustrating the prose in _X3D for Web Authors_ Chapter 7. More at
* Chapter 7, Event Animation
* https://www.youtube.com/playlist?list=PLuSIsM-86simo9kv21MLgaNKw7LGg8HjL
Time to woodshed? Technique is learned step by step. Have fun with X3D animation! 8)
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
From: x3d-public <x3d-public-bounces at web3d.org> On Behalf Of John Carlson
Sent: Wednesday, August 23, 2023 12:02 PM
To: Holger Seelig <holger.seelig at yahoo.de>
Cc: Andreas Plesch <andreasplesch at gmail.com>; X3D <x3d-public at web3d.org>
Subject: Re: [x3d-public] Limit to # of chained sensors?
Script in the sense that I’m writing Node.js code to generate this. X3D is supposed to be declarative, yet resorts to Scripting??? I’m also learning Castle Script as a backup.
If I had something I could use that would log the events, so I could actually see what’s happening, instead of flashing buttons, cool! I don’t really even need a GUI, at this point If i could specify a field in TimeSensor, that would be cool. A 3D visualization of the evens would be cool too!
I’m trying with ScalarInterpolators and BooleanSequencers again, hoping to get something working. Sigh! I’ll try to get something by today.
On Wed, Aug 23, 2023 at 7:29 AM Holger Seelig <holger.seelig at yahoo.de <mailto:holger.seelig at yahoo.de> > wrote:
You probably want to use a Script node now ;)
--
Holger Seelig
Leipzig, Germany
holger.seelig at yahoo.de <mailto:holger.seelig at yahoo.de>
https://create3000.github.io/x_ite/ <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcreate3000.github.io%2Fx_ite%2F&data=05%7C01%7Cbrutzman%40nps.edu%7Cd85161780249444b9ae008dba40b834f%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638284142185052252%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Lv%2BhAYPlJQUWloHXuNpQHwrcvlngF4jWrcAZyfMBxDA%3D&reserved=0>
Am 23.08.2023 um 14:15 schrieb John Carlson <yottzumm at gmail.com <mailto:yottzumm at gmail.com> >:
Yes, I understand that. What should I use instead?
I will try stopTime, but I probably tried that.
Note that this is generated code
On Wed, Aug 23, 2023 at 3:39 AM Holger Seelig <holger.seelig at yahoo.de <mailto:holger.seelig at yahoo.de> > wrote:
I think there is logic bug in your code, if all browsers do the same. If I look below in your code, what you have posted here, I see that you use cycleTime to connect to startTime, but cycleTime will be generated an event at the beginning of each cycle, even for the first cycle.
>A cycleTime event is generated at the beginning of every cycle, including the cycle starting at startTime.
This mean in turn you will start all TimeSensors at once.
Best regards,
Holger
--
Holger Seelig
Leipzig, Germany
holger.seelig at yahoo.de <mailto:holger.seelig at yahoo.de>
https://create3000.github.io/x_ite/ <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcreate3000.github.io%2Fx_ite%2F&data=05%7C01%7Cbrutzman%40nps.edu%7Cd85161780249444b9ae008dba40b834f%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638284142185052252%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Lv%2BhAYPlJQUWloHXuNpQHwrcvlngF4jWrcAZyfMBxDA%3D&reserved=0>
Am 23.08.2023 um 04:23 schrieb John Carlson <yottzumm at gmail.com <mailto:yottzumm at gmail.com> >:
Also X3DOM does 4-5 TimeSensors in a row. I can start in the middle, and it does another set. Just 2 sets.
Weird.
On Tue, Aug 22, 2023 at 7:42 PM John Carlson <yottzumm at gmail.com <mailto:yottzumm at gmail.com> > wrote:
This appears to be of more general interest, so I am forwarding to others.
I am trying dead simple animation chaining, with one time sensor chaining into another...nothing really complex yet, though I've tried ScalarInterpolators, BooleanSequencers, event utilities, etc.
Even simpler would be setting startTime and stopTime directly in the TimeSensors. Should I do that?
Is this the right approach, or should I attempt something more difficult with event utilities that people keep talking about?
Browsers of interest: FreeWRL, view3dscene, X_ITE all do 4-5 animations, not the whole cycle. Is there a limit in the standard? That would be likely?
There are no loops yet, so only 1 TimeSensor should be running once you activate the Everything_Touch TouchSensor.
Thanks!
John
On Tue, Aug 22, 2023 at 7:00 PM John Carlson <yottzumm at gmail.com <mailto:yottzumm at gmail.com> > wrote:
Michalis, Joe,
Is there a limit to the number of chained animations in view3dscene?, say I have 11 TimeSensors with 11 animations, running one after the other? I'm only seeing 4-5 active at a time. This is important, because I have 4 characters.
I've been messing with the Animations panel, to see what's possible.
I'm guessing I should have a single TimeSensor, that sends to a ScalarInterpolator, but this is dead simple animation. It looks like only 4-5 can be active at a time. Is there a better architecture I can use?
Here's the essentials:
$ cat takes.Lily.t*
DEF Lily_Stand010Timer TimeSensor { cycleInterval 2.6999999999999997 loop FALSE enabled TRUE startTime 1 } # 2.6999999999999997 - 0
DEF Lily_Stand011Timer TimeSensor { cycleInterval 0.6000000000000001 loop FALSE enabled TRUE } # 3.3 - 2.6999999999999997
DEF Lily_Stand012Timer TimeSensor { cycleInterval 3.45 loop FALSE enabled TRUE } # 6.75 - 3.3
DEF Lily_Run013Timer TimeSensor { cycleInterval 6.300000000000001 loop FALSE enabled TRUE } # 13.05 - 6.75
DEF Lily_Turn014Timer TimeSensor { cycleInterval 3.4499999999999993 loop FALSE enabled TRUE } # 16.5 - 13.05
DEF Lily_Walk015Timer TimeSensor { cycleInterval 2.3999999999999986 loop FALSE enabled TRUE } # 18.9 - 16.5
DEF Lily_Walk016Timer TimeSensor { cycleInterval 3 loop FALSE enabled TRUE } # 21.9 - 18.9
DEF Lily_Skip017Timer TimeSensor { cycleInterval 3.6000000000000014 loop FALSE enabled TRUE } # 25.5 - 21.9
DEF Lily_Stand018Timer TimeSensor { cycleInterval 1.5 loop FALSE enabled TRUE } # 27 - 25.5
DEF Lily_Stand019Timer TimeSensor { cycleInterval 3 loop FALSE enabled TRUE } # 30 - 27
DEF Lily_Stand0110Timer TimeSensor { cycleInterval 0 loop FALSE enabled TRUE } # 0 - 30
ROUTE Everything_Touch.touchTime TO Lily_Stand010Timer.startTime
ROUTE Everything_Touch.touchTime TO Lily_Stand011Timer .stopTime
ROUTE Everything_Touch.touchTime TO Lily_Stand012Timer .stopTime
ROUTE Everything_Touch.touchTime TO Lily_Run013Timer .stopTime
ROUTE Everything_Touch.touchTime TO Lily_Turn014Timer .stopTime
ROUTE Everything_Touch.touchTime TO Lily_Walk015Timer .stopTime
ROUTE Everything_Touch.touchTime TO Lily_Walk016Timer .stopTime
ROUTE Everything_Touch.touchTime TO Lily_Skip017Timer .stopTime
ROUTE Everything_Touch.touchTime TO Lily_Stand018Timer .stopTime
ROUTE Everything_Touch.touchTime TO Lily_Stand019Timer .stopTime
ROUTE Everything_Touch.touchTime TO Lily_Stand0110Timer .stopTime
ROUTE Lily_Stand010Timer.cycleTime TO Lily_Stand011Timer.startTime
ROUTE Lily_Stand011Timer.cycleTime TO Lily_Stand012Timer.startTime
ROUTE Lily_Stand012Timer.cycleTime TO Lily_Run013Timer.startTime
ROUTE Lily_Run013Timer.cycleTime TO Lily_Turn014Timer.startTime
ROUTE Lily_Turn014Timer.cycleTime TO Lily_Walk015Timer.startTime
ROUTE Lily_Walk015Timer.cycleTime TO Lily_Walk016Timer.startTime
ROUTE Lily_Walk016Timer.cycleTime TO Lily_Skip017Timer.startTime
ROUTE Lily_Skip017Timer.cycleTime TO Lily_Stand018Timer.startTime
ROUTE Lily_Stand018Timer.cycleTime TO Lily_Stand019Timer.startTime
ROUTE Lily_Stand019Timer.cycleTime TO Lily_Stand0110Timer.startTime
ROUTE Lily_Stand0110Timer.cycleTime TO Lily_Stand010Timer.startTime
Pulling my hair out,
John
_______________________________________________
x3d-public mailing list
x3d-public at web3d.org <mailto: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/20230824/a13e0c00/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5464 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230824/a13e0c00/attachment-0001.p7s>
More information about the x3d-public
mailing list