Page 1 of 1
light : show direction helper

Posted:
Monday, 05.November 2012, 16:49
by ikam
Hi
here a little improvment to test, it allow to show directions of lights in handle view mode.
It should work fine with transfomenable option.
Re: light : show direction helper

Posted:
Monday, 05.November 2012, 20:11
by Skinnytorus
Yes, yes, yes! A very handy feature. Seems to be working fine - ready to be merged. Many thanks, man!
Re: light : show direction helper

Posted:
Tuesday, 06.November 2012, 07:34
by ikam
yes just to do not apply rotation on point light, and it's ok for this part.
however I'm not fully satisfied of ModLight and transformations, TransformEnable flags and its matrix transformation is applied for all lights.
instead controlling individual vector pos and direction it's not possible to apply matrix transformations (trans, rotate, scale) that is more natural for animations (at least rotations), It should be interesting to have those transformations for each light.
I thought to keep TransformEnable and a global transformation, but add for each light an individual transformation
Re: light : show direction helper

Posted:
Tuesday, 06.November 2012, 08:20
by Skinnytorus
I wish I had wz at hand now... I will revert this evening.
Re: light : show direction helper

Posted:
Tuesday, 06.November 2012, 16:58
by ikam
here a version with individual transform per light
Re: light : show direction helper

Posted:
Tuesday, 06.November 2012, 17:30
by Skinnytorus
Awesome! But I can not fully understand what Scale does to the MODLight geometrically. As I see, Scale does not affect its size, but moves the light: x- along x axis, y - along the vector of the light, and z - along z axis. Is that how it's supposed to work?
Re: light : show direction helper

Posted:
Tuesday, 06.November 2012, 18:15
by ikam
you're right scale here only move the light, there is not really a great interest and it's quite bizarre to use, but it's a part of the matrix creation process as rotate and translate so I put a gui control to interact with those transformations.
In my opinion only rotation has a real interest, translation it's redundant with light pos control...
maybe I should only keep rotations, or study another way to apply rotation transformations per light
Re: light : show direction helper

Posted:
Tuesday, 06.November 2012, 20:23
by Skinnytorus
But scale.y is useful to move the lights along their vectors, isn't it?
Re: light : show direction helper

Posted:
Wednesday, 07.November 2012, 10:20
by ikam
ok I leave it like this, it could be usefull...
I just removed for handles the tranformeglobal calculation because pos/dir are wrong when combined with indiv tranfo, and as calcul become too complex just to show handles, I prefered remove it, so now only individual transformation affect handle pos and dir (this is only true for handles, real lights positions and dir are correct and correctly affected by individual and global tranfo, that's why it's not so important).
Re: light : show direction helper

Posted:
Wednesday, 07.November 2012, 11:08
by Skinnytorus
OK, but will the global transform handle be shown with no local transforms active?
I mean it might make sense to disable the global transform handle only when any local transform is active.
Re: light : show direction helper

Posted:
Wednesday, 07.November 2012, 11:46
by erbsen
This comes in handy, thanks.
Re: light : show direction helper

Posted:
Thursday, 08.November 2012, 17:26
by Skinnytorus
ikam
Have you reached the final version? I mean I don't see your pull request - is anything wrong?
Re: light : show direction helper

Posted:
Thursday, 08.November 2012, 19:22
by ikam
I mean it might make sense to disable the global transform handle only when any local transform is active.
yes, i thought the same, but finnally it could to appear buggy if the user don't know this rule, so I prefer not at all
Have you reached the final version? I mean I don't see your pull request - is anything wrong?
nop, I will post it now

Re: light : show direction helper

Posted:
Friday, 09.November 2012, 08:48
by Skinnytorus
Yey!!! By the way, it would be nice if you could post your latest build here so that people could enjoy it before ryg authors the commits.
Thanks again.