Edit light by looking

Was reading the rhino help pages and discovered this command and was curious why it can only be used on spotlights? would be great if it could be used on rectangle lights and other direction based lights. Most other software has a “light view” so you can see through the light and make quick adjustments. Its not a huge deal I guess but figured if you have it for spotlights why not add it to all the other light types?

I was curious to see if I could maybe use the named view widget to align it to the light and group it but quickly realized the light won’t follow the widget just because its grouped, I’m sure grasshopper could get it to work but not really sure its worth it, nice to have though.

Hi Ryan - thanks, I agree. I don’t see, off hand, why this would not be available for other light types that have a direction.
RH-80434 EditLightByLooking: more light types

-Pascal

Well I’m glad I discovered this for atleast spotlights, I remember there was a discussion about this some time back regarding light view, suprised no one mentioned this command, actually couldn’t find a single discussion about it on here, so figured I’d atleast mention it because its definitely useful, and I would use it all the time instead of rotate 3d, seeing it in space is far easier for me. Has this command been out for a long time?

It first appeared in Rhino 3.0.

– Dale

wow that was over 20 years ago lol maybe it was only created for spotlights because that was the only type available back then? any ways, sorry to add to your never ending pile of user wishes, just wanted to point it out because its useful and glad someone thought to make it back then. I could imagine in my head it being part of the view panel or “set view” with a “light view” sub panel listing all lights in the scene that you could just click on and it would change the view based on the light selected.

Hi @Ryan656,

Here is a script that will set directional light to the view’s camera. Use Rhino’s RunPythonScript command to run.

SetLightToView.py (2.2 KB)

– Dale

Thanks Dale!! I’ll try it out :+1:

Works great! any easy way to get it to work with a rectangle light? the directional arrow on the rectangle rotates but it doesn’t actually rotate the rectangle itself positionally in space.

Oh probably. I’ll look tomorrow, this was pretty quick and dirty.

— Dale

That would be awesome! looking forward to trying it out :grin:

I was curious about this so here’s a hack of Dale’s script that seems to work with rectangular lights…

SetLightToView_Maybe.py (2.7 KB)

Guaranteed slightly tested.

-Pascal

1 Like

Thanks Pascal, I tried it and yes it does position it correctly, only thing I noticed is the arrow isn’t normal to the rectangle? not sure if that effects how the light works? I can just create a new rectangle light based on the coordinates of the that rectangle and see if it looks any different in v-ray

ahh maybe I can’t as it doesn’t have anything besides center to snap to

EDIT: nevermind my snaps stopped working for some reason, will try it again.

Works perfectly and render looks identical between the one positioned with the script and a newly created one in the exact position/scale minus the funky arrow direction - Thanks!!!