light : show direction helper

light : show direction helper

Postby ikam » Monday, 05.November 2012, 16:49

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.
ikam
Operator
Operator
 
Posts: 911
Joined: Friday, 14.October 2011, 13:00
Location: France

Re: light : show direction helper

Postby Skinnytorus » Monday, 05.November 2012, 20:11

Yes, yes, yes! A very handy feature. Seems to be working fine - ready to be merged. Many thanks, man!
Skinnytorus
Operator
Operator
 
Posts: 1300
Joined: Monday, 06.February 2012, 17:46

Re: light : show direction helper

Postby ikam » Tuesday, 06.November 2012, 07:34

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
ikam
Operator
Operator
 
Posts: 911
Joined: Friday, 14.October 2011, 13:00
Location: France

Re: light : show direction helper

Postby Skinnytorus » Tuesday, 06.November 2012, 08:20

I wish I had wz at hand now... I will revert this evening.
Skinnytorus
Operator
Operator
 
Posts: 1300
Joined: Monday, 06.February 2012, 17:46

Re: light : show direction helper

Postby ikam » Tuesday, 06.November 2012, 16:58

here a version with individual transform per light
You do not have the required permissions to view the files attached to this post.
ikam
Operator
Operator
 
Posts: 911
Joined: Friday, 14.October 2011, 13:00
Location: France

Re: light : show direction helper

Postby Skinnytorus » Tuesday, 06.November 2012, 17:30

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?
Skinnytorus
Operator
Operator
 
Posts: 1300
Joined: Monday, 06.February 2012, 17:46

Re: light : show direction helper

Postby ikam » Tuesday, 06.November 2012, 18:15

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
ikam
Operator
Operator
 
Posts: 911
Joined: Friday, 14.October 2011, 13:00
Location: France

Re: light : show direction helper

Postby Skinnytorus » Tuesday, 06.November 2012, 20:23

But scale.y is useful to move the lights along their vectors, isn't it?
Skinnytorus
Operator
Operator
 
Posts: 1300
Joined: Monday, 06.February 2012, 17:46

Re: light : show direction helper

Postby ikam » Wednesday, 07.November 2012, 10:20

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).
ikam
Operator
Operator
 
Posts: 911
Joined: Friday, 14.October 2011, 13:00
Location: France

Re: light : show direction helper

Postby Skinnytorus » Wednesday, 07.November 2012, 11:08

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.
Skinnytorus
Operator
Operator
 
Posts: 1300
Joined: Monday, 06.February 2012, 17:46

Re: light : show direction helper

Postby erbsen » Wednesday, 07.November 2012, 11:46

This comes in handy, thanks.
erbsen
Operator
Operator
 
Posts: 873
Joined: Thursday, 15.July 2004, 23:00
Location: Os

Re: light : show direction helper

Postby Skinnytorus » Thursday, 08.November 2012, 17:26

ikam
Have you reached the final version? I mean I don't see your pull request - is anything wrong?
Skinnytorus
Operator
Operator
 
Posts: 1300
Joined: Monday, 06.February 2012, 17:46

Re: light : show direction helper

Postby ikam » Thursday, 08.November 2012, 19:22

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 ;)
ikam
Operator
Operator
 
Posts: 911
Joined: Friday, 14.October 2011, 13:00
Location: France

Re: light : show direction helper

Postby Skinnytorus » Friday, 09.November 2012, 08:48

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.
Skinnytorus
Operator
Operator
 
Posts: 1300
Joined: Monday, 06.February 2012, 17:46


Return to Development and contribution



Who is online

Users browsing this forum: No registered users and 7 guests