[x3d-public] Proposal: new field "factor" in Transform node
Michalis Kamburelis
michalis.kambi at gmail.com
Fri Apr 22 19:41:02 PDT 2016
On kwi 21 2016, at 1:20 am, Yves Piguet <yves.piguet at gmail.com> wrote:
> On 21 avr. 2016, at 00:26, Michalis Kamburelis wrote:
>
> > 1\. IMHO, it would be more consistent to specify scale treatment such
> that factor=0 means identity and factor=1 means "use the original
> Transform".
>
> It's actually the case.
You're absolutely right. Sorry, I didn't look closely enough at your equation.
Looking closer, indeed
\- factor=0 means you get sign(s) * exp(0) which is 1 or -1, depending on
original scale sign.
\- factor=1 means you get back the original value.
This is cool. Still "factor=0" does not make "identity" in case of negative
original scale (it makes -1). But this seems OK, even an advantage
(interpolating between negative scale and identity seems not much useful,
better to reach -1 in case of a negative scale).
> > E.g. set "scale = lerp(factor, 1, scale)". This makes
> "scale" interaction with "factor" similar to how "factor" affects
> "translation" and "rotation" in your proposal.
>
> But then, extrapolating is less practical: you get a degenerated zero scale
when factor is -1, and e.g. 2s-1 when factor is 2, which isn't very useful.
>
> I've written the handling of scale as a special case, but actually plain
multiplication of the translation and the rotation can also be seen as a kind
of logarithmic modulation of the transform. In all cases, if factor is 2, it
has the same effect as applying the transform twice; if factor is 0.5,
applying it twice has the same effect as the original transform.
Good point, and it makes me agree with your equations 100%:) I see that the
treatment of translation/rotation/scale is actually consistent. Great!
Best regards,
Michalis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20160422/a04a523e/attachment.html>
More information about the x3d-public
mailing list