<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">A brief shoutout to the value of this mail list, and the Pipermail archive!<div class=""><br class=""></div><div class="">I’m finally attempting to improve the user experience of my web app and one of the things that’s annoyed me is that in order to adjust the animation playback speedup I would simply reload the whole scene (using x3dom). This always seemed unnecessary to me as only thing being changed in the scene was the cycleInterval in the TimeSensor.</div><div class=""><br class=""></div><div class="">Reading through this old thread has been instructive, though not encouraging. I’m wondering now what is the best practice. Should I adjust the keyValues in my interpolators instead of adjusting cycleInterval in TimeSensor?<br class=""><div class=""><br class=""></div><div class="">-Mike</div><div class=""><br class=""><div class="">
<div class=""><b class=""><span style="font-size: 9pt; font-family: calibri, sans-serif;" class="">Mike McCann</span></b><br class=""><span style="font-size: 8.5pt; font-family: calibri, sans-serif;" class="">Sr Software Engineer</span><br class=""><span style="font-size: 8.5pt; font-family: calibri, sans-serif;" class="">P (831) 775-1769 F (831) 775-1620</span></div><div class=""><table cellpadding="5px" border="0" style="width: 550px; table-layout: fixed; height: 80px;" class=""><tbody class=""><tr class=""><td style="width: 80px;" class=""><img src="https://www.mbari.org/signature/MBARI-Email-Signature-logo.gif" class=""><br class=""></td><td class=""><img src="https://www.mbari.org/signature/VertBar.jpg" class=""><br class=""></td><td style="width: 500px; padding: 10px;" class=""><div style="padding-left: 9px;" class=""><span style="font-family: calibri, sans-serif; font-size: 9pt;" class=""><strong class="">Monterey Bay Aquarium Research Institute</strong></span></div><div style="padding-left: 9px;" class=""><span style="font-family: calibri, sans-serif; font-size: 9pt;" class="">7700 Sandholdt Road, Moss Landing CA 95039</span></div><div style="padding-left: 9px;" class=""><span style="font-size: 9pt;" class=""><a href="http://www.mbari.org/" target="_blank" rel="nofollow noopener noreferrer" class="">www.mbari.org</a></span><br data-mce-bogus="1" class=""></div><div style="padding-left: 9px;" class=""><span style="color: rgb(255, 0, 0); font-family: calibri, sans-serif; font-size: 9pt;" class="">Advancing marine science and engineering to understand our changing ocean.</span></div></td></tr></tbody></table></div><div class=""><br class=""></div>
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On Nov 25, 2016, at 3:01 PM, Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" class="">andreasplesch@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><p dir="ltr" class="">The purpose of modifying the cycleInterval is to slow down or speed up a linked interpolater, in most cases. There is another way to achieve the same effect which is to modify the keyValue field of an interpolater. The equivalent of doubling the cycleInterval would be to half all values in the keyValue field array.</p><p dir="ltr" class="">Should both modifications have the same effect ?</p><p dir="ltr" class="">I think it is possible to change keyValues at any time. When the interpolater is then used for the next time step, the interpolated value is then computed from the new keyValues, eg. to half of the value it was before the change, in the example above. The animation jumps back.</p><p dir="ltr" class="">To mimic this effect for changes to cycleInterval, it would be necessary that the fraction is recomputed in the time step following the change. So a doubling of the cycleInterval would lead to jump from 0.4 to 0.2 of the fractional time.</p><p dir="ltr" class="">Overall, I do think that the expectation of most would be that changes in cycleInterval do not lead to jumps, eg. that fraction does not change.</p><p dir="ltr" class="">Andreas </p>
<div class="gmail_extra"><br class=""><div class="gmail_quote">On Nov 25, 2016 3:50 PM, "Don Brutzman" <<a href="mailto:brutzman@nps.edu" class="">brutzman@nps.edu</a>> wrote:<br type="attribution" class=""><blockquote class="quote">[continuing dialog...]<br class="">
<br class="">
On 11/23/2016 10:59 AM, Leonard Daly wrote:<br class="">
<blockquote class="gmail_quote">
Don,<br class="">
<br class="">
I disagree with your concluding comment "Best place to fix this is in TimeSensor algorithm/code itself." The specification states (as you quote) "An active TimeSensor node ignores set_cycleInterval ... events". The spec needs to change for the TimeSensor to receive, process, and act of an incoming event that changes cycleInterval.<br class="">
<br class="">
Perhaps a better solution is to change the spec to allow TimeSensor to accept and process cycleInterval changes.<br class="">
</blockquote>
<br class="">
Yes that was the entire point of the specification comment: to change TimeSensor specification prose (and corresponding algorithm) to allow dynamic cycleInterval changes.<br class="">
<br class="">
So perhaps there is some basis for agreement here after all?<br class="">
<br class="">
Am looking at the specification comment description, hopefully it is clear. Roy if appropriate please improve when entering in Mantis, as you think best.<div class="quoted-text"><br class="">
<br class="">
"Issue: TimeSensor cycleInterval needs to be modifiable when running"<br class="">
<br class="">
</div><blockquote class="gmail_quote">
The question that would need to be resolved is what happens to the current cycle.<br class="">
</blockquote>
<br class="">
Yes that is the important next question if cycleInterval is dynamically modified for a running TimeSensor.<br class="">
<br class="">
<blockquote class="gmail_quote">
I can see three options<br class="">
<br class="">
1) The TimeSensor would reset (stop and start from the beginning). This works for looping sensors, but may cause problems on a single pass sensor, or one that must have a specific number of cycles before stopping.<br class="">
<br class="">
2) The TimeSensor would jump to the same fractional time. For example if the TimeSensor is .4 of the way through a cycle with cycleInterval of 10 (i.e. 4 seconds in), and the cycleInterval was changed to 20, the fractional time would still be .4, but it would take 12 seconds to complete the remaining interval. This is probably the most benign option. It does lead to sudden velocity changes in any animating object.<br class="">
<br class="">
3) The TimeSensor would jump to the same real time. For example if the TimeSensor is .4 of the way through a cycle with cycleInterval of 10 (i.e. 4 seconds in), and the cycleInterval was changed to 20, the fractional time would become .2 taking the full 20 seconds to complete this cycle. This options leads to sudden position changes in any animating object.<br class="">
<br class="">
There can be other variants where the change happens smoothly, but it may not be worth trying to standardize all possibilities.<br class="">
<br class="">
Leonard Daly<br class="">
</blockquote>
<br class="">
My thinking was that, other than accepting a set_cycleInterval event, we should try to avoid any other algorithmic changes unless shown to be absolutely necessary. Specification complexity can be confusing to authors (witness the current cycleInterval problem) and inconsistently implemented if not careful.<br class="">
<br class="">
Suggested approach is to consider typical animation examples, use those to determine if anything must be changed in spec, implement and evaluate.<br class="">
<br class="">
I suspect that your option (2) is most likely closest to a least-interference update in the algorithm.<br class="">
<br class="">
This minimalist approach seems workable if cycleInterval is dynamically reduced (or lengthened) significantly. Of interest is that subsequent set_fraction events make sense as well.<br class="">
<br class="">
Of course an author retains full control whatever is decided here... They can always stop/modify/restart a TimeSensor clock, but have to be willing to do that across multiple event loops in order to achieve deterministic response (just like the currently existing situation).<br class="">
<br class="">
Thanks for scrutiny of this relatively small X3D change which appears to have important potential improvements for HTML5/DOM and VR external interoperability.<br class="">
<br class="">
<br class="">
<blockquote class="gmail_quote"><blockquote class="gmail_quote"><div class="quoted-text">
Comment on 19775-1: Abstract X3D Definitions - V3.3<br class="">
8.4.1 TimeSensor<br class="">
<a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/time.html#TimeSensor" class="">http://www.web3d.org/documents<wbr class="">/specifications/19775-1/V3.3/<wbr class="">Part01/components/time.html#Ti<wbr class="">meSensor</a><br class="">
<br class="">
-----------------<br class="">
Issue: TimeSensor cycleInterval needs to be modifiable when running<br class="">
<br class="">
It is not feasible to modify TimeSensor cycleInterval without major<br class="">
machinations and likely failure.<br class="">
<br class="">
Spec sayeth:<br class="">
<br class="">
8.4.1 TimeSensor<br class="">
"An active TimeSensor node ignores set_cycleInterval and set_startTime<br class="">
events. An active TimeSensor node also ignores set_stopTime events for<br class="">
set_stopTime less than or equal to startTime."<br class="">
<br class="">
Email discussion illustrates difficulties with modifying cycleInterval<br class="">
without error.<br class="">
Subject: dynamic cycleInterval changes<br class="">
<a href="http://web3d.org/pipermail/x3d-public_web3d.org/2016-November/005566.html" class="">http://web3d.org/pipermail/x3d<wbr class="">-public_web3d.org/2016-Novembe<wbr class="">r/005566.html</a><br class="">
<br class="">
Issues such as event-arrival nondeterminism, usability and HTML5/DOM<br class="">
interoperability are all interrelated on this topic.<br class="">
<br class="">
Best place to fix this is in TimeSensor algorithm/code itself. Necessary<br class="">
change is to make TimeSensor cycleInterval modifiable when running in order<br class="">
to avoid two-phase commits and a host of other difficulties.<br class="">
<br class=""></div>
-----------------<br class="">
<br class="">
Submitted on Wednesday, 2016, November 23 - 8:42am<br class="">
by brutzman (brutzman )<br class="">
IP: <a href="tel:162.225.68.164" class="">162.225.68.164</a><br class="">
<br class="">
See: <a href="http://www.web3d.org/node/1694/submission/1072" class="">http://www.web3d.org/node/1694<wbr class="">/submission/1072</a><br class="">
</blockquote></blockquote><div class="elided-text">
<br class="">
all the best, Don<br class="">
-- <br class="">
Don Brutzman Naval Postgraduate School, Code USW/Br <a href="mailto:brutzman@nps.edu" class="">brutzman@nps.edu</a><br class="">
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA <a href="tel:%2B1.831.656.2149" class="">+1.831.656.2149</a><br class="">
X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" class="">http://faculty.nps.edu/brutzma<wbr class="">n</a><br class="">
</div></blockquote></div><br class=""></div>
_______________________________________________<br class="">x3d-public mailing list<br class=""><a href="mailto:x3d-public@web3d.org" class="">x3d-public@web3d.org</a><br class="">http://web3d.org/mailman/listinfo/x3d-public_web3d.org<br class=""></div></blockquote></div><br class=""></div></div></body></html>